LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Background correction and Normalizing Image

Hello All,

 

I am trying to removing the background and normalizing the image data. I have an image which I attached here. 

All I want as end result of normalized image with no background. 

At last  I want to check the beam profile before and after.

 

Is anybody previously worked on it?

Any VI?

Any help would be appreciate.

 

Thanks in Advance 

0 Kudos
Message 1 of 7
(4,369 Views)

Is there a specific problem you're having with your code?  Right now it seems like you're asking if someone has completely solved it for you already.

 

I can't tell if you're having problems manipulating the image in LabVIEW in general, or if you can get it into LabVIEW and you're not sure what operations to do to the image, or something else entirely.

 

Also, where are you getting this image from?  Beam images can only really be analyzed meaningfully if you have a physical scale to assign to the pixels.

0 Kudos
Message 2 of 7
(4,364 Views)

I am not asking to entire solve this problem.

Rephrasing my question again, 

 

How to remove the background from the image?

How to normalized the image?

How to plot the intensity profile?

 

I need a guidance regarding which method should I have to follow. I am starting from raw only. 

 

I am getting this image from camera which have frame size 1920 X 1080 pixel size 1.67 um

 

I have a knowledge of vision and labview. 

 

0 Kudos
Message 3 of 7
(4,359 Views)

Removing background:

The best way is if you have live control of the light source, either the ability to turn it on/off or block the beam.  You then take a picture (or series of pictures and average them out) of "darkness", i.e. beam off or beam blocked, and then activate the beam, and you subtract the "darkness" image  (or averaged images) from each frame with the beam active.

The next-best way is that you subtract a constant value from every pixel.  You can either manually pick a value that gives you a nice image, or try to compute it.  One way to compute it is to assume certain areas of the screen will always be dark (example: small squares in each of the 4 corners), compute the average light level there (possibly using median intensity instead of mean, so outliers don't shift it too much).

 

When you say "normalize" do you mean to set it up so the beam brightness always appears roughly the same?  The best way is to adjust the capture somehow, either by adding or removing filters from the beam so you see the most light possible without saturation, or by changing the exposure time to capture more or less light in each frame.

If you can't adjust the capture, then just find the brightest pixel (after background removal), and then multiply every pixel in the image by a value that makes the brightest pixel equal the max intensity value allowed in your image (255 if it's an 8-bit image, etc).

 

For profiles, after you've removed the background, find the centroid of the image (i.e. the point where half the light is on one side and half is on the other, once scanning in X and once in Y).  On that point, take a 1D array slice of the image in X and in Y, and make a graph of intensity vs. location for each.

0 Kudos
Message 4 of 7
(4,339 Views)

Hello,

 

Thank you so much for really quick response. 

 

I totally got the normalize image and plotting intensity graph answers. 

 

I am still confused about background thing. I want to apply the 4 corner one solution but I am not sure how to do that. 

If you don't mind could you make small VI for that background correction? just for example. 

 

Thanks

0 Kudos
Message 5 of 7
(4,335 Views)

Hello,

 

Could you please help me with background correction concept?

I am exactly looking for same thing what you suggest. That take 4 corner and then do averaging. I am new to labview that's why I didn't get the idea how can I perform this task. 

 

Thanks,

 

0 Kudos
Message 6 of 7
(4,286 Views)

Looks like a few of us are working on the same problem:

https://forums.ni.com/t5/LabVIEW/calculate-1-e-2-of-beam-intensity-profile-Measurement/m-p/3766201/h...

CLED (2016)
0 Kudos
Message 7 of 7
(4,275 Views)