Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Vision resample2 function ERROR

I am acquiring a 2048 x 2048 imaq image which I save in a raw format, but I would also like to save a smaller thumbnail 512 x 512 TIF image of the scene as well.

 

I am using the Resample2 function in the following method

 

Dim imaqimage as new CWIMAQImage

Dim resample_imaqimage as new CWIMAQImage

 

*acquire the image into imaqimage*

 

CWIMAQVision1.Resample2 imaqimage, resample_imaqimage,cwimaqinterpolatebilinear, 512, 512

And I get the error, "Incompatible Image Type"

0 Kudos
Message 1 of 4
(7,045 Views)

Hi timmkish,

 

Upon looking at this code, my first instinct is a mismatch in the file types.  Have you seen the following lines in the help document?

 

Resample2 Method

Use this method with U8, I16, SGL, HSL, and RGB32 images.

SourceImage and DestImage must be the same type of image.

 

Are you sure that your source and destination images are the same type? If not, this could be the issue.

 

 

Stephen Meserve
National Instruments
0 Kudos
Message 2 of 4
(7,029 Views)

Where is the help file located and what is it's filename?

 

The image I acquire is a 12 bit image.

0 Kudos
Message 3 of 4
(7,024 Views)

Hi timmkish,

 

The help file is located at

 

C:\Program Files\National Instruments\Vision\Documentation\cwimaq.chm

 

Stephen Meserve
National Instruments
0 Kudos
Message 4 of 4
(7,020 Views)