OpenCV (Open Source Computer Vision) is a cross-platform library of programming functions for real time computer vision.
-1
votes
0answers
19 views
Implementation of the Direct Cosine Transform [closed]
I'm trying to implement the discrete cosine transform function as part of an assignment and would appreciate a bit of help.
It's part of the JPEG compression algorithm. ...
3
votes
1answer
30 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
1k views
Program for face recognition
I have been using the following script for face recognition as a security feature:
main.py
...
7
votes
2answers
590 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
37 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
72 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
202 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
283 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
102 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
170 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
123 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
157 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
579 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
838 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
364 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
3k 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
318 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
571 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
713 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
340 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
281 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
932 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
769 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
355 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
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
690 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
29k 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
708 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 ...