{"id":1749,"date":"2022-05-16T21:48:29","date_gmt":"2022-05-17T04:48:29","guid":{"rendered":"https:\/\/www.coastalvectors.com\/blog\/?p=1749"},"modified":"2022-05-17T13:33:18","modified_gmt":"2022-05-17T20:33:18","slug":"reflected-primary-colors","status":"publish","type":"post","link":"https:\/\/www.coastalvectors.com\/blog\/2022\/05\/reflected-primary-colors\/","title":{"rendered":"Reflected Primary Colors"},"content":{"rendered":"<p>Eyes are interesting things. We have <a href=\"https:\/\/en.wikipedia.org\/wiki\/Cone_cell\">color receptors<\/a> in our eyes tuned for three different wavelengths. Short (blue), medium (green), and long (red). Our brains combine this information and allow us to perceive millions of color, which is really just amazing.<\/p>\n<p>These three colors are so important, that we specifically target them when we produce images on our monitors and TVs. All the images are made up of these three colors. Just as importantly, when we capture images with cameras, we actually filter the light going into the cameras into the three primary colors.<\/p>\n<p><a href=\"https:\/\/www.coastalvectors.com\/blog\/2022\/05\/reflected-primary-colors\/bayer-filter\/\" rel=\"attachment wp-att-1758\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1758\" src=\"https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/bayer-filter-450x170.jpg\" alt=\"\" width=\"450\" height=\"170\" srcset=\"https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/bayer-filter-450x170.jpg 450w, https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/bayer-filter-750x283.jpg 750w, https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/bayer-filter-768x290.jpg 768w, https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/bayer-filter-1536x579.jpg 1536w, https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/bayer-filter.jpg 2034w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><\/a><\/p>\n<p>Camera image sensors aren&#8217;t inherently color sensitive. Each pixel we get out of a camera is actually made up from information gathered from 4 sub-pixels on the digital camera sensor. Each sub pixel has a filter in front of it for light to pass through; 1 Red, 1 blue, and 2 green. This is called the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Bayer_filter\">Bayer Filter<\/a>. After the camera takes a picture or records a frame, the sub pixels get interpolated together to give a single pixel of data.<\/p>\n<p>(It&#8217;s probably more nuanced than that, but that is the general idea)<\/p>\n<p>I recently purchased an RGB flashlight, and wondered how well I could reconstruct a color image by taking 3 photos illuminated with the different lights and combining them.<\/p>\n<p>Ideally, I would like to try this using a black and white film camera, or black and white digital sensor, however I have access to neither, so I decided to use my iPhone.<\/p>\n<p><a href=\"https:\/\/www.coastalvectors.com\/blog\/2022\/05\/reflected-primary-colors\/three-colors\/\" rel=\"attachment wp-att-1755\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1755\" src=\"https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/three-colors-450x109.jpg\" alt=\"\" width=\"450\" height=\"109\" srcset=\"https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/three-colors-450x109.jpg 450w, https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/three-colors-750x182.jpg 750w, https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/three-colors-768x187.jpg 768w, https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/three-colors-1536x374.jpg 1536w, https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/three-colors-2048x498.jpg 2048w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><\/a><\/p>\n<p>The first method I used was to take color photos with each illumination, and layer them on top of each other using the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Blend_modes#Addition\"><em>add<\/em> blend mode<\/a>. Using this blend mode adds the RGB values together. For example:<\/p>\n<p><a href=\"https:\/\/www.coastalvectors.com\/blog\/2022\/05\/reflected-primary-colors\/additive\/\" rel=\"attachment wp-att-1753\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1753\" src=\"https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/Additive-450x235.png\" alt=\"\" width=\"450\" height=\"235\" srcset=\"https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/Additive-450x235.png 450w, https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/Additive-750x391.png 750w, https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/Additive-768x401.png 768w, https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/Additive-1536x802.png 1536w, https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/Additive.png 1688w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><\/a><\/p>\n<p>This method works well. It&#8217;s somewhat surprising considering that nothing I used was color calibrated.<\/p>\n<p><a href=\"https:\/\/www.coastalvectors.com\/blog\/2022\/05\/reflected-primary-colors\/color-blend-test-1\/\" rel=\"attachment wp-att-1754\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1754\" src=\"https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/Composite-1-450x338.jpg\" alt=\"\" width=\"450\" height=\"338\" srcset=\"https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/Composite-1-450x338.jpg 450w, https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/Composite-1-750x563.jpg 750w, https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/Composite-1-768x576.jpg 768w, https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/Composite-1-1536x1152.jpg 1536w, https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/Composite-1-2048x1536.jpg 2048w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><\/a><\/p>\n<p>The second method that I was more excited about was taking black and white photos of each and using those as the raw channel data to reconstruct the image.<\/p>\n<p><a href=\"https:\/\/www.coastalvectors.com\/blog\/2022\/05\/reflected-primary-colors\/3-bw-images\/\" rel=\"attachment wp-att-1756\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1756\" src=\"https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/3-bw-images-450x109.jpg\" alt=\"\" width=\"450\" height=\"109\" srcset=\"https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/3-bw-images-450x109.jpg 450w, https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/3-bw-images-750x182.jpg 750w, https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/3-bw-images-768x187.jpg 768w, https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/3-bw-images-1536x374.jpg 1536w, https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/3-bw-images-2048x498.jpg 2048w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><\/a><\/p>\n<p>I took the photos on my iPhone while using the black and white filter mode. I then used Affinity Photo to import the photos and assign them to channels. The end result was abysmal.<\/p>\n<p><a href=\"https:\/\/www.coastalvectors.com\/blog\/2022\/05\/reflected-primary-colors\/color-blend-test-2\/\" rel=\"attachment wp-att-1757\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1757\" src=\"https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/Channel-Mix-450x338.jpg\" alt=\"\" width=\"450\" height=\"338\" srcset=\"https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/Channel-Mix-450x338.jpg 450w, https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/Channel-Mix-750x563.jpg 750w, https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/Channel-Mix-768x576.jpg 768w, https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/Channel-Mix-1536x1152.jpg 1536w, https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/Channel-Mix-2048x1536.jpg 2048w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><\/a><\/p>\n<p>I was able to improve it a bit by mixing the blue channel higher and reducing the intensity of the green channel.<\/p>\n<p><a href=\"https:\/\/www.coastalvectors.com\/blog\/2022\/05\/reflected-primary-colors\/color-blend-test-2-2\/\" rel=\"attachment wp-att-1760\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1760\" src=\"https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/Channel-Mix-2-450x338.jpg\" alt=\"\" width=\"450\" height=\"338\" srcset=\"https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/Channel-Mix-2-450x338.jpg 450w, https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/Channel-Mix-2-750x563.jpg 750w, https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/Channel-Mix-2-768x576.jpg 768w, https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/Channel-Mix-2-1536x1152.jpg 1536w, https:\/\/www.coastalvectors.com\/blog\/wp-content\/uploads\/2022\/05\/Channel-Mix-2-2048x1536.jpg 2048w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><\/a><\/p>\n<p>Still not great.<\/p>\n<p>I believe some of the problems are that the BW filter on the iPhone is not at all true black and white. I was surprised initially to find that the image wasn&#8217;t actually grayscale. It was RGB. I also don&#8217;t know how the image is being converted to black and white. It&#8217;s plausible that in the process of converting to grayscale, more red and blue data is thrown away in favor of green because it produces a better result to our eyes.<\/p>\n<p>Although this was a bit of an interesting exercise, I think in the end it didn&#8217;t achieve great results because of the lack of true black and white sensor. The color results would have been more meaningful if it had been achieved without any color aware equipment.<\/p>\n<p>Additionally, I&#8217;d be interested in comparing a composited photo using 3 exposures with red, green, and blue lights to a composited photo using 3 filters and white light. Someday I can revisit this experiment once I procure a proper camera.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Eyes are interesting things. We have color receptors in our eyes tuned for three different wavelengths. Short (blue), medium (green), and long (red). Our brains combine this information and allow us to perceive millions of color, which is really just amazing. These three colors are so important, that we specifically target them when we produce &hellip; <a href=\"https:\/\/www.coastalvectors.com\/blog\/2022\/05\/reflected-primary-colors\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Reflected Primary Colors<\/span><\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,11],"tags":[],"class_list":["post-1749","post","type-post","status-publish","format-standard","hentry","category-missives","category-projects"],"_links":{"self":[{"href":"https:\/\/www.coastalvectors.com\/blog\/wp-json\/wp\/v2\/posts\/1749","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.coastalvectors.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.coastalvectors.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.coastalvectors.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.coastalvectors.com\/blog\/wp-json\/wp\/v2\/comments?post=1749"}],"version-history":[{"count":8,"href":"https:\/\/www.coastalvectors.com\/blog\/wp-json\/wp\/v2\/posts\/1749\/revisions"}],"predecessor-version":[{"id":1765,"href":"https:\/\/www.coastalvectors.com\/blog\/wp-json\/wp\/v2\/posts\/1749\/revisions\/1765"}],"wp:attachment":[{"href":"https:\/\/www.coastalvectors.com\/blog\/wp-json\/wp\/v2\/media?parent=1749"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.coastalvectors.com\/blog\/wp-json\/wp\/v2\/categories?post=1749"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.coastalvectors.com\/blog\/wp-json\/wp\/v2\/tags?post=1749"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}