• Ultraviolet Photography
  •  

Tree stump UVIVF with contaminating light removal by image subtraction

Fluorescence Processing UV Lighting
23 replies to this topic

#1 Andy Perrin

    Member

  • Members+G
  • 4,425 posts
  • Location: United States

Posted 23 November 2020 - 03:00

Awhile ago I found that it was possible to remove visible light contamination in UVIVF photography by subtracting an (averaged) image without the torch from an image illuminated with the torch. This method was used to excellent effect with the Queen Anne's Lace that I showed some time ago. The secret is to only subtract on 16 bit linear images, which can be obtained from PhotoNinja by turning off everything except the white balance. Do not try image subtraction on JPEGs! You won't get nice results.

The filters used were BG38 2mm + Tiffen Haze 2E, and the contaminating background light is streetlights. The white balance and color correction were taken from the profile I made for the gourd photos the other day.

The torch was the Nemo.

Procedure was to take 30 photos with the torch off using the built-in intervalometer in my Son A7s, and then repeat the process with 30 more photos while light painting with the Nemo. I then took the median of the no-torch photos to get a combined no-torch image, and took the MAXIMUM of the light-painted images to get a combined with-torch image. Then I subtracted the streetlight-only image from the streetlights+UV image in Photoshop and adjusted contrast on the results.

Final result:
Attached Image: Strump UVIVF PN UVP.jpg

Image with torch + streetlights:
Attached Image: Torch-Max UVP.jpg

Image with streetlights only:
Attached Image: No torch-Median-outliers removed UVP.jpg

Edited by Andy Perrin, 23 November 2020 - 03:01.


#2 colinbm

    Member

  • Members+G
  • 2,749 posts
  • Location: Australia

Posted 23 November 2020 - 03:25

This is striking in the differences Andy, good work.

#3 Stefano

    Member

  • Members(+)
  • 2,187 posts
  • Location: Italy

Posted 23 November 2020 - 03:29

That worked wonderfully! You really cleaned your image, this may have interesting applications.

A question: Why did you take the maximum of the torch images? Does it work better than the average/median* by experience, or is there a deeper reason?

*are the average and the median the same here?

#4 Andy Perrin

    Member

  • Members+G
  • 4,425 posts
  • Location: United States

Posted 23 November 2020 - 03:43

Thanks, Colin!

View PostStefano, on 23 November 2020 - 03:29, said:

A question: Why did you take the maximum of the torch images? Does it work better than the average/median* by experience, or is there a deeper reason?

*are the average and the median the same here?
Stefano, median is not the same as average -- see the wiki article here:
https://en.wikipedia.org/wiki/Median

The reason for taking the median of the streetlight images is that medians *reject outliers* very well, and in this case that means it removes the headlights of passing cars! Typically if you take 30 images at least one or two will contain headlights but by taking the median those won't be included in the combined image.

The reason for taking the max of the torch images is that you want to get the brightest pixels of the set, since the brightest pixels have the most UVIVF signal. (No cars passed by while taking the UVIVF ones, or I would have had to redo it.)

Edited by Andy Perrin, 23 November 2020 - 03:45.


#5 Stefano

    Member

  • Members(+)
  • 2,187 posts
  • Location: Italy

Posted 23 November 2020 - 03:58

I know that a geometric mean works better than the arithmetic one (the typical average) at removing outliers, since it uses more "powerful" operations to calculate it. But I guess you don't have the tools to calculate it on a series of images, and maybe the median is just better anyway.

Can you pick the dimmest pixels to remove "positive" spikes in brightness (for the no-torch image)? That should work too.

#6 Andy Perrin

    Member

  • Members+G
  • 4,425 posts
  • Location: United States

Posted 23 November 2020 - 04:02

Stefano- yes, the minimum would have worked on the no-torch. I prefer the median. Most software doesn’t do geometric means and median works very well for the purpose.

#7 Cadmium

    Member

  • Members+G
  • 4,250 posts

Posted 23 November 2020 - 05:10

Andy, Great shot! :smile:

#8 Andy Perrin

    Member

  • Members+G
  • 4,425 posts
  • Location: United States

Posted 23 November 2020 - 05:34

Thanks Cadmium!

#9 dabateman

    Da Bateman

  • Members+G
  • 3,007 posts
  • Location: Maryland

Posted 23 November 2020 - 08:07

Andy this excellent. What is that orangish thing between the stumps?
That is only really visible in your final subtraction image.

#10 GaryR

    Member

  • Members+G
  • 318 posts
  • Location: London, Ontario, Canada

Posted 23 November 2020 - 14:15

Striking results, but you really had to work for this image!

#11 Andy Perrin

    Member

  • Members+G
  • 4,425 posts
  • Location: United States

Posted 23 November 2020 - 16:29

David, I have no idea. It could be a piece of trash I missed or something?

Thanks Gary. Not as much work as you would think. The photos took about 15 min and the processing another 20! I guess to people who like “straight out of camera” as the standard then it might seem like a lot?

#12 nfoto

    Former Fierce Bear of the North

  • Owner-Administrator
  • 3,256 posts
  • Location: Sørumsand, Norway

Posted 23 November 2020 - 16:54

Coming up with the initial visual concept can take much longer than that ...

#13 dabateman

    Da Bateman

  • Members+G
  • 3,007 posts
  • Location: Maryland

Posted 23 November 2020 - 18:48

View PostAndy Perrin, on 23 November 2020 - 16:29, said:

David, I have no idea. It could be a piece of trash I missed or something?

Thanks Gary. Not as much work as you would think. The photos took about 15 min and the processing another 20! I guess to people who like “straight out of camera” as the standard then it might seem like a lot?

Now that I look closely it might be a leaf that blew in between the shots. Thus not subtracted out.

#14 Andy Perrin

    Member

  • Members+G
  • 4,425 posts
  • Location: United States

Posted 23 November 2020 - 21:24

Yeah, that sounds plausible. Looking between the two original shots, it looks like that could be the case.

#15 Stefano

    Member

  • Members(+)
  • 2,187 posts
  • Location: Italy

Posted 23 November 2020 - 22:18

In this case, if you used the median for the torch image, you should have removed it, since it is an outlier (and quite a strong one). But you used the maximum for a good reason that you have already explained, so you caught it. I think the only solution sometimes is just to do a "manual" check and remove defective images.

Was it windy when you took the images?

#16 Andy Perrin

    Member

  • Members+G
  • 4,425 posts
  • Location: United States

Posted 24 November 2020 - 04:26

Occasionally gusty but not steady wind. Median for the torch image would have eliminated the light painting!

#17 Stefano

    Member

  • Members(+)
  • 2,187 posts
  • Location: Italy

Posted 24 November 2020 - 04:45

View PostAndy Perrin, on 24 November 2020 - 04:26, said:

Median for the torch image would have eliminated the light painting!
True! I forgot you painted instead of illuminating everything all at once.

#18 dabateman

    Da Bateman

  • Members+G
  • 3,007 posts
  • Location: Maryland

Posted 25 November 2020 - 13:04

Andy,
Do you have sony playmemories installed on your A7S?
The light painting, smooth reflection or light trails apps, $5 each would let you do this live in camera. I was jusst ready about that last night as the cost of a brand new A7Rii is $1200, which is tempting and its one of the last to support the apps, which do stuff useful tbat Sony never added. Also a focus bracketing app or hack app out there as well. Looks like with open memories you can write your own to get the camera to do whatever you want.

#19 Andy Perrin

    Member

  • Members+G
  • 4,425 posts
  • Location: United States

Posted 25 November 2020 - 19:01

Dabateman, yes I do have it installed, but it's not the simple - When I did the above, I used PlayMemories Time-lapse app as my intervalometer to get the shots. Then I did the stacking and alignment with the median and max on the 16bit TIFFs using Long Exposure Stacker on my mac (from the astro community). The results are almost certainly better than what could be achieved in-camera using an app, which would use JPG probably and no alignment.

I honestly don't understand why people are so set on doing things in-camera with shitty quality when you can do better with a custom program on the computer. Convenience isn't worth the price you pay in quality.

Edited by Andy Perrin, 25 November 2020 - 19:03.


#20 dabateman

    Da Bateman

  • Members+G
  • 3,007 posts
  • Location: Maryland

Posted 25 November 2020 - 19:09

Actually depends on the app. The camera processor is specialized for image editing. It can be faster and cleaner with the right software. This is why Fuji and Olympus with recent cameras have the option to edit off the camera tethered to the computer. The camera processor is just better.
But software is lacking. I like the open memories concept, people have added stuff. But still not much available.

I don't know what these apps do or how they handle the data. But might be worth at least researching.