Category : opencv

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 ..

Read more

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** ..

Read more

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); // ..

Read more

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..

Read more