Prev: Help for the IIR Direct Form II Transposed Implementation
Next: Saving ~.fig files from an ~.m script
From: zhang on 13 Aug 2010 18:06 Hi guys, Part of my data suffers local illumination variations. Recently, I heard that applying an optional global image normalisation equalisation can reduce the influence of illumination effects. It said that gamma(power law) compression, either computing the square root or the log of each colour channel, can helps to reduce the effects of local shadowing and illumination variations. My question is how to implement gamma compression. I do not expect to get a complete solution. Please just give me some hints. Thanks in advanced
From: ImageAnalyst on 13 Aug 2010 18:28
zhang: Well, applying a gamma curve to your image can reduce the variations in your intensity, but it will also apply to the foreground in your image as well as the background, although to different degrees if they are in different intensity ranges. You can use the intlut() function or any power law mathematical equation to do this. However you shouldn't just go and apply this willy nilly in the hopes that it will improve your situation because it may not. You're best off posting your image (somewhere such as http://drop.io) and asking for help in how to isolate the foreground and background either here or in the sci.image.processing newsgroup. Actually the more common case is that people want to linearize the intensity to do image analysis and so they want to undo the gamma applied by nearly all digital cameras (unless setup specifically to prevent the gamma from being applied). There are a variety of reasons for applying a gamma, and the same for not wanting one. It's a long story. You would mostly want a linear situation but nothing's linear - not your eyes, not your monitor, not your camera. Some of them try to compensate for others to make it appear linear (like the gamma of your camera which is the opposite of the gamma of your monitor to try to give you a linear emittance, but then it enters your eyes which have a cubic response to intensity, ala CIELAB). WAY too much to get into here. Start your learning here: http://www.dpreview.com/learn/?/Glossary/Digital_Imaging/Gamma_01.htm and with a web search on gamma. Now, back to your main problem of local illumination variations. First you have to get your background, which can mean snapping a blank shot (just your illumination and no object in the field of view), or it can mean taking the median of your video sequence, or any number of other ways. Then once you have your background image, the most common way to correct transmitted light images (like microscopy) is to use background division. For radiology you'd use background subtraction. For reflected light, you might try homomorphic filtering (http:// en.wikipedia.org/wiki/Homomorphic_filtering). But again, your best bet is to post your image, and details of your optical or imaging setup and to ask experts for worthwhile approaches to try. Good luck, ImageAnalyst |