Image Recognition and Python Part 3

sentdex · Beginner ·👁️ Computer Vision ·12y ago
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 Matplotlib Python Tutorial Part 1: Basics and your first Graph!
Matplotlib Python Tutorial Part 1: Basics and your first Graph!
sentdex
2 Python Encryption Tutorial with PyCrypto
Python Encryption Tutorial with PyCrypto
sentdex
3 Python's Logging Function
Python's Logging Function
sentdex
4 wxPython Tutorials 1: Making Windows GUIs with Python : Installing + 1st window!
wxPython Tutorials 1: Making Windows GUIs with Python : Installing + 1st window!
sentdex
5 wxPython Tutorials 2: Making Windows GUIs with Python: Customizing Window Parameters
wxPython Tutorials 2: Making Windows GUIs with Python: Customizing Window Parameters
sentdex
6 wxPython Programming Tutorial 3: Menu Bar and Menu Button
wxPython Programming Tutorial 3: Menu Bar and Menu Button
sentdex
7 wxPython Programming Tutorial 4: Panels
wxPython Programming Tutorial 4: Panels
sentdex
8 wxPython Programming Tutorial 5: User Input Saved To Variables
wxPython Programming Tutorial 5: User Input Saved To Variables
sentdex
9 wxPython Programming Tutorial 6: Multiple Choice Input
wxPython Programming Tutorial 6: Multiple Choice Input
sentdex
10 wxPython Programming Tutorial 7: Adding Static Text and Colors
wxPython Programming Tutorial 7: Adding Static Text and Colors
sentdex
11 wxPython Programming Tutorial 8: Custom Button Images
wxPython Programming Tutorial 8: Custom Button Images
sentdex
12 wxPython Programming Tutorial 9: Tool Bar Items and Sub Menus!
wxPython Programming Tutorial 9: Tool Bar Items and Sub Menus!
sentdex
13 Basic PHP Tutorial 13: Multi-dimensional Array
Basic PHP Tutorial 13: Multi-dimensional Array
sentdex
14 Basic PHP Tutorial 15: Functions and Global Variables
Basic PHP Tutorial 15: Functions and Global Variables
sentdex
15 Basic PHP Tutorial 12: Associative Array
Basic PHP Tutorial 12: Associative Array
sentdex
16 Basic PHP Tutorial 14: Foreach loop
Basic PHP Tutorial 14: Foreach loop
sentdex
17 Basic PHP Tutorial 16: Include and Require
Basic PHP Tutorial 16: Include and Require
sentdex
18 Basic PHP Tutorial 7: Assignment, comparison and Logical operators
Basic PHP Tutorial 7: Assignment, comparison and Logical operators
sentdex
19 Basic PHP Tutorial 4: Variables and Comments
Basic PHP Tutorial 4: Variables and Comments
sentdex
20 Basic PHP Tutorial 11: Arrays part 1, basic array
Basic PHP Tutorial 11: Arrays part 1, basic array
sentdex
21 Basic PHP Tutorial 6: If else and else if conditionals cont'd
Basic PHP Tutorial 6: If else and else if conditionals cont'd
sentdex
22 Basic PHP Tutorial 1: Intro to PHP
Basic PHP Tutorial 1: Intro to PHP
sentdex
23 Basic PHP Tutorial 3: HTML with PHP
Basic PHP Tutorial 3: HTML with PHP
sentdex
24 Basic PHP Tutorial 9: While Loop
Basic PHP Tutorial 9: While Loop
sentdex
25 Basic PHP Tutorial 10: Switch Statement
Basic PHP Tutorial 10: Switch Statement
sentdex
26 Basic PHP Tutorial 2: Print and Echo
Basic PHP Tutorial 2: Print and Echo
sentdex
27 Basic PHP Tutorial 5: If else and else if conditional statements
Basic PHP Tutorial 5: If else and else if conditional statements
sentdex
28 Basic PHP Tutorial 8: Arithmatic Operators: Doing math with php
Basic PHP Tutorial 8: Arithmatic Operators: Doing math with php
sentdex
29 Basic PHP Tutorial 17: User Input Form Example / String Manipulation
Basic PHP Tutorial 17: User Input Form Example / String Manipulation
sentdex
30 Basic PHP Tutorial 18: HTML Entities and forms cont'd
Basic PHP Tutorial 18: HTML Entities and forms cont'd
sentdex
31 Basic PHP Tutorial 19: Finding words in strings
Basic PHP Tutorial 19: Finding words in strings
sentdex
32 Basic PHP Programming Tutorial 20: Saving to a File / writing and appending
Basic PHP Programming Tutorial 20: Saving to a File / writing and appending
sentdex
33 Basic PHP Programming Tutorial 22: Hashing part 2: salting
Basic PHP Programming Tutorial 22: Hashing part 2: salting
sentdex
34 Basic PHP Programming Tutorial 23: Variables in Strings and tokenizing
Basic PHP Programming Tutorial 23: Variables in Strings and tokenizing
sentdex
35 Basic PHP Programming Tutorial 21: MD5 Hashing For Security
Basic PHP Programming Tutorial 21: MD5 Hashing For Security
sentdex
36 Basic PHP Programming Tutorial 24: String similarity
Basic PHP Programming Tutorial 24: String similarity
sentdex
37 Basic PHP Programming Tutorial 25: Time and Time stamps
Basic PHP Programming Tutorial 25: Time and Time stamps
sentdex
38 Basic PHP Programming Tutorial 26: Die and Exit
Basic PHP Programming Tutorial 26: Die and Exit
sentdex
39 Basic PHP Programming Tutorial 27: MySQL Databases Part 1
Basic PHP Programming Tutorial 27: MySQL Databases Part 1
sentdex
40 Basic PHP Programming Tutorial 28: MySQL Database Part 2: Reading From Database
Basic PHP Programming Tutorial 28: MySQL Database Part 2: Reading From Database
sentdex
41 Basic PHP Programming Tutorial 29: MySQL Database Part 3: Inputting Data
Basic PHP Programming Tutorial 29: MySQL Database Part 3: Inputting Data
sentdex
42 Basic PHP Programming Tutorial 30: MySQL database in Use
Basic PHP Programming Tutorial 30: MySQL database in Use
sentdex
43 Django Tutorial Web Development with Python Part 1: Installing Django
Django Tutorial Web Development with Python Part 1: Installing Django
sentdex
44 Python Tutorial: File Deletion and Folder Deletion / directory deletion
Python Tutorial: File Deletion and Folder Deletion / directory deletion
sentdex
45 Python Tutorial: How to Rename Files and Move Files with Python
Python Tutorial: How to Rename Files and Move Files with Python
sentdex
46 3D Graphs in Matplotlib for Python: Basic 3D Line
3D Graphs in Matplotlib for Python: Basic 3D Line
sentdex
47 3D Plotting in Matplotlib for Python: 3D Scatter Plot
3D Plotting in Matplotlib for Python: 3D Scatter Plot
sentdex
48 3D Charts in Matplotlib for Python: Multiple datasets scatter plot
3D Charts in Matplotlib for Python: Multiple datasets scatter plot
sentdex
49 Sikuli Tutorial 1: Visually programming in python!
Sikuli Tutorial 1: Visually programming in python!
sentdex
50 Sikuli Tutorial 2: Program visually in python!
Sikuli Tutorial 2: Program visually in python!
sentdex
51 Sikuli Tutorial 3: Program visually in python!
Sikuli Tutorial 3: Program visually in python!
sentdex
52 3D Bar Charts in Python and Matplotlib
3D Bar Charts in Python and Matplotlib
sentdex
53 3D Plane wire frame Graph Chart in Python
3D Plane wire frame Graph Chart in Python
sentdex
54 Raspberry Pi Part 1 Introduction
Raspberry Pi Part 1 Introduction
sentdex
55 Raspberry Pi Part 8: First Download and Update! (Firmware)
Raspberry Pi Part 8: First Download and Update! (Firmware)
sentdex
56 Raspberry Pi Part 10: How to set up a Linux Web Server on your Pi
Raspberry Pi Part 10: How to set up a Linux Web Server on your Pi
sentdex
57 Raspberry Pi Part 11: Remote Desktop
Raspberry Pi Part 11: Remote Desktop
sentdex
58 Twitter Analysis: How to rank a user's influence
Twitter Analysis: How to rank a user's influence
sentdex
59 GPIO Tutorial for Pi Part 2 - Programming the GPIO
GPIO Tutorial for Pi Part 2 - Programming the GPIO
sentdex
60 GPIO Tutorial for Raspberry Pi Part 1 - Setting up
GPIO Tutorial for Raspberry Pi Part 1 - Setting up
sentdex

Related AI Lessons

Cloud-Optimized OpenCV + A Special Surprise Announcement on OpenCV Live
Learn about Cloud-Optimized OpenCV for faster computer vision computations and a special announcement on OpenCV Live
OpenCV Blog
When the Camera Becomes an Exam Proctor: Building an AI-Powered Exam Monitoring System with…
Learn how to build an AI-powered exam monitoring system using Computer Vision and DeepFace to assist professional certification exams
Medium · Python
When the Camera Becomes an Exam Proctor: Building an AI-Powered Exam Monitoring System with…
Build an AI-powered exam monitoring system using Computer Vision and Deep Learning to enhance professional certification exams
Medium · Deep Learning
When the Camera Becomes an Exam Proctor: Building an AI-Powered Exam Monitoring System with…
Build an AI-powered exam monitoring system using Computer Vision and Deep Learning to enhance exam security and integrity
Medium · Cybersecurity
Up next
Marketing management for ugc net| Important topics of marketing management ugc net commerce dec 2023
Bhoomi Learning Centre~Dr. Muskan
Watch →