Category : opencv4

Hi:I have built the OpenCV 4.5.2 library using the instructions found here in an AWS G4 server which has a T4 nVidia card and now I’m trying to use it in a very simple C++ application in Visual Studio 2019 that should run it the exact same server. But for the example below I get ..

Read more

I am trying to find a way to dump the OpenCV window content into a cv::Mat. The idea is to dump the window content at any time without having access to the original image. I could not find a function in OpenCV for this. Any ideas? cv::Mat img, img2; img = cv::imread("D:Imagestestphoto.png"); cv::imshow("myWindow", img); // ..

Read more

Good day, c++ I installed opencv/4.5.2 from conan (by cmake macro) and try a simple piece of code: cv::VideoCapture cap(0, cv::CAP_MSMF); if (!cap.isOpened()) { cerr << "couldn’t openn"; return -1; // <<– stop here } // … # … conan_cmake_run( REQUIRES ${CONAN_EXTRA_REQUIRES} opencv/4.5.2 OPTIONS ${CONAN_EXTRA_OPTIONS} BASIC_SETUP CMAKE_TARGETS # individual targets to link to BUILD missing) ..

Read more

I have a problem regarding the detection of eyelashes on a human eye. In practice I have to cut out the part covered by the eyelashes from the iris, which I have already obtained. I thought of binarizing the image and therefore having a black cloud instead of the eyelashes, and therefore obtaining the right ..

Read more

I have written a code to detect an object in video and tracking objects position with help of trackers i have crop the tracked object and store in vectorobjects and also i have to subtract background frame of same video but I did not understand how can I store this objects in the background frame. ..

Read more

I have built OpenCV 4.5.0 from scratch on windows (VS-2019). The x64/vc16 folder has only bin and staticlib subfolders. I am unable to find the lib folder in the same directory. Typically when we use the pre-built binaries, the lib folder is present and the lib folder is set for Linker → General → Additional ..

Read more

OpenCV tracking API has implementations in 3 different places. video/tracking.hpp tracking.hpp tracking/tracking_legacy.hpp I would like to be able to use any implementation by providing the name of the algorithm as input. cv::Ptr<cv::Tracker> get_tracker(std::string trackerType); A similar approach with Python seems to work. if tracker_type == ‘CSRT’: tracker = cv2.TrackerCSRT_create() elif tracker_type == ‘MOSSE’: tracker = ..

Read more

I’m trying to capture sequence of frames from a webcam and show it as QImage: cv::Mat mat; cap >> mat; //cap is cv::VideoCapture("/dev/video0") cv::Mat dest; cv::cvtColor(mat, dest, cv::COLOR_BGR2RGB); QImage img((uchar*) dest.data, dest.cols, dest.rows, dest.step, QImage::Format_RGB888); ui->vid->setPixmap(QPixmap::fromImage(img)); It worked with default settings but I needed to switch from GStreamer to V4L2* so now I open the ..

Read more