Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Area Adjust Brightness

Solved!
Go to solution

Does anyone have a good idea on how to adjust brightness of an image in an area of interest?  Currently looking and image add / subtract as a possibility.  Any other ides out there besides pixel modification.  Pizel or line modification is too slow.  Needs to run fast.

 

Matt

 

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 1 of 10
(6,292 Views)
Solution
Accepted by topic author mfitzsimons

Hi matt

 

Did you tried with imaq bcglookup function?

Message 2 of 10
(6,277 Views)

That is what I was looking for but didn't know where to look.  I modified the NI example to add the masking functionality,  Works great!  Added my modifications for all to use.

 

BCGmask.PNG

Matt Fitzsimons
NI Alliance Member
LabVIEW Champion
NI Certified LabVIEW Architect
LabVIEW, LV-RT, Vision, DAQ, Motion, and FPGA
0 Kudos
Message 3 of 10
(6,267 Views)

Soultion accepted by both Matt's.  Workes well and much faster than pixel replacment.

 

Matt

 

 

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 4 of 10
(6,253 Views)

UGH.  Doesn't work with color images.  Just U8.

Matt Fitzsimons
NI Alliance Member
LabVIEW Champion
NI Certified LabVIEW Architect
LabVIEW, LV-RT, Vision, DAQ, Motion, and FPGA
0 Kudos
Message 5 of 10
(6,175 Views)

Hello,

 

just apply the correction on each color plane seperately. Or use ColorBCGLookup which does the same.

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
Message 6 of 10
(6,167 Views)

Or even better, extract the Luminance channel and apply the correction to that before replacing it.

 

Message 7 of 10
(6,149 Views)

I am actually trying to balance the lighting on my images.  My camera vendor recommended running a flat field calibration.  Says it is the process of taking a black image (lens cap on) and am image of a white target.  I am hot spotting in the center and rolling off on the edges.  Anyone heard of this and how to do this with NI Vision?

 

Matt

 

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 8 of 10
(6,145 Views)

Greg,

 

Thanks for the replay.  I almost would need to apply a gradient correction and finding it is too aggressive to just correct an area of the image.The RGB outputs have a "hump" in the center then slowly roll off on the edges.

 

Thanks,

 

Matt

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 9 of 10
(6,142 Views)

Hi Matt --

 

Yes, I've done a simple flat-field correction similar to what you describe on colour images in LabVIEW.

 

It's probably best to image either a white or grey surface, which is as uniform as possible, and under exactly the same lighting conditions as you use.  This should give an image which is bright in the middle and then decreases towards the edges and corners.  Being "white" or "grey" means that you can extract the greyscale image (Luminance) and apply the transformation to the Luminance plane of your acquired images.  I use the IMAQ MulDiv VI like this:

 

Vision.lvlib_ColourBGCorrect_BD.png

 

The Factor allows an overall change in the image brightness, or just the maximum value of the Background (flat-field) image is used as the scaling. There are more complicated techniques using both a "black" and "white" image, but for my application this was sufficient.

 

 

0 Kudos
Message 10 of 10
(6,137 Views)