OpenCV (Open Source Computer Vision) is a cross-platform library of programming functions for real time computer vision.
6
votes
2answers
147 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
33 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
37 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
159 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
160 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
71 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
126 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
101 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
138 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
451 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
712 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
276 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
2k 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
284 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
517 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
652 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
2k 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
335 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
248 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
877 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 ...
11
votes
1answer
732 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
327 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 ...
2
votes
1answer
980 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
605 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
28k 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
684 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 ...