Image Recognition and Python Part 3
Skills:
CV Basics90%
Key Takeaways
Covers the basics of image recognition using Python
Full Transcript
hello everybody and welcome back to the third video in the image recognition and manipulation tutorial Series where we left off we were looking at that array and in this video we're going to take a bit more closer look at it again and explain a few more things in the array and then we'll go ahead and get started with actual uh manipulation and stuff so here's the array again and um just to say it again the whole thing is the image broken down is the rows right these are the rows and then you've got each pixel in that row and it's you know horizontal right pixel pixel and each number within here corresponds to red green blue and then this is your Alpha and again Alpha is like fade basically or um how solid is that that picture so if so or color rather so if you have um a very low Alpha it's very see-through right transparent that's the word I'm looking for transparent so anyway that's what Alpha is now the next thing that we might want to consider is y 255 what the heck is that talking about well in programming everything is is counted not starting at one but it starts at zero so actually these are all 256 so this just means the image was saved as a 256 color bit map not to be confused with like a 256bit image right so so like if you think about um a 16 color bit map that means it it only allows like 0 to 15 so 16 total colors which is actually quite a few colors um so that if a 16 color bit map will give you as many as 4,096 colors 256 colors uh will give you obviously a much larger right cuz it's basically your options are 16 * 16 * 16 right so that makes 496 with 2 56 colors it's 256 * 256 * 256 which gives you basically 16.8 million colors that you can choose from so obviously there's a lot more depth to your colors but I'll be also honest with you if you look like a like a non zoomed in uh picture and one uses uh the 16 by 16 x 16 right so 16 color bit map versus the 256 color bitmap even though there's right a massive difference in colors it's kind of hard to tell the difference anyways but um that's neither here nor there but I'm just explaining what these numbers are so moving right along next question that a lot of people are going to have is why is this RGB and not rwb or WB you know why is it not rwb that's a good question why is it not red white and blue anyway why is it RGB and not r y be having a really hard time putting that out right so why is it you know aren't we taught like an art class right three primary colors that make all the other colors red yellow blue right so why are we write red RGB is red green blue so why are we doing that well little bit of history for you guys and I bet some of you guys probably know but it boils down to the difference between additive colors versus subtractive colors now what we're dealing with is additive colors so as you add more of that color it actually like makes it brighter so to speak whereas if you uh consider like back in art right in paint class if you had a green right say you were painting some green and you paint a stripe of green and then you paint another stripe of green over that previous stripe it makes it a darker green not a lighter green and but if you took like a flashlight and you put over like a green let's say Saran wrap that was green and you turned on that flashlight and then you got another flashlight and did the same thing it would make that green brighter right it wouldn't make it darker by adding more so it's the the addition of light behind it so that's why like um well first of all like white has all the colors in it right so pure white we know this is white because it's 255 255 so it's all of red all of green and are all of um blue right so we know this this is actually white and it's a solid white not that even Alpha of white wouldn't really make a difference but anyway um unless it was laid over something I suppose um so and that's why like sunlight for example is mostly white because it has all of the colors in it and that's why it is um it's an additive right and conversely uh where where we've got 0 0 0 this means there's nothing nothing and nothing there is nothing there and it's got an A full Alpha so it's a solid you guessed it black so so that is additive uh versus subtractive colors and then the reason why we're using this in computers now you could do it either way really computers cuz it's just straight up just generating this stuff but it just kind of makes sense to make it additive instead of subtractive color schemes because um you're everything you do on the computer you're viewing it through a monitor and the monitor is basically a light that is shining this stuff to you so so that's kind of why we're using RGB so the more you know so uh the next thing that I would like to do is uh this was just dot right so we see 0000 255 and then we've got all these other 255 so if we closed out of this and I think I stuck it in that file let's uh let me pull that up real quick the images yeah I sure did so in the images file we had Dot and then there's also Dot and Dot so if you go edit that you should get this and then if you zoom in you'll see there's one black dot and then there's this one Green Dot and let me just grab the pencil and come over here to the green I use this green so if we edited that color we can actually see down here the the red green and blue value of this uh Green Dot so it's 34 17776 so if we uh close out of this and just remember it's Dot and Dot and we change this to not dot.png but Dot and dot.png run it and come over here scroll back to the top here we still have that black dot right and then sure enough we've got 34 177 76 and then a full Alpha so obviously solid green so I realized too some of you guys that might sound might have been like painfully slow and you already knew everything I just told you but um if if you're uncomfortable with the idea of transferring an image to an array right and it's an array of red green blue and Alpha at first that's very confusing and you've got to kind of situate yourself to look at this and see it right so unless you're from The Matrix you probably don't like look at this array and be like oh okay I see that it's a black dot and a Green Dot right but now now I'm slowly converting you guys and pretty soon you'll be able to look at an array and just be able to see the image you know so you don't even need images anymore you just need the arrays and you can just like look at it and be like that is beautiful that's a good idea I bet you could do like computer artwork or something right and just make it the array and then uh put like the array up on the wall and make people look at it like that's just beautiful anyway I bet there's someone that really can't like look at the array and know what the picture is but not me anyway um so that's going to conclude this video as always thanks for watching thanks for your support your subscriptions and until next time
Original Description
This is the third video to my image recognition basics series. Image recognition can be used for all sorts of things like facial recognition, identifying what is in pictures, character recognition, and more.
Sentdex.com
Facebook.com/sentdex
Twitter.com/sentdex
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from sentdex · sentdex · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Matplotlib Python Tutorial Part 1: Basics and your first Graph!
sentdex
Python Encryption Tutorial with PyCrypto
sentdex
Python's Logging Function
sentdex
wxPython Tutorials 1: Making Windows GUIs with Python : Installing + 1st window!
sentdex
wxPython Tutorials 2: Making Windows GUIs with Python: Customizing Window Parameters
sentdex
wxPython Programming Tutorial 3: Menu Bar and Menu Button
sentdex
wxPython Programming Tutorial 4: Panels
sentdex
wxPython Programming Tutorial 5: User Input Saved To Variables
sentdex
wxPython Programming Tutorial 6: Multiple Choice Input
sentdex
wxPython Programming Tutorial 7: Adding Static Text and Colors
sentdex
wxPython Programming Tutorial 8: Custom Button Images
sentdex
wxPython Programming Tutorial 9: Tool Bar Items and Sub Menus!
sentdex
Basic PHP Tutorial 13: Multi-dimensional Array
sentdex
Basic PHP Tutorial 15: Functions and Global Variables
sentdex
Basic PHP Tutorial 12: Associative Array
sentdex
Basic PHP Tutorial 14: Foreach loop
sentdex
Basic PHP Tutorial 16: Include and Require
sentdex
Basic PHP Tutorial 7: Assignment, comparison and Logical operators
sentdex
Basic PHP Tutorial 4: Variables and Comments
sentdex
Basic PHP Tutorial 11: Arrays part 1, basic array
sentdex
Basic PHP Tutorial 6: If else and else if conditionals cont'd
sentdex
Basic PHP Tutorial 1: Intro to PHP
sentdex
Basic PHP Tutorial 3: HTML with PHP
sentdex
Basic PHP Tutorial 9: While Loop
sentdex
Basic PHP Tutorial 10: Switch Statement
sentdex
Basic PHP Tutorial 2: Print and Echo
sentdex
Basic PHP Tutorial 5: If else and else if conditional statements
sentdex
Basic PHP Tutorial 8: Arithmatic Operators: Doing math with php
sentdex
Basic PHP Tutorial 17: User Input Form Example / String Manipulation
sentdex
Basic PHP Tutorial 18: HTML Entities and forms cont'd
sentdex
Basic PHP Tutorial 19: Finding words in strings
sentdex
Basic PHP Programming Tutorial 20: Saving to a File / writing and appending
sentdex
Basic PHP Programming Tutorial 22: Hashing part 2: salting
sentdex
Basic PHP Programming Tutorial 23: Variables in Strings and tokenizing
sentdex
Basic PHP Programming Tutorial 21: MD5 Hashing For Security
sentdex
Basic PHP Programming Tutorial 24: String similarity
sentdex
Basic PHP Programming Tutorial 25: Time and Time stamps
sentdex
Basic PHP Programming Tutorial 26: Die and Exit
sentdex
Basic PHP Programming Tutorial 27: MySQL Databases Part 1
sentdex
Basic PHP Programming Tutorial 28: MySQL Database Part 2: Reading From Database
sentdex
Basic PHP Programming Tutorial 29: MySQL Database Part 3: Inputting Data
sentdex
Basic PHP Programming Tutorial 30: MySQL database in Use
sentdex
Django Tutorial Web Development with Python Part 1: Installing Django
sentdex
Python Tutorial: File Deletion and Folder Deletion / directory deletion
sentdex
Python Tutorial: How to Rename Files and Move Files with Python
sentdex
3D Graphs in Matplotlib for Python: Basic 3D Line
sentdex
3D Plotting in Matplotlib for Python: 3D Scatter Plot
sentdex
3D Charts in Matplotlib for Python: Multiple datasets scatter plot
sentdex
Sikuli Tutorial 1: Visually programming in python!
sentdex
Sikuli Tutorial 2: Program visually in python!
sentdex
Sikuli Tutorial 3: Program visually in python!
sentdex
3D Bar Charts in Python and Matplotlib
sentdex
3D Plane wire frame Graph Chart in Python
sentdex
Raspberry Pi Part 1 Introduction
sentdex
Raspberry Pi Part 8: First Download and Update! (Firmware)
sentdex
Raspberry Pi Part 10: How to set up a Linux Web Server on your Pi
sentdex
Raspberry Pi Part 11: Remote Desktop
sentdex
Twitter Analysis: How to rank a user's influence
sentdex
GPIO Tutorial for Pi Part 2 - Programming the GPIO
sentdex
GPIO Tutorial for Raspberry Pi Part 1 - Setting up
sentdex
More on: CV Basics
View skill →Related AI Lessons
⚡
⚡
⚡
⚡
Cloud-Optimized OpenCV + A Special Surprise Announcement on OpenCV Live
OpenCV Blog
When the Camera Becomes an Exam Proctor: Building an AI-Powered Exam Monitoring System with…
Medium · Python
When the Camera Becomes an Exam Proctor: Building an AI-Powered Exam Monitoring System with…
Medium · Deep Learning
When the Camera Becomes an Exam Proctor: Building an AI-Powered Exam Monitoring System with…
Medium · Cybersecurity
🎓
Tutor Explanation
DeepCamp AI