OpenCV (Open Source Computer Vision) is a cross-platform library of programming functions for real time computer vision.
0
votes
0answers
39 views
Utilizing Moviepy's fl_image function efficiently to modify an incoming video
This is a followup question from this question of mine. I used the suggested function provided by an answer in my current code. 'model' is a dictionary loaded from the pickle file. 'loadpickle' and ...
4
votes
1answer
69 views
Safe handling of variables in multi-threading application with shared resources
I've been developing this application as my first C++ project and am at a point where it is functional and would like to take a step back and critique/improve my code from a standpoint of ...
1
vote
0answers
60 views
Sensor-Stream-Recorder Project
I'm a student working on a project to record sensor data from magnetic sensors. As part of the project, I created a 'Recorder-Tool' using opencv to acquire the recordings I need.
The purpose of this ...
3
votes
1answer
130 views
OpenCV 3: Using k-Nearest Neighbors to analyse RGB image
I'm new to computer vision and numpy.
I wrote a simple script to seperate red, green and blue colors from the original image by using the kNN algorithm.
After reading through some numpy tutorials, I'...
6
votes
1answer
2k views
Program for face recognition
I have been using the following script for face recognition as a security feature:
main.py
...
7
votes
2answers
2k views
Crop black border of image using NumPy
Objective: Crop the image so only the number stays in the image
Problem: Slow Performance
I have code that crops an image.
The image pixels are 0 or 255. There are no values between.
The ...
3
votes
1answer
54 views
Read current picture with OpenCV and always return a new picture
When opening a rtc-stream a thread should always grab the newest picture because otherwise there would be a huge buffer with "old" pictures. Also a call from getMatFromStream() should never return the ...
1
vote
0answers
113 views
Different method to calculate blob area in OpenCv
I'm trying to use a different method to calculate a blob area from contourArea, using the countNonZero function. I want to see if there is significant approximation ...
14
votes
1answer
299 views
Dynamic Colour Binning: Grouping Similar Colours in Images
This is a piece of code that implements an image-processing algorithm I came up with. I call it Dynamic Colour Binning. It's a fairly academic exercise that was more about providing a learning ...
1
vote
0answers
476 views
OpenCV-based wrapper for Windows screen capture
I have written a ScreenVideoCapture class that implements an interface for capturing frames from a specified monitor connected to the PC. It uses OpenCV structures (...
1
vote
0answers
225 views
Multithreaded MJPG network stream server
I'm a bit of a neophyte when it comes to C++, and so I'd like some feedback regarding a recent project.
The code sits on a Raspberry Pi and streams camera data over TCP on a specified port.
The ...
0
votes
0answers
260 views
Asking for optimizing part of a hog-based object detection using C++
Since Matlab implementation of HOG+SVM object detection algorithm was too slow, I decided to make use of the speed of C++ and re-implemented the algorithm in it. However, I'm more or less unfamiliar ...
1
vote
1answer
185 views
Set openCV basic structures to zero in a unique way
For test cases I need a unique way to set any structure to zero. For openCV I wrote this:
...
1
vote
0answers
204 views
C++ and OpenCV memory management
I'm including all of my code, however, my major issue here is about returning the vector/array/pointer (I don't really know what to choose) in this function:
...
4
votes
1answer
803 views
Python GUI for cropping and saving images quickly
I wrote a simple GUI applications to help me select 'positive' regions of a bunch of photos for the purpose of training an object detectir using OpenCV Haar Cascades.
For training purposes, you need ...
2
votes
0answers
1k views
Optimizing OpenCV's undistortPoints
I am working on improving the runtime of code that undistorts every pixel point in an image. Currently each point is undistorted via a call to cv::undistortPoints()...
3
votes
1answer
543 views
Shortest path in image
This code takes an image and detects a global shortest path from the top to bottom row, with the requirement that top and bottom column index be the same. For this, it scans through each element on ...
5
votes
1answer
4k views
Histogram of a RGB image using OpenCV
I wrote some C++ code using the OpenCV library. The program reads the image and plot histograms of Red, Green, and Blue components. I am very new to OpenCV so I need comments and advice. What do you ...
2
votes
0answers
364 views
Performane issue for Matlab-like reshape in OpenCV
I am translating Matlab code to OpenCV. The code involves lots of reshaping of large matrices. As the Matlab reshape differs from OpenCV you can't just use OpenCV reshape.
Here is why: Let's suppose ...
2
votes
1answer
672 views
Simple speed up of C++ OpenMP kernel
This function calculates the standard deviation of a patch, given a kernel size and greyscale OpenCV image. The middle pixel of the patch is kept if stdev of the patch is below the given threshold, ...
2
votes
0answers
833 views
fftshift implementation for OpenCV
I'm trying to implement fftshift from matlab for OpenCV. Can you please review the correctness of my algorithm? Have I missed something? Also, is there a better and faster way to do it?
...
0
votes
1answer
3k views
Real time head segmentation using OpenCV
I am using OpenCV 2.410 to implement a project. My project allows to segment head from video sequence which get from camera. First, I detect the head region and then apply segmentation method for that ...
5
votes
1answer
347 views
Tracking Eye Movements
The following class (that was my first class ever in python) was used in an eye tracking context. Imagine a context where you always will have a single gaze-point and some closed contours. How can I ...
3
votes
0answers
296 views
Grayscale bilinear patch extraction - SSE optimization
My program makes an intensive use of small sub-images extracted using bilinear interpolation from larger grayscale images (some call this problem subpixel translation).
I am using the following C++ ...
5
votes
2answers
1k views
More optimized approach of Dijkstra's algorithm
I need a graph-search algorithm that is enough in our application of robot navigation and I chose Dijkstra's algorithm.
We are given the gridmap which contains free, occupied and unknown cells where ...
12
votes
1answer
814 views
Custom iterator implementation returning OpenCV Mat
I have written an adapter class that allows iteration over the rows of a Mat object from OpenCV. For those interested, here is the Mat documentation, but the ...
3
votes
1answer
391 views
Combining multiple files of uncommon filetype into one
I've created a utility program for combining multiple .vec files into one. The program's main application is in training haar cascade classifiers in openCV (details). This is my first open source ...
6
votes
1answer
6k views
“Histogram of Oriented Gradients” (HOG) feature detector for computer vision
Here is a function that I've only slightly modified from its original context, found here.
Before mentioning anything else, it should be noted that I'm desperately trying to optimize this code for ...
2
votes
1answer
1k views
Track a fix area with meanshift -OpenCV
I need your help in OpenCV. I'm a student and am working on a project in which involves a little autonomous car. I use Python for the main programming language.
I have some problem with my meanshift. ...
6
votes
1answer
838 views
Replace subimage by its average value
I have the input image in, and the mask image lev (which label each pixel as a number from 1 to ...
2
votes
2answers
30k views
OpenCV 2.4.5 face detection
This code is supposed to grab live camera feed, display feed in a window, mark in rectangles all detected faces, get the biggest detected face (by total area), display it in separate window, convert ...
10
votes
3answers
6k views
Density-based clustering of image keypoints
I have implemented the DBSCAN algorithm for clustering image keypoints. I have been following the pseudocode on the wiki page pretty strictly, and it's working, but I get the feeling its a very naive ...
10
votes
2answers
747 views
OpenCV Mat processing time
I'd like to know whether having different variables for the src (source) and dst (destination) of an OpenCV function will have an effect on the processing time. I have two functions below
that does ...