|
Win32 Systems (Win98, Me, NT, 2000 and XP)
This sample shows you how to use the Region Of Interest (ROI) controls in
the PXR800. Setting the ROI in an image is the same as cropping the image.
The PXR800 gives you the ability to specify not only the size of the image
but also the upper left hand corner. It lets you define the rectangular
portion of the image you are interested in and then only DMA that much data
to your buffer.
The ROI functions are:
GetROI()
SetROI()
You may have already noticed that PXRVB_SetROI() is used in all of the samples
in the function ResetPXR() to set the initial Region Of Interest as follows:
' set the region of interest, ROI, to a default value
dwROILeft = 0
dwROITop = 0
dwROIWidth = dwImageX
dwROIHeight = dwImageY
i = PXRVB_SetROI(Fgh, dwROILeft, dwROITop, dwROIWidth, dwROIHeight, IW_QUEUED)
The values for dwROILeft and dwROIWidth must be divisible by 4.
The values for dwROITop and dwROIHeight must be divisible by 2.
In this sample you will learn how to do the following:
1. Create a simple control window.
2. Create a video display window.
3. Initialize the PXR frame grabber.
4. Grab frames and display them in realtime in the video display window.
5. Set the Region Of Interest (ROI) for the displayed frame.
The Visual Basic support for the PXR800 requires the following header files and libraries.
1. PXR800API.BAS
2. PXR800.BAS
3. PXRFRAME.BAS
4. IMAGINFO.BAS
5. PXR800_DISPLAY.BAS
6. PXR800.DLL
7. PXRFRAME.DLL
8. PXR800_DISPLAY.DLL
|