08-30-2012 03:10 AM
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.
09-02-2012 11:15 PM
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" ...
09-05-2012 01:26 AM
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.