Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ count objects 2 works on one PC and not another

Here's the problem - I have a vi which pulls in an image from a Firewire camera. The image is essentially white dots on a black background. I use the 'IMAQ Count Objects 2' to count the number of objects and their area after setting the appropriate threshold value. This works fine. When I copy the vi to another computer running the same OS (XP Pro) and with the same installed components of Labview (Labview 8.0 and Vision8.5) the program runs fine (no errors or crashing) but it cannot detect any objects, irrespective of the threshold setting.

Here's the kicker - if I replace the image I'm grabbing from the camera with a saved image then the program will run on both computers and both will detect the white areas (ans also give the same number of objects and same total area, as might be expected). Any ideas?

 

thanks

 

Paul

0 Kudos
Message 1 of 6
(3,978 Views)

The program is fine, so that means the camera is not setup correctly, or the image you are taking is different somehow.

 

Are you looking at the image that you are capturing?  Does it look the same on both computers?  What camera are you using?  Is it 8 or 16 bit?  Any differences between the systems? (camera, light, lens, etc.)

 

Bruce

Bruce Ammons
Ammons Engineering
Message 2 of 6
(3,971 Views)

Bruce,

 

thanks for the quick reply. I'm using a monochrome Unibrain firewire camera (I can check the model number tomorrow). I'm feeding the same image in to both computers from the same camera (just switching the firewaire cable from one to the other so the conditions are identical). The captured images look the same on both computers. An additional section of the program that I didn't mention allows me to draw a horizontal line across the image and plot the intensity distribution (I forget the sub-vi involved but I copied it from one of the example vi's) - this allows me to estimate the threshold level. This section also works on both computers. If I remember correctly the image is a greyscale 16-bit image (again, I can check tomorrow). The only difference in the systems that just struck me is that the PC that doesn't seem to work is running XP Pro with Service Pack 3 - the working PC runs XP Pro with SP2

Any help is much appreciated.

 

Paul

0 Kudos
Message 3 of 6
(3,966 Views)
Hi Paul:

Could you verify that the image is a 16-bit image?  This was reported to R&D (# 56970) for further investigation.  It was reported a couple years ago and only seems to be valid for a 10-bit image but sounds very similar to the behavior you are experiencing. Although the issue seemed to be resolved, there is a possibility that something in Service Pack 3 for Windows XP caused this issue to reappear.

The workaround listed there is to convert the image to an array and back.

Let me know the image resolution and I will try to recreate this behavior.
Alex Person
NI-RIO Product Support Engineer
National Instruments
0 Kudos
Message 4 of 6
(3,922 Views)

Thanks for the reply.

 

The image type is Greyscale (16) [so I'm asssuming that is a 16-bit image (I'm new to programing in Vision)]. I have installed XP Pro with SP2 and the behavior is the same. Also tried converting the image to an array and then imediately back to an image but again the problem remains. The image resolution is 1280 x 960. I can get you a copy of the vi if that would help?

Thanks  again for your time,

 

Paul

0 Kudos
Message 5 of 6
(3,911 Views)

Hi Paul:

 

That does not sound like the CAR I mentioned before but if you would like to post the VI, I will try to replicate the issue.

Alex Person
NI-RIO Product Support Engineer
National Instruments
0 Kudos
Message 6 of 6
(3,886 Views)