LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with image multiplication

Hi,

 

I am working on an image processing application and I have a problem with multiplacation of image. I use an autothresholding function to get a binary image. After thresholding I want to superimpose binary image with image taken with a traditional camera. The problem is that I need to multiply every pixel value of the binary image by 255 to get proper results of image fusion. To multiply image I used IMAQ multiply function which seems to work properly. After multiplication I need to convert image to array, so I used imagetoarray function. Unfortunately I don't get proper values after this operation - all array values are 0. I appreciate any help with this problem.

 

I attached the vi with added a comment next to the conversion function.

 

0 Kudos
Message 1 of 3
(2,345 Views)

I'm not sure if this is the problem, as I've only done a little image manipulation.  I believe that, by default (unless you specify otherwise), images are U8 gray-scale quantities.  If you multiply a U8 by 255 (Sgl) and express the result as a U8, the result will be 255 for all values except 0 (when it will be 0).

 

Does your thresholded image autoBthreshold 4 image look all black (or white -- I can't remember which color = 255)?  If so, then your code is "doing what you told it to do", which might not be the same thing as "doing what you want it to do" ...

Message 2 of 3
(2,316 Views)

It looks like you're right. I made this VI again from basics using only IMAQ functions and now it works fine. Thanks a lot.

0 Kudos
Message 3 of 3
(2,295 Views)