LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem using the IMAQ Extract function.Not getting two different image out

Solved!
Go to solution
Highlighted

Hi, I am trying to use the multiple IMAQ extract functions to get certain parts of the webcam image and then using the color extract function to get the average RGB values. The problem is that both the IMAQ extract functions give the same image on its output port. The block diagram snippet and VI are attached below. Also, please let me know if there is a better way of doing this. I need to expand this later to extract rgb values of about 40-50 different parts of the image instead of just two shown below.

Extract RGB data.png

0 Kudos
Message 1 of 5
(1,123 Views)
Solution
Accepted by topic author surasdfs

This happened because IMAQ Images transferred by references. You should provide different destination images for each extraction:

 

07-01-2014 23-40-21 extr.png

 

Andrey.

 

Message 2 of 5
(1,111 Views)

You did not create another image that you should wire to the input "Image Dst" of "IMAQ Extract".  That's why you always operate on the original image (which you should not do if you intend to operate on several regions of the image).

Solution: 

(1) Create a new image and wire this to "Image Dst".

(2) Apply the histogram operation sequentially (e.g. in a loop).

That way you will notice, that Image Dst contains actually(!) the region you have specified.  (Put a probe on the image wire that goes from the Extract VI to the Histogram VI).

 

0 Kudos
Message 3 of 5
(1,110 Views)

Thanks, that solved it. if you don't mind, I have another question/issue. I am getting only about 10fps but the webcam is capable of 30fps. Only a couple times, I saw it display about 29 fps, but for the most part, its staying a little below 10fps. Do you know why it is so slow?

0 Kudos
Message 4 of 5
(1,084 Views)

Nevermind, just had to change some camera settings from auto to manual. 

0 Kudos
Message 5 of 5
(1,076 Views)