What's new

High-end color matching head scratcher


BenjyvC

Member
Messages
5
Likes
0
I'm working with custom lighting to produce photography used in photogrammetry, there being two models of LEDs used in separate exposures of nearly identical rasters. I'm limited to manufacturing tolerances in how closely matched are the spectral output of both arrays, there being a slight shift in overall chromaticity between images illuminated with each set of LEDs. This poses a problem when I go to layer these exposures in Photoshop to apply a difference blend, something I intend to use to tease out specular reflections in one of the image sets. This only works when the the color matches perfectly in both sets. I've had these LEDs tested and was provided a set of text files containing the needed spectral data, the question now turning to how to use this data to filter out of each data set what's not in common to the other data set, allowing me to work with a lowest common denominator. I'm not worried about dumbing down the color, as the isolated specualar data is converted to grayscale before it's put to use in a shader tree in a game engine.

Any idea how this might work in Photoshop. I'd write an action script to batch process the image database, just need to figure out how to make this work on two images based on the data in the .txt files. I'm attaching a partial sample of these files, the full spectral distribution data is about ten times too big to upload here. Many thanks!
 

Attachments

Tom Mann

Guru
Messages
7,223
Likes
4,341
First, let me check that I understand your goal. If I understand the description of your project, your goal is to produce a photograph-like image in which diffuse reflections from the objects being photographed are suppresed, leaving only the specular reflections from them.

If this is not correct, don't even bother reading further, because my comments are based on the above assumption.

If my understanding is correct, here are two suggestions:

1) If at all possible use a more direct, real-world method to separate the diffuse from specular reflections instead of trying to do it after the fact using Photoshop or some other post processing approach. Traditionally, by far, the best way to separate diffuse from specular reflections has been to rely on the fact that diffuse reflections strongly depolarize polarized incident light, whereas specular reflections retain much of the polarization of polarized incident light. This fact is often used to suppress unwanted reflections (eg, from an impasto top layer) when photographing paintings for museum quality reproduction.The painting is illuminated with 2 or more light sources with polarizing film on all sources. These polarizers are all aligned in the same way, say, to permit only vertically polarized light to pass. A polarizing filter is placed in front of the camera lens, and oriented to pass only horizontally polarized light. This setup guarantees that specular reflections will be strongly suppressed.

If I understand your problem correctly, you need to do the opposite, i.e., suppress the diffusely scattered light coming off the scene, and pass only the specularly reflected light. For various reasons that we can delve into later, one can not do this by simply re-orienting the polarizers. Instead, much like your current method, one would have to use a difference approach. In other words, take two photos using the same light sources, but rotate the camera's polarizer by 90 degrees between shots. One forms the difference image, and then inverts it. This approach should be vastly more robust than the method you described in your post. Specifically, it should not be susceptable to the small changes in color and intensity that are interfering with your current approach.
------------

2) If there is some constraint on your workflow that does not permit you to use suggestion #1, and forces you to use the method you described, then let me make the following simple suggestion:

Photograph the scene with a camera that can store the images in RAW form (ie, not JPG or TIF). Immediately after photographing each scene, without changing anything, put a neutral gray reference card in the scene and take another photo. Then use either PS's ACR module, or Lightroom to do a custom white balance on the image(s) of the scene based on the gray card image(s).

For accurate results, it is critically important to do this sort of white balance / color correction in a linear color space (ie, the raw data from the sensor), not any of the common color spaces (ie, sRGB, Adobe RGB, ProPhoto RGB, or any of the CMYK spaces), all of which include gamma corrections. The reason for this is that if you try to do it in a gamma corrected space, you will not be able to get exactly the same cc / WB on the shadows and highlights with one set of corrections.

Let me know if any of this sounds useful to you, and we can pursue it further.

Cheers,

Tom M
 

Tom Mann

Guru
Messages
7,223
Likes
4,341
PS - If the scenes have already been shot, and you can't use either of the above suggestions, then there is a work-around to the necessity of having gray card shots in my suggestion #2. Let me know and we can discuss this.

Tom M
 

BenjyvC

Member
Messages
5
Likes
0
Thanks, Tom. I might have provided more information, was going for succinct, but you've described precisely my workflow using cross-polarized and co-polarized photography, these two images being what I'm needing to layer in difference blend mode to isolate the specular reflections. I'm clear that LEDs produce very spiky sprectral distribution, non-uniform color, which then throws the conversion from RAW. But given I'm working with 5700 K with a high 92 CRI, I'm not unhappy with the color, might not be absolutely faithful to the subject or what's latently yet in the data, but close enough for my purposes at present. I'd be interested to produce a LUT camera profile for this light down the road, but have bigger fish to fry presently trying to isolate the specular reflections.

A post on the Adobe forum suggested this .txt file seems to follow some kind of ASCII LUT, that pinning the format might be a start to converting, if need be, to whatever format PS uses in an Adjustment Layer referencing LUTs, whatever that format follows. I'm in contact with the firm that tested the LEDs, they'll surely have something to say about the original format going out, but do you have any thoughts how to pin what format PS is friendly with, much less what workflow implements LUTs in an Adjustment Layer?

Many thanks,
Benjy
 

Tom Mann

Guru
Messages
7,223
Likes
4,341
I'm out and about thru this evening. I'll try to respond to your comments early tomorrow morning (US East coast time).

Tom M

PS - I'm glad I did not misinterpret your description & u have already incorporated polarizes into your workflow. CU later.
 

Tom Mann

Guru
Messages
7,223
Likes
4,341
Sorry. Got called out of town over the weekend. I'll respond tomorrow when I'm stuck at home with the big snow storm that is heading our way.

Tom
 

BenjyvC

Member
Messages
5
Likes
0
Hi Tom,

Not to burden you, but many thanks for your thoughts. Some surrounding pieces are beginning to take shape, will be nice to have a plan addressing the need for a LUT. Thanks.

Benjy
 

Top