Ask Your Question

Denis Gottardello's profile - activity

2018-01-21 17:45:37 -0500 received badge  Popular Question (source)
2017-10-17 15:47:51 -0500 received badge  Popular Question (source)
2016-12-25 15:12:22 -0500 answered a question Qt with OpenCV

Please have a look at the windeployqt console app in the Qt folder. You need to add all the required dll to you Qt application. I suggest you to use msvc instead of mingw. With mingw sometimes it is very hard to link the application correctly.

2016-11-02 23:11:38 -0500 received badge  Taxonomist
2016-05-28 03:08:38 -0500 answered a question Webcam does not capture video using openCV

Have you built OpenCV with MinGW32?

2016-05-27 12:28:19 -0500 received badge  Famous Question (source)
2016-02-07 04:02:57 -0500 received badge  Notable Question (source)
2015-12-13 10:52:05 -0500 received badge  Self-Learner (source)
2015-12-13 04:46:10 -0500 answered a question [Solved] CascadeClassifier.detectMultiScale crash on Mac OSX

Solved by recompile OpenCV with -DWITH_OPENCL=OFF

2015-12-11 10:39:55 -0500 asked a question [Solved] CascadeClassifier.detectMultiScale crash on Mac OSX

I'm using OpenCV 3 on Windows, Linux and Mac. My program goes to crash when calling the function CascadeClassifier::detectMultiScale. This happens only on Mac but not on Linux, Windows. This is the Mac bug report:

4 libopencv_objdetect.3.0.dylib 0x000000010fd68486 cv::CascadeClassifier::detectMultiScale(cv::_InputArray const&, std::__1::vector<cv::rect_<int>, std::__1::allocator<cv::rect_<int> > >&, double, int, int, cv::Size_<int>, cv::Size_<int>) + 214 25 ssssss.ComputerVisionStudio 0x000000010e444cda QThProcessImage::DetectObjects(cv::Mat, cv::CascadeClassifier&, cv::CascadeClassifier&, QString) + 378

2015-09-25 11:15:54 -0500 answered a question [Solved] OpenCv 3 and link problem

Solved after many weeks on trying. The linker wants exactly only the libraries listed above, with exactly this order. The libraries can be required more than one time.

Can you help me this the ticket ???

LIBS += ../../opencv-3.0.0/lib/libopencv_core300.a
LIBS += ../../opencv-3.0.0/lib/libopencv_imgcodecs300.a
LIBS += ../../opencv-3.0.0/lib/libopencv_objdetect300.a
LIBS += ../../opencv-3.0.0/lib/libopencv_imgproc300.a
LIBS += ../../opencv-3.0.0/lib/libopencv_face300.a
LIBS += ../../opencv-3.0.0/lib/libopencv_videoio300.a
LIBS += ../../opencv-3.0.0/lib/libopencv_highgui300.a
LIBS += ../../opencv-3.0.0/lib/libopencv_video300.a
LIBS += ../../opencv-3.0.0/3rdparty/lib/libzlib.a
LIBS += ../../opencv-3.0.0/lib/libopencv_hal300.a
LIBS += ../../opencv-3.0.0/3rdparty/lib/liblibjpeg.a
LIBS += ../../opencv-3.0.0/3rdparty/lib/liblibwebp.a
LIBS += ../../opencv-3.0.0/3rdparty/lib/liblibtiff.a
LIBS += ../../opencv-3.0.0/3rdparty/lib/liblibpng.a
LIBS += ../../opencv-3.0.0/lib/libopencv_core300.a
LIBS += C:\Qt\Qt5.5.0\Tools\mingw492_32\i686-w64-mingw32\lib\libvfw32.a
LIBS += C:\Qt\Qt5.5.0\Tools\mingw492_32\i686-w64-mingw32\lib\libole32.a
LIBS += C:\Qt\Qt5.5.0\Tools\mingw492_32\i686-w64-mingw32\lib\liboleaut32.a
LIBS += C:\Qt\Qt5.5.0\Tools\mingw492_32\i686-w64-mingw32\lib\libuuid.a
LIBS += C:\Qt\Qt5.5.0\Tools\mingw492_32\i686-w64-mingw32\lib\libgdi32.a
LIBS += C:\Qt\Qt5.5.0\Tools\mingw492_32\i686-w64-mingw32\lib\libcomdlg32.a
LIBS += ../../opencv-3.0.0/3rdparty/lib/libzlib.a
LIBS += ../../opencv-3.0.0/lib/libopencv_hal300.a
2015-09-24 07:17:16 -0500 commented answer [Solved] Linking on Mac OSX

The error is

Undefined symbols for architecture x86_64: "cv::CascadeClassifier::detectMultiScale(cv::_InputArray const&, std::vector<cv::rect_<int>, std::allocator<cv::rect_<int> > >&, double, int, int, cv::Size_<int>, cv::Size_<int>)", referenced from: QThMatchPeople::run() in qthmatchpeople.o QThProcessImage::DetectObjects(cv::Mat, cv::CascadeClassifier&, cv::CascadeClassifier&, QString) in qthprocessimage.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

2015-09-24 07:16:16 -0500 answered a question [Solved] OpenCv 3 and link problem

As static because if I use -DBUILD_SHARED_LIBS=ON I obtain ar error at cmake time.

2015-09-24 03:05:04 -0500 answered a question [Solved] OpenCv 3 and link problem

In desperation I have linked all libraries. I have tried to change the rows order but nothing. Each time I have obtained a different linker error. On Linux the same order works perfectly.

2015-09-24 02:37:11 -0500 answered a question [Solved] Linking on Mac OSX


2015-09-24 02:33:35 -0500 received badge  Enthusiast
2015-09-23 05:17:12 -0500 answered a question [Solved] Linking on Mac OSX

I'm using Qt instead of xCode. The problem happens only if I have to use the function "cv::CascadeClassifier::detectMultiscale" Are you using that function with xCode? Can you try to use it only to verify if you have a link problem as I?

2015-09-21 06:05:00 -0500 asked a question [Solved] OpenCv 3 and link problem

eigen_faces.cpp:-1: error: undefined reference to cv::LDA::subspaceProject(cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&)'** eigen_faces.cpp:-1: error: **undefined reference tocv::Algorithm::Algorithm()'

I have already linked all libraries, see above: LIBS += ../../opencv-3.0.0/lib/libopencv_adas300.a LIBS += ../../opencv-3.0.0/lib/libopencv_aruco300.a LIBS += ../../opencv-3.0.0/lib/libopencv_aruco_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_bgsegm300.a LIBS += ../../opencv-3.0.0/lib/libopencv_bgsegm_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_bioinspired300.a LIBS += ../../opencv-3.0.0/lib/libopencv_bioinspired_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_calib3d300.a LIBS += ../../opencv-3.0.0/lib/libopencv_calib3d_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_ccalib300.a LIBS += ../../opencv-3.0.0/lib/libopencv_ccalib_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_core300.a LIBS += ../../opencv-3.0.0/lib/libopencv_core_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_datasets300.a LIBS += ../../opencv-3.0.0/lib/libopencv_dnn300.a LIBS += ../../opencv-3.0.0/lib/libopencv_dnn_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_dpm300.a LIBS += ../../opencv-3.0.0/lib/libopencv_dpm_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_face300.a LIBS += ../../opencv-3.0.0/lib/libopencv_face_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_features2d300.a LIBS += ../../opencv-3.0.0/lib/libopencv_features2d_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_flann300.a LIBS += ../../opencv-3.0.0/lib/libopencv_flann_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_hal300.a LIBS += ../../opencv-3.0.0/lib/libopencv_hal_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_highgui300.a LIBS += ../../opencv-3.0.0/lib/libopencv_highgui_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_imgcodecs300.a LIBS += ../../opencv-3.0.0/lib/libopencv_imgcodecs_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_imgproc300.a LIBS += ../../opencv-3.0.0/lib/libopencv_imgproc_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_line_descriptor300.a LIBS += ../../opencv-3.0.0/lib/libopencv_line_descriptor_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_ml300.a LIBS += ../../opencv-3.0.0/lib/libopencv_ml_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_objdetect300.a LIBS += ../../opencv-3.0.0/lib/libopencv_objdetect_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_optflow300.a LIBS += ../../opencv-3.0.0/lib/libopencv_optflow_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_photo300.a LIBS += ../../opencv-3.0.0/lib/libopencv_photo_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_reg300.a LIBS += ../../opencv-3.0.0/lib/libopencv_reg_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_rgbd300.a LIBS += ../../opencv-3.0.0/lib/libopencv_rgbd_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_saliency300.a LIBS += ../../opencv-3.0.0/lib/libopencv_saliency_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_shape300.a LIBS += ../../opencv-3.0.0/lib/libopencv_shape_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_stereo300.a LIBS += ../../opencv-3.0.0/lib/libopencv_stereo_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_stitching300.a LIBS += ../../opencv-3.0.0/lib/libopencv_stitching_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_structured_light300.a LIBS += ../../opencv-3.0.0/lib/libopencv_structured_light_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_superres300.a LIBS += ../../opencv-3.0.0/lib/libopencv_superres_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_surface_matching300.a LIBS += ../../opencv-3.0.0/lib/libopencv_surface_matching_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_text300.a LIBS += ../../opencv-3.0.0/lib/libopencv_text_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_tracking300.a LIBS += ../../opencv-3.0.0/lib/libopencv_tracking_pch_dephelp.a LIBS += ../../opencv-3.0.0/lib/libopencv_ts300.a LIBS += ../../opencv-3.0.0/lib/libopencv_ts_pch_dephelp.a LIBS ... (more)

2015-09-20 11:25:27 -0500 answered a question [Solved] Linking on Mac OSX

None can help me?

2015-09-13 01:44:29 -0500 answered a question OpenCV Developer for Project needed

Where are you located? Please have a look an application based on Qt and OpenCV. Please, try Mac or Linux version. I hadn't got time to build it for Windows. If you want I can integrate OpenCV functions in your project. My email is

2015-07-18 14:17:33 -0500 asked a question I'm very disappointed about opencv 3.

Unable to compile it on Windows using MinGW and contrib modules. Unable to link it on Mac OSX. It's working only on Linux. A year ago more less I have uploaded a little patch for Linux (many hours to use github) and no one have replied to me.

2015-07-01 09:24:03 -0500 answered a question OpenCv 3.0.0, how to patch

Solved by including the .o files directly:

    LIBS += /home/denis/Cpp/opencv-3.0.0/modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap.cpp.o
    LIBS += /home/denis/Cpp/opencv-3.0.0/modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_libv4l.cpp.o
    LIBS += /home/denis/Cpp/opencv-3.0.0/modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_gstreamer.cpp.o
    LIBS += /home/denis/Cpp/opencv-3.0.0/modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_images.cpp.o
    LIBS += /home/denis/Cpp/opencv-3.0.0/modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_mjpeg_decoder.cpp.o
    LIBS += /home/denis/Cpp/opencv-3.0.0/modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_mjpeg_encoder.cpp.o

Is there a way to have my function in the videoio library?

2015-07-01 09:06:43 -0500 answered a question How OpenCV 3.0 can be used with Qt 5.4 on windows7 32 bit?

MinGW works perfectly with OpenCv but I have problem to build OpenCv 3.0.0. If you will can please explain how.

2015-07-01 08:04:07 -0500 asked a question OpenCv 3.0.0, how to patch

A long time ago I have uploaded a patch for OpenCv, to change input of a 4 inputs capture card but none have replied to me... But this is another problem. Now I have patched OpenCv to change input channel. The compilation ends correctly but, when I tried to compile my program, I have a problem with linking.

The patched files are:





The error is:

qthvideointerface.cpp:(.text+0x8fc): undefined reference to `cvSetChannel' collect2: error: ld returned 1 exit status make: * [ComputerVisionStudio] Error 1 14:58:34: The process "/usr/bin/make" exited with code 2. Error while building/deploying project ComputerVisionStudio (kit: Desktop Qt 5.4.2 GCC 32bit) When executing step "Make" 14:58:34: Elapsed time: 00:04.

The patch is:


CVAPI(double) cvGetCaptureProperty( CvCapture* capture, int property_id );
CVAPI(int)    cvSetCaptureProperty( CvCapture* capture, int property_id, double value );

bool cvSetChannel(CvCapture* capture, int index); int cvGetChannel(CvCapture* capture);


CV_IMPL int cvSetCaptureProperty( CvCapture* capture, int id, double value )
    return capture ? capture->setProperty(id, value) : 0;

CV_IMPL int cvGetCaptureDomain( CvCapture* capture)
    return capture ? capture->getCaptureDomain() : 0;

bool cvSetChannel(CvCapture* capture, int index) { return capture->cvSetChannel(index); }

int cvGetChannel(CvCapture* capture) { return capture->cvGetChannel(); }


struct CvCapture virtual bool cvSetChannel(int) { return false; } virtual int cvGetChannel() { return -1; }


class CvCaptureCAM_V4L_CPP : CvCapture virtual bool cvSetChannel(int); virtual int cvGetChannel();

bool CvCaptureCAM_V4L_CPP::cvSetChannel(int index) { if (ioctl(captureV4L->deviceHandle, VIDIOC_S_INPUT, &index) < 0) { perror ("Unable to set channel."); } else return true; return false; }

int CvCaptureCAM_V4L_CPP::cvGetChannel() { int index; if (ioctl(captureV4L->deviceHandle, VIDIOC_G_INPUT, &index) < 0) { perror ("Unable to get channel."); } else return index; return -1; }

2015-06-29 08:13:22 -0500 received badge  Teacher (source)
2015-06-27 03:13:31 -0500 answered a question How many maximum cameras that openCV can handle ?

Hi. I normally use opencv with 8 cameras for each machine. Each camera in a thread. The problem isn't related to opencv but related to the hardware (If for example you are using a video card with one channel but more inputs. In this case you have to patch opencv and switch from a input to the other continuously)

2015-06-26 03:37:21 -0500 asked a question [Solved] Linking on Mac OSX

When I try to link the program on Mac OSX I obtain the error Undefined symbol for architecture x86_64: "cv::CascadeClassifier::detectMultiscale..."

On Linu I haven't got any error.

Can someone suggest me the solution?

2015-05-08 04:38:48 -0500 asked a question opecv2/hal/defs.h

I'm trying to compile my program on mac osx using opencv-3.0.1-rc1 but I obtain the error opencv2/hal/defs.h, file not found. What it means?

2015-04-27 10:52:25 -0500 received badge  Notable Question (source)
2015-02-18 06:18:20 -0500 received badge  Popular Question (source)
2014-12-29 13:47:09 -0500 answered a question Compile opencv on Mac OS X 10.10 Yosemite

Doesn't work. Already tried this tutorial: In the past I had a Mavericks mac and I hadn't got any problem with all opencv releases but, by surfing, I have found other people that can't compile opencv on Yosemite. Another question: Why I have to wait a day to can replay?

2014-12-27 13:06:16 -0500 asked a question Compile opencv on Mac OS X 10.10 Yosemite

I'm trying to compile opencv in Mac Yosemite. I have tried a lot of versions of opencv but none has ended correctly. I obtain errors like this:

[ 36%] Building CXX object modules/core/CMakeFiles/opencv_perf_core.dir/perf/perf_dot.cpp.o

[ 36%] Building CXX object modules/core/CMakeFiles/opencv_perf_core.dir/perf/perf_inRange.cpp.o [ 37%] Building CXX object modules/core/CMakeFiles/opencv_perf_core.dir/perf/perf_main.cpp.o /Users/denis/Cpp/opencv- error: multiple unsequenced modifications to 'argc' [-Werror,-Wunsequenced] CV_PERF_TEST_MAIN(core) ^~~~~~~~~~~~~~~~~~~~~~~ /Users/denis/Cpp/opencv- note: expanded from macro 'CV_PERF_TEST_MAIN' CV_PERF_TEST_MAIN_INTERNALS(modulename, plain_only, __VA_ARGS__)\ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/denis/Cpp/opencv- note: expanded from macro 'CV_PERF_TEST_MAIN_INTERNALS' while (++argc >= (--argc,-1)) {__VA_ARGS__; break;} /this ugly construction is needed for VS 2005/\ ^ ~~ 1 error generated. make[2]: * [modules/core/CMakeFiles/opencv_perf_core.dir/perf/perf_main.cpp.o] Error 1 make[1]: [modules/core/CMakeFiles/opencv_perf_core.dir/all] Error 2 make: ** [all] Error 2 Mac-mini-di-Denis:opencv- denis$

In Mac OS SX 10.7 Lion all ends correctly. Is there anybody that has compiled opencv correctly in Yosemite?

2014-12-09 13:56:26 -0500 marked best answer OpenCV and face recognition

I have followed this tutorial for have face recognition with OpenCV. The source code is easy but does not works well. For example I obtain the same prediction for me, my sister and my brother.

Have you got experiences with OpenCV and face recognition? Have you got any suggestion for have the best of the results with face recognition? Which is the tipical error in percentual with face recognition applications?

2014-12-09 13:56:13 -0500 marked best answer Only a little help with git.

In order to upload a OpenCV patch I have followed this tutorial The problem is that there isn't a "Create" button here "" to upload my How can I complete the procedure?

2014-12-09 13:54:46 -0500 marked best answer Licence plate

Hi everybody. Have you got an example on how can I detect the license plate of a car?

2014-10-20 05:22:55 -0500 received badge  Popular Question (source)
2014-03-04 14:57:35 -0500 answered a question cv::BackgroundSubtractorMOG2, cv::CascadeClassifier(), thread contest

After many hours of research now I think it is a OpenCV bug. The behaviour happens with OpenCV and OpenCV 2.4.8 usando MinGW32. In order to compile OpenCV 2.4.8 with MinGW is necessary to patch the source code as is described here:

After that, if you want to obtain the behaviour, the only thing to do is to create a Qt project and in the main class add the following rows:

include "mainwindow.h"

include "ui_mainwindow.h"

include "opencv2/objdetect/objdetect.hpp"

include "opencv2/highgui/highgui.hpp"

include "opencv2/imgproc/imgproc.hpp"

include <iostream>

include <stdio.h>

using namespace std; using namespace cv;

MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); CascadeClassifier face_cascade; }

MainWindow::~MainWindow() { delete ui; }

Now which is the fastest way to obtain a good OpenCV release for MinGW?

2014-03-02 07:20:55 -0500 asked a question cv::BackgroundSubtractorMOG2, cv::CascadeClassifier(), thread contest

The objects in the subject send immediately my application to crash at the rows:

    CCEyes= new cv::CascadeClassifier();
    MOG2Background= new cv::BackgroundSubtractorMOG2();

The rows are in a thread, non in the mai crocess. That happens on Windows. On Linux all works well.

Have you got any suggestion?

2014-02-26 05:40:58 -0500 edited question Motion detection false alarms from light changes

In order to use the motion detection in my software with OpenCV, I use this elementary approach:

cv::GaussianBlur(Frame, Frame, cv::Size(5, 5), 0, 0, cv::BORDER_DEFAULT);
MOG2Background.operator ()(Frame, Foreground);
std::vector<std::vector<cv::Point> > Contours;
cv::findContours(Foreground, Contours, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_SIMPLE);
cv::rectangle(Foreground, cv::Point(0, 0), cv::Point(Foreground.cols, Foreground.rows), cv::Scalar(0, 0, 0), CV_FILLED);
cv::drawContours(Foreground, Contours, -1, cv::Scalar(255, 255, 255), CV_FILLED);

This code works correctly but, if there is a flash light from the Window (by a car lights during the night for example) I obtain an alarm. How can I do to optimize my code?