How to remove brightness gradient?

Hi,

during my experiments I recorded a lot of PEEM-Images which show a brightness gradient for example from down right to the upper left corner (see attached image). Up to now, to remove such gradient I extracted a line profile along the red line, made a linear fit to it, generate a 2D plane of it with the slope of the fit and subtracted this wave from the image.
Is there some better method to do this automatically?:

1. Find the brightness gradient
2. Fit this to a 2D-Polynom and subtract this from the image

Thanks a lot
Hi,

this was one of my first ideas but there is not a real background. What you see inside the circles are magnetic domains.
Maybe my brain is too tired but I don't seem to be following.

LausX wrote:
2. Fit this to a 2D-Polynom and subtract this from the image

Fitting and subtracting a polynomial is what ImageRemoveBackground does. But the plane fitted by ImageRemoveBackground may have have a non-zero gradient component orthogonal to the direction that you identify manually. Is that the issue?

Perhaps the problem is in
LausX wrote:
1. Find the brightness gradient


Can you explain a bit more how you do this?

Or, tell us exactly how ImageRemoveBackground fails for you.
It looks to me like the problem is that you don't have areas that are truly "background" in the sense having particles that are on top of a uniform background, like rocks sitting on a table top. What you have are about equal areas of dark and light regions.

But ImageRemoveBackground allows you to pick regions of interest where the 2D polynomial fit will be done. If you select just spots in dark areas, I think it should do what you want.

To start looking into it, select Analysis->Packages->Image Processing. In the Image menu, find Remove Background. The selection of the areas to fit is manual using that control panel. I don't know how hard it would be to find suitable spots in your images automatically. It could be tricky.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com