Avoiding Zerene artifacts

A forum to ask questions, post setups, and generally discuss anything having to do with photomacrography and photomicroscopy.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

Dee Aitchess
Posts: 4
Joined: Tue Jun 27, 2017 11:12 pm
Location: Rural NSW Australia

Avoiding Zerene artifacts

Post by Dee Aitchess »

I often get a row of dots on my stack that are not in the original image. It seems to be be one per slice, my guess is that a small contrasting point, perhaps just a single pixel, is eluding the stacking algorithm and getting reproduced in each slice. It is tedious going back to edit them out.

What causes these dots and what should I do to prevent them?

ChrisR
Site Admin
Posts: 8668
Joined: Sat Mar 14, 2009 3:58 am
Location: Near London, UK

Post by ChrisR »

You will probaby find each one moves as yuou go through the stack. If so it's dust on your sensor.
Chris R

Lou Jost
Posts: 5944
Joined: Fri Sep 04, 2015 7:03 am
Location: Ecuador
Contact:

Post by Lou Jost »

Or, if it is a bright colorful dot, it can be a hot pixel on the sensor. Many cameras have functions to automatically eliminate these hot pixels.

clarnibass
Posts: 130
Joined: Fri Jun 10, 2016 11:33 pm

Post by clarnibass »

Look at the original photos and see if there is a dot at that area. What usually happens is whatever you are taking a photo of moves slightly in the frame for each photo (because you change focus, move the camera, etc.). If it's a dot at the same place in the frame, it moves when the software aligns the photo so it ends up misaligned and creates this "row". The software uses them because they have contrast.

Sometimes it's easiest to clone/heal them before stacking. Since it is at the same place you can often just copy the clone/heal to all photos. Sometimes it's easier to clone them after.

Dust on the sensor is the most common and found it impossible to clean the sensor to such a degree that it doesn't happen 100% of the times. It could be one of the other things mentioned.

Lou Jost
Posts: 5944
Joined: Fri Sep 04, 2015 7:03 am
Location: Ecuador
Contact:

Post by Lou Jost »

The OP said it was often a single pixel, and describes it as often single high-contrast points. So I'd like to repeat that these are usually caused by hot pixels rather than dust. If so, cleaning the sensor will not help. Most cameras can easily fix that for you automatically.

Lou Jost
Posts: 5944
Joined: Fri Sep 04, 2015 7:03 am
Location: Ecuador
Contact:

Post by Lou Jost »

The OP said it was often a single pixel, and describes it as often single points. So I'd like to repeat that these are usually caused by hot pixels rather than dust. If so, cleaning the sensor will not help. Most cameras can easily fix that for you automatically.

ChrisR
Site Admin
Posts: 8668
Joined: Sat Mar 14, 2009 3:58 am
Location: Near London, UK

Post by ChrisR »

And you did repeat it, which is fair enough, because you're probably right!
Chris R

Lou Jost
Posts: 5944
Joined: Fri Sep 04, 2015 7:03 am
Location: Ecuador
Contact:

Post by Lou Jost »

Oops, didn't notice my double post!!

Greenfields
Posts: 116
Joined: Thu Nov 25, 2010 10:54 am
Location: Nottinghamshire, England

Post by Greenfields »

Dust spots will be dark with diffused edges. They are much more conspicuous in macro work because of the high f/ numbers = small effective apertures we use, casting sharper shadows of dust particles through the stack of filters [IR short-pass, OLP anti-aliasing filters &c.] which cover the sensor.


"Hot pixels" will be a few pixels in size and generally take the form of a sort of cross. The cross may be white [if the defective photosite is behind a green Bayer filter element] or coloured [if the photosite is behind a red or blue filter element]. Again these are much more conspicuous in macro work because of the long exposures we use. A "hot pixel" gets brighter with longer exposures.

The cross may look like a single pixel because its centre is much brighter than the rest.

In my experience defective photosites are much less common than they were as manufacturing technology has advanced

Here is an example of hot pixels produced by a Canon 5D Mark II:

Image

Technical note:

The original image was exposed in a 5DII in subdued light, with a capped lens for 837 seconds at ISO 100.

Raw images [left column] opened in Rawnalyze 2.10.30 in Channel mode. Exposure adjustment +4 1/6 EV. All three channels of the raw image are displayed. The maximum scale at which Rawnalyze can view images is 100% - but by taking a screen capture [in this case of a 15 x 15 pixel region of interest centred on the hot pixel] and enlarging this [using nearest neighbour] any other scale can be created.

Demosaicked images were produced by Canon’s Digital Photo Professional software, version 3.5.10 [because this edition of DPP at least does not map out hot pixels] and saved as 16 bit per channel *tif files. These were opened in Adobe Photoshop CS5. A curves adjustment was made to balance the visibility of the hot pixels and the background noise, then a 15 x 15 pixel crop made centred on the selected hot pixel. The crops were enlarged [using nearest neighbour].

Henry
Feel free to edit my images.

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

Here are a couple of replies that I've sent recently, to people who wrote to support at zerenesystems.com asking about trails of bright and dark spots.

Trails of light spots...
Yes, hot pixels are a fairly common problem in stacks.

Focus stacking tends to expose any sort of sensor defects, because the combined process of image alignment and preserving sharp "detail" usually turns each single-dot sensor defect into a line of dots. The resulting line then almost "jumps off the page" because human eyes are so highly optimized for detecting lines.

Sensor dust is the most common problem, with hot pixels trailing substantially behind but still pretty common.

There are several ways to attack the general problem of defect trails in post-processing. But they all amount to making up "good" pixel values to replace the bad values that were actually captured.

Personally I am not fond of the idea of making stuff up if it can be avoided, so I generally recommend to address hot pixels by adjusting the setup so that they do not appear in the first place.

The most important thing is to add light as necessary so that you can shoot at low ISO and fast shutter. In addition to avoiding problems with hot pixels, this will also minimize pixel noise so that you'll get better gradation in the stacked images.

Also, if possible, take the camera out of Live View mode before shooting the stack. Live View mode requires continuous reading of the sensor, which drives its temperature up due to increased power consumption.

In most cases, the combination of low ISO, fast shutter, and avoiding Live View can eliminate hot pixels as a significant problem.

In the remaining few cases where hot pixels remain problematic, you can either address the lines after stacking with some tool like Photoshop's "healing brush", or inside Zerene Stacker by retouching from single source images, or before stacking using some sort of batch edit during the raw conversion. (Search for word combinations like "batch dust removal" combined with the name of whatever image processing software you have available.)
Trails of dark spots...
What you're looking at are called "dust trails".

If you examine your source images, you will find that each of the trails in the output image corresponds to a single dot at a fixed position in the input files. What happens is that as you step focus, the subject appears to change size and moves slightly across the sensor. During the stacking process, Zerene Stacker realigns the images as necessary to keep the subject in one place and size. But then each dot appears to move across the frame. Zerene Stacker treats the dot(s) as detail to be retained, so, in the output, you end up seeing each dot in all of the various positions that it had across the whole set of source images, after realignment.

The individual dark spots are due to dust on your sensor. For those, the best thing you can do is to clean your sensor and keep it that way. Every process for "removing" dust after the picture has been shot actually amounts to asking the computer to replace bad pixel values, which were contaminated by dust, with made-up values based on surrounding pixels. This can work pretty well, but it's definitely better to avoid the problem in the first place by using a clean sensor.

If you cannot clean your sensor and keep it that way, then all of the remaining options are less than ideal. At this time, there is nothing like a "defect removal tool" built into Zerene Stacker that will prevent the dots from propagating to become trails. One approach is to fix up the trails in post-processing, using something like Photoshop's "healing brush". Alternatively, you can run the source images through a batch process, using say Lightroom or Photoshop, and apply a healing brush to eliminate the dots at that stage. Often the streaks are most obvious in out-of-focus background regions. In those areas, they can be effectively eliminated by retouching in Zerene Stacker, brushing over that whole area from the appropriate single input image.

In some cases, especially with high magnification work using microscope objectives and a very stable focus stepping platform, you can eliminate the trails by turning off image alignment. (Go to Options > Preferences > Alignment and remove all the check marks.) By not realigning the images, this will preserve the dots as dots instead of trails. Of course this presumes that alignment is not required. With typical macro setups, turning off alignment is not practical because it will produce a blurred result.
--Rik

Post Reply Previous topicNext topic