03-16-2016 07:34 AM
Hello everyone,
I'm new to LabView and to this forum, so I hope I'm in the right subforum. If not, it would be kind if a mod could move this thread.
My problem is the following:
Let's say I have a white spot which I want to observe with a camera. The color of the spot changes to green over time and I want to acquire the picture aswell as getting the increase intensity of the developing green color over time. I don't know which functions I need to use in order to achieve this. Can anyone hint me in the right direction? I think it's at least possible in LabView.
Thank your everyone for your help.
Best regards,
Tresdin
Solved! Go to Solution.
03-16-2016 10:23 AM - edited 03-16-2016 10:24 AM
Hi Tresdin, are you using the IMAQdx drivers in the vision acquisition software?
03-16-2016 10:40 AM
hi gregoryj,
yes I'm using the IMAQdx drivers for vision acquisition. At the moment I have a cheap cam which I'm using just to test things. If I can code a program with LabView which does it's job I will spend money on something more expensive.
03-16-2016 10:43 AM
Once you have your image you can use IMAQ ColorImageToArray to get the value at each pixel. It will be U32 and you should be able to extract the bytes of color intensity out of that.
03-16-2016 10:45 AM
Thanks for your reply.
Is it possible to acquire a live image while measuring the increase in my green color? Or am I only able to get an image and process it afterwards?
I'm quite new to LabView actually (~1 month). I know the basics I think but I'm even newer when it comes to image processing and stuff.
03-16-2016 10:47 AM
You can do it all together. The issue would just be if your calculations take a long time then you might slow down your image acquisition rate, but there's nothing that says you can't process your image immediately after capturing it.
03-16-2016 10:50 AM
Damn, I was too slow, I drew a picture (it's quite bad but I think it doest the trick) in order what I want.
Do you have any information where I can read about image acquisition aswell as image processing? I already tried simple stuff with grabbing and taking snapshots, but I have a hard time grasping the concept with images and processing in LabView.
Thanks again
03-16-2016 12:33 PM - edited 03-16-2016 12:33 PM
I'm not sure what the best resource is for the IMAQdx drivers, I think the examples that NI provides are pretty helpful. Here is a simple VI that will tell you the average green value of all the pixels in your image.
03-17-2016 03:04 AM
Hello gregoryj,
thank you very much for your help. I have to digest that 🙂
If I understood it I have to implement it to a live picture. I hope I can do this, but your code was already very helpful. I'll try this. Thanks again
03-17-2016 10:37 AM
Yes, there will be just a couple of changes. First, for a continuous acquisition you should right click the For loop and change to While loop. Then make sure to open the camera before the loop, and close the camera after the loop. Finally, replace the "load picture" VI with a "grab image" VI.