NI VideoMASTER and NI AudioMASTER

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ Color Match Decreases with Multiple ROIs

I think I may be doing something wrong...

 

I'm doing a color match between a reference and a test image.  So far it appears to work well without any ROIs specified.  Before I go any further I should probably tell you guys what I'm trying to achieve; I want to select multiple ROI regions on the reference image then do a color match for those regions in the test image.    The problems start when I select more than 1 ROI on the reference image, as seen below.  The image shown below is the front panel of my vi, you will notice that there are multiple ROI regions selected on the reference image, I expected to get a score of 1000 (the score is 1 - 1000) but as you can see the score is 687.  I'm using the IMAQ colormatch.vi for scoring the images. 

 

When I select 1 ROI where I know there will not be any pentagons I get a score of 1000.  When an ROI is NOT selected I get a score of 868 which is expected because of the red pentagons on the test image. So it appears that the ROI functionality is somewhat working just not when I select more than one. 

 

I have attached the main vi which is called video.vi and a subvi called Image Color Compare.vi. 

 

Front Panel

Download All
0 Kudos
Message 1 of 4
(12,620 Views)

Hi Daniel,

 

I can't actually run your Video VI because I'm missing a few type definitions; however, I can run Image Color Compare. I noticed that you are using the name "test" for both IMAQ Create functions, instead of unique names. Also, your images are set to greyscale (I'm assuming) in order to use the histograph function, but there doesn't appear to be any code which compares based on color rather than greyscale intensity.

 

Also, where in Video.vi is Image Color Compare used as a SubVI? I looked through the code but I was unable to find its location.

 

 

0 Kudos
Message 2 of 4
(12,592 Views)

About the name test, I never meant to upload Image Color Compare.vi  Please look at the video.vi and ignore the other vi.  In Video.vi you will noticed a while loop in the bottom with a case called Color Match, that is where the problem is at. 

 

I have reposted the VIs that I meant to post originally. By the way this new Video.vi may already have the fix for this.  

Download All
0 Kudos
Message 3 of 4
(12,587 Views)

How are your results affected if you change the Color Sensitivity on the IMAQColorLearn function to Medium or Low?

0 Kudos
Message 4 of 4
(12,571 Views)