Hi I have started exploring somthing in Darkent YOLO object detection. Where Video capture is done as below
mat_cv* get_capture_frame_cv(cap_cv *cap) {
cv::Mat *mat = new cv::Mat();
try {
if (cap) {
cv::VideoCapture &cpp_cap = *(cv::VideoCapture *)cap;
if (cpp_cap.isOpened())
{
cpp_cap >> *mat;
}
else std::cout << " Video-stream stopped! \n";
}
else cerr << " cv::VideoCapture isn't created \n";
}
catch (...) {
std::cout << " OpenCV exception: Video-stream stoped! \n";
}
return (mat_cv *)mat;
}
Where cpp_cap >> *mat; cature the frame where I want to take Perspective and returns output at return (mat_cv *)mat;
Please help me.
Regards, Prabhakar M