Extract Method
Syntax
CWIMAQVision.Extract SourceImage, DestImage, Left, Top, Width, Height [, xSubsample = 1] [, ySubsample = 1]
Return Type
On success, this method returns 0. On failure, this method returns a negative number.
Purpose
Obsolete—Use Extract2 instead. Reduces the size of an image or part of an image by adjusting the horizontal and vertical resolution.
Remarks
Use this method with U8, I16, SGL, RGB32, and HSL32 images.
Parameters
SourceImage As CWIMAQImage
The image to extract.
DestImage As CWIMAQImage
The resulting image.
Left As Long
The left edge of the region to extract.
Top As Long
The top edge of the region to extract.
Width As Long
The width of the region to extract.
Height As Long
The height of the region to extract.
xSubsample As Variant
[Optional] The horizontal sampling step. This parameter defines the columns to extract (the horizontal reduction ratio). For example, set this parameter to 3 to extract one out of every three columns from the SourceImage into the DestImage. The method copies the pixel columns to the destination image without subsampling if you use the default value.
This parameter has a default value of 1.
ySubsample As Variant
[Optional] The vertical sampling step. This parameter defines the rows to extract (the vertical reduction ratio). For example, set this parameter to 3 to extract one out of every three rows from the SourceImage into the DestImage. The method copies the pixel rows to the destination image without subsampling if you use the default value.
This parameter has a default value of 1.