LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ Quantify rseults with use of image mask are not of the right regeons

I'm using the IMAQ quantify VI from labview to analize a binairy image. This binairy image is an 8bit image that consists only of pixels with the value 0 or 1. The places of the binairy  image where the pixels have the value 0, mean that a corresponding image has not data in that place. A pixel value of 1 means that there is data that should be processed later in the program in the corresponding image.

The quantify function is also used to devide the image in 666 regeons with the use of the image mask input. These regeons are squares of 22x22 pixels. The image mask consists of 666 regeons (horizontally 74 sqaures, vertically 9 sqaures) and each of the regeons has his own regeonal number. The resulting regeonal report is used to decide whether each regeon has data in it or not, with the use of the mean value in the report. When the mean value is equal to 0 than it is sure that there is no data in that regeon since all the pixels in the regeon have to have the value of 0. If the mean is not 0 at least one of the pixels in that regeon has the value of 1, wich means that there is data in the regeon. The image mask is created from an 2D array wich is converted to an 16 bit image with the use of IMAQ ArrayToImage.

I've checked that the input data is correct: the binairy image consist of only 1 and 0 values, the image mask is consist of 666 sqaures of 22x22 pixels and each sqaure has pixels in it with the value corresponding to the regeonal number of the sqaure, the binairy image and the image mask have the same size, the image mask is an 16 bit image and both images have the same border size (3).

Two problems occur:

1) The regeonal report doesn't consist of 666 elements, but of 665 elements (element 0 to 664)

2) The data in the regeonal report is not of the right area's. It looks like the data is shifted one to the right in the regeonal report array, the data in element 0 isn't from regeon 0 but from regeon 1, element 1 corresponds to regeon 2, and so on. I'm haven't checked if the data is exactly of the next regeon, but I suspect it because of the regeonal report array being one short. But it is also possible that the regeons aren't placed on the right place in the binary image.

If someone else occured this problem with the IMAQ Quantify function or has a solution to it, I would really apreaciate a reply.




0 Kudos
Message 1 of 3
(2,460 Views)
Isn't there anybody who encountered the same problem or with an solution?
0 Kudos
Message 2 of 3
(2,445 Views)
Kick
0 Kudos
Message 3 of 3
(2,430 Views)