1

This is somewhat hard for me to explain, but what I'm looking for is a technique to correct a fixed-pattern intensity variation in an image. The pattern comes from (say) a projection system and is not inherent to the actual image.

I can produce a 90%-average white frame that exposes these variations, which amount to perhaps as much as 10%, so that the range of values will be from about 85% to 95% in different areas. I then need to make an inverted mask / alpha that undoes those variations. So if applied to the original white frame it would result in a pure image with no variations. Once created, the mask will be applied externally, not within a graphics program.

If I've managed to convey that, how would you approach the creating of this transparency / alpha mask, given the original white frame with variations? My tool of choice is PSP 9 (no laughs), but a solution using PS would be fine.

4
  • @joojaa - Because this is still just theory -- the image won't exist unless I can flesh out the concept. And I mentioned that once I have a suitable invert mask, it will not be used in a graphics program. It will become a static transparency layer in a live electronic process with motion video. – Jim Mack Dec 30 '14 at 20:01
  • Imagine as an analog of this that you shot some video with a camera whose lens had a few 'dark spots' from dirt or whatever, that only occluded the image but did not block it. And suppose that you had at one point also recorded a perfectly grey field with this camera. The task is to find these luminance differences and neutralize them as much as possible. – Jim Mack Dec 30 '14 at 20:13
  • (continued) The grey image has the data, the plan is to make a layer that inverses the problem in all the other video. This isn't exactly it, but solving that would solve the actual issue. So the problem I'm working on is: how do I extract the static fault data from a grey still, using a graphics program? – Jim Mack Dec 30 '14 at 20:13
  • Is it better now? Anyway this should be moved to some other stack exchange like stack overflow or physics (but its hard to find a match). As this is not a graphics design problem but an engineering one. – joojaa Dec 30 '14 at 21:22
1

Below your original with the +/- 5% variance, add a second layer that is an even 90% gray (or white, whichever term you prefer!), then:

  • Add a layer below that is a flat 90%, no variations.

  • Target your top layer. From the main menu, choose Image > Apply Image > Subtract. Set Layer: to your new flat layer, Offset: to 128 and Scale: to 2.

  • Invert.

  • Change the blend mode of your top layer to Linear Light.

  • Merge down.

This will give you a layer that inverts the variations from your base 90%, and will give you a more accurate result than varying the luminance by hand.

2
  • Thanks, that sounds easy (-: I'll have to translate that into PSP9 terms to see if I can do it here or have to get help from a colleague with PS. The Arithmetic.. Subtract menu has Bias and Divisor which I assume match Offset and Scale, but Linear Light is not a blend mode I recognize in PSP. If you describe its effect I can probably find the PSP analog. Maybe just Luminance Only? – Jim Mack Dec 31 '14 at 1:39
  • Alan, i prefeer to fill layers and use subtract mode instead as its nondestructive. Its better if you get a step wrong and are developping the method. @JimMack linear light is add, sum or something like that. – joojaa Dec 31 '14 at 9:25
2

This can be done yes, I would call this operation equalizing or normalizing the image. That white image is the alpha, if you can call it that.

As per comments and feedback:

It is possible to drop all pixels down to 85%. There are 2 possible physical phenomena: subtractive or multiplicative masks, so I'm outlining both

  1. Subtractive for emitters such as digital imaging units. First subtract 85% percent form your reference image then invert the image and subtract the source with that. You now have a mask of how much to subtract the color with.

    Mathematically speaking it is:

    1-(error-85%filledLayer)

enter image description here

Image 1: Top original difference capture (synthesized and HIGHLY exagarated), resulting mask trough subtraction, subtracted mid from top

  1. Alternatively since your physical mask is most likely multiplicative (due to physics of semitransparent maps). You can use divide instead divide a 85% layer with your original error image. That is then your mask.

    Mathematically speaking it is:

    85%filledLayer/error

Divide multiply

Image 2: Top original difference capture (synthesized and HIGHLY exagarated), resulting mask through division, multiplied top and mid

All functions used exist in both Photoshop (as that's what I used) and PSP, as well as Matlab and Mathematica.

Make sure that:

  1. Your color correction mode is converted to a linear working space. Otherwise calculations won't work! This is highly unnatural for graphics designers but makes the math MUCH easier.
  2. That your manufacturing process has a well defined color profile that can adjust to your linear data.

NOTE: it's way better if you do this processing in Mathematica or Matlab since it's far easier to formulate this as mathematics.

PPS: I'm not a graphics artist but a mechanical engineer.

3
  • Thank you for your highly detailed analysis. I do think that you're trying to solve my underlying issue, not the question I actually posed. I'm sure what you're proposing works as an end-to-end fix, but that isn't what I need: I just need to generate an alpha layer. – Jim Mack Dec 30 '14 at 21:46
  • Thats the process and alpha, anyway since you didnt indicate base level of expertise i didnt think you needed to know what buttons to push. had you come to the chat i would have known. Alan outlines my original answer as process chains. anyway subtract just means set layer mode to subtract divide layer mode to divide. etc.. – joojaa Dec 31 '14 at 9:13
  • @pizza TY doing a good job! – joojaa Apr 3 '15 at 5:22
0

I think I have a workable process for this. The steps are:

1) Capture the initial average 90% white frame with +/- 5% areas

2) Reduce the overall luminance to 50% average -- pixels that were exactly 90% proportionally become 50%, those at 95% become 52.7% etc.

3) Invert the image: make it negative. Anything at 50% stays the same, anything at 53% becomes 47%, and so on.

4) Increase overall luminance so that 50% pixels are again at 90%, or whatever higher level allows no clipping (nothing tries to exceed 100%).

5) The resulting image can be used as a transparency layer, reducing the intensity of those areas that originally were too bright, and likewise for ones originally too dark. The overall amount of correction can be varied using gain.3

If anyone sees an issue with this, or doesn't understand my thought process, please comment. I feel pretty good about it, but it's still just an idea.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.