Пример #1
0
BOOL HVR2300ImageCapture::HVR_CameraInit(int res, int pid) {

    int DrvInfo[MAX_DEVICE];
    int ConnectNo;

    ConnectNo = HVR_camDrvInit(&DrvInfo[0]);
    Sleep(800);

    if(ConnectNo == 0)
        return 0;
    else
        CAMERA_NO = 0;

    if(!HVR_camSensorInit(pid, CAMERA_NO)) {
        std::cout<<"Please check Product No."<<std::endl;
        return 0;
    }

    if(!HVR_ispResolutionCmd(res, pid, CAMERA_NO))
        return 0;

    // 1000 이값은 property로 조절?
    HVR_ispSetExposureTime(m_brightness, pid, CAMERA_NO);

    return 1;
}
Пример #2
0
bool HyVisionHvr2130Camera::cameraInit(int width, int height)
{
	int res = VGA;
	if( width == 1280 && height == 1024 ) {
		res = SXGA;
		_cameraWidth = 1280;
		_cameraHeight = 1024;
	}
	else if( width == 1024 && height == 768 ) {
		res = SXGA;
		_cameraWidth = 1280;
		_cameraHeight = 1024;
	}
	else {
		res = VGA;
		_cameraWidth = 640;
		_cameraHeight = 480;
	}

	int DrvInfo[MAX_DEVICE];
	int	ConnectNo;

	// 드라이버 확인 및 카메라 정보 얻어오기...
	ConnectNo = HVR_camDrvInit(&DrvInfo[0]);
	Sleep(800);

	PrintMessage("Camera connect number : %d \r\n", ConnectNo);

	if(ConnectNo==0) return false;
	else			 _id = 0;  // 1개 연결시, 0번째 카메라를 초기화함...

	// 카메라 초기화...
	if(!HVR_camSensorInit(HVR2130P, _id)) {
		PrintMessage("ERROR : Product No.을 확인하세요. (Product No. HVR2130P) \r\n");
		return false;
	}

	// 해상도 세팅...
	if(!HVR_ispResolutionCmd(res, HVR2130P, _id)) return false;
	
	return true;
}