[Solved] how to programme an eye tracking based computer mouse in C++

You can use a port of BGI library for Windows (WinBGIm). Here’s a link to a general idea of how to do it (sample project in VS2010). Project: http://muhammadallee.pbworks.com/w/file/53399106/WinBGIm-Demo.zip (You would need to go to Project Properties->Linker->Input and correct the path of the lib file there. Alternatively, use this project: http://www.cs.colorado.edu/~main/bgi/visual/BGI2010.zip Documentation:http://www.cs.colorado.edu/~main/bgi/doc/ It will use … Read more

[Solved] How to add OpenCV files in Visual Studio

Extract the OpenCV install in any directory you want. Copy the path of the directory where you extracted the OpenCV and add it to your System PATH. Restart your computer to allow it to recognize new environment variables. Open the properties of the project in Visual Studio and select VC++ Directories Select Include Directories and … Read more

[Solved] OpenCV to android Opencv (JAVA)

I hope this might help you as I am doing something similar. Mat gray8 = new Mat(marked.size(), CvType.CV_8UC1); Imgproc.cvtColor(marked, gray8, Imgproc.COLOR_RGB2GRAY); Scalar mean = Core.mean(gray8); Imgproc.threshold(gray8, gray8, mean.val[0], 255, Imgproc.THRESH_BINARY); /*Imgproc.erode(gray8, gray8, new Mat(), new Point(-1, -1), 2);*/ List<MatOfPoint> contours = new ArrayList<MatOfPoint>(); MatOfInt4 hierarchy = new MatOfInt4(); Imgproc.findContours(gray8, contours, hierarchy, Imgproc.RETR_LIST, Imgproc.CHAIN_APPROX_SIMPLE); Toast.makeText(getApplicationContext(), contours.size()+” … Read more

[Solved] Remove white space from an image using python

The code is almost perfect. It just can’t crop on the right side because of the scrollbar. And it does not consider some padding (which you liked according the comments). The thing I removed is the topology modification. import numpy as np import cv2 img = cv2.imread(‘cropwhitefromimage.png’) scrollbarright = 20 img = img[:, :-scrollbarright] gray … Read more

[Solved] Install glibc 2.15 in Red Hat 6.5 [duplicate]

Can I install glibc from some repo? Not likely: distributions usually don’t ever update the major/minor version of glibc from the one they originally shipped with, because the likelihood of breaking applications is too great. You may have to build glibc-2.15, or better current glibc-2.24 from source and install it into non-default location. See this … Read more

[Solved] Python Opencv2 Camera with Start Flashlight, Stop Flashlight, Click Picture, Start Video Recording, Stop Video Recording buttons

You describe with “click picture, start recording, stop recording” default imaging behavior of cameras. Those buttons work on most cams using opencv (/pyqt) but beyond is SDK manufacturer specific. If you can’t figure it out with your camera post product name, type, version into your question. For example… FLIR has a vast amount of SDK … Read more

[Solved] How to multiply Mat A * B?

this is to improve concept Mat A = (Mat_<float>(3, 4) << 1, 2, 3, 4, 5, 6, 7, 8, 9, 0.1, 0.1, 0.3); Mat B = (Mat_<float>(3, 4) << 1, 2, 3, 4, 5, 6, 7, 8, 9, 0.1, 0.1, 0.3); Mat AB0; multiply(A, B, AB0); cout << A << endl; cout << B << … Read more

[Solved] How to build opencv that only support decode jpeg?

You’d better use other frameworks other than OpenCV. OpenCV is extremely heavy for this kind of job. It’s mainly focused on image processing. Maybe you can use OpenImageIO, freeimage or other libs. You can refer to these posts: Reading an image file in C/C++ https://products.fileformat.com/image/cpp/openimageio solved How to build opencv that only support decode jpeg?

[Solved] Read and straighten multiple images from vector string, get error: “vector subscript out of range” [c++]

one of the problems in your code is, that you never check the results of your operations, there should be: M[i] = imread(“Klasa_pierwsza\\” + lista[i]); if ( M[i].empty() ) { cerr << “Klasa_pierwsza\\” + lista[i] << ” could not be loaded !” << endl; continue; } // … std::vector<cv::Vec4i> lines; cv::HoughLinesP(bw, lines, 1, CV_PI / … Read more