Ok, eerst de beschrijving van de functie:
CaptureImage
long CaptureImage (long lMode, long lMaxTime, long lImageQuality, long *pImageQuality,
VARIANT *pImage)
Description
- Capture the image whose image quality value is greater than the given value by
lImageQuality. The image quality value is the value formerly known as focus value and it ranges from 0 to 100. This function should not be used to capture images for enrollment or recognition. It is used to capture image for image display only. To display live images, llImageQuality should be set to 0.
Input arguments
- lMode:
> RECOGNIZE_MODE(value: 0x100): uses the right and left illuminators to capture
the image. Not used any more.
> ENROLL_MODE(value: 0x200): uses the right illuminator only to capture the image.
- lMaxTime: the max time period to get the iris image whose image quality value is greater than the given value. The unit is millisecond. In order to set 30 seconds, lMaxTime should be set to 30000.
- lInImageQuality: the image quality value of captured iris image should be greater than this value. The range of image quality value is from 0 to 100, so if InImageQuality is set to
100, no image will be captured.
Output arguments
- pImageQuality: the iris image quality value of the captured iris image
- pImage: the captured iris image
Return Value
- 0 for success. Please refer to IADeviceControl error code description.
Nu mijn code:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
| long lImageQualityOut;
VARIANT vImage;
BYTE *pImage;
BYTE *pOutImage;
BYTE *pRGBImage;
Graphics::TBitmap* bmp = new Graphics::TBitmap();
pImage = new BYTE[IMAGE_SIZE];
pOutImage = new BYTE[320 * 240];
VariantInit(&vImage);
vImage.vt= VT_BYREF|VT_UI1;
vImage.pbVal = pImage;
if (intConnected > 0)
{ DeviceControl1->CaptureImage(0x200,30000,0,&lImageQualityOut,&vImage);
Convert640x480to320x240(pImage, pOutImage);
/*Hier wil ik het plaatje dat ik heb geconventeerd naar 320*240 laten zien, en deze code ontbreekt dus*/
/*Ik krijg namelijk de pImage niet in een plaatje, terwijl dat naar mijn mening wel mogelijk moet zijn*/
/*Ik heb dingen geprobeerd met bmp die boven is gedeclareerd, en verder nog een aantal andere manieren waarop je een figuur kunt laten zien*/
}
else
MessageBox(NULL, "Open the device first!","Error",MB_OK + MB_ICONWARNING);
} |
Links staat de info voor VARIANT vImage, rechts voor pImageOut
Misschien dat je hier wat aan hebt? Bedankt voor je reacties tot dusver en alvast bedankt voor de andere reacties.
B-Man