Search Results

Search found 340 results on 14 pages for 'opencv'.

Page 2/14 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • pointPolygonTest in OpenCV 2.2

    - by Mathieu Dubois
    I wanted to use pointPolygonTest but I have a problem. I'm stuck to OpenCV2.2. I tried to use the code found here: http://docs.opencv.org/doc/tutorials/imgproc/shapedescriptors/point_polygon_test/point_polygon_test.html#point-polygon-test I use findContours to detect contours in an image. Under OpenCV 2.2 returns a vector< vector<Point> >. The problem is that pointPolygonTest accept a matrix as an entry. Therefore the code doesn't compile with OpenCV 2.2: erreur: invalid initialization of reference of type ‘const cv::Mat&’ from expression of type ‘std::vector<cv::Point_<int>, std::allocator<cv::Point_<int> > >’ Under more recent OpenCV versions, the findContours function returns vector<Mat> so it's easy to pass to pointPolygonTest (see the example). I guess I could convert the vector< vector<Point> > to vector<Mat>. Unfortunately the documentation is not very clear about the format. Does anybody have an advice?

    Read the article

  • Opencv application crashes at runtime with error code 0x0000142

    - by Tuan Anh
    I have openCV and minGW installed with codeblock IDE following the instructions found here http://kevinhughes.ca/tutorials/opencv-install-on-windows-with-codeblocks-and-mingw/ i tried the simple image loading program in the article and the build process went fine. but when i tried running the output program, it crashes with the error message "the application was unable to start correctly (0xc0000142). Click OK to close the application." I used Dependency Walker to see if the program failed to load dll module and here's the output screen of Dependency Walker https://www.dropbox.com/s/f9iaftdt8atjwpl/Screenshot%202013-11-05%2022.21.45.png i am not used to DW but as i can see in its output screen, some openCV dll failed to load and the loaded Windows DLL were 64 bit instead of 32 bit (as minGW is 32 bit). I can't figure out why as i already configure the Path environment variable for the bin directory of openCV and the app still can not load the dll modules. And i think that Windows will automatically load the proper 32 bit DLLs when a 32 bit app is run but this situation the app still failed to load. Anyone has ideas?

    Read the article

  • Error when linking C executable to OpenCV

    - by Ghilas BELHADJ
    I'm compiling OpenCV under Ubuntu 13.10 using cMake. i've already compiled c++ programs and they works well. now i'm trying to compile a C file using this cMakeLists.txt cmake_minimum_required (VERSION 2.8) project (hello) find_package (OpenCV REQUIRED) add_executable (hello src/test.c) target_link_libraries (hello ${OpenCV_LIBS}) here is the test.c file: #include <stdio.h> #include <stdlib.h> #include <opencv/highgui.h> int main (int argc, char* argv[]) { IplImage* img = NULL; const char* window_title = "Hello, OpenCV!"; if (argc < 2) { fprintf (stderr, "usage: %s IMAGE\n", argv[0]); return EXIT_FAILURE; } img = cvLoadImage(argv[1], CV_LOAD_IMAGE_UNCHANGED); if (img == NULL) { fprintf (stderr, "couldn't open image file: %s\n", argv[1]); return EXIT_FAILURE; } cvNamedWindow (window_title, CV_WINDOW_AUTOSIZE); cvShowImage (window_title, img); cvWaitKey(0); cvDestroyAllWindows(); cvReleaseImage(&img); return EXIT_SUCCESS; } it returns me this error whene running cmake . then make to the project: Linking C executable hello /usr/bin/ld: CMakeFiles/hello.dir/src/test.c.o: undefined reference to symbol «lrint@@GLIBC_2.1» /lib/i386-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[2]: *** [hello] Erreur 1 make[1]: *** [CMakeFiles/hello.dir/all] Erreur 2 make: *** [all] Erreur 2

    Read the article

  • opencv fails to open avi with ffdshow codec

    - by Seb
    Hey everyone, I am currently using OpenCV to try and open an AVI file that was made using ffdshow. The program manages to open the video file and play however, the video file is in black and white and is slightly skewed. VLC and windows media player can run it fine. Is there anything that I am able to do to install the ffdshow codec into OpenCV or do I have to covert each file with ffdshow used into appropriate OpenCV codec formats? Thank you in advance for your help.

    Read the article

  • OpenCV 2.0 C++ API using imshow: returns unhandled exception and "bad-flag"

    - by Konrad
    I'm trying to use the new OpenCV 2.0 API in MS Visual C++ 2008 and wrote this simple program: cv::Mat img1 = cv::imread("image.jpg",1); cv::namedWindow("My Window", CV_WINDOW_AUTOSIZE); cv::imshow("My Window", img1); Visual Studio returnes an unhandled exception and the Console returns: OpenCV Error: bad flag (parameter or structure field) (Unrecognized or unsupported array type) in unknown function, file ..\..\..\..\ocv\opencv\src\cxcore\cxarray.cpp, line 2376 The image is not displayed. Furthermore the window "My Window" has a strange caption: "ÌÌÌÌMy Window", which is not dependent on the name. The "old" C API using commands like cvLoadImage, cvNamedWindow or cvShowImage works without any problem for the same image file. I tried a lot of different stuff without success. I appreciate any help here. Konrad

    Read the article

  • Having problems building OpenCV 2.0 on CentOS 5?

    - by Hayri Ugur KOLTUK
    Hi all! I'd been trying to install OpenCV library to my centos system however when i type make and hit enter after configuring with cmake, i get the following error: [100%] Building CXX object tests/cv/CMakeFiles/cvtest.dir/src/amoments.o [100%] Building CXX object tests/cv/CMakeFiles/cvtest.dir/src/affine3d_estimator.o [100%] Building CXX object tests/cv/CMakeFiles/cvtest.dir/src/acontours.o [100%] Building CXX object tests/cv/CMakeFiles/cvtest.dir/src/areprojectImageTo3D.o Linking CXX executable ../../bin/cvtest CMakeFiles/cvtest.dir/src/highguitest.o: In function CV_HighGuiTest::run(int)': highguitest.cpp:(.text._ZN14CV_HighGuiTest3runEi+0x15): warning: the use oftmpnam' is dangerous, better use `mkstemp' [100%] Built target cvtest make: * [all] Error 2 and interesting, once i got this error: [ 99%] Built target mltest [ 99%] Generating generated0.i Traceback (most recent call last): File "/home/proje/OpenCV-2.1.0/interfaces/python/gen.py", line 43, in ? if True in has_init and not all(has_init[has_init.index(True):]): NameError: name 'all' is not defined make[2]: * [interfaces/python/generated0.i] Error 1 make[1]: [interfaces/python/CMakeFiles/cvpy.dir/all] Error 2 make: ** [all] Error 2 What possibly is the cause of these errors? I need to install opencv immediately on this computer. Best regards, Hayri Ugur KOLTUK

    Read the article

  • OpenCV 2.0 and Python

    - by Jive Dadson
    I cannot get the example Python programs to run. When executing the Python command "from opencv import cv" I get the message "ImportError: No module named _cv". There is a stale _cv.pyd in the site-packages directory, but no _cv.py anywhere. See step 5 below. MS Windows XP, VC++ 2008, Python 2.6, OpenCV 2.0 Here's what I have done. Downloaded and ran the MS Windows installer for OpenCV2.0. Downloaded and installed CMake Downloaded and installed SWIG Ran CMake. After unchecking "ENABLE_OPENMP" in the CMake GUI, I was able to build OpenCV using INSTALL.vcproj and BUILD_ALL.vcproj. I do not know what the difference is, so I built everything under both of those project files. The C example programs run fine. Copied contents of OpenCV2.0/Python2.6/lib/site-packages to my installed Python2.6/lib/site-packages directory. I notice that it contains an old _cv.pyd and an old libcv.dll.a.

    Read the article

  • Simple OpenCV problem.

    - by iamcreasy
    Why I try to run the following OpenCV program, it shows the following error : ERROR: test_1.exe - Application Error The application failed to initialize properly (0x80000003). Click on OK to terminate the application. CODE: #include "cv.h" #include "highgui.h" int main() { IplImage *img = cvLoadImage("C:\\face.bmp"); cvSetImageROI(img, cvRect(100,100, 100, 100)); cvAddS(img, cvScalar(50), img); cvResetImageROI(img); cvShowImage("Test", img); cvWaitKey(0); return 0; } When i press F5(im using vs2008express), the program encounters a break point...i have attached a picture...dont know, whether, it will help or not. Error Snapshot Link It is not that, only this program is producing this error, but also any kind of image manipulation funciton containing (OpenCV)program is resulting in this sitution. Such as : cvSmooth one last thing, it there any dedicated OpenCV forum or sth like that?

    Read the article

  • 2d graph in real-time by using opencv and c++

    - by user2758510
    I have a really basic question in opencv and c++. I am trying to graph something in real time by using opencv. I am looking to find a function to draw a graph in rel-time. But still unssuccesful. I need a function that gets two arrays as an input one for x axis and one for y. I tried with this but seems not work in real-time http://www.shervinemami.info/graphs.html I just need to know if there is something available in opencv or not. Thanks in advance.

    Read the article

  • Opencv python and webcam

    - by Neil Benn
    Hello, I'm working with OpenCV on a beagleboard with ubuntu and OpenCV 1.1 interfaced via Python. I'm trying to set something up to capture a feed from a UVC compatible webcam (logitech C250). I have tested the webcam with luvcview and it works but only if I set the input format to YUV. If I run it in 'normal' mode I am getting back jpeg frames and something - somewhere is not happy! I'm trying to connect with the webcam in OpenCV as I want to get the image back from the webcam and run some analysis on it. As I have a limited device this seems to be the most efficient way of doing it - however I need to instruct the capturing system to capture in YUV and not jpeg. Is there a way of doing this (for example luvcview allow me to enter luvcview -f YUVY)? Cheers, Neil

    Read the article

  • Using EXR images in OpenCV

    - by Nestor
    Hi there! I'm currently working on a project with OpenEXR and I would like to implement some Blob detection algorithms. To do this I figured that I could use OpenCV as it says in the documentation that it can open OpenEXR format files. I have all the libraries installed and working as I've been doing other things. I open a simple jpg file with openCV cvLoadImage. It works fine. But when i try to open any .exr file it doesn't seam to like it. I get a gray window where there should be the image display. Has anyone done any tests with OpenCV and OpenEXR libraries working together? Have they worked for you? What do you think? Thanks.

    Read the article

  • Subtract displaced mask using OpenCV

    - by dario_ramos
    I want to do: masked = image - mask But I want to "displace" mask. That is, move it vertically and horizontally (as long as the intersection between it and image is not empty, this would be valid). I have some hand-coded assembly (which uses MMX instructions) which does this, embedded in a C++ program, but it's unstable when doing vertical displacemente, so I thought of using OpenCV instead. Would it be possible to do this calling only one OpenCV function? Performance is critical; using OpenCV, time should be at least in the same order of magnitude as the assembly code.

    Read the article

  • Image classification using openCV and weka

    - by simk
    Hi i want to do image classification, so i am planning to use openCV for the preprocessing of image and weka to check which ML algorithm gives best result, so the problem i am facing is converting the image data in to weka ARFF file format, when i apply some image transformation to image and write the image data it become so large and not sure how to define @ATTRIBUTE for that. If you have done similar thing before please suggest how can i solve this and it particularly doesn't have to be openCV i can use other tools also, please suggest.

    Read the article

  • obtain OpenGL camera(view) matrix from openCV findhomography

    - by user1828449
    I want to build an AR application on Android by opencv and opengl. I found GL_MODELVIEW can place camera and model in world coordinates like the following link I tried to load a simple model-view matrix by gl.glLoadMatrixf(newMat, 0); and it works so I want to draw 3d model on the top of my target image if i got the four corner points of the target image because model-view matrix is needed I want to know if I can obtain the camera view matrix by opencv's findhomography

    Read the article

  • Detect marker with opencv and python

    - by Mitch
    Hi im trying to detect a marker in a webcam video feed and overlay it with a 3d object - pretty much exactly like this: http://www.morethantechnical.com/2009/06/28/augmented-reality-with-nyartoolkit-opencv-opengl/ i know artoolkit is the best module for this, but i was hoping to just use opencv in python since i dont know nearly enough c/c++ to be able to use artoolkit. im hoping someone will be able to get me on the right track towards detecting the marker and determining its location and orientation etc since i have no idea how best to go about this or what functions i should be using thanks mitch

    Read the article

  • Transform OpenCV image data type to Devil image format and vice-verca

    - by D.K
    I want to use a CUDA-enabled SIFT library but I am using the OpenCV driver to get images from the webcam? The Cuda library is using the Devil Library for image data types. Should I transofrm the images from OpenCV data types to Devil? Or Should I use another method for getting images from the webcam[devil compatible data types]? Thanks for your attention

    Read the article

  • OpenCV performance in different languages

    - by h0b0
    I'm doing some prototyping with OpenCV for a hobby project involving processing of real time camera data. I wonder if it is worth the effort to reimplement this in C or C++ when I have it all figured out or if no significant performance boost can be expected. The program basically chains OpenCV functions, so the main part of the work should be done in native code anyway.

    Read the article

  • X264 encoding using Opencv

    - by user573193
    I am working with a high resolution camera: 4008x2672. I a writing a simple program which grabs frame from the camera and sends the frame to a avi file. For working with such a high resolution, I found only x264 codec that could do the trick (Suggestions welcome). I am using opencv for most of the image handling stuff. As mentioned in this post http://doom10.org/index.php?topic=1019.0 , I modified the AVCodecContext members as per ffmpeg presets for libx264 (Had to do this to avoid broken ffmpeg defaults settings error). This is output I am getting when I try to run the program [libx264 @ 0x992d040]non-strictly-monotonic PTS 1294846981.526675 1 0 //Timestamp camera_no frame_no 1294846981.621101 1 1 1294846981.715521 1 2 1294846981.809939 1 3 1294846981.904360 1 4 1294846981.998782 1 5 1294846982.093203 1 6 Last message repeated 7 times [avi @ 0x992beb0]st:0 error, non monotone timestamps -614891469123651720 = -614891469123651720 OpenCV Error: Unspecified error (Error while writing video frame) in icv_av_write_frame_FFMPEG, file /home/ajoshi/ext/OpenCV-2.2.0/modules/highgui/src/cap_ffmpeg.cpp, line 1034 terminate called after throwing an instance of 'cv::Exception' what(): /home/ajoshi/ext/OpenCV-2.2.0/modules/highgui/src/cap_ffmpeg.cpp:1034: error: (-2) Error while writing video frame in function icv_av_write_frame_FFMPEG Aborted Modifications to the AVCodecContext are: if(codec_id == CODEC_ID_H264) { //fprintf(stderr, "Trying to parse a preset file for libx264\n"); //Setting Values manually from medium preset c-me_method = 7; c-qcompress=0.6; c-qmin = 10; c-qmax = 51; c-max_qdiff = 4; c-i_quant_factor=0.71; c-max_b_frames=3; c-b_frame_strategy = 1; c-me_range = 16; c-me_subpel_quality=7; c-coder_type = 1; c-scenechange_threshold=40; c-partitions = X264_PART_I8X8 | X264_PART_I4X4 | X264_PART_P8X8 | X264_PART_B8X8; c-flags = CODEC_FLAG_LOOP_FILTER; c-flags2 = CODEC_FLAG2_BPYRAMID | CODEC_FLAG2_MIXED_REFS | CODEC_FLAG2_WPRED | CODEC_FLAG2_8X8DCT | CODEC_FLAG2_FASTPSKIP; c-keyint_min = 25; c-refs = 3; c-trellis=1; c-directpred = 1; c-weighted_p_pred=2; } I am probably not setting the dts and pts values which I believed ffmpeg should be setting it for me. Any sugggestions welcome. Thanks in advance

    Read the article

  • Looking for OpenCV haarcascade resources

    - by timwu2023
    Hi, I am looking to detect an airplane in a image using OpenCV, and I have no idea where to get started..... I don't know that much about OpenCV so I don't know what approaches I can take. For what I understand I need a haarcascade xml file that defines an airplane image, but there could be other ways I don't know of. Someone please give me a direction or link me a airplane xml file. Thanks.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >