opencv

What are the standard techniques for removing a segmentation (such as a human or bird) from a video?

Let's say you are taking a video (with the camera in a steady position) and a bird flies through the view of the camera. It should be possible to do image segmentation and automatically remove this bird from the video. What are these styles of algorithms called and how are they normally accomplished? ...

OpenCV - cvExtractSURF is causing a memory leak?

Hello OpenCV'ers, I am using the OpenCV function: cvExtractSURF but I am finding a major memory leak. Has anyone successfully implemented this call? My code is as follows: IplImage *cvImage = [self CreateIplImageFromUIImage:image grayscale:YES]; CvMemStorage* storage = cvCreateMemStorage(0); CvSeq *objectKeypoints = 0; //CvSeq *objec...

Missing libraries in JNI2OpenCV?

I'm a newb when it comes to JNI2OpenCV. It has errors regarding java.library.path. I've read this thread http://stackoverflow.com/questions/2441198/opencv-to-jni-how-to-make-it-work but it seems that this is a different case from mine. Here's the errors I get: Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\JNI2OpenCV.d...

OpenCV crashes trying to read a video with RELEASE build

Using VideoCapture vcc("someDir/someFile.avi"); as the first line in my code (OpenCV 2.x, Win7, VS2010), the execution for RELEASE crashes but the DEBUG works fine .. as slow as expected though. It only crashes when trying to read a video file which means passing a string to the constructor. The error looks like this: Unhandled ...

installing opencv on windows(W32) to be used with code blocks.

hi everyone. i am trying to use opencv library with code blocks(8.02).i have installed opencv2.1. when i include the headers and link the library its all fine.i have gone through http://opencv.willowgarage.com/wiki/CodeBlocks tutorial as well.but when i compile the project it reports no error or warning.it just says exit with status 1. ...

pointer on ctypes to use opencv on Python 3.1

Hi, i try to use OpenCV on Python 3.1 through ctypes, but I do not know how represent pointers. Example, if I want to load an image and print the content of her first pixel, i will write in C++ : #include <opencv/cv.h> #include <opencv/highgui.h> using namespace std; int main() { IplImage *img; img = cvLoadImage("/home/foo/f...

Apply opencv threshold to a numpy array

I'm trying to apply opencv's Threshold function to a numpy array. I'm using the python bindings for opencv 2.1. It goes like this: import cv import numpy as np a = np.random.rand(1024,768) cv.Threshold(a,a,0.5,1,cv.CV_THRESH_BINARY) and this throws an error: OpenCV Error: Unsupported format or combination of formats () in threshold ...

opencv matrix into shared memory

Hi! I want to share between two linux processes a CvMat object (a matrix in the OpenCV library), for that I'm using shared memory. One process (server) will capture a frame (matrix) from the webcam, convert it to gray scale, share it using shared memory and show the frame on the screen. The other process (client) will read the shared fr...

Image classification in python

I'm looking for a method of classifying scanned pages that consist largely of text. Here are the particulars of my problem. I have a large collection of scanned documents and need to detect the presence of certain kinds of pages within these documents. I plan to "burst" the documents into their component pages (each of which is an ind...

opencv every frame processing

Hi all! I want to write a crossplatform application using opencv for video capture. In all the examples, i've found frames from the camera are processed using the grab function and waiting for a while. And i want to process every frame in a sequence. I want to define my own callback function, which will be executed every time, when a new...

opencv not working with NetBeans

I am trying to write this simple image modifier program in c++ with opencv on netbeans. I am using ubuntu 10.04. Everytime I try to run or compile it, it returns the below errors. I have opencv configured in the linker and the additional tools. What is going wrong? include stdlib.h include stdio.h include math.h include cv.h inc...

OpenCV c++ application deployment with external libraries

Hi, I've tried searching A LOT for this with no luck (possibly because I'm not using the right technical terms). My issue is mainly to do with linking static libs, compiling and deploying. Before I get into details, my executables compile fine on my system; the main issue is how to deploy these as a working solution to others. I've wr...

passing a function which returns void but has integer arguments to another function as an ARGUMENT itself

hello , I have recently started working on OpenCV using c++.I am having a problem with the following code. #include "cv.h" #include "highgui.h" int g_slider_position = 0; CvCapture* g_capture = NULL; void onTrackbarSlide(int pos) { cvSetCaptureProperty( g_capture, CV_CAP_PROP_POS_FRAMES, pos ); } int main( int argc, ch...

Compiling/Linking OpenCV Sample: camshiftdemo.c

I built the demo on my Ubuntu 10.04 using the headers found in this PPA and with the build_all.sh script found in the same directory as camshiftdemo.c. All I got is a Could not initialize capturing... message. Then I tried to build it with this line (found it after building the demo with CMake in the building directory that CMake create...

Compiling OpenCV on Windows 7 64bit

I'm trying to get OpenCV working on Windows 7 64bit. I tried installing the vs2008.exe installer bundle from the OpenCV website but it produced errors when trying to compile, I Google'd these and it appears that installer is no good for 64bit versions of Windows 7, bugger. I've tried having a crack at compiling using CMake, but really...

Transferring an image from Matlab to an OpenCV IplImage

I have an image in Matlab: img = imopen('image.jpg') which returns an uint8 array height x width x channels (3 channels: RGB). Now I want to use openCV to do some manipulations on it, so I write up a MEX file which takes the image as a parameter and constructs an IplImage from it: #include "mex.h" #include "cv.h" void mexFunction(in...

kmeans in opencv python interface

Hi I'm using v2.1 with the built-in python interface. I'm trying to load an image from a file, transform it to lab and get the clusters from the ab plane. I have a working matlab code but don't know how to do the same in opencv. How do I reshape a jpeg or png images and feed it to kmeans? Thanks The error I'm getting: OpenCV Error: ...

trouble with output directory for OpenCV VideoWriters.

Hi, I'm a math undergrad and have little programming experience. I'm interested in computer vision however. Tried to follow the Learning OpenCV book but its slightly outdated. How do i save the resulting video file in my linux home directory? for eg "/home/user/..", thanks in advance, this is my first post and i know i won't be disappoin...

cvblob compile error in Visual C++ 6.0

Hi all! I'm using Microsoft Visual C++ 6.0 and Microsoft Visual Studio 2008 to develop an academic computer vision project. In this project i need to use OpenCV 1.1 (http://opencv.willowgarage.com/) and CvBlob (http://code.google.com/p/cvblob/). I tried to compile this project with Microsoft Visual Studio 2008 and it compiles without...

Distribute a binary executable of a program built with OpenCV?

I created a program in C that uses OpenCV. In addition to distributing the source and make files, I would like to distribute a Win32 binary that will run when an end-user clicks on it. Presumably I would need an easy way for the user to install the OpenCV libraries. What is the best way to do this? Should I be looking into installers, ...