Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

1394 invalid image type

I am trying to use the NIIMAQ1394 functions in VB. I finaly figured out how to snap an image into the CWIMAQViewer, but when I try to use it as a CWIMAQViewer.Image after it is displayed in the viewer in a CWIMAQVision Function I recieve invlaid image type error. Below is the code I am trying to use.


errorCode = imaq1394SnapCW(sid, myImage2)
If (errorCode <> IMG1394_ERR_GOOD) Then
DisplayError (errorCode)
Stopped_Click
End If


CWIMAQVision1.Threshold CWIMAQViewer1.Image, myImage, 150, 255


So what I really want to know is how to you use the images aquired in the NIIMAQ1394 in all these NIVision Functions for Measurement Studio?
0 Kudos
Message 1 of 2
(3,203 Views)
You have to make sure you are capturing the image in MONO form. The CWIMAQVISION cant handle color images from the viewer. It will just crash your whole computer and not give you an error that you may need to use a 8 bit image.
0 Kudos
Message 2 of 2
(3,203 Views)