openframeworks / openFrameworks

openFrameworks is a community-developed cross platform toolkit for creative coding in C++.
http://openframeworks.cc
Other
9.89k stars 2.55k forks source link

Setting ROI on ofxCvFloatImage and using draw throw error. #2836

Open e271 opened 10 years ago

e271 commented 10 years ago

When using setRoi on ofxCvFloatImage and using the draw method I got this:

[ error ] ofxCvFloatImage: operator=: source width and/or height are zero:0 0 OpenCV Error: Assertion failed (src.size == dst.size && src.channels() == dst.channels()) in cvConvertScale, file /home/arturo/host/Downloads/OpenCV-2.3.1/modules/core/src/convert.cpp, line 1193 terminate called after throwing an instance of 'cv::Exception' what(): /home/arturo/host/Downloads/OpenCV-2.3.1/modules/core/src/convert.cpp:1193: error: (-215) src.size == dst.size && src.channels() == dst.channels() in function cvConvertScale

However if I use resetRoi and then drawRoi, it works and I got the same effect as draw. Also with drawRoi it show the correct roi area always.

I'm using of0.8 on Linux with codeblocks.

Best regards

bilderbuchi commented 10 years ago

could you try with current master? it's possible this has been fixed already.