Auto correct for uneven illumination.

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
wl2776

Auto correct for uneven illumination.

Post by wl2776 »

I am going to process images from a series of digital cameras.
Some of them have unevenly illuminated background like here: http://www.astropix.com/IMAGES/J_DIGIT/ ... LOOP_1.JPG
And sometimes this unequal illumination affects the results of the following analysis.

Since there are very many images, I have no time to review all of them and apply manual correction, like described in the article (http://www.astropix.com/HTML/J_DIGIT/VIGNET.HTM).

The location of the "gradient center" (the point from where the gradient spreads) is also unknown in general. And if this gradient is present or not - too. :roll:

Is it possible to detect and remove it somehow automatically?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Auto correct for uneven illumination.

Post by magick »

wl2776

Re: Auto correct for uneven illumination.

Post by wl2776 »

I've seen this already, just before asking the question. The page is currently opened in another tab of my Opera. Unfortunately, I haven't found examples of doing what I need to do.

Do you mean I have to develop the algorithm and consult that page for details of the implementation?

I was asking for help about the algorithm itself...

I am writing the C function which will be compiled in the shared library, and that page contains shell scripts.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Auto correct for uneven illumination.

Post by anthony »

Talk with fred. He is very happy to help with an explaination and implementation of algorithms.

What he is doing is developing new methods whcih may or may not be included into the core of IM. basically we do not have the people with the programming skills to go any new additions that quickly.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Auto correct for uneven illumination.

Post by fmw42 »

Are all your images similar to the astronomical example you have presented?

I ran this example using my space script and was able to do a fairly decent job of removal of the uneven illumination. The space algorithm does not care where the glare is in the image. It just tries to even it out using a spatially adaptive technique. There is some loss of color saturation, but that can be brought back by several other techniques.

If you contact me offline at the email address on my web page (http://www.fmwconcepts.com/imagemagick/index.html), I can give you some more information about the space algorithm. Some information about the algorithm is available in my image processing tutorial linked on this page.

Here are my test results:

http://www.fmwconcepts.com/misc_tests/BLOOP_1.jpg (your example image)
http://www.fmwconcepts.com/misc_tests/B ... ace_w5.jpg (space algorithm)
http://www.fmwconcepts.com/misc_tests/B ... 5_norm.jpg (space algorithm normalized)
http://www.fmwconcepts.com/misc_tests/B ... oost50.jpg (space algorithm color boosted)


Fred W.
Post Reply