07-02-2009 10:49 AM
I am trying to process all images from a .avi file. I want to get the greyscale version of the color images of avi, increase contract, and threshold it. I wanna do this based on the Read AVI Example, but it seems not work on it. What is the problem?
My vi is in the attachment.
Thanks,
Bill
07-02-2009 12:14 PM
Step 1: Probe all the error wires and see where the first error occurs and what it says. That will help a lot.
My guess is that the first time through the loop works, but you are typecasting a color image to a grayscale. The second time through the loop, you are trying to load a color image from the avi into the grayscale image and it fails.
I would create a second grayscale image and use it as the dest image in the typecast operation. This way your color image will stay color.
FYI, this looks like a good time to use a for loop with a conditional stop.
Bruce
07-02-2009 12:53 PM
I still have questions why it fails at the second time I load a color image. I tried the probe at different image output. It seems only the contract enhance works. The threshold is not working.
You mean you connect the image dest of cast operation to the image output of the 'avi read'? It seems not work. If possible, can you change on my vi and send my email? maxin853@gmail.com I am a beginner of labview.
Thanks a lot,
Bill
07-02-2009 12:54 PM
07-02-2009 12:55 PM - edited 07-02-2009 12:58 PM
The threshold wasn't working because by default it replaces all pixels within the range by the default value (1).
You need to set the Keep/Replace input to FALSE and the Replace Value to zero to blank out everything else.