어떻게 C++ builder XE2로 예제 코드를 돌리긴 했는대 어떻게 하면 촬영된 이미지를 VCL폼으로 불러올수 있는지 모르겠습니다.
가능하면 VCL폼에 TImage의 함수인 Image1->Picture->LoadFromFile(ImageName);를 이용해서 촬영된 이미지를 VCL 폼으로 불러오고 싶은대 어떻게 하면 경로명을 불러올수 있는지 이해가 안됩니다.
예제코드의 이미지를 VCL폼으로 불러 올수 없을까요?
상세한 코드는 첨부파일에 있습니다.
// 이미지 촬영 핵심코드
/* Grab some images in a loop. */
for (i = 0; i < numGrabs; ++i) {
unsigned char min, max;
PylonGrabResult_t grabResult;
bool bufferReady;
/* Grab one single frame from stream channel 0. The
camera is set to single frame acquisition mode.
Wait up to 500 ms for the image to be grabbed. */
GR_check(PylonDeviceGrabSingleFrame(hDev, 0, imgBuf , payloadSize,
&grabResult, &bufferReady, 500), "PylonDeviceGrabSingleFrame");
/* Check to see if the image was grabbed successfully. */
if (grabResult.Status == Grabbed) {
/* Success. Perform image processing. */
getMinMax(imgBuf, grabResult.SizeX, grabResult.SizeY, &min, &max);
printf("Grabbed frame #%2d. Min. gray value = %3u, Max. gray value = %3u\n"
, i + 1, min, max);
#ifdef GENAPIC_WIN_BUILD
/* Display image */
GR_check(PylonImageWindowDisplayImageGrabResult(0, &grabResult),
"PylonImageWindowDisplayImageGrabResult");
#endif
}
//VCL에서 이미지 불러오기(미완성)
// Image1->Picture->LoadFromFile();
}
|