Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ cannot acquire odd with ROI's

I've attached a sample program that replicates the problem. This is using LabWindows 5.5.1 on Windows 2000 with a 1408 board.

When acquiring an ROI that has an odd width, imaq automatically rounds the width down to an odd number. Depending on what this odd number is, it will be reduced by 1 or 3 pixels.
0 Kudos
Message 1 of 4
(3,318 Views)
hi there
the width must be a multiple of 4 (so EVEN, not ODD) for line sync reasons.
If you make your own roi, you cand round it to this multiple as you like (i did it with" left top right bottom" from "imaq extract" under 5.5.1). Anyway, one pixel lost or got is cheap for this nice board, moreover if you put borders on your image...
0 Kudos
Message 2 of 4
(3,318 Views)
Aha, that would do it. Is this behaviour documented anywhere? I wasn't able to find it in the 1408 Manual nor in any examples using region of interest.
0 Kudos
Message 3 of 4
(3,318 Views)
AHaaaaaaaa nice to help you then
I did find it back again
"Chapter 3 High-Level Functions � imgSnapArea
left indicates the left horizontal offset of the first pixel transferred.
height indicates the height of the area to transfer.
width indicates the width of the area to transfer.
rowPixels indicates the exact pixel-width of the horizontal line to acquire. This parameter
specifies the number of pixels to add to the line pointer for the next scan line. This value must
be greater than or equal to the width parameter and a multiple of four.
0 Kudos
Message 4 of 4
(3,318 Views)