camera input change to video input (cv:Mat to vsdk::UMat)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

camera input change to video input (cv:Mat to vsdk::UMat)

622 Views
alan13341313
Contributor I

In apex_isp_ldw demo 

SDI_ImageDescriptor lFrmDesc2 = SDI_ImageDescriptor(640, 480, GS8);
lpFdma->DdrBufferDescSet(FDMA_IX_G_SUB_2, lFrmDesc2);

lFrameYsub = lGrabber.FramePop(FDMA_IX_G_SUB_2);

algorithm takes "lFrameYsub.mUMat "as input 

How do I change  into videoCapture?

I tried this :

cv::VideoCapture mVideoCap;
cv::Mat img1(HEIGHT, WIDTH, CV_8UC3);
cv::Mat img2(HEIGHT, WIDTH, CV_8UC3);
cv::Mat img3(640, 480, CV_8UC3);
cv::Mat img4(640, 480, CV_8UC1);
vsdk::UMat vsdkumat1(HEIGHT, WIDTH, CV_8UC3);
vsdk::UMat vsdkumat2(640, 480, CV_8UC1);

cv::resize(img2,img3,cv::Size(640,480),0,0,1);
cv::cvtColor(img3, img4, cv::COLOR_BGR2GRAY);

vsdkumat2 = img4.getUMat(cv::ACCESS_RW);

and send "vsdkumat2" as input , but the result doesn't seem right

0 Kudos
Reply
0 Replies