apply camera profile on focus stack

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

Moderators: rjlittlefield, ChrisR, Chris S., Pau

iconoclastica
Posts: 486
Joined: Sat Jun 25, 2016 12:34 pm
Location: Wageningen, Gelderland

apply camera profile on focus stack

Post by iconoclastica »

First time in my life I need colour reproduction as accurate as possible. However, the way I know how to apply camera profiles is through Lightroom on RAW images, whereas my focus stacks are composed of jpegs. What should I do?
--- felix filicis ---

Beatsy
Posts: 2105
Joined: Fri Jul 05, 2013 3:10 am
Location: Malvern, UK

Post by Beatsy »

Shoot raw, ,convert to TIFFs and stack those. Then colour balance the result as you would for RAW files. Maybe better to set custom white balance in camera to get "true colour" inputs - but I'm not sure if stacking preserves the colour properly.

Takes longer of course (bigger files).

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

Re: apply camera profile on focus stack

Post by rjlittlefield »

iconoclastica wrote:First time in my life I need colour reproduction as accurate as possible. However, the way I know how to apply camera profiles is through Lightroom on RAW images, whereas my focus stacks are composed of jpegs. What should I do?
Have you already shot the stacks that you want to process, or are you looking for advice on future stacks?

Which focus stacking software are you using?

And one more... a silly question, perhaps, but exactly how are you measuring the accuracy of color reproduction? Is this a case of making prints, or something else?

--Rik

elf
Posts: 1416
Joined: Sun Nov 18, 2007 12:10 pm

Post by elf »

Just make up words for the colors you want to be accurate, then everyone will be able to see them 8)

http://www.sciencealert.com/humans-coul ... h-suggests

iconoclastica
Posts: 486
Joined: Sat Jun 25, 2016 12:34 pm
Location: Wageningen, Gelderland

Post by iconoclastica »

Beatsy wrote:Shoot raw, ,convert to TIFFs and stack those. Then colour balance the result as you would for RAW files. Maybe better to set custom white balance in camera to get "true colour" inputs - but I'm not sure if stacking preserves the colour properly.

Takes longer of course (bigger files).
This works for short stacks, but macro stacks often have more than 100 layers. Moreover, the process is automated then.
--- felix filicis ---

iconoclastica
Posts: 486
Joined: Sat Jun 25, 2016 12:34 pm
Location: Wageningen, Gelderland

Re: apply camera profile on focus stack

Post by iconoclastica »

rjlittlefield wrote:Have you already shot the stacks that you want to process, or are you looking for advice on future stacks?
I have shot stacks and I think the result could be better. So let's say I need advice for future stacks.
Which focus stacking software are you using?
Zerene, often with Stackshot.
And one more... a silly question, perhaps, but exactly how are you measuring the accuracy of color reproduction? Is this a case of making prints, or something else?
I am now preparing test pages that finally will appear in a printed book (offset printer). We will be making thousands of photos and I want to master the process as well as possible before I really start producing.

The subject matter is plants and the colours of leaves and flowers matter.

On sufficiently large subjects I can measure the colour with the Pantone Colour Cue. But also the values of the colour patches of the various calibration charts are known and can be compared with the digital colors. I trust that when the patches are correct, every colour in the photo will be correct?

I make camera profiles with the color checker passport. As yet I haven't got an idea how to do the same in macro.
--- felix filicis ---

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

Re: apply camera profile on focus stack

Post by rjlittlefield »

iconoclastica wrote:Zerene, often with Stackshot.
With Zerene, pixel values in the output files will exactly equal pixel values in the input files if you do three things:

1. Disable brightness correction.

2. Use the DMap stacking method. (PMax often alters colors, typically increasing contrast and reducing saturation.)

3. Do not select "Retain extended dynamic range" when saving images.
On sufficiently large subjects I can measure the colour with the Pantone Colour Cue.
If you use the same lens, then the same calibration should work for macro. If you use a different lens, the color may shift. You could do a quick check using just white balance. I am not aware of any color charts that are made small enough to be used directly with macro.
I trust that when the patches are correct, every colour in the photo will be correct?
Unfortunately, no. There is an effect called "metamerism" that makes it impossible to exactly match all the colors all the time, even well inside the color gamut of the workflow. But if you shoot with high CRI illumination and match the patches, you'll be as good as it's possible to get.
However, the way I know how to apply camera profiles is through Lightroom on RAW images, whereas my focus stacks are composed of jpegs.
In your situation, I strongly recommend to go with RAW and avoid JPEG. Yes, it is more expensive in terms of computer time and storage. But with JPEG there's a lot happening under the covers that you don't have control over. This includes the possibility that the camera may do slightly different things from one scene to another, even though you think you have everything locked down and set manually. JPEG also provides much less capability to accurately adjust color balance after shooting.

Using Lightroom with the Zerene Stacker plug-in, there's not much difference in human time between raw and JPEG.

--Rik

iconoclastica
Posts: 486
Joined: Sat Jun 25, 2016 12:34 pm
Location: Wageningen, Gelderland

Re: apply camera profile on focus stack

Post by iconoclastica »

So, if I recapitulate:
  • * there's no input profiling unless I shoot RAW
    * input jpegs for focus stacking have to be generated from these RAWs
That would be unfortunate, for there's quite a lot of difference when shooting thethered jpegs and raw. The former get's tranfered to the computer and processes in the PMax stack within my usual 3 seconds shooting cycle, whereas the latter takes a long time to get transfered over USB 2.
rjlittlefield wrote: Using Lightroom with the Zerene Stacker plug-in, there's not much difference in human time between raw and JPEG.
--Rik
I hadn't noticed that plugin yet! I just installed it and it seems to work. So then the workflow becomes:
  • * shoot raw, thethered or ofline
    * import into Lightroom
    * export to zerene
Is that correct?

From there, I hit snags again. W/o brightness correction and dynamic range, well, that's something I should try. Just I never did. But DMap rarely works for me: loads of artifacts where PMax often gives me a clean result straight away.
--- felix filicis ---

iconoclastica
Posts: 486
Joined: Sat Jun 25, 2016 12:34 pm
Location: Wageningen, Gelderland

macro target

Post by iconoclastica »

I am not aware of any color charts that are made small enough to be used directly with macro.
I think I see a way. Four patches can be shot simultaneously 1:1. Six of these can be combined into a raster that can be calibrated. Not as straightforward as including a target in the corner of a photo, but for a fixed setup it might be worth the effort.
--- felix filicis ---

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

Re: apply camera profile on focus stack

Post by rjlittlefield »

iconoclastica wrote:So then the workflow becomes:
  • * shoot raw, thethered or ofline
    * import into Lightroom
    * export to zerene
Is that correct?
That's correct. Color profiling would get applied between the import and export, through Lightroom settings.
DMap rarely works for me: loads of artifacts where PMax often gives me a clean result straight away.
With DMap, it's important to get the contrast threshold slider adjusted correctly. The proper setting is when areas with no significant focused detail go black in preview. For discussion, see the tutorial, "How To Use DMap". A common mistake is to set the slider far left so that nothing is "black in preview". Unless the whole frame is covered by focused detail, that approach practically guarantees nasty artifacts.

With PMax, check to see if the color remains true enough for your purposes. The amount of change that it makes depends on stack depth, typically little for short stacks and progressively more for deeper stacks. The major effects are to increase contrast and reduce saturation, usually not much effect on hue.

Check also whether brightness correction causes problems for you. Typically it does not make noticeable changes in hue or saturation, only in brightness and contrast, again more change with deep stacks.

Sensitivity to all these things varies a lot from one observer to another. I've had users comment about changes that I had to measure because I just couldn't see them by eye, and lots of other people apparently completely content with changes that I found very obvious.

--Rik

iconoclastica
Posts: 486
Joined: Sat Jun 25, 2016 12:34 pm
Location: Wageningen, Gelderland

Re: apply camera profile on focus stack

Post by iconoclastica »

Yes, the final judge is the eye. I hold it for possible that it's a lot of effort without visible result. But first I should try before I decide.

Thanks, I now know how to proceed.

BTW: I think I meticulously position the slider just up to the point where the first dots start to appear within the detaild zone. Since I use white backgrounds, the transition usually is sudden.

If all other fails, I could use the PMax for lightness and DMap for colour layers.
--- felix filicis ---

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

Post by rjlittlefield »

That sounds like the right strategy for slider positioning. Sometimes a bit farther to the right produces better results, especially if the subject contains areas that are featureless or nearly so it can help to let those go black in preview along with the background.

What sort of artifacts do you see? Can you post examples?

--Rik

iconoclastica
Posts: 486
Joined: Sat Jun 25, 2016 12:34 pm
Location: Wageningen, Gelderland

Post by iconoclastica »

rjlittlefield wrote:What sort of artifacts do you see? Can you post examples?
--Rik
Here's an example, somewhat arbitrarily chosen, for I use to delete the part-images after use. It may not be the best example. But these still remained in the file buffer:

Image

This was my threshold choice (I think in my first attempt I was slightly more conservative, thus including the droplets and accepting a little background selection):

Image
--- felix filicis ---

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

Post by rjlittlefield »

felix, I apologize for the late reply. I missed seeing the post of your images, and returned to this thread only just now when I wanted to add some new information.

This scene will be impossible for either DMap or PMax to handle perfectly, because of its many small stalks that overlap in XY but are widely separated in depth. Because of the "transparent foreground" effect, the stalks in front will always look transparent even if they are actually opaque. In addition, DMap will inevitably create gray outlines in places where the depth map has to slew from foreground to background, crossing frames where nothing is in focus and the lens is getting most of its light from background. I have marked some examples of this problem at the black arrows.

By comparing the PMax and DMap outputs, I see that these DMap outputs are also suffering from blotchy contamination of what should be almost uniformly colored areas. I have marked a couple of these places with green arrows. The reason those areas look blotchy is that the contrast threshold is set too low. Notice in your contrast threshold preview image that these areas do not appear in their natural colors (saturated red). Instead, they are blotched with gray, as they appear in the final DMap rendering. These areas could be cleaned up by moving the threshold higher (slider to the right). In other words, get more aggressive about making things go black in preview. With scenes like this, sometimes the best position of the slider is to make everything except strong edges go black in preview.

Image

I often describe the "best" position of the slider as being when the unfocused background goes black in preview. But that's only an approximation. When portions of the subject do not contain discernible detail, it is important to make those parts go black in preview also. Otherwise you get this blotchy effect because the software latches onto low contrast variation that comes from random pixel noise instead of real detail.

In general, for this sort of subject I'm pretty sure you'll find that your best results will come from running DMap with a higher threshold, followed by retouching from PMax in areas where it does a better job, such as on those overlapping stalks.

-----------------------------

Now, the bit of information that I wanted to add, which is completely unrelated to the above. I learned today that X-Rite ColorChecker makes a small version of their chart, only 1"x1.5" in total. That's clearly not small enough to fit in the frame that you've shown as an example, but it might be helpful in lower magnification work.

The downside is price -- despite its size, or perhaps because of it, the small chart costs twice as much as the regular 8.25"x11" chart. The small chart is called the "X-Rite ColorChecker Extra Mini Chart". Google search should find that for sale at several places for currently about $150.

--Rik

Chris S.
Site Admin
Posts: 4042
Joined: Sun Apr 05, 2009 9:55 pm
Location: Ohio, USA

Post by Chris S. »

Might we move this thread to the "Macro and Micro Technique and Technical Discussions" forum? Interested readers might miss it here in the gallery.

--Chris S.

Post Reply Previous topicNext topic