{"id":4070,"date":"2022-07-19T22:00:40","date_gmt":"2022-07-20T05:00:40","guid":{"rendered":"https:\/\/www.cloudacm.com\/?p=4070"},"modified":"2022-07-19T22:17:32","modified_gmt":"2022-07-20T05:17:32","slug":"runcam-near-ir-and-aerochrome","status":"publish","type":"post","link":"https:\/\/www.cloudacm.com\/?p=4070","title":{"rendered":"RunCam Near-IR and AeroChrome"},"content":{"rendered":"<p>Near IR has been covered in earlier posts and I wanted to expand on the topic after seeing it represented in false color. I happened upon Mathieu Stern&#8217;s work a couple of weeks after my last post, which he posted just over three weeks earlier.<\/p>\n<p><iframe loading=\"lazy\" title=\"Modifying my Camera to see the World Differently\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/apLBMlTQwJc?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>The commercial grade work employed a yellow filter inserted in a modified high end camera that had its Near IR filter removed by Kolari Vision. This second video expanded on the topic.<\/p>\n<p><iframe loading=\"lazy\" title=\"How I Modified my Camera to see the World in Pink\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/lzb9gOyr-4Y?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>The filter manufacturer also provided a blog post, written by Yann Philippe, regarding near IR digital processing with the use of their filters.<\/p>\n<p><a href=\"https:\/\/kolarivision.com\/the-irchrome-infrared-photography-filter-our-digital-version-of-kodak-aerochrome\/\">https:\/\/kolarivision.com\/the-irchrome-infrared-photography-filter-our-digital-version-of-kodak-aerochrome\/<\/a><\/p>\n<p>The post mentioned Kodak Aerochrome film and how it represents invisible near IR light in the red color spectrum. It also mentioned how this film has been discontinued and they provide a means to digitally reproduce it with the use of their color filters. The post provided some information about other efforts to digitally create the Aerochrome effect with the use of Yellow #12 filters and extensive postproduction. They noted edge artifacts can be introduced largely from channel mixing. Yann Philippe then approached the idea of using an opposing yellow filter, which brought about the cyan filter Kolar Vision offers, with striking results.<\/p>\n<p>I then searched for efforts by others in replicating the Aerocrhome effect and found this posting by Todd Dominey providing the back story about the film and some history of it. He also demonstrates his use of filters in digital photography.<\/p>\n<p><iframe loading=\"lazy\" title=\"The Surprising True Story of Kodak Aerochrome \/ Part One\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/NWl1HINQUao?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p><iframe loading=\"lazy\" title=\"Digitally Emulating Kodak Aerochrome \/ Part Two\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/AUgogt515Jk?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>I then sampled the work of others in mimicking the Aerochrome effect.<\/p>\n<p><iframe loading=\"lazy\" title=\"Emulate the look of Aerochrome Film with These Lightroom Presets\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/ILk1j3b6Tz0?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>Recreating Aerochrome \u2013 A Discontinued Infrared Film<br \/>\nJoshua Bird<br \/>\n<a href=\"https:\/\/joshuabird.com\/blog\/post\/recreating-aerochrome\">https:\/\/joshuabird.com\/blog\/post\/recreating-aerochrome<\/a><\/p>\n<p>How to Emulate the look of Aerochrome Film<br \/>\nDan Wampler<br \/>\n<a href=\"https:\/\/www.lifepixel.com\/photo-tutorials\/emulate-look-aerochrome-film\">https:\/\/www.lifepixel.com\/photo-tutorials\/emulate-look-aerochrome-film<\/a><\/p>\n<p>One-Image Aerochrome with Green and Orange filter<br \/>\nChristoph<br \/>\n<a href=\"https:\/\/www.ultravioletphotography.com\/content\/index.php?\/topic\/4292-one-image-aerochrome-with-green-and-orange-filter\/\">https:\/\/www.ultravioletphotography.com\/content\/index.php?\/topic\/4292-one-image-aerochrome-with-green-and-orange-filter\/<\/a><\/p>\n<p>It was worth taking a closer look at Richard Mosse&#8217;s work that Todd mentioned earlier. since it used the actual Aerochrome film stock that was becoming scarce.<\/p>\n<p><iframe loading=\"lazy\" title=\"The Impossible Image\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/BTVkqwuLYHU?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p><iframe loading=\"lazy\" title=\"RICHARD MOSSE | EXTENDED INTERVIEW | The Works | RT\u00c9 ONE\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/QbSDv-5v_x4?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>I then decided to use Carl Bergsdorf&#8217;s method to create a false color representation using existing material I already had, mainly since he demonstrated how to do the process using GIMP.<\/p>\n<p><iframe loading=\"lazy\" title=\"How to Emulate KODAK AEROCHROME\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/T_h2cgsaTBE?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>My results in GIMP were plagued with edge artifacts, the resulting images had a halo effect. Since I was considering applying these changes to a large quantity of stock, I needed a scriptable method. Fred Weinhaus offers an ImageMagick scripts that had cleaner results.<\/p>\n<p><a href=\"http:\/\/www.fmwconcepts.com\/imagemagick\/huemap\/\">http:\/\/www.fmwconcepts.com\/imagemagick\/huemap\/<\/a><br \/>\n<a href=\"http:\/\/www.fmwconcepts.com\/imagemagick\/replacecolor\/\">http:\/\/www.fmwconcepts.com\/imagemagick\/replacecolor\/<\/a><br \/>\n<a href=\"http:\/\/www.fmwconcepts.com\/imagemagick\/greenscreen\/\">http:\/\/www.fmwconcepts.com\/imagemagick\/greenscreen\/<\/a><\/p>\n<p>I settled with the huemap and created the following stereoscopic image that turned the green foliage to red.<\/p>\n<p><a href=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/IMG_2579_Stacked.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4074 \" src=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/IMG_2579_Stacked-300x227.jpg\" alt=\"\" width=\"447\" height=\"338\" srcset=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/IMG_2579_Stacked-300x227.jpg 300w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/IMG_2579_Stacked-768x581.jpg 768w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/IMG_2579_Stacked-357x270.jpg 357w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/IMG_2579_Stacked.jpg 991w\" sizes=\"auto, (max-width: 447px) 100vw, 447px\" \/><\/a><\/p>\n<p>However, not all of my stock footage gave the same results, with large areas having patching or missing color shifting. The other issue was this was not IR, it was a color shift.<\/p>\n<p><iframe loading=\"lazy\" title=\"Sand Point Park False Color AeroChrome Demo\" src=\"https:\/\/player.vimeo.com\/video\/731604877?dnt=1&amp;app_id=122963\" width=\"640\" height=\"720\" frameborder=\"0\" allow=\"autoplay; fullscreen; picture-in-picture; clipboard-write\"><\/iframe><\/p>\n<p>Here is the script I used for the preceding video.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">#!\/bin\/bash\r\n# False Color - Green to Red Shift\r\n\r\nsrcnme=MINI0038_Full_Stab\r\n\r\nwrkdir=\/home\/user\/NOIR\/Fred-IM\/video5\/\r\nsrcimg=${wrkdir}images\/\r\nprcimg=${wrkdir}processed\/\r\nfwimscipt=${wrkdir}huemap\r\n\r\nsrcmov=${srcnme}.MOV\r\nscalesz=Scale720_\r\nhue=Hue_\r\nimgseq=${srcimg}${scalesz}${srcnme}_%04d.png\r\n\r\nffmpeg -i ${srcmov} -vf \"scale=1280:720\" ${scalesz}${srcmov}\r\nffmpeg -i ${scalesz}${srcmov} -vf fps=30 ${imgseq}\r\n\r\ncd $srcimg\r\nfor file in *.png; do bash $fwimscipt -h 110,35 -t 80,90 ${file} ${prcimg}${file}; done\r\n\r\ncd $prcimg\r\nls *png &gt; imagelist1.txt\r\nsed \"s\/Scale720\/file \\'Scale720\/\" imagelist1.txt &gt; imagelist2.txt\r\nsed \"s\/png\/png\\'\/\" imagelist2.txt &gt; imagelist3.txt\r\nffmpeg -y -r 30 -f concat -safe 0 -i \"imagelist3.txt\" -c:v libx264 -vf \"fps=30,format=yuv420p\" ${wrkdir}${scalesz}${hue}${srcmov}\r\nrm *.txt\r\n\r\nffmpeg -i ${srcmov} -i ${wrkdir}${scalesz}${hue}${srcmov} -filter_complex \"[0:v][1:v]vstack=inputs=2:shortest=1[outv]\" -map \"[outv]\" Stacked_${wrkdir}${scalesz}${hue}${srcmov}<\/pre>\n<p>It became clear that my existing footage had limitations which would require me to gather new footage using the filtering method pointed out by Yann Philippe and demonstrated by JW Wong. Unfortunately, I wasn&#8217;t able to locate the specifics of the demo, but did locate photos on Flickr.<\/p>\n<p><a href=\"https:\/\/www.flickr.com\/photos\/jw_wong\/35117360304\/\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/live.staticflickr.com\/4326\/35117360304_c9fb8893a3_z.jpg\" alt=\"Digital replacement (emulation) of Ektachrome \/ Aerochrome colour infrared film - Single-image method\" width=\"640\" height=\"384\" \/><\/a><\/p>\n<p>This photo gave some idea on the postproduction involved. It is a flow chart of how the blue channel is isolated to only containing Near IR by means of a yellow filter. The color channels are then split, shifted, and then the blue channel is canceled from the red and green channels to remove Near IR data. The resulting channels are shifted, then recombined with level adjustments for a false color result.<\/p>\n<p>I then created a new filter for my RunCam2 4K camera using foam board and some gel color filters for the closest approximation to cancel blue light.<\/p>\n<p><a href=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/IMG_2699_Both.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4078\" src=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/IMG_2699_Both.jpg\" alt=\"\" width=\"504\" height=\"568\" srcset=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/IMG_2699_Both.jpg 504w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/IMG_2699_Both-266x300.jpg 266w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/IMG_2699_Both-240x270.jpg 240w\" sizes=\"auto, (max-width: 504px) 100vw, 504px\" \/><\/a><\/p>\n<p>One of the critical requirements in order for this to work properly is that the white balance not be set to automatic. The RunCam doesn&#8217;t offer an option to disable the white balance. I assumed that setting it to cloudy when it was cloudy or sunny when it was sunny that the results would be fine. The unprocessed results had a gold and magenta look, which was nothing like the samples that JW Wong had.<\/p>\n<p><a href=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/RC_0013_220708063525.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4080\" src=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/RC_0013_220708063525.jpg\" alt=\"\" width=\"960\" height=\"540\" srcset=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/RC_0013_220708063525.jpg 960w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/RC_0013_220708063525-300x169.jpg 300w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/RC_0013_220708063525-768x432.jpg 768w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/RC_0013_220708063525-480x270.jpg 480w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><\/a><\/p>\n<p>It became apparent that the best white balance option for any lighting condition was the incandescent setting. I&#8217;m assuming that the warm 2400K color was shifted to 6500K which happens to be what is considered to be daylight or cloudy daytime light, <a href=\"https:\/\/en.wikipedia.org\/wiki\/Color_temperature\">https:\/\/en.wikipedia.org\/wiki\/Color_temperature<\/a>. I attempted to correct the white balance using similar techniques from the following videos, but the results had degraded too much for them to be useful.<\/p>\n<p><iframe loading=\"lazy\" title=\"Secret to White Balance in Infrared Photography\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/QUFitdP7uoc?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p><iframe loading=\"lazy\" title=\"More Secrets to White Balance in Infrared Photography\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/iaFe66cSb2o?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p><a href=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/Scaled_RC_0001_220711130255.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4081\" src=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/Scaled_RC_0001_220711130255.jpg\" alt=\"\" width=\"960\" height=\"540\" srcset=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/Scaled_RC_0001_220711130255.jpg 960w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/Scaled_RC_0001_220711130255-300x169.jpg 300w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/Scaled_RC_0001_220711130255-768x432.jpg 768w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/Scaled_RC_0001_220711130255-480x270.jpg 480w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><\/a><\/p>\n<p>The resulting image was closer, yet no match of JW Wong&#8217;s work. So then I went about stacking each process into a script which would hopefully mimic JW&#8217;s work and have that AeroChrome look. Here is the script I used for the following image.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">#!\/bin\/bash\r\n# Bulk Process\r\n\r\n# Sources\r\n# https:\/\/www.imagemagick.org\/Usage\/compose\/\r\n# https:\/\/www.imagemagick.org\/Usage\/color_basics\/\r\n# https:\/\/www.imagemagick.org\/Usage\/color_mods\/\r\n# http:\/\/johnriselvato.com\/ffmpeg-how-to-add-color-normalization-to-a-video\/\r\n# http:\/\/johnriselvato.com\/how-to-edit-the-hue-of-a-video\/\r\n\r\n\r\n\r\nsrcimg=RC_0001_220711130255\r\nimgext=.JPG\r\nvidimg=_FFPEG_Normalize_H-45_S.85\r\nimrimg=_IM-R\r\nimgimg=_IM-G\r\nimbimg=_IM-B\r\nimximg=_IM-X\r\n\r\n\r\n# This shifts the color so the foliage is closer to a blue grey hue, also normalizes for more depth contrast\r\nffmpeg -i ${srcimg}${imgext} -vf \"normalize=strength=1, hue=h=-45:s=.85\" ${srcimg}${vidimg}${imgext}\r\n\r\n# This separates the color image into 3 red, green, and blue grayscale images\r\nconvert ${srcimg}${vidimg}${imgext} -channel R -separate ${srcimg}${imrimg}${vidimg}${imgext}\r\nconvert ${srcimg}${vidimg}${imgext} -channel G -separate ${srcimg}${imgimg}${vidimg}${imgext}\r\nconvert ${srcimg}${vidimg}${imgext} -channel B -separate ${srcimg}${imbimg}${vidimg}${imgext}\r\n\r\n# This subtracts the blue channel component that contains near IR from the red channel\r\n# The blue channel needs to be recreates as a consequence of the subtraction\r\nconvert ${srcimg}${imbimg}${vidimg}${imgext} ${srcimg}${imrimg}${vidimg}${imgext} -compose Mathematics -define compose:args='1,0,0,0' -composite  ${srcimg}${imrimg}X${vidimg}${imgext}\r\nconvert ${srcimg}${vidimg}${imgext} -channel B -separate ${srcimg}${imbimg}${vidimg}${imgext}\r\n\r\n# This subtracts the blue channel component that contains near IR from the green channel\r\n# The blue channel needs to be recreates as a consequence of the subtraction\r\nconvert ${srcimg}${imbimg}${vidimg}${imgext} ${srcimg}${imgimg}${vidimg}${imgext} -compose Mathematics -define compose:args='1,0,0,0' -composite  ${srcimg}${imgimg}X${vidimg}${imgext}\r\nconvert ${srcimg}${vidimg}${imgext} -channel B -separate ${srcimg}${imbimg}${vidimg}${imgext}\r\n\r\n# Each of the resulting channels need to have levels adjusted for balance and the channels are reassigned before combining them into color\r\n# Blue becomes the red channel, red becomes the green channel, and green becomes the blue channel.\r\nconvert ${srcimg}${imbimg}${vidimg}${imgext} -level 0%,100%,0.5 ${srcimg}${imrimg}2${vidimg}${imgext}\r\nconvert ${srcimg}${imrimg}X${vidimg}${imgext} -normalize ${srcimg}${imgimg}2${vidimg}${imgext}\r\nconvert ${srcimg}${imgimg}X${vidimg}${imgext} -normalize ${srcimg}${imbimg}2${vidimg}${imgext}\r\n\r\n# This combines the grayscale color channels into a color image\r\nconvert ${srcimg}${imrimg}2${vidimg}${imgext} ${srcimg}${imgimg}2${vidimg}${imgext} ${srcimg}${imbimg}2${vidimg}${imgext} -channel RGB -combine ${srcimg}${imximg}${vidimg}${imgext}\r\n\r\n# This sharpens the image due to bluring from the yellow gel filters\r\nconvert ${srcimg}${imximg}${vidimg}${imgext} -unsharp 0x4+0.6+0 ${srcimg}${imximg}2${vidimg}${imgext}<\/pre>\n<p><a href=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/Scaled_RC_0001_220711130255_IM-X2_FFPEG_Normalize_H-45_S.85.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4082\" src=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/Scaled_RC_0001_220711130255_IM-X2_FFPEG_Normalize_H-45_S.85.jpg\" alt=\"\" width=\"960\" height=\"540\" srcset=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/Scaled_RC_0001_220711130255_IM-X2_FFPEG_Normalize_H-45_S.85.jpg 960w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/Scaled_RC_0001_220711130255_IM-X2_FFPEG_Normalize_H-45_S.85-300x169.jpg 300w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/Scaled_RC_0001_220711130255_IM-X2_FFPEG_Normalize_H-45_S.85-768x432.jpg 768w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/Scaled_RC_0001_220711130255_IM-X2_FFPEG_Normalize_H-45_S.85-480x270.jpg 480w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><\/a><\/p>\n<p>The image had some of the qualities of AeroChrome, but lacked pop and punch in the red channel. The channel cancellation in the script wasn&#8217;t doing what I had intended. It was stacking the two greyscale images with the result having a combination of darker shades while allowing lighter shades to pass. My intention was to subtract the lighter shades of either the red or green channels based on the amount of white shades in the blue (Near IR) channel. After some attempts of doing this in GIMP, I settled on isolation, alpha channeling, and layering to get the color depth. Since ImageMagick didn&#8217;t offer alpha channeling, I had to employ a script from Fred Weinhaus, <a href=\"http:\/\/www.fmwconcepts.com\/imagemagick\/color2alpha\/index.php\">http:\/\/www.fmwconcepts.com\/imagemagick\/color2alpha\/index.php<\/a>. Here is the updated script used to do that with the results below.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">#!\/bin\/bash\r\n# Bulk Process\r\n\r\n# Sources\r\n# https:\/\/www.imagemagick.org\/Usage\/compose\/\r\n# https:\/\/www.imagemagick.org\/Usage\/color_basics\/\r\n# https:\/\/www.imagemagick.org\/Usage\/color_mods\/\r\n# http:\/\/johnriselvato.com\/ffmpeg-how-to-add-color-normalization-to-a-video\/\r\n# http:\/\/johnriselvato.com\/how-to-edit-the-hue-of-a-video\/\r\n# http:\/\/www.fmwconcepts.com\/imagemagick\/color2alpha\/index.php\r\n\r\n\r\n\r\nsrcimg=RC_0001_220711130255\r\nimgext=.JPG\r\nlyrext=.PNG\r\nvidimg=_FFPEG_Normalize_H-45_S.85\r\nimrimg=_IM-R\r\nimgimg=_IM-G\r\nimbimg=_IM-B\r\nimximg=_IM-X\r\n\r\n\r\n# This shifts the color so the foliage is closer to a blue grey hue, also normalizes for more depth contrast\r\nffmpeg -i ${srcimg}${imgext} -vf \"normalize=strength=1, hue=h=-45:s=.85\" ${srcimg}${vidimg}${imgext}\r\n\r\n# This separates the color image into 3 red, green, and blue grayscale images\r\nconvert ${srcimg}${vidimg}${imgext} -channel R -separate ${srcimg}${imrimg}${vidimg}${imgext}\r\nconvert ${srcimg}${vidimg}${imgext} -channel G -separate ${srcimg}${imgimg}${vidimg}${imgext}\r\nconvert ${srcimg}${vidimg}${imgext} -channel B -separate ${srcimg}${imbimg}${vidimg}${imgext}\r\n\r\n# This subtracts the blue channel component that contains near IR from the red channel\r\n# The blue channel needs to be recreates as a consequence of the subtraction\r\nconvert ${srcimg}${imbimg}${vidimg}${imgext} ${srcimg}${imrimg}${vidimg}${imgext} -compose minus_src -composite ${srcimg}${imrimg}X${vidimg}${imgext}\r\nconvert ${srcimg}${imbimg}${vidimg}${imgext} ${srcimg}${imrimg}${vidimg}${imgext} -compose Mathematics -define compose:args='1,0,0,0' -composite  ${srcimg}${imrimg}X${vidimg}${lyrext}\r\nconvert ${srcimg}${vidimg}${imgext} -channel B -separate ${srcimg}${imbimg}${vidimg}${imgext}\r\n\r\n# This subtracts the blue channel component that contains near IR from the green channel\r\n# The blue channel needs to be recreates as a consequence of the subtraction\r\nconvert ${srcimg}${imbimg}${vidimg}${imgext} ${srcimg}${imgimg}${vidimg}${imgext} -compose minus_src -composite ${srcimg}${imgimg}X${vidimg}${imgext}\r\nconvert ${srcimg}${imbimg}${vidimg}${imgext} ${srcimg}${imgimg}${vidimg}${imgext} -compose Mathematics -define compose:args='1,0,0,0' -composite  ${srcimg}${imgimg}X${vidimg}${lyrext}\r\nconvert ${srcimg}${vidimg}${imgext} -channel B -separate ${srcimg}${imbimg}${vidimg}${imgext}\r\nconvert ${srcimg}${vidimg}${imgext} -channel B -separate ${srcimg}${imbimg}${vidimg}${lyrext}\r\n\r\n# Each of the resulting channels need to have levels adjusted for balance and the channels are reassigned before combining them into color\r\n# Blue becomes the red channel, red becomes the green channel, and green becomes the blue channel.\r\nconvert ${srcimg}${imbimg}${vidimg}${imgext} -normalize ${srcimg}${imrimg}2${vidimg}${imgext}\r\nconvert ${srcimg}${imrimg}X${vidimg}${imgext} -negate -normalize ${srcimg}${imgimg}2${vidimg}${imgext}\r\nconvert ${srcimg}${imgimg}X${vidimg}${imgext} -negate -normalize ${srcimg}${imbimg}2${vidimg}${imgext}\r\nconvert ${srcimg}${imbimg}${vidimg}${lyrext} -level 0%,100%,0.5 ${srcimg}${imrimg}2${vidimg}${lyrext}\r\nconvert ${srcimg}${imrimg}X${vidimg}${lyrext} -normalize ${srcimg}${imgimg}2${vidimg}${lyrext}\r\nconvert ${srcimg}${imgimg}X${vidimg}${lyrext} -normalize ${srcimg}${imbimg}2${vidimg}${lyrext}\r\n\r\n# This combines the grayscale color channels into a color image\r\nconvert ${srcimg}${imrimg}2${vidimg}${imgext} ${srcimg}${imgimg}2${vidimg}${imgext} ${srcimg}${imbimg}2${vidimg}${imgext} -channel RGB -combine ${srcimg}${imximg}${vidimg}${imgext}\r\nconvert ${srcimg}${imrimg}2${vidimg}${lyrext} ${srcimg}${imgimg}2${vidimg}${lyrext} ${srcimg}${imbimg}2${vidimg}${lyrext} -channel RGB -combine ${srcimg}${imximg}${vidimg}${lyrext}\r\n\r\n# This sharpens the image due to bluring from the yellow gel filters\r\nconvert ${srcimg}${imximg}${vidimg}${imgext} -unsharp 0x4+0.6+0 ${srcimg}${imximg}2${vidimg}${imgext}\r\nconvert ${srcimg}${imximg}${vidimg}${lyrext} -unsharp 0x4+0.6+0 ${srcimg}${imximg}2${vidimg}${lyrext}\r\n\r\n.\/color2alpha -ca cyan -g 3 ${srcimg}${imximg}2${vidimg}${imgext} ${srcimg}${imximg}3${vidimg}${lyrext}\r\n\r\nconvert ${srcimg}${imximg}2${vidimg}${lyrext} \\( ${srcimg}${imximg}3${vidimg}${lyrext} -alpha set -channel alpha -evaluate multiply 0.8 \\) -flatten ${srcimg}${imximg}4${vidimg}${lyrext}<\/pre>\n<p><a href=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/Scaled_RC_0001_220711130255_IM-X4_FFPEG_Normalize_H-45_S.85.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4084\" src=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/Scaled_RC_0001_220711130255_IM-X4_FFPEG_Normalize_H-45_S.85.jpg\" alt=\"\" width=\"960\" height=\"540\" srcset=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/Scaled_RC_0001_220711130255_IM-X4_FFPEG_Normalize_H-45_S.85.jpg 960w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/Scaled_RC_0001_220711130255_IM-X4_FFPEG_Normalize_H-45_S.85-300x169.jpg 300w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/Scaled_RC_0001_220711130255_IM-X4_FFPEG_Normalize_H-45_S.85-768x432.jpg 768w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/Scaled_RC_0001_220711130255_IM-X4_FFPEG_Normalize_H-45_S.85-480x270.jpg 480w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><\/a><\/p>\n<p>This was a closer approximation so I ran it against JW&#8217;s samples. The results were darker blues but less reds. There are so many factors that need to match, I concluded that any combination of these first needed to be matched to get comparable results. I then created a script to process video taken with the RunCam. Here is that script with the resulting video<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">#!\/bin\/bash\r\n# Aerochrome Process\r\n\r\nsrcnme=RC_0002_220711130856\r\n\r\nwrkdir=\/PathContainingVideo\/\r\nsrcimg=${wrkdir}images\/\r\nprcimg=${wrkdir}processed\/\r\n\r\nsrcmov=${srcnme}.MP4\r\nscalesz=Scale_Flip_FrameRate_ColorShift_\r\nimgseq=${srcimg}${scalesz}${srcnme}_%04d.png\r\nimrimg=_IM-R\r\nimgimg=_IM-G\r\nimbimg=_IM-B\r\nimximg=_IM-X\r\nfwimscipt=${wrkdir}color2alpha\r\n\r\n\r\nffmpeg -i ${srcmov} -vf \"scale=640:360, hflip, vflip, fps=30, hue=h=-45:s=.85\" ${scalesz}${srcmov}\r\nffmpeg -i ${scalesz}${srcmov} ${imgseq}\r\n\r\n\r\ncd $srcimg\r\nfor file in *.png; \r\ndo \r\n\r\n# This separates the color image into 3 red, green, and blue grayscale images\r\nconvert ${file} -channel R -separate ${prcimg}R_${file}\r\nconvert ${file} -channel G -separate ${prcimg}G_${file}\r\nconvert ${file} -channel B -separate ${prcimg}B_${file}\r\n\r\n# This subtracts the blue channel component that contains near IR from the red channel\r\n# The blue channel needs to be recreates as a consequence of the subtraction\r\nconvert ${prcimg}B_${file} ${prcimg}R_${file} -compose minus_src -composite ${prcimg}RY_${file}\r\nconvert ${prcimg}B_${file} ${prcimg}R_${file} -compose Mathematics -define compose:args='1,0,0,0' -composite  ${prcimg}RX_${file}\r\nconvert ${file} -channel B -separate ${prcimg}B_${file}\r\n\r\n# This subtracts the blue channel component that contains near IR from the green channel\r\n# The blue channel needs to be recreates as a consequence of the subtraction\r\nconvert ${prcimg}B_${file} ${prcimg}G_${file} -compose minus_src -composite ${prcimg}GY_${file}\r\nconvert ${prcimg}B_${file} ${prcimg}G_${file} -compose Mathematics -define compose:args='1,0,0,0' -composite  ${prcimg}GX_${file}\r\nconvert ${file} -channel B -separate ${prcimg}B_${file}\r\n\r\n# Each of the resulting channels need to have levels adjusted for balance and the channels are reassigned before combining them into color\r\n# Blue becomes the red channel, red becomes the green channel, and green becomes the blue channel.\r\nconvert ${prcimg}B_${file} -normalize ${prcimg}RY1_${file}\r\nconvert ${prcimg}RY_${file} -negate -normalize ${prcimg}GY1_${file}\r\nconvert ${prcimg}GY_${file} -negate -normalize ${prcimg}BY1_${file}\r\nconvert ${prcimg}B_${file} -level 0%,100%,0.5 ${prcimg}RX1_${file}\r\nconvert ${prcimg}RX_${file} ${prcimg}GX1_${file}\r\nconvert ${prcimg}GX_${file} ${prcimg}BX1_${file}\r\n\r\n# This combines the grayscale color channels into a color image\r\nconvert ${prcimg}RY1_${file} ${prcimg}GY1_${file} ${prcimg}BY1_${file} -channel RGB -combine ${prcimg}IY_${file}\r\nconvert ${prcimg}RX1_${file} ${prcimg}GX1_${file} ${prcimg}BX1_${file} -channel RGB -combine ${prcimg}IX_${file}\r\n\r\n# This sharpens the image due to bluring from the yellow gel filters\r\nconvert ${prcimg}IY_${file} -unsharp 0x4+0.6+0 ${prcimg}IY1_${file}\r\nconvert ${prcimg}IX_${file} -unsharp 0x4+0.6+0 ${prcimg}IX1_${file}\r\n\r\nbash $fwimscipt -ca cyan -g 3 ${prcimg}IY1_${file} ${prcimg}IY2_${file}\r\n\r\nconvert ${prcimg}IX_${file} \\( ${prcimg}IY2_${file} -alpha set -channel alpha -evaluate multiply 0.8 \\) -flatten ${prcimg}IY3_${file}\r\n\r\ndone\r\n\r\n\r\n\r\ncd $prcimg\r\nls IY3_*png &gt; imagelist1.txt\r\nsed \"s\/IY3_\/file \\'IY3_\/\" imagelist1.txt &gt; imagelist2.txt\r\nsed \"s\/png\/png\\'\/\" imagelist2.txt &gt; imagelist3.txt\r\nffmpeg -y -r 30 -f concat -safe 0 -i \"imagelist3.txt\" -c:v libx264 -vf \"fps=30,format=yuv420p\" ${wrkdir}IY3_${srcmov}\r\nrm *.txt\r\n\r\n\r\n# Multi Line Comment\r\n: '\r\n\r\nI put stuff here when needed, just to comment it out\r\n\r\n\r\n'<\/pre>\n<p><iframe loading=\"lazy\" title=\"MaryMoor Park AeroChrome\" src=\"https:\/\/player.vimeo.com\/video\/731605787?dnt=1&amp;app_id=122963\" width=\"640\" height=\"360\" frameborder=\"0\" allow=\"autoplay; fullscreen; picture-in-picture; clipboard-write\"><\/iframe><\/p>\n<p>I then took some of the processed images from the video to create some montage views of the area.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/IY3_Scale_Flip_FrameRate_ColorShift_RC_0000_220711125734_0012_stitch2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4086\" src=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/IY3_Scale_Flip_FrameRate_ColorShift_RC_0000_220711125734_0012_stitch2-1024x181.png\" alt=\"\" width=\"974\" height=\"172\" srcset=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/IY3_Scale_Flip_FrameRate_ColorShift_RC_0000_220711125734_0012_stitch2-1024x181.png 1024w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/IY3_Scale_Flip_FrameRate_ColorShift_RC_0000_220711125734_0012_stitch2-300x53.png 300w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/IY3_Scale_Flip_FrameRate_ColorShift_RC_0000_220711125734_0012_stitch2-768x136.png 768w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/IY3_Scale_Flip_FrameRate_ColorShift_RC_0000_220711125734_0012_stitch2-1536x272.png 1536w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/IY3_Scale_Flip_FrameRate_ColorShift_RC_0000_220711125734_0012_stitch2-2048x362.png 2048w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/IY3_Scale_Flip_FrameRate_ColorShift_RC_0000_220711125734_0012_stitch2-604x107.png 604w\" sizes=\"auto, (max-width: 974px) 100vw, 974px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/IY3_Scale_Flip_FrameRate_ColorShift_RC_0006_220711131258_0986_stitch.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-4087\" src=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/IY3_Scale_Flip_FrameRate_ColorShift_RC_0006_220711131258_0986_stitch-1024x666.png\" alt=\"\" width=\"640\" height=\"416\" srcset=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/IY3_Scale_Flip_FrameRate_ColorShift_RC_0006_220711131258_0986_stitch-1024x666.png 1024w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/IY3_Scale_Flip_FrameRate_ColorShift_RC_0006_220711131258_0986_stitch-300x195.png 300w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/IY3_Scale_Flip_FrameRate_ColorShift_RC_0006_220711131258_0986_stitch-768x499.png 768w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/IY3_Scale_Flip_FrameRate_ColorShift_RC_0006_220711131258_0986_stitch-415x270.png 415w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2022\/07\/IY3_Scale_Flip_FrameRate_ColorShift_RC_0006_220711131258_0986_stitch.png 1172w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>From what I could find, near IR imaging predated AeroChrome with it being used aboard ships in bad weather conditions. I could not find much material from Eastman-Kodak regarding AeroChrome, but did find a book written by Walter Clark who was a lead at Eastman Kodak at the time when AeroChrome was created.<\/p>\n<p><a href=\"https:\/\/www.gettyimages.com\/detail\/news-photo\/pictured-left-to-right-doctor-walter-clark-of-the-eastman-news-photo\/566221423?adppopup=false\">https:\/\/www.gettyimages.com\/detail\/news-photo\/pictured-left-to-right-doctor-walter-clark-of-the-eastman-news-photo\/566221423?adppopup=false<\/a><\/p>\n<p>Photography by Infrared, Second Edition : Its Principles and Applications Hardcover \u2013 January 1, 1947<br \/>\nWalter Clark<br \/>\n<a href=\"https:\/\/www.amazon.com\/Photography-Infrared-Its-Principles-Applications\/dp\/1406744867\/ref=tmm_pap_swatch_0?_encoding=UTF8&amp;qid=&amp;sr=\">https:\/\/www.amazon.com\/Photography-Infrared-Its-Principles-Applications\/dp\/1406744867\/ref=tmm_pap_swatch_0?_encoding=UTF8&amp;qid=&amp;sr=<\/a><\/p>\n<p>Much thanks go out to all mentioned in this post. This was a topic I had not anticipated to revisit so soon. I also want to thank Anthony Thyssen &#8211; <a href=\"https:\/\/antofthy.gitlab.io\/anthony.html\">https:\/\/antofthy.gitlab.io\/anthony.html<\/a>, who spelled out the critical process of how to compose channels which I used to get better color depth, <a href=\"https:\/\/www.imagemagick.org\/Usage\/compose\/\">https:\/\/www.imagemagick.org\/Usage\/compose\/<\/a>.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Near IR has been covered in earlier posts and I wanted to expand on the topic after seeing it represented in false color. I happened upon Mathieu Stern&#8217;s work a couple of weeks after my last post, which he posted just over three weeks earlier. The commercial grade work employed a yellow filter inserted in a modified high end camera that had its Near IR filter removed by Kolari Vision. This second video expanded on the topic. The filter manufacturer&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/www.cloudacm.com\/?p=4070\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-4070","post","type-post","status-publish","format-standard","hentry","category-computer-vision"],"_links":{"self":[{"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/posts\/4070","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4070"}],"version-history":[{"count":11,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/posts\/4070\/revisions"}],"predecessor-version":[{"id":4089,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/posts\/4070\/revisions\/4089"}],"wp:attachment":[{"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4070"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4070"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4070"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}