Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems opening BMP image using ReadImage function

I am trying to load BMP images using the IMAQ Vision ReadImage function (VB6). The images load as monochrome images.
 
I use the CWIMAQViewer1.Pallette as a parameter in the command.
 
Note: The images load fine when using Vision Assistant or other image viewing software.
 
Any ideas?
 
Thanks!
0 Kudos
Message 1 of 2
(3,128 Views)
Steverino--

      The function that you need to change to make the image to a color RGB from a monochrome  is CWIMAQ.Viewer1.Image.Type or you could try CWIMAQImage.Type.  You can look in the "NI Vision for Visual Basic Reference Help" to find out more information on these functions.  This can be found in the Vision Documentation folder by going through the Windows Start menu.

     The very best way to find out how to do this would be to look at an example.  If you navigate to the folder on the harddrive where Vision is installed (Program Files ->National Instruments -> Vision)  then there is a folder named "Examples" that has a folder "MSVB" that contains several VB examples.  The first folder, "getting started" has an example called ReadImage that will read any kind of image.  Please, take a look at this example.

    Let us know if this did not help or you still have any questions.

Regards,

John H
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,112 Views)