I am proceeding with parallel processing using GPU, while installing CUDA, I did build the dll files in CMAKE to have GPU support. I did include all the CUDA files and now when I am trying to rebuild the following solution: #include <iostream> #include <stdio.h> #include "C:\Users\admin\Documents\opencv\build\include\opencv2\opencv.hpp" #include "C:\Users\admin\Documents\opencv\build\include\opencv2\gpu\gpu.hpp" using namespace std; int main (int argc, char* argv[]) { try { cv::Mat src_host = cv::imread("image2.jpg", CV_LOAD_IMAGE_GRAYSCALE); //read in image cv::gpu::GpuMat dst, src; //allocate space src.upload(src_host); //upload cv::gpu::threshold(src, dst, 128.0, 255.0, CV_THRESH_BINARY); //threshold cv::Mat result_host; dst.download(result_host); cv::imshow("Result", result_host); //display cv::waitKey(5000); } catch(const cv::Exception& ex) { std::cout << "Error: " << ex.what() …

Member Avatar
Member Avatar
+0 forum 1

How to draw a convexthull and a polygon around the hand in this tutorial. I found this tutorial in JavaCV how to detect a hand gesture. But it doesn't show how to draw the convexhull or a polygon around the palm. Can someone tell me how to do that in this example? http://www.javacodegeeks.com/2012/12/hand-and-finger-detection-using-javacv.html

Member Avatar
Member Avatar
+0 forum 8

Hi i developed a C++ code for tracking a yellow colored object. IDE: CodeBLocks Opencv Version:2.4.6 Language: C++ Following is the code for yellow color detection, which i was able to successfully perform. #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" #include <iostream> using namespace cv; using namespace std; Mat GetThresholdedImage(Mat image_here) { Mat image_here1=image_here; cvtColor(image_here,image_here1,CV_BGR2HSV); inRange(image_here1, Scalar(20, 100, 100), Scalar(30, 255, 255), image_here1); return image_here1; } int main(int argc, char* argv[]) { VideoCapture cap(0); // open the video camera no. 0 if (!cap.isOpened()) // if not success, exit program { cout << "Cannot open the video cam" << endl; return -1; } double …

Member Avatar
+0 forum 0

i made a project using visual studio and opencv ,it worked fine. however later i thought of adding GUI. i googled and found abput QT.some how i managed to include libraries and build paths,when i use **C fucntions of opencv** the program works fine but when i use ***c++ features of opencv*** i get following error:- #include "widget.h" #include "ui_widget.h" #include "opencv2/highgui/highgui.hpp" #include "opencv/cv.h" #include "opencv/cvaux.h" Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::Widget) { ui->setupUi(this); IplImage *in; QImage imp; in=cvLoadImage("F:/test.jpg"); cv::VideoCapture cap; } ERROR:- ***widget.obj:-1: error: LNK2019: unresolved external symbol "public: __cdecl cv::VideoCapture::VideoCapture(void)" (??0VideoCapture@cv@@QEAA@XZ) referenced in function "public: __cdecl Widget::Widget(class QWidget …

Member Avatar
Member Avatar
+0 forum 4

I am trying to semi-circles and full circles in an image. This is the process I'm following : Process image (including Canny edge detection) Find contours and draw them on an empty image, so that I can eliminate unwanted components. (The processed image is exactly what I want.) Detect circles using HoughCircles. And this is what I get. I accept or reject a circle based on it's size. So the result is not acceptable. Also I have a long list of "acceptable" circles so I need some allowance in the HoughCircle params. As for the full circles, it's easy - …

Member Avatar
Member Avatar
+0 forum 2

hi. i am working on a project to find colors. i've stucked in finding purple color. i've used many application for finding color ranges and i've tested many numbers. i am using cvInRangeS function. i really appreciate if someone helps me. thanks.

Member Avatar
Member Avatar
+0 forum 2

hi, Below is the code that displays 2 similar images and pixel values BGR of both images. I wanted to know , how to calculate the distance(euclidean) between selected pixels in 2 images[like (100,100),(100,101) coordinate and so on.how to go about it?how to use the values of BGR and B1G1R1 to calculate difference.Thank You #include <cv.h> #include<iostream> #include <cxcore.h> #include <highgui.h> using namespace std; int main(int argc, char** argv[]) { int patchXPosImg1=100,patchYPosImg1=100,patchXPosImg2=100,patchYPosImg2=100; int patchWidth=3, patchHeight=4; int i,j,k,l; IplImage *img1 = cvLoadImage("E:/images.jpg"); cvNamedWindow("Image1:",1); cvShowImage("Image1:",img1); IplImage *img2 = cvLoadImage("E:/images.jpg"); cvNamedWindow("Image2:",2); cvShowImage("Image2:",img2); for(i=patchYPosImg1;i<patchYPosImg1+patchHeight;i++) { for(j=patchXPosImg1;j<patchXPosImg1+patchWidth;j++) { CvScalar s; s=cvGet2D(img1,i,j); // get the (i,j) …

Member Avatar
+0 forum 0

Hello, I'm building opencv library with cmake for mingw to be used with qt and i've been able to generate the makefilelist. But when i type **mingw32-make** at the command prompt i get error when it's 44% built. error says: *Cannot export _ZN12_GLOBAL__N_13R)p3aLLEv: symbol not found Cannot export _ZN12_GLOBAL__N_17CmpType3allEv: symbol not found collect2: Id returned 1 exit status mingw32-make[2]: [bin/opencv_perf_core.exe] Error 1 mingw32-make[1]: [modules/core/CMakeFiles/opencv_perf_core.dir/all] Error 2 mingw32-make: [all] Error 2* Please I need help.

Member Avatar
+0 forum 0

# **I am installing OpenCv using these steps:** # Building OpenCV from Source Using CMake, Using the Command Line Create a temporary directory, which we denote as <cmake_binary_dir>, where you want to put the generated Makefiles, project files as well the object files and output binaries. Enter the <cmake_binary_dir> and type cmake [<some optional parameters>] <path to the OpenCV source directory> For example cd ~/opencv mkdir release cd release cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local .. Enter the created temporary directory (<cmake_binary_dir>) and proceed with: make **<--- Errors here** sudo make install ** # Once I type "make" I get this …

Member Avatar
Member Avatar
+0 forum 4

I am compiling some source that is linked to two packages. One is OpenCV and the other is a driver library for an infrared camera. The company only provides a 32-bit version of the library via an rpm package. I compiled OpenCV from source and it's libraries are installed in /usr/local/lib64. I am running Fedora 18 64-bit version. Here is my CMakeLists.txt: CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(xeneth_test) SET(CMAKE_MODULE_PATH ${CMAKE_MODULES_PATH} /home/sam/Documents/common/CMakeModules) SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib) SET(CMAKE_CXX_FLAGS "-m32") FIND_PACKAGE(Xeneth REQUIRED) INCLUDE_DIRECTORIES(${LIBXENETH_INCLUDE_DIRS}) FIND_PACKAGE(OpenCV REQUIRED) #GENERATE EXECUTABLES ADD_EXECUTABLE(myXenethTest src/myXenethTest.cpp) TARGET_LINK_LIBRARIES(myXenethTest ${XENETH_LIBRARIES} ${OpenCV_LIBS}) When I run make I get: Scanning dependencies of target myXenethTest [100%] Building CXX …

Member Avatar
Member Avatar
+0 forum 2

Hi everybody, is there anyone with experience with opencv for python? I was wondering if there is a way to allocate some memory on demand, since when I try processing images (usually bigger than 800x800 pixels) I get a "OpenCV Error: Insufficient memory (unable to allocate 59500564 bytes)" message. (bytes may be more or less, according to the images obviously). The solution I am using is to scale down the images, but I am curious to know if there is another workaround. Thanks, Gianluca

Member Avatar
+0 forum 0

hi i want to do object identification (whether it is a human or vehicle).... i use cvmatchtemplates and cvshapematch.... both function couldn't give proper result... which function should give better result for my project......

Member Avatar
+0 forum 0

Am I correctly including all the library files from the directory ?? LIBS += `"C:\openCV24\opencv_bin\lib\*.dll"` Because this line keeps on giving me `C:\openCV24\opencv_bin\install\lib*.dll: Invalid argument` Ive tried looking several places and have altered this line many times but cant seem to get it to work. Can someone please let me know if Im missing a step ?? I have alreay included the includepath and that work fine `INCLUDEPATH += "C:\openCV24\opencv_bin\install\include"` but its the additional library files that throw an error Btw I went by this tutorial step by step and cant get mine to work http://www.youtube.com/watch?v=dgcXYQijV6c&feature=related Thx alot really getting …

Member Avatar
+0 forum 0

Hi, i need to create a binary matrix (one which elements can only be 1 or 0) in openCV. The nearest that I was getting is creating a matrix which elements are 8-bit values using the CV_8UC1 dataType. There must be another dataType which specifies that the matrix elements are 1 bit values, but I can't find anything. I looked it up in the OpenCV documentation, and found a section which describes how dataTypes are named, but nothing that I tried worked. Here is a citation form the [OpenCV documentation](http://docs.opencv.org/modules/core/doc/basic_structures.html) about dataTyps: > Template “trait” class for OpenCV primitive data …

Member Avatar
Member Avatar
+0 forum 2

how to implement active appearance model any tutorial to coding of it. in opencv vc++

Member Avatar
+0 forum 0

im using this code to detect face features,it works properly but after sometime of its run,video frame pauses and stops responding. im running it on microsoft visual cpp 2008 #include "stdafx.h" #include <stdlib.h> #include <stdio.h> #include <math.h> #include <cv.h> #include <highgui.h> #include <conio.h> // A Simple Camera Capture Framework const char* cascade_name_f ="D:\\study\\xml\\haarcascade_frontalface_alt2.xml"; const char* cascade_name_e ="D:\\study\\xml\\parojos.xml"; const char* cascade_name_n ="D:\\study\\xml\\Nose.xml"; const char* cascade_name_m ="D:\\study\\xml\\haarcascade_mcs_mouth.xml"; void detect_and_draw( IplImage* img ); int main() { IplImage* grayImg; // gray image for the conversion of the original image int threshold = 120, maxValue = 255; int thresholdType = CV_THRESH_BINARY; CvCapture* capture = cvCaptureFromCAM( …

Member Avatar
Member Avatar
+0 forum 2

Does anyone know the equivalent version of cvCreateImage in c++. I tried googling it but no luck. Thanks!!!

Member Avatar
Member Avatar
+0 forum 3

Can anyone discuss how to convert a jpeg color image into binary using OpenCv and C++. I find it hard understanding it on my own. I found sample programs but that really doesn't help much if I don't understand the meaning of every line of code. At least a step by step guide on what I should do will be very helpful. Thanks!!!

Member Avatar
+0 forum 0

I'm trying my hand at OpenCV and have run into a problem that Dr. Google hasn't been able to help me out with. According to O'Reilly, the following code should play an AVI file in a window the program creates. [CODE] #include "highgui.h" #include <stdio.h> int main( int argc, char** argv ){ cvNamedWindow( "Example2", CV_WINDOW_AUTOSIZE ); CvCapture* capture = cvCreateFileCapture( argv[1] ); IplImage* frame; printf("Starting loop\n"); while(1){ frame = cvQueryFrame( capture ); if( !frame ){ printf("Breaking: No frame\n"); break; } cvShowImage( "Example2", frame ); char c = cvWaitKey(33); if( c == 27 ) break; } cvReleaseCapture( &capture ); cvDestroyWindow( "Example2" …

Member Avatar
Member Avatar
+0 forum 3

C programming in IOS? Hi, I am implementing an image editing program in C which should work both in Windows, IOS (iDevices). Ths point is that we do not want to re-write same code in Object-C or Xcode. Let's say that we have a C program that is just resizing an input image by half. The program should be with some OpenCV librarie files. We know it can be compiled and built in Windows with MinGW. But is there a way to compile and build same project files to run within iDevices? (This is supposed to be called from an …

Member Avatar
Member Avatar
+0 forum 2

GUYs, pls help me in installing openCV in win7 64-bit, i downloaded opencv 2.3 its round about 141mb and it has some cmake files. i got it from here [url]http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.3.1/[/url] and i dont know how to proceed further?

Member Avatar
Member Avatar
+0 forum 1

hey everyone, i have trying to build a aplication which takes hand gestures as input and performs corresponding mouse events as output using opencv inc/c++, but im having trouble implementing the hand detection and gesture recognition part.. so anyone can help me out..!!!

Member Avatar
Member Avatar
+0 forum 1

I am a beginner in openCV and C++ as well.I am stuck in a particular place while trying to implement face recognition in open cv. I have the stored training images in a folder called data the images of first person is stored like 1_john1.pgm 2nd image of first person .................1_john2.pgm and so on. Next persons first image is again 2_peter1.pgm etc etc Now I have - [CODE] vector<string> personNames;// array of person names (indexed by the person number). [/CODE] Now after running face recognition algorithm i am getting - [CODE]personNames[nearest-1].c_str()[/CODE] which contains the string with the persons name which …

Member Avatar
Member Avatar
+0 forum 8

Hello, Ive been working on learning opencv by example and have learned lots but have some confusions/confusion in some parts, and would appreciate if you guys could help me out.. First off I have 5 matrices, and I want to combine them into one big matrix.. for this reason I converted them to row matrices, using the code: [code=c]CvMat row_header, *row, *row2; row = cvReshape(mat, &row_header, 0, 1); row2 = cvReshape(mat2, &row_header, 0, 1);[/code] I then want to combine these into a single matrix, and for that I used: [code=c]cv::Mat M1(2,50,CV_32FC1); M1.row(1) = mat + 0; M1.row(2) = mat2 + …

Member Avatar
Member Avatar
+0 forum 2

Hello, I'm having trouble running the CalcOpticalFlowPyrLK in Python. When I try doing the calculations for the Lucas Kanade code it will not compute the error I get is the following:[ICODE] File "****", line 63, in callback (currFeatures, status, track_error) = cv.CalcOpticalFlowPyrLK(old_image, new_image, old_pyramid, new_pyramid, old_features, (3,3), 1, (cv.CV_TERMCRIT_ITER, 10, 0) , 0) error: pyramid A has insufficient size [/ICODE] Here's the following code: [CODE] new_pyramid = self.pyrdownsize(new_image) old_pyramid = self.pyrdownsize(old_image) (currFeatures, status, track_error) = cv.CalcOpticalFlowPyrLK(old_image, new_image, old_pyramid, new_pyramid, old_features, (3,3), 1, (cv.CV_TERMCRIT_ITER, 10, 0) , 0) def pyrdownsize(self, cv_image): (rows,cols) = cv.GetSize(cv_image) pyr = cv.CreateMat(int(cols/2), int(rows/2), cv.GetElemType(cv_image)) cv.PyrDown(cv_image, pyr) …

Member Avatar
+0 forum 0

I have followed this tutorial for setting up Eclipse and OpenCV: [URL="http://carrierfrequency.blogspot.com/2011/05/opencv-22-in-windows-using-eclipse-ide.html"]http://carrierfrequency.blogspot.com/2011/05/opencv-22-in-windows-using-eclipse-ide.html[/URL], and doing it with OpenCV 2.3. But, I'm always getting the error: Type 'IplImage' could not be resolved for IplImage* img = 0; Why is that? Thanks.

Member Avatar
Member Avatar
+0 forum 1

Hi, I wrote a program for detecting circles using Hough Transform using OpenCV in C. The program inputs 3 images, each image contains a fixed small circle and a big circle with variable position. The program then recognizes both the circles and marks the centres of both the circles. Now what I want to do is that in the output image the (x,y) coordinates of the centre of the bigger circle should be displayed with respect to the centre of the fixed smaller circle . Here's the code for 'circle.cpp' [CODE]#include <cv.h> #include <highgui.h> #include <math.h> int main(int argc, char** …

Member Avatar
+0 forum 0

Hey friends lets checkout a small, simple and cute python program for taking photos with with your webcam without the help of any third party application programs. [CODE] import os import datetime import opencv.adaptors from opencv import highgui import Image def get_image(camera): im = highgui.cvQueryFrame(camera) # Add the line below if you need it (Ubuntu 8.04+) im = opencv.cvGetMat(im) #convert Ipl image to PIL image dir(im) print "image taken" return opencv.adaptors.Ipl2PIL(im) #_______________find usernae___________ a=os.popen('whoami') l=a.read() s=l.split('\n') uname=s[0] #______________find date n time _________ now = datetime.datetime.now() now = str(now) im=None camera= highgui.cvCreateCameraCapture(0) im = get_image(camera) os.chdir('/home/%s/Pictures' %(uname) ) fname='image_'+now+'.png' im.save(fname, "PNG") …

Member Avatar
Member Avatar
+0 forum 3

Im trying to install the opencv libraries and i tried following the instructions at: [URL="http://blog.cuvilib.com/2011/03/22/how-to-build-opencv-2-2-with-gpu-cuda-on-windows-7/"]http://blog.cuvilib.com/2011/03/22/how-to-build-opencv-2-2-with-gpu-cuda-on-windows-7/[/URL] but Im having problems getting the sample code to compile. When I try: [CODE]#include <iostream> #include <opencv2/opencv.hpp> #include <opencv2/gpu/gpu.hpp> using namespace std; int main() { try { cout<<cv::gpu::getDeviceName(0); } catch(const cv::Exception& ex) { std::cout << "Error: " << ex.what() << endl; } return 0; }[/CODE] I get these errors 1>test.obj : error LNK2019: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl cv::gpu::getDeviceName(int)" (?getDeviceName@gpu@cv@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) referenced in function _main 1>C:\Users\Chris\Documents\Visual Studio 2008\Projects\open cv image capture\Debug\open cv image capture.exe : fatal error LNK1120: 1 unresolved externals How …

Member Avatar
Member Avatar
+0 forum 2

I'm making a project with OpenCV about tracking. But what I want is the ability to let the user import his own tracking algorithms. Is there some way that i can check in a specified folder if there are new algorithms added and how can I include them in my code? So i want to check if there are other algorithms added and 'load' them in to my code and execute them. How can I do this? The algorithms always have the same amount of parameters.

Member Avatar
Member Avatar
+0 forum 2

The End.