Jump to content

Fixing Really Bad Moire Patterns


Recommended Posts

<p>Here's a comparison between the incident I just had, and the previous one. It seems it is more narrow-spaced textual stripes that cause the problem with my 5D sensor. Note that in the one on the right, Dad's suit does not have a problem, although there was a small patch that cleaned up without dark patterning.</p><div>00W94l-233877684.jpg.9032b8e57ad22a254ad87f1e764965e5.jpg</div>
Link to comment
Share on other sites

  • Replies 50
  • Created
  • Last Reply

Top Posters In This Topic

<p>Hi Nadine -</p>

<p>I just did exactly that. I made two posts which show the layer stack that I used + the settings for the PS BW adjustment layer. Unfortunately, these two posts somehow wound up in a separate thread:<br /> http://www.photo.net/digital-darkroom-forum/00W94r with the title:<br /> <em>"Response to Fixing Really Bad Moire Patterns"</em></p>

<p>I think this happened because I initially attached the wrong screen shot, deleted it, and attempted to re-post it. A warning from photo.net came up saying that it looked like I was trying to do multiple identical posts. Is there any way you, as moderator, can easily move those two posts to this thread?</p>

<p>Thanks,</p>

<p>Tom</p>

Link to comment
Share on other sites

<p>Nadine - With respect to different clothing showing wildly different amounts of Moire banding, the worst problems occur when the wavelength (ie, the repeat interval) of the weave or texture is, after passing through your lens, almost exactly equal to the repeat interval for the pixels in your sensor or some multiple of that frequency. This is called Nyquist aliasing. </p>

<p>A good illustration of the phenomena is <a href="http://logix4u.net/images/stories/dsp/tutorial1/aliasing.jpg">here</a>. In this case, the luminosity of the subject might actually vary from point to point at the rate shown by the high frequency sine wave. However, the sensors, represented by the black dots on the curve, are spaced much further apart, say, just a little over one wavelength apart (as shown). So, when the camera reads out the values of the sensors (ie, the values at the dots), and connects them together to form an image (a graph in a 1-D case), one gets the much lower frequency sine wave shown on the curve. </p>

<p>If the two repetition wavelengths are substantially different, the values at the sampled points will vary almost randomly and you won't have any problems with the image. However if the two repetition wavelengths are close (or nearly a multiple of each other), you get the very low frequency banding that you see. </p>

<p>I'm pretty sure this explains much of the differences you have seen between different fabrics. Magnification ratio, angle of the clothing to the lens, inherent contrast in the weave / pattern, etc. will all change the prominence of the banding, but the major effect is always due to a near match in wavelengths.</p>

<p>HTH,</p>

<p>Tom M</p>

Link to comment
Share on other sites

<p>Tom--thanks so much for the further explanation on both the theory and PS sequence. I can use all the help I can get!</p>

<p>I am moderator in the wedding forum, but my 'powers' don't extend into this forum, so I can't combine the info. Perhaps the forum moderator can help us.</p>

<p>I am posting one last image to show the actual weave/pattern of my previous case, just to add to some possible conclusion as to what kind of patterns would cause moire with my 5D (to try to avoid even shooting with it in the future). The shot was taken outside in mostly natural light and while I still got some moire, this side didn't show it as much. Another similarity is that both were neutral colors. Don't know if that has anything to do with anything.</p><div>00W97R-233899584.jpg.8b666275f392022e71e9c7243cdf7c45.jpg</div>

Link to comment
Share on other sites

<p>OK Tom--after playing around in PS4, I can figure out the black and white layer, but am stuck with the next layer up and then the curves, because I don't understand the layer. I assume this is where the color is restored. So can you run that by me? I am really not so proficient in PS, so go slowly...</p>
Link to comment
Share on other sites

<p>Hi Nadine - Unfortunately, this is going to have to be short because we're preparing for company, but I promise more detail later.</p>

<p>First, note that on each layer above the background / base image, I've added a layer mask to constrain the changes to the problematic area. The mask should have feathered edges for the usual reasons.</p>

<p>Working our way up the layer stack, the next layer is the BW adjustment layer. This provides the heart of the fix: adjustment of the luminosity that varies by color in such a way that the B&W version of the image has minimal banding due to the Moire effect. </p>

<p>This is fine, but we now we have an image where everything is in color except for the area that needs fixing, so we have to restore color to it. This is where my 2nd layer comes in. Because this particular fabric has only a single hue, I simply used the eyedropper / sampler tool (size = 5x5 or 11x11 ) to give me a good estimate for the color (ie, hue + saturation) of the fabric. I then flooded this layer with that color. I then changed the blending mode of this layer to "color" to colorize the B&W section of the image coming up from the layer below. While the layer below got rid of the banding in the luminosity, this layer completely gets rid of the banding in the color. If the fabric exhibiting banding had been multi-color, one would not have been able to use such a simple approach, and this layer would have taken considerably more thought / effort.</p>

<p>Now, we're almost done. The final and top layer is a curves layer (normal blend mode). It's effect is quite small. I inserted it because I noticed that the fixed area was just a bit too dark and contrasty. The "curve" in this layer is almost a straight line, just with a tiny bit of a (smooth) bump upwards in the RGB composite value from about luminosity = 20 to about luminosity = 100. That seemed to best blend in the fixed area with the remainder of the image.</p>

<p>That's all there is to do to implement my variant of Sarah's suggested approach. I'll be back late tonight and check in, add more detail to the explanation, etc.</p>

<p>All the best. HTH.</p>

<p>Tom M.</p>

<p>PS - I received your email and will respond in a moment.</p>

Link to comment
Share on other sites

<p>Nadine, thanks for posting the suit pattern. That tells me a lot.</p>

<p>You'll note that the fabric's pattern is essentially an array of white dots on a black background, making a pattern much like light shining through a window screen with really fat wires. I think this might be the key to why the fabric is so problematic. It's not, say, like an oxford cloth, in which the darker and lighter patches would be laid out in a diagonal pattern as on a chess board. This is important, because the sensor's AI filter is only going to blur together the light that would hit adjacent pixels. If you look at a Bayer array pattern and imagine the white spots aligning with all the blue pixels aligning with the white spots and all the red and green pixels aligning with the darker field, that would give you a blue-ish (actually cyan) cast. There's of course some blurring from the white spots to the adjacent green pixels, so that is why the cast alternates between cyan and yellow (give or take).</p>

<p>I think the lesson (for me) is to pay attention to the weave of fabric. If it's a window-screen pattern, then watch out. If it's an oxford cloth pattern, then it's probably safe. I'm relieved that you could see the moire in a highly magnified peep, because I'm a compulsive peeper. At opportune moments during a shoot, I run through several representative frames to check for critical sharpness, depth of field, exposure, etc.</p>

<p>Nadine, I don't use PS, but rather Corel's PaintShop Pro. The user interface is quite different. However, what you would do in PSP (probably similar in PS) is to cut out (or "mask" out ?) the gray-scaled gray suit and to superimpose it over the color image in another layer. Think of dressing up a paper doll. You're not really "restoring color" to the grayscale layer, but rather leaving it gray -- dressing a color image in grayscale clothing. I suspect you already understand this and are simply having trouble with the PS user interface. I can't help you there. ;-) Good luck with your editing!</p>

<p>Edit: OK, I see what Tom is doing. Yep... what he said. ;-)</p>

Link to comment
Share on other sites

<p>Tom--I do understand what you said. Thanks so much. My next question is--how do you know which way to go with the black and white color sliders? How did you find the optimum settings? Was it trial and error or looking for the orange/cyan shifting?</p>

<p>Sarah--Thanks again for your ideas. You ought to post the method somewhere. As you might imagine, I scoured the internet looking for solutions and didn't find any kind of thinking like yours. I guess this photo.net thread is publishing your solution! Anyway, Russell Brown has a solution similar, using the green channel, which would have the least moire effect, and overlaying it onto the image. The color is restored similarly to Tom's, but Russell Brown uses the Levels control to restore the color to the suit. Suzette Allen (in the shootsmarter link) uses the green channel as a pattern for the healing brush.</p>

<p>I'll also see about shooting my LCD with a magnified view of the above image. You can see how it might show up. Then I'll post it. The last suit pattern I uploaded was from my first incident. It was worse than the second one, which is the bluish suit.</p>

<p>Bill--I'm not sure how one can work with the RAW file to get rid of moire. Capture 1 has a plug in for moire that is used in the RAW process, but I don't know anything about it. Without such a plug in, not sure how it could be done since most RAW processing software does not have a layer option.</p>

Link to comment
Share on other sites

<p>Sarah--here is a picture I took of my 5D LCD, magnified (you see the magnification icon) so the moire shows. It really isn't as obvious as on a processed image. I left it underexposed slightly to show the moire more, so if you keep your LCD turned up bright, or expose to the right, etc., you might not see it as much.</p>

<p>I also took the image into DPP and back into Lightroom and played around with sharpening or minus sharpening but couldn't get the moire to look much better. I was tempted to download the trial version of Capture 1 just to get the moire plug in but after reading their info carefully, I notice they say that it works on color moire, and what I have here is not just color moire to get rid of.</p><div>00W9W5-234061884.JPG.69828dc2f65d00403b46ea81b77b1b3c.JPG</div>

Link to comment
Share on other sites

<p>Bill C - Yes, in principle, one could do better with the RAW data because of the greater bit depth and access to the numbers from individual color sensors before aggregation into pixels. In practice, even if someone developed an algorithm to make use of this information and then wrote commercial software for us users, my guess is that it probably would not much better than working with the sensor data after it was turned into pixel data by a regular RAW converter. </p>

<p>The fundamental reason is that Moire'ing occurs when the incident light is sampled by the regular array of sensors, not in any subsequent processing of the electrical signals that the sensors produce. For example, how could any algorithm (including ones that operate on RAW data) distinguish between images with spatial frequencies of 99, 101, 199, 201, 299 or 301 cycles per mm if the spatial frequency of the sensor array is 100 cycles per mm. All six of these images will produce identical moire bands with a spatial frequency of exactly 1 cycle per mm. </p>

<p>Nadine - I'm glad my previous comments were helpful.</p>

<p>WRT your question about adjusting the BW sliders, I started from Sarah's comments about emphasizing the green channel and then rotating the hue around green. Translated into the language of PS's BW converter, "emphasizing the green" means that the sliders will be maximum around green and fall off as you go away from green. "Rotating the hue wheel" translates to a slight but smooth asymmetry between the sliders "above" green and those "below" green in the PS BW converter dialog box. While trying to always satisfy the above constraints, I then tweaked away using successive approximation to minimize the luminosity banding.</p>

<p>Cheers,</p>

<p>Tom M.</p>

 

Link to comment
Share on other sites

<p>Thanks Mr. Tom Mann for your explanation. That has caused me to dig into this subject some more and I've got some sites I'm presently reading.</p>

<p>Question: I have a camera that has the Foveon chip on it. I capture in RAW with all my cameras. From what I gather, this chip operates more like film and has less of a problem with this moire pattern. Is this true?<br /> Why don't more manufacturers use the Foveon chip? Maybe it's more expensive?<br>

Here is one site leaning toward the foveon chip:<br>

http://www.digiphoto.org.uk/sensors.htm</p>

<p>Thanks again for your ideas and I appreciate you taking time to stimulate my interest.</p>

<p>Have a great week.</p>

Link to comment
Share on other sites

<p>Hi Bill - It is absolutely correct that a well designed vertically stacked sensor such at a Foveon should exhibit vastly less color Moire bands than a Bayer pattern sensor. This is because the three colors are essentially perfectly registered with each other. Such a sensor should also exhibit a bit less luminance banding because of the improved fill factor (for a specified pitch).</p>

<p>WRT cost, I have designed a few photo-sensitive semiconductor arrays for non-photographic applications, and I can tell you that any time you increase the number of layers in a chip, the cost goes up and the yield per wafer goes down. Although I haven't designed, and haven't even bothered to look at the details of the fabrication of a Foveon sensor, I strongly suspect they must use more layers than a standard Bayer chip, so cost is likely a factor.</p>

<p>In addition, there are performance trade-offs between the two designs. It isn't totally a matter of cost. As I recall the Wikipedia article on Foveon sensors presented a reasonably un-biased comparison between the two.</p>

<p>Gotta run.</p>

<p>Cheers,</p>

<p>Tom M.</p>

Link to comment
Share on other sites

<p>Nadine - Aliasing is minimized by limiting the high spatial frequencies in the image before the light hits the sensor. With a very fine sensor pitch (eg, well above 10-20 Mpixels in a full frame format), it is likely that the resolution of the lens itself will limit the high spatial frequencies sufficiently to minimize Moire'ing. This is probably the basis of the statement you heard. I have no personal experience with this, but I can certainly believe it.</p>

<p>Gotta run,</p>

<p>Tom M.</p>

Link to comment
Share on other sites

<p>Geoff -</p>

<p>1. The hue of a color is often represented by its angular position on a color wheel, and is usually specified in degrees. Her phrase, "Rotate the hues", means changing the angular coordinate without changing the saturation or luminosity. In PS, this is probably most easily done by inserting a Hue/Saturation adjustment layer above the image of interest, and then adjusting the Hue with "Main" showing in the pull-down menu.</p>

<p>2. In addition to being able to specify a color by the (Hue, Saturation, Luminosity) coordinates discussed above, one can also specify a color by the more usual RGB values. The phrase, "Break out the Green Channel", simply means to look at only the green channel. In PS, this can be done directly by selecting only the green channel in the "Channel Palate", or by any of several other methods including inserting a "Channel Mixer" adjustment layer, clicking the "Monochrome" box, and setting the sliders for R=0, G=100%, B=0.</p>

<p>In the variant of the method that I suggested, I effectively combined these two adjustment layers into one using a "BW conversion" layer. This has the additional advantage of allowing separate control to the colors between R, G and B. The price for the increased generality is that one now has more sliders to tweak. </p>

<p>HTH,</p>

<p>Tom M.</p>

 

Link to comment
Share on other sites

<p>I'd like to thank everyone for all the useful information, particularly Sarah and Tom for making sense of the science of this issue. Below is my final on the worst image. I basically lightened the stripes on the green channel, copied the green channel over the red and blue channel and brought the color back using levels and tweaking the RGB channels. The suit was selected via a hand drawn shape. It took hours to fix up the stripes. Everything else was pretty fast.</p>

<p>I also experimented with the black and white channel, as Tom described, and for some images, it would be better, because it got rid of more of the color, but I found that in some parts, the color differed as well. Plus, as Tom describes, it tended to be darker and need some contrast control. However, it could save a bunch of stripe fixing, depending upon the color moire. Also, because it is a separate layer, more work can be done to it than a channel.</p>

<p>I didn't try to take out everything, since the hardest stripes were the small ones, and past a certain point, I doubt they would show up badly. I would, of course, do further work should my client want it, say for a very large print, or something. I also did some patching of fabric over one of the lapels, because it had really thin moire strips. The below is a 50 percent crop.</p><div>00WAYG-234515584.jpg.d447bc0b527b0c776ea14459ea671864.jpg</div>

Link to comment
Share on other sites

  • 1 year later...

<p>I am relatively new to Photo.net and I know this is an older post yet thought I would share a fairly productive technique for removing the luminosity component of the Moire pattern in Nadine's image.<br>

<br />Before introducing that technique, just wanted to point out that these Moire patterns are well know by the Camera Sensor and Camera manufacturers. Use of both Anti-aliasing filters on the sensor as well as techniques in the software demosaicing algorithms are used to help minimize their occurrence. If you have the original Raw files, it is worth your efforts to try different Raw converters because that by itself may eliminate the Moire pattern without retouching. If that is not possible or does not yield positive results, read on:</p>

<p>I have summarized the technique using Nadine's image with her permission below. For more examples, details, and a screencast of a demonstration of the technique you can optional go to my blog at:</p>

<p><a href="http://jkwphoto.blogspot.com">A New Way to Remove Moire</a><br>

<br />I developed this new technique from a different image on a different forum (NAPP) and subsequently searched other forums to find additional images to do additional testing. Nadine graciously allowed me access to the full original image for the test. She also suggested that I add this late post to her thread.<br>

<br />I have tried this technique on 20 images and it worked pretty well on 19 of those 20. Here is how to identity which types of Moire patterns will work with this technique. Look at each of the individual color channels. At least two and often all 3 of the RGB channels will have a wave pattern very similar to waves on the ocean. This occurs when the subject of the image has a fine pattern that is very close to the spacing of the individual GRBG sensors of a Bayer Type Camera sensor. If the peaks and valleys of the luminosity of the wave pattern in each Color Channel is physically separated (out of phase) with each other, then this technique has a good shot of working.<br>

<br />Removing the color portion of the Moire Pattern is not different than previously presented techniques shared in this thread and elsewhere. The main difference of this technique is exposing the luminosity of all three color channels simultaneously and using a phase cancellation technique very similar to noise cancelling headphones. This phase cancellation is done with a Hue/Saturation adjustment layer. This Hue/Sat adjustment layer simultaneously rotates the 3 color channels while adjusting the contribution of the luminosity component of the 3 color channels. Canceling out the Moire pattern is done by first adjusting the Hue slider followed by the saturation slider. The adjustments are sensitive and may require a bit of iteration.<br />Some images only require a single Hue/Sat adjustment layer while other images (depending on the Moire pattern) require multiple masked Hue/Sat adjustment layers. Nadine's image required 3 zones to get good overall results.<br>

<br />Note that to get good results for any technique with Morie patterns, you need to view at 100% or larger or you will most likely have false Morie patterns that you are trying to correct (without success.<br /><br />Following are 3 snapshots of Nadine's original image using this technique followed by the layer stack used. I hope this will be helpful and any comments on the technique are appreciated.</p>

<p>100% of Upper Left of Nadine's Image<br>

<img src="http://i774.photobucket.com/albums/yy26/thebestcpu/Photodotnet/NadinesImageUpperLeft.jpg" alt="" /><br>

100% of Waist Area of Nadine's Image<br>

<img src="http://i774.photobucket.com/albums/yy26/thebestcpu/Photodotnet/NadinesImageWaist.jpg" alt="" /><br>

100% of Upper Right of Nadine's Image<br>

<img src="http://i774.photobucket.com/albums/yy26/thebestcpu/Photodotnet/NadinesImageUpperRight.jpg" alt="" /><br>

Layer Stack to Create the Moire ReTouching<br>

<img src="http://i774.photobucket.com/albums/yy26/thebestcpu/Photodotnet/NadineImageLayerStack.jpg" alt="" /></p>

Link to comment
Share on other sites

<p>Thank you to all who've posted here - I tagged this for my reference quite a while ago and have used the techniques explained here and attained good results myself.</p>

 

<blockquote>

<p>"The main difference of this technique is exposing the luminosity of all three color channels simultaneously and using a phase cancellation technique very similar to noise cancelling headphones."</p>

</blockquote>

<p>Got it.<br>

<br />Welcome to PN and thank you for sharing the technique and explaining. I'm off to have a look at your blog.<br>

WW</p>

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...