Ask Your Question

Dr. Console's profile - activity

2017-10-22 16:59:03 -0600 received badge  Popular Question (source)
2017-05-02 11:50:58 -0600 received badge  Famous Question (source)
2016-08-22 02:01:39 -0600 received badge  Notable Question (source)
2016-04-18 09:59:41 -0600 received badge  Popular Question (source)
2015-09-26 08:18:29 -0600 received badge  Student (source)
2015-06-25 07:19:44 -0600 asked a question std::bad_alloc in traincascade

Hey Guys, I tried to run the opencv_traincascade program with following command under Win7 64bit:

C:\Users\Dr. Console\Desktop\opencv-haar-classifier-training-master>opencv_traincascade -data classifier -vec samples.vec -bg negatives.txt -numStages 2 -minHit Rate 0.999 -maxFalseAlertRate 0.5 -numPos 50 -numNeg 20 -w 80 -h 40 -mode ALL -p recalcValBufSize 1536 -precalcIdxBufSize 1536

When running this command I had 2530 mb free ram and more than 50 GB free space on my harddrive and got this error:

terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc

This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.

I also tried it in a VM with Linux Mint but got also a memalloc error where it says that it can't alloc 2GB of data, even if I had enough space on my virtual harddrive.

I hope someone knows this problem aswell as a solution for it.

NG Dr. Console

2015-06-24 04:12:03 -0600 commented answer imshow: Assertion failed (size.width>0 && size.height>0)

Well and in windows you have to have an eye on the filename if you reanme something, so my file was test.png.jpg and i didn't realized it -.-

2015-06-24 04:11:18 -0600 received badge  Scholar (source)
2015-06-23 16:16:43 -0600 commented answer imshow: Assertion failed (size.width>0 && size.height>0)

Well this line throws an error at compiling XD cerr is not a member of std it says

2015-06-23 15:01:15 -0600 asked a question imshow: Assertion failed (size.width>0 && size.height>0)

Hey guys, here's the next error I encountered ... When I tried this code to test the installation:

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>

using namespace cv;

int main()
{
    Mat image;// new blank image
    image = cv::imread("C:\\Users\XYZ\Documents\CodeBlocks\Projekte\Test\test.png", 0);// read the file
    namedWindow( "Display window", WINDOW_NORMAL );// create a window for display.
    imshow( "Display window", image );// show our image inside it.
    waitKey(0);// wait for a keystroke in the window
    return 0;
}

I get this error inside the app console:

OpenCV Error: Assertion failed (size.width>0 && size.height>0) in imshow, file C :\OpenCV\opencv\sources\modules\highgui\src\window.cpp, line 279 terminate called after throwing an instance of 'cv::Exception' what(): C:\OpenCV\opencv\sources\modules\highgui\src\window.cpp:279: error: ( -215) size.width>0 && size.height>0 in function imshow

This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.

Process returned 3 (0x3) execution time : 10.086 s Press any key to continue.

The image used is the standart Win7 demo picture of a jellyfish renamed to test.png and put into the project folder.

I hope that someone can help me, maybe it's just a change from opencv 2 to 3 but I don't know.

My System is Win7, Code::Blocks 13.12 and OpenCV 3. Compiler is mingw.

NG Dr. Console

2015-06-23 14:52:10 -0600 commented question Problem at compiling (libopencv_core300.dll not found)

Better? :D

2015-06-23 14:41:23 -0600 received badge  Editor (source)
2015-06-23 12:57:34 -0600 commented question Problem at compiling (libopencv_core300.dll not found)

Well now I get further than before but now getting this error: [ 37%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap _dshow.cpp.obj C:\OpenCV\opencv\sources\modules\videoio\src\cap_dshow.cpp:122:11: error: 'struc t IEnumPIDMap' has virtual functions and accessible non-virtual destructor [-Wer ror=non-virtual-dtor] interface IEnumPIDMap : public IUnknown ^ C:\OpenCV\opencv\sources\modules\videoio\src\cap_dshow.cpp:139:11: error: 'struc t IMPEG2PIDMap' has virtual functions and accessible non-virtual destructor [-We rror=non-virtual-dtor] interface IMPEG2PIDMap : public IUnknown ^ C:\OpenCV\opencv\sources\modules\videoio\src\cap_dshow.cpp:227:11: error: 'struc t ISampleGrabberCB' has virtual functions and accessible non-virtual destructor [-

2015-06-23 12:50:09 -0600 commented question Problem at compiling (libopencv_core300.dll not found)

Well, yes i left everything as is in cmake. :D I never used cmake before so i thought i could do more damage than help... I'll try it now and report if it works.

Thanks already!

2015-06-22 22:36:37 -0600 asked a question Problem at compiling (libopencv_core300.dll not found)

Hey guys,

I'm just installing OpenCV for a project controling a SMD mounting machine but I'm not abled to comile the Project for usage with Code::Blocks with mingw.

I'm using this tutorial: http://kevinhughes.ca/tutorials/openc...

Everytime I'm running the command "mingw-make" it stops at 31% with following message:


[ 31%] Linking CXX shared library ....\bin\libopencv_core300.dll

c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot fin d -lRunTmChk

collect2.exe: error: ld returned 1 exit status

modules\core\CMakeFiles\opencv_core.dir\build.make:1286: recipe for target 'bin/ libopencv_core300.dll' failed

mingw32-make[2]: * [bin/libopencv_core300.dll] Error 1

CMakeFiles\Makefile2:1654: recipe for target 'modules/core/CMakeFiles/opencv_cor e.dir/all' failed

mingw32-make[1]: * [modules/core/CMakeFiles/opencv_core.dir/all] Error 2

Makefile:148: recipe for target 'all' failed

mingw32-make: * [all] Error 2


My Systems is WIN7 64bit and the newest versions of cmake, mingw, opencv and Code::Blocks

Hope someone can help me.

NG from Germany Dr. Console

EDIT:

Found a solution, it's a mingw bug... I needed to disable IPP and comment out the line 'add_extra_compiler_option(-Werror=non-virtual-dtor)' in C:opencv\sources\cmake\OpenCVCompilerOptions.cmake So the make command worked.