• Ultraviolet Photography
  •  

Freeware EM1 dye channel images using bandpass filters

Filters UV Camera
4 replies to this topic

#1 dabateman

    Da Bateman

  • Members(+)
  • 884 posts
  • Location: Maryland

Posted 15 April 2019 - 21:10

Phil Warren recently shared his code to look at only one channel from a captured image in his blog post here:
http://www.philwarre...raphy.com/blog/

But using the code and specific bandpass filters, we look at the specific dye response at specific wavelengths for our cameras. First you need to have dcraw. On a windows computer you can get the latest compiled version from Easy HDR:
https://www.easyhdr....download/dcraw/

Then you also need to install Imagemagick and make sure during the install procedure you click to install the "convert" program:
https://www.imagemagick.org/

Now getting access to the command prompt just type "cmd" into the search bar on a Windows 10 computer.

Using this code you convert your raw images to output just one specific channel.

For my EM1 Red is:
dcraw c -D -T -6 -g 2.4 12.92 -o 1 Pictures/image.orf | convert - -roll +1+1 -sample 50% Pictures/image_Red.TIF

For EM1 Blue is
dcraw c -D -T -6 -g 2.4 12.92 -o 1 Pictures/image.orf | convert - -roll +0+0 -sample 50% Pictures/image_Blue.TIF


For EM1 GreenA is
dcraw c -D -T -6 -g 2.4 12.92 -o 1 Pictures/image.orf | convert - -roll +0+1 -sample 50% Pictures/image_GreenA.TIF


For EM1 GreenB is
dcraw c -D -T -6 -g 2.4 12.92 -o 1 Pictures/image.orf | convert - -roll +1+0 -sample 50% Pictures/image_GeenB.TIF

The dcraw settings use document mode to avoid any alterations of the raw file and output to sRGB color space. The convert settings drop out to just one color channel. Really cool.

Taking images of a flower using my specific bandpass filters I get the following. The first image is the Monochrome original image used to sample, followed by the Blue, Green and Red channels as labelled. The Pentax UAT lens was used set at f8 and two UVB 15.0 bulbs were used for all images.
300bp10
Attached Image: EM1_300nm_Channels.jpg
313bp25
Attached Image: EM1_313nm_Channels.jpg
335bp10
Attached Image: EM1_335nm_Channels.jpg
370bp15
Attached Image: EM1_370nm_Channels.jpg
390bp25
Attached Image: EM1_390nm_Channels.jpg
Badder Venus U filter
Attached Image: EM1_Baader_Channels.jpg

Here are specific Wratten #47 (blue), #58 (Green) and #29 (red) stacked with BW 486 filter to ensure I am looking at the specific Blue, green and red channels.
Attached Image: EM1_Tiffen47_Channels.jpg
Attached Image: EM1_Tiffen58_Channels.jpg
Attached Image: EM1_Tiffen29_Channels.jpg

Interesting is the green channels both seem to have the exact same response through the range tested. This I wasn't sure of as I think Olympus uses two slightly different green dyes. Also interesting to see how much sharper the specific channel signal is compared to the original raw file. I may use this to get better monochrome results from my EM1.

#2 dabateman

    Da Bateman

  • Members(+)
  • 884 posts
  • Location: Maryland

Posted 15 April 2019 - 22:13

Looks like the files seems to be auto brightened. Here is a set using -d code to adjust the black point. These look much better.

Attached Image: EM1_300nm_Channels_AutoSet.jpg
Attached Image: EM1_313nm_Channels_AutoSet.jpg
Attached Image: EM1_335nm_Channels_AutoSet.jpg
Attached Image: EM1_370nm_Channels_AutoSet.jpg
Attached Image: EM1_390nm_Channels_AutoSet.jpg
Attached Image: EM1_Baader_Channels_AutoSet.jpg

#3 dabateman

    Da Bateman

  • Members(+)
  • 884 posts
  • Location: Maryland

Posted 14 May 2019 - 06:23

I found a better way to get the four channel data directly.

Download the latest version of Libraw for your computer and extract the file.
In the Bin folder is a program called 4channels.

Copy 4channels and libraw.dll to your users folder in Windows for easy access.

On a windows computer open a command prompt using cmd.
Then use the following code:
4channels -A -g image.raw

The -A will autoscale the results using an integer factor.
The -g will use a 2.2 gamma correction. This is not needed and for image analysis is probably best to be avoided. But it does boost the image a bit for visual analysis.

The result after running this will be four output Tiff files labelled .raw.b, .raw.r, .raw.g and .raw.g2

The output is cleaner as well. I am not sure what type of scaling dcraw is doing, but its doing something to the images.

#4 Marianne Oelund

    Imaging Enthusiast

  • Members
  • 12 posts
  • Location: Seattle, WA, USA

Posted 14 May 2019 - 08:12

View Postdabateman, on 15 April 2019 - 21:10, said:

Phil Warren recently shared his code to look at only one channel from a captured image in his blog post here:
http://www.philwarre...raphy.com/blog/


You can open any JPEG (or TIF or almost any other format) image in Irfanview and turn off the R, G and/or B channels (but not G1 or G2 individually). Very quick, very simple.

#5 dabateman

    Da Bateman

  • Members(+)
  • 884 posts
  • Location: Maryland

Posted 14 May 2019 - 09:40

Marianne,
The jpeg has been interpolated. For many cases, odd artifacts are introduced. Especially for Olympus files, where VNG is sometimes better than typical Amaze.

Using the 4channels method, with my Olympus Em1, I can get a true 4Mpixels image. I will have to try this, but you can split to the 4 channels. For some reason one of the green channels has banding. I think it may contain all the phase detect photo sites. You can throw it away and remerge the others to RGB.