Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- camera.StartGrabbing();
- CPylonImage image;
- CImageFormatConverter fc;
- fc.OutputPixelFormat = PixelType_RGB8packed;
- while(camera.IsGrabbing())
- {
- camera.RetrieveResult( 1000, ptrGrabResult, TimeoutHandling_ThrowException);
- if (ptrGrabResult->GrabSucceeded())
- {
- fc.Convert(image, ptrGrabResult);
- cv_img = cv::Mat(ptrGrabResult->GetHeight(),ptrGrabResult->GetWidth(), CV_8UC3,(uint8_t*)image.GetBuffer());
- d_frame= GpuMat(cv_img);
- char key = (char) waitKey(1);
- if(waitKey(30)==27)
- {
- camera.StopGrabbing();
- }
- }
- }
Add Comment
Please, Sign In to add comment