LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adjust brightness of USB webcam

Solved!
Go to solution

Hi,

My goal is to get real time  continuous stream of images from a notebook webcam and modify its brightness. I'm able to communicate with webcam. However, after  I grab the image and modify it using IMAQ BCGlookup.VI to modify the brightness of the image, the modified image doesn't reflect the change. I don't know what I'm missing here. If I use a single image (not from USB camera but a single stored image Eg. .JPEG) and use this concept then it works but doesn;t work with the webcam acquired files.

BTW, I have  NI vision assistant 2009 also installed.

I have attached the VI and block diagram.

Any ideas highly appreciated..

Thanks.

ABM 

 

 

Download All
0 Kudos
Message 1 of 13
(6,781 Views)
0 Kudos
Message 2 of 13
(6,779 Views)

Please ignore my previous message. I have connected the two threads by stating a continue message in that thread.

 

@op You can define the buffer name in the img dst of the bcg lookup like this. Check whether this works

 

 

buff.JPG

0 Kudos
Message 3 of 13
(6,769 Views)

ABM26 wrote:

 

However, after  I grab the image and modify it using IMAQ BCGlookup.VI to modify the brightness of the image, the modified image doesn't reflect the change. I don't know what I'm missing here. If I use a single image (not from USB camera but a single stored image Eg. .JPEG) and use this concept then it works but doesn;t work with the webcam acquired files.

 

 

 


Its happened, because you have RGB image from webcam (in most cases IMAQ USB will return this type), and this type not supported by IMAQ BGCLookup

 

1. Check image type delivered from camera

2. Check error output after IMAQ BGCLookup

 

If your image is RGB, then convert it into U8 before using IMAQ BGC

 

Andrey.

 

0 Kudos
Message 4 of 13
(6,745 Views)

Hi,

I tried your suggestion. But it doesn't work..Thanks. I will let you know once I have solution. 

0 Kudos
Message 5 of 13
(6,725 Views)

HI Andrey,

Thanks for your suggestion. Let me try it.... 

0 Kudos
Message 6 of 13
(6,723 Views)

A few points.

 

I notice from the vi that you are overwriting the memory with the modified image. May be worth wiring in a destination image with its own memory buffer as an input to the BCG lookup so that u can compare corrected and uncorrected  images. Image 1 and Image 2 will look identical according to your diagram becasue they are referring to the same image buffer.

 

Have u tried extracting a colour plane from the colour image?

 

Is your memory assigned to the correct image format?

Simon 

 

0 Kudos
Message 7 of 13
(6,708 Views)

Hello,

I have finally got the idea to work. You can use IMAQ BCG color lookup and modify the intensity of the image by varying the intensity of each color plane.

Also, you need to have two separate memory  buffers so that the modified image won't overwrite the original one. (this was something I was missing in original VI).

Thanks all for your inputs. I have attached new working VI.

ABM 

0 Kudos
Message 8 of 13
(6,678 Views)
YUp and that was what i suggested/meant by putting a seperate buffer for bcg lookup.
0 Kudos
Message 9 of 13
(6,676 Views)

Yes, it's easy to fall into the trap of using your original buffer for the destination image. I made that mistake initially. 

0 Kudos
Message 10 of 13
(6,670 Views)