I was going the K-means algorithm as a technique for clustering images, as part of my project in the area of Image Processing. In the process, I decided to code using OpenCV libraries. So, can somebody help me in coding the algorithm in C++ using OpenCV. I can manage well, if some code snippet is provided. I just started learning about t...
How do I speed up the correspondence matching processes of SURF? I used the samples provided and changed it to capture color images from the webcam for processing, however, the speed certainly needs improvement. Where should this be tackled on?
...
Hi all,
I am trying to capture from a Sony Handicam DCR-HC38, running the code below, and passing [-1 .. 3] to the CaptureFromCAM function. The code runs, but I get no image. Do I need to "wrap" the camera somehow? Skype recognizes the camera, but python/opencv won't. I'm running Windows Vista if that helps any.
import cv
cv.Named...
I have no background in computer vision, but I was curious to know how I could use OpenCV library to achieve the following:
I have a jar of spare buttons, assorted in colour, style and diameter. For the most part they are circular. I evenly scatter them on a piece of white paper, and under good lighting, take a fairly high resolution pi...
Hi all,
I can't seem to play my avi files using OpenCV. I am on a Mac and the files work with Quicktime and VLC player. I have tried using mencoder to convert it to i420 but that still has not been successful. No error messages occur and it seems like the program closes automatically and I'm not sure how to debug it.
int main(int arg...
Hey guys and gals,
So I load a color .png file that has been taken with an iphone using cvLoadImage. And after it's been loaded, when I immediately display it in my X11 terminal, the image is definitely darker than the original png file.
I currently use this to load the image:
IplImage *img3 = cvLoadImage( "bright.png", 1);
For th...
Respected sir,
I am about to start my final year project "Real time/fast implemantation license plate recognition" using opencv. Opencv is totaly new for me and i am working on it now-a-days and i am facing couple of problems with it. I know how to display images but i don't know where to read image pixels or read image in mat...
Is there a simple way to invert a mask using OpenCV? For example, if I've got a mask like this:
010
111
010
I'd like to invert it and get this:
101
000
101
Note: I'm using OpenCV's Python bindings, so while it would be possible to simply loop over each element in the mask, execution speed could become an issue.
...
I copied the part of codes that I wanted to modify into my main.cpp. However, upon executing it, the speed is much slower. Why is that so and how do I modify codes in this case?
...
I am trying to process 16-bit single-channel uncompressed TIFF images with OpenCV 2.1, but when I call cvLoadImage, apparently they get converted to 8-bit:
IplImage* img = cvLoadImage("myImage.tif",
CV_LOAD_IMAGE_ANYDEPTH | CV_LOAD_IMAGE_ANYCOLOR);
std::cout << img->depth << std::endl;
prints
8
The images have been produced ...
If I've got an image which look, for example, like this:
0101001
1101101
0101001
Is there any method I can use which will find both of those disconnected blobs? For example, producing something like this:
0102003
1102203
0102003
Like scipy.ndimage.label.
...
Is it possible to get the accumulator value along with rho and theta from a Hough transform?
I ask because I'd like to differentiate between lines which are "well defined" (ie, which have a high accumulator value) and lines which aren't as well defined.
Thanks!
...
Hi,
So I'm using the class Mat from opencv in a program I'm writing. Mat looks something like this:
class Mat {
public:
Mat(int width, int height, int type);
template <typename T> T getElt(int x, int y);
int depth();
...
}
The type in the constructor specifies whether elements in the Mat are float...
Hi All,
I am updating some older OpenCV code that was written in (I guess) an OpenCV 1.1 manner (i.e. using IplImages).
What I want to accomplish right now is to simply load a series of images (passed as command line arguments) as Mats. This is part of a larger task. The first code sample below is the old code's image loading method. ...
Hey guys and gals,
I'm trying to do a simple template match in openCV and at the line in my code where I call cvMatchTemplate, I get a segmentation fault. I don't know if this is relevant, but i'm on a mac using x11 and i'm using opencv 2.0.0.
Here is relevant code:
IplImage* imgOriginal = cvLoadImage("reference.png", 0);
IplImage*...
I have an OpenCV project mixing Python and C. After changing to OpenCV 2.1, my calls to C code are not working any more, probably because OpenCV is no more using SWIG bindings.
From Python, I was used to call a C function with the following prototype:
int fast_support_transform(CvMat * I, CvMat * N,...);
Now, I get the following err...
I'm trying to read an avi file in OpenCV 2.1, VS2008 standard for 2 days now with no luck. I constantly get this message in the program console:
Compiler did not align stack variables. Libavcodec has been miscompiled
and may be very slow or crash. This is not a bug in libavcodec,
but in the compiler. You may try recompiling using...
I'am having a hard time trying to find the article which is referenced in the cvFindContours
algorithm, it is "Topological structural analysis of digitized binary images by border following" Satoshi Suzuki and Keiichi Abe. [suzuki85]
So I wonder if there any resource where all the OpenCv references are stashed.
Also, any explanation...
I'm trying to get OpenCV working with Python 3. A friend showed me ctypes-opencv that appears to work with Python 3. The problem is I totally can not figure out how to "install" or get any code working. I've followed all instructions I could find from a few people mentioning installs on google and none of those seemed to work or I couldn...
How does OpenCV handle Regions of Interest (ROI)?
Say I set a region of interest using cvSetImageROI(). Is that ROI stored with the IplImage structure?
If so, when I pass the image to functions such as cvSmooth() or cvFindContours(), will those functions operate on the whole image or just the ROI ?
cvFindContours() seems to provide ...