How a Pixel Gets its Color | Bayer Sensor | Digital Image
Вставка
- Опубліковано 8 лют 2025
- This video explains how pixels are assigned RGB values using a bayer filter system. It is one of the many bonus lessons on my new DVD, Photoshop Crash Course which will teach you how to think in Photoshop terms. This particular video was made to help explain how pixels are assigned colors and why this is important when working in Photoshop. I hope that you will enjoy it. Please be sure to visit my blog for free tips and photography information. If you are a beginner getting into photography, I know it will help. Best Wishes!
www.michaelthem...
Still very helpful even 13 years later. Thanks!
Very pedagogical and well explained. I can add to this that noise in a digital image or photograph (inconsistent color values in neighboring pixels), occurs when and because the bayer array has not received sufficient light to make a correct and consistent calculation, think of it in terms of statistics, the larger the data set (in this case, photons or light hitting the sensel) the more statistically correct and consistent your output will be.
This is just the video I needed that explained how the RBG info is collected and makes up the colour in a pixel. I am an elementary teacher and looking to explain the coding behind colours in pixels as part of my STEM investigations. Brilliant. taa. I am now going home to play with torches, coloured cellophane and glasses of water to see if I can show different colours.
Our teacher explained this to us in 40 minutes, you did in 6 minutes. You sir are a win and deserve a pixel mushroom that Weebl uses
watching this video 12 years later and it never gets old!
The video and wiki are both correct. A 5 Mega pixel Camera has 5 million pixels, however, the final color of each pixel is interpolated by its neighboring pixels, otherwise it could only be pure red, pure blue or pure green. Each sensel does indeed represent a single pixel, but to determine its color, it needs help, 9 sensels are used in the calculation of a single, central (meaning the one in the middle) pixel.
Thanks for referencing this video on your recent video. This is a golden video. Learnt so much!
In the CMYK, which is typically used for printing yes. Digital imaging tends to use RGB.
Although I'm familiar with much of the subject material on your UA-cam site, there were more than a couple "Oh wow, I didn't know that"'s. LOVE your teaching approach and styles, very impressive!
Thank you Michael... a dvd or two are on my get-list!
Amigo, no sabes el bien que le haces a la humanidad con este video, muy bien hecho, gracias y felicidades.
Yes that is right. The words are carefully chosen. Its not 9 sensels represent a pixel, its nine sensels are involved in the calculation of a single, central target sensel and contribute their data to determining the final color. This is simplified with 3 sensels (the glasses) instead of 9.
Great video!
One thing which might be obvious but it's not emphasized is that the actual "megapixels" resolution of a digital camera sensor refers to the luminance, the colour resolution is less than 1/3 of that (reds are even less than that) due to the bayer matrix interpolation.
Only the Foveon image sensor can capture 1 colour information per pixel.
And some Sony CCDs have a 4 colour bayer filter (with an additional aqua sensel, instead of two green sensels).
anyway, thanks for sharing!
hi, I told filmmaker IQ that he knows a lot but he is not instructive. He teaches himself. He got offended.
Your way of explanation is instructive. I wish you explain these subjects with more science detail, particularly with black and white.
It IS more accurate to describe a bayer sensor as 2 green to 1 red to 1 blue, as if you select any 4 sensels this is what you should have. The interpolation for each pixel however is a different matter, depending on what the base color of that main sensel is.
Awesome explanation on what's actually happening in the camera! Thanks.
Very good and usefull explanation. I use Digi Camera and Photoshop and knew nothing about light has converted in colours by a sensor! Thank you!
That is *very* interesting. I can see now that by adjusting the values of R and G and B in an editing program such as PhotoShop, that critical colors will be accurate and I don't have to rely on eyeballing my monitor. I can correlate them with an external aid such as a color wheel or chart that gives the respective values for the color I want.
Great presentation of your material. Thank you.
Why weren't you my professor? Best explanation ever!
This video is brilliant. It makes this complex subject so easy to to understand. Fantastic full marks from mew
Ok, maybe this will help:
Sensels are in the sensor, pixels are in the image.
Pixels dont really have a defined size until you print the image. A single pixel can be teeny tiny or a mile wide depending on how it is printed. Sensels create pixels on a 1 to 1 ratio. Yes, the color of 1 pixel is determined by surrounding sensels.
@robertwc82 Yes, Y is a primary color in the CMYK color model -(Cyan, Magenta, Yellow and Key, which is Black) It is used primarily for printing. Very easy to see where the confusion comes in. The recording of light on a digital sensor in most cases is using RGB as described on the video.
Or “additive” vs “subtractive” colors, the radiation of a certain wavelength of light or the absorption of all the other wavelengths of visible light.
Ow ok, now I understand.
I had some problems with the difference between sensels and pixels, but now I get it! :)
Thank you very much!
you, sir, are just brilliant! wish my teachers are even half as effective as you are.
subscribed!
deamn, mate! This video is SO on point! Thank you!
well explained and very informative!! thanks for sharing
All your videos are awesome man! :D Really helps me
GREAT explanation!!!
I like your demonstration. It's very helpful!
Now that's one hell of a MIND JOB, right there!!! Thank you!!!
Excellent! I wouldn't change a thing! Your demeanor was awesome as well!
Thank you so much. I would like to see another video with more details. Particularly the difference between the color sensels and the grey one. When the pixels get the color? And when they are black and white? more details, please!
thank you very much for this great presentation !
Well done and simplified for dummies like me.
Could you explain pros and cons between Bayer and Foveon sensors? I learn a lot of your Bayer explanation, great, thanks ...
Found this very useful and explained well👍
Amazing way of explaining 👍👍👍
Thank you, very much Michael! You explained it as though I were a 6-year-old-boy...and that´s the best way I learn! :)
I appreciate it...Greetings from Nicaragua!
I guess im asking the wrong place but does anyone know a trick to log back into an instagram account..?
I was dumb forgot my account password. I love any help you can offer me!
@Connor Saul instablaster :)
@Tony Evan i really appreciate your reply. I got to the site on google and im in the hacking process atm.
I see it takes quite some time so I will get back to you later when my account password hopefully is recovered.
@Tony Evan It did the trick and I actually got access to my account again. I'm so happy:D
Thanks so much, you saved my account !
@Connor Saul Glad I could help xD
Thank you. Great straight forward explanation.
Best video seen about RGB
Thank you- This calculation happens for each and every pixel. Pretty incredible!
can you talk more about those filters please!
nice demonstration and explanation
Very informational video.
another great video ... thanks michael
It all makes sense now haha
Really good video man, thank you ✌🏻
I'm sensing you're onto something there man!
very lucid teaching thank you !!
perfect explaination. thank you very much!
great presentation
Found this very useful
It was very helpful and informative. Thanks!!
It is amazing video. You solve one of my biggest doubt.
@pepenacho65 The reason green is used more and in fact the reason those three colors are chosen actually relates more to the structure of a human eye. They have cone cells that are like the "sensels" our eyes and well they react best to those colors. So we are just following what is already part of our anatomy.
The cells that respond to green light are the most sensitive so electronic displays tend to use more components for green colors.
You are great teacher.....what a video !!!!! love it
Very good explain.
Very, very, very well stated. Made it simple enough that I assume a 6th grader would know what's up. But detailed enough to start a conversation =D
@pepnacho65 Here's some math ahead: properly converting a color image to grayscale takes advantage of the fact that human eyes are more sensitive to green than blue and red.
To get the grayscale value you compute the dot product of the original color and 0.3, 0.59, 0.11 representing the three colors in a 3-float vector. In other words, green gets the most weight and blue gets the least. Those three numbers are approximate values.
Excellent analogy, I finally get it! Thanks!
sme useful stuff....nice...watch it...njoy it
Conversation starter.. very true. Good video, this. 👍👍
Great Explanation !!!
What decides the central or target sensel ? and how are the other 8 sensels are distributed around the target sensel. does it has a pattern to it or is it random......
Awesome video !!! :) thanks for putting an effort and explaining this concept !!! keep up the good work :)
One of the best explanation... Thank you
Only one word: AMAZING. *0*
@robertwc82 You are thinking about CMYK, not RGB
Very Helpful. Thanks
Hi!
I just found your video and found it very informative.
It sorted out many queries of me.
Regards
very helpful, i was curious so i searched it and found the right answer , when i was a kid i wud get so close to the old tv screen and i would see squares of red and blue and i wondered why xD
wow! that's amazing!!! i always wonder, where that 16M colors came from..? now I know where its came from! thnx!
awesome video
Great vid. Well done.
Hi there!
Thanks for the explanation!
So as I understand, the size of one pixel = the size of one sensel. Right?
And the colour of one pixel is based on the surrounding sensels.
Or is it like this?
The size of one pixel = the size of (4 or 9?) sensels
And the colour of one pixel is based on the surrounding sensels.
Wich one is the right conclusion?
Can you help me please?
Greets!
I'm currently working on a project that requires a red, green, and blue sensing photodiode. Not wanting to spend a lot of money, I'm buying three standard photodiodes and covering each one with either a red, green, or blue film.
Do you know where I could purchase rgb plastic films?
great video man! you must be from california non? or oregon haha. hey i was wondering why is there a difference between colors in light and colors that we paint with or see on objects. im super confused about this
Great stuff!!
thank you! very helpful!
Hello, can you please tell me how to prepare a simple Bayer filter set and one more question... let's say i used red colored transparent film paper and I place it over the computer's monitor screen with a red color image in my laptop's monitor will the image color change? same for the green and blue and how about if I use a digital printed image and place the colored transparent film paper will it change?
OK
I am not sure what the video is referring to at 02:35 when it describes the nine sensels required to represent a pixel...
Maybe it's saying each sensel represents an individual image pixel, but that the value of every sensel is calculated by the value of neighboring pixels.
GREAT STUFF!!
Just curious how does red and green make yellow? is there a different color system or something?
The video says that nine sensels are used to represent a pixel.
But according to Wikipedia "Bayer Filter" entry, each individual sensel (Red,Green, or Blue) represents a pixel and the missing color data of each sensel is gathered
by interpolation( e.g., neighboring pixel).
Which is correct?
For example, would a 5 megapixel camera contain 5 million sensels or (5 million X 9) sensels?
Just 5 million sensels. Essentially the greyscale aspect of the image is captured in full 5 megapixel resolution, but the colour aspect is capture in lower resolution and the computer (either built into the camera or a separate computer) has to guess the colour details a bit.
amazing...brother
excellent tutorial. Wonder what the 2 means in 2 to the 8th in an 8 bit?
Thanks...
GREAT video :)
@G3org3Master because it starts at 0, not 1.
Thank you for sharing this vedio, but I have a question, if a blue light over the red cups, I thought some of the light will still past into the cups, because the light will pass through the thinner paper, so How do you think about this kinds situation, thank you .
+yi wang Think of the filters as preventing everything but that one color through. Best wishes!
you mean just think of, but actually when you put a like yellow light through red cup, there will have red light through the cup right.
+yi wang some red light, some green, but only the red light will be absorbed by the red senseless and the green light by the green
i am amazed
Thanks !!
What is the difference then between standard RGB bayer (rgb pixels) and quadbayer (pixel binning)?
Does each of these RGB filters have certain frequency ranges, within which they would allow the light to pass and be counted?
If so, does a red photon have the same "value" as a orange one when falling on a red filtered part of the sensor?
Orange will be created by the combination of the intensity of the red,blue and green,it doesn't have the same value as red just the different combinations of the filtered red, green and blue lights when combined together just like mixing different paint colours to create unique colour
That's an amazing video with very general and great explanation. I have a question, Does it work on a LCD or plasma displayed screen and how do they change the intensity of the fluorescent light?? I kind of think it would not work in cathode ray tube for previous generation otherwise it would not be black and white.
thanks
Hmmm.... that would be..... why?
I thought a "pixel" was the 16.7 mill color capable unit (like in a tv or monitor), weather its made of 3,4,6 or 9 elements, so a 5Mpix camera would have 5M times 3 or 4 whatever individual color cells (sensels I guess).
In the calculation your talking about one final pixel would share information with its neighbour (softening the transition). On the other hand it would be space saving.
hi, you confused me about pixel and sensel. If every pixel has only one color filter on top of it what are those nine sensors with different color filters?
Thank you very much, BUT I think that you didn't explain sth....
How does the sensel catch the intensity? (I thought that each sensel is binary, and not able to decode the exact quantity of light...)
Thanks in advance for your interest ;-)
not sure if it has been asked - but why are there two green ones?
Wow! Thank you.
Thanx
Nice to see an instructional video which doesn't look like it was made by men with crew cuts from the 1950's.
thanks for this :)
would yellow be made by red and green light... just curious
so if I buy a camera with 640x480 pixels, does that mean that effectively it only has 640/3 x 480/3 pixels (approx. 213 x 160 pixels only). Is this also the reason why usally 3 ccd video cameras have lesser pixels but better quality images?