03-11-2010 02:37 AM
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
Solved! Go to Solution.
03-11-2010 02:45 AM
03-11-2010 04:09 AM
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
03-12-2010 04:29 AM
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.
03-12-2010 02:17 PM
Hi,
I tried your suggestion. But it doesn't work..Thanks. I will let you know once I have solution.
03-12-2010 02:17 PM
HI Andrey,
Thanks for your suggestion. Let me try it....
03-12-2010 03:43 PM
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
03-15-2010 02:46 AM
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
03-15-2010 02:48 AM
03-15-2010 04:11 AM
Yes, it's easy to fall into the trap of using your original buffer for the destination image. I made that mistake initially.