I’m trying to define my own opencv module and build it out of the sources folder, and I meet some link error while building on window’s msvc: link error log on visual studio here is my file structure(on any arbitrary path): file structure I try to build this extra module(matlib.cpp) with opencv source in: F:/opencv-master ..
For a program I am writing, I am trying to create an if statement that will store the coordinates of a mouse click on an image if a mouse click happens. If the condition of the function being done is met, the coordinates that were just created will be stored in an array. The coordinates ..
This is my dir tree (root dir is untitled) This is the content of CMakeLists.txt cmake_minimum_required(VERSION 3.0.0) project(untitled) set(CMAKE_CXX_STANDARD 11) find_package (OpenCV 4.5.2 REQUIRED) include_directories ("/usr/local/include/opencv4/") add_executable(untitled main.cpp) This is my code in main.cpp: #include <iostream> #include <string> #include <sstream> #include <opencv4/opencv2/core.hpp> #include <opencv4/opencv2/highgui.hpp> using namespace cv; using namespace std; int main(int argc, const char** ..
I try to cross-compile openCV for Raspberry Pi4, I’ve used the guide here Open-CV cross-compile guide. The Raspberry Pi4 runs Alpine and I don’t want any installed libraries or packages there. OpenCV is cross-compiled successfully, but when I try to use it in my apk, I get some errors. My main.cpp code: #include <opencv2/opencv.hpp> #include ..
I am trying to use openCV logisticRegression() function to fit a logistic curve data. Below is the code example: data_train.convertTo(data_train, CV_32F); data_test.convertTo(data_test, CV_32F); labels_train.convertTo(labels_train, CV_32F); // Create model Ptr<LogisticRegression> lr1 = LogisticRegression::create(); // learning rate lr1->setLearningRate(0.001); // Number of iterations lr1->setIterations(1000000); // L2 regularization lr1->setRegularization(LogisticRegression::REG_L2); // training method lr1->setTrainMethod(LogisticRegression::BATCH); // Small batch size lr1->setMiniBatchSize(1); // ..
This question is built off of this other question. Assuming I have a stable junction algorithm implemented. I am trying to derive a graph from the junctions. I am stuck on: How do I move along a line in openCV and calculate the path length? So for example when evaluating point C: C connects with: ..
In the program that I am writing right now, I am allowing the user to click on an image to create points. When four points are drawn, a spline will appear between them using the formula included in the code below. I successfully added the ability to draw the points, but my current issue is ..
I am trying to read a local video file which was recorded through the camera, then saved to memory through AVAssetWriter. I saved the video locally to my app with URL file:///var/mobile/Containers/Data/Application/4AF409E3-9CBE-4384-B8AA-56C60ACCD7BA/Documents/mergeVideo-July%2025,%202021%20at%2011:48%20AM.mp4 How can I open this in a .cpp file and read it using opencv in ios? Source: Windows Que..
I have this image that has visible horizontal color bandings: I’ve tried many filters to remove the bandings but nearly none of them could completely remove the bandings and Overblurring the image results in loss of detail. Is there any way to remove the bandings using OpenCV? Thanks Source: Windows Que..
I tried cv::VideoCapture cap( argv ); unsigned f = (unsigned)cap.get( cv::CAP_PROP_FOURCC ); cout << f << endl; but the output of f was 0. The codec of the video file is H.264. Source: Windows Que..