I have attached an LEED image below. I want to know how to remove the background grid lines from this image. But I am not sure how to proceed. Any help?
Regular background subtraction may work but any offsets in the grid between consecutive frames or any change in exposure will affect the results. Spatial filtering should work reasonably well if the grid has precise constant intervals.
Before performing spatial filtering you may want to consider if the image could benefit from pre-processing if it is desired to warp the image so that the grid lines are straight.
You can find a discussion of the filtering in the Image Processing Tutorial (File Menu->Example Experiments->Tutorials->Image Processing Tutorial) under "Spatial frequency filtering".
In your application the approach could be:
1. Invert an image so that the grid corresponds to high signal.
2. Fourier transform the image to determine the x and y spatial frequencies of the grid.
3. Construct a nice smooth filter that attenuates these frequencies and test on the inverted image.
4. Construct a 2D wave representing your filter in frequency space (say filterWave).
Note: I have not tested the following -- it is just meant as quick illustration of some steps
5. Use MatrixOP to write one command line that executes the filtering calculation as shown in the example of MatrixOP documentation
// Image filtering using 2D spatial filter filterWave: MatrixOp/O filteredImage=IFFT(FFT(srcImage,2)*filterWave,3)
6. For an 8-bit image you can replace srcImage above with
cmplx(-wi+255,0)// Note the order for computing the inversion
7. Modify the equation to convert the complex to real, perform the inverse inversion and convert to 8-bits (all in one line):
@K_A ... I am truly puzzled by the image. I know LEED systems (and at one point mucked about with software that analyzed I(V) curves of the diffraction spots). I have *never* seen such lines in any LEED image. Is this a home-built system? Can you view the screen without the camera in place (and do the lines appear there)? Can you replace the camera as a test point? Can you pound on the instrument vendor to fix what is happening? I really think you need to address the problems in the image at the source rather than trying to post-process what I must respectfully call a "horribly sloppy LEED image". I am glad to chat off-line when you are interested.
There are two types of shutters in most industrial style cameras, rolling and global. The rolling is more common and can introduce artifacts. The distorted propellors being the most common illustration. If there are several periodic sources of light being produced that could introduce image artifacts with a rolling shutter. One test is to rotate the camera 90 degrees and see if the background noise follows the camera.
Ouch! What is the source of the grid lines? Do you have a way to generate the image without the LEED screen display to show only the grid lines?
September 24, 2018 at 09:06 am - Permalink
In reply to Ouch! What is the source of… by jjweimer
yes, I can see the grid lines without a sample as well. The source might be related to the image acquisition software for the LEED.
September 24, 2018 at 09:20 am - Permalink
If the grid is periodic it might clean out well using spatial filtering.
A.G.
September 24, 2018 at 09:55 am - Permalink
In reply to If the grid is periodic it… by Igor
Is there any Igor help file on this?
September 24, 2018 at 01:41 pm - Permalink
In addition to AG's recommendation, I might consider this.
I'd have to wonder how this can be a software issue. Do you have some thoughts to troubleshoot this as well?
September 24, 2018 at 03:16 pm - Permalink
Regular background subtraction may work but any offsets in the grid between consecutive frames or any change in exposure will affect the results. Spatial filtering should work reasonably well if the grid has precise constant intervals.
Before performing spatial filtering you may want to consider if the image could benefit from pre-processing if it is desired to warp the image so that the grid lines are straight.
You can find a discussion of the filtering in the Image Processing Tutorial (File Menu->Example Experiments->Tutorials->Image Processing Tutorial) under "Spatial frequency filtering".
In your application the approach could be:
1. Invert an image so that the grid corresponds to high signal.
2. Fourier transform the image to determine the x and y spatial frequencies of the grid.
3. Construct a nice smooth filter that attenuates these frequencies and test on the inverted image.
4. Construct a 2D wave representing your filter in frequency space (say filterWave).
Note: I have not tested the following -- it is just meant as quick illustration of some steps
5. Use MatrixOP to write one command line that executes the filtering calculation as shown in the example of MatrixOP documentation
MatrixOp/O filteredImage=IFFT(FFT(srcImage,2)*filterWave,3)
6. For an 8-bit image you can replace srcImage above with
cmplx(-wi+255,0) // Note the order for computing the inversion
7. Modify the equation to convert the complex to real, perform the inverse inversion and convert to 8-bits (all in one line):
I hope this helps,
A.G.
September 24, 2018 at 03:50 pm - Permalink
In reply to Regular background… by Igor
Dear Igor, Thanks for the illustration, I will try to implement it.
September 25, 2018 at 03:23 am - Permalink
In reply to In addition to AG's… by jjweimer
Dear jjweimer, I tried this but the background image that I have, has an offset and gives a distorted image.
and the intensity is not uniformly distributed among the grids.
I will try to take it under the same conditions as you said.
September 25, 2018 at 03:36 am - Permalink
@K_A ... I am truly puzzled by the image. I know LEED systems (and at one point mucked about with software that analyzed I(V) curves of the diffraction spots). I have *never* seen such lines in any LEED image. Is this a home-built system? Can you view the screen without the camera in place (and do the lines appear there)? Can you replace the camera as a test point? Can you pound on the instrument vendor to fix what is happening? I really think you need to address the problems in the image at the source rather than trying to post-process what I must respectfully call a "horribly sloppy LEED image". I am glad to chat off-line when you are interested.
September 25, 2018 at 06:22 am - Permalink
I would also check the camera as jjweimer pointed out already. It looks like an artefact of the camera rather than the LEED apparatus.
September 25, 2018 at 10:32 am - Permalink
In reply to I would also check the… by thomas_braun
There are two types of shutters in most industrial style cameras, rolling and global. The rolling is more common and can introduce artifacts. The distorted propellors being the most common illustration. If there are several periodic sources of light being produced that could introduce image artifacts with a rolling shutter. One test is to rotate the camera 90 degrees and see if the background noise follows the camera.
Andy
September 25, 2018 at 10:48 am - Permalink
Dear all, Thanks for all the suggestions on troubleshooting
September 26, 2018 at 02:46 pm - Permalink