arturoc / FaceSubstitution

Face substitution experiments using ofxFacetracker
Other
436 stars 120 forks source link

Scramble Suit example - OpenCV Error: Assertion failed (ssize.area() > 0) in resize #30

Open jBachalo opened 8 years ago

jBachalo commented 8 years ago

First, am able to compile the FaceSubstitution example without issue. I believe my data folder is populated correctly. Am populating faces folder with identical images used in FaceSubstitution example which load fine. see attached

data_folder

The complete error message I am getting is

[warning] ofFile: copyFrom(): copying a writable file, opening new copy as read only
[ error ] ofImage: loadImage(): couldn't load image from "/Users/foo/bin/data/301 0.234737 -0.304078 6301"
[ error ] ofPixels: format doesn't support channels
OpenCV Error: Assertion failed (ssize.area() > 0) in resize, file /Applications/OpenFrameworks/openframeworksDevelop/scripts/apothecary/build/opencv/modules/imgproc/src/imgwarp.cpp, line 1834
libc++abi.dylib: terminating with uncaught exception of type cv::Exception: /Applications/OpenFrameworks/openframeworksDevelop/scripts/apothecary/build/opencv/modules/imgproc/src/imgwarp.cpp:1834: error: (-215) ssize.area() > 0 in function resize

and this line is hilighted in Tracker.cc cv::resize(im,small_,cv::Size(TSCALE_ww,TSCALE_hh),0,0,CV_INTER_LINEAR);

I think this is a similar error https://forum.openframeworks.cc/t/ofxavfvideoplayer-ofxcv-ofxfacetracker-movie-cropped-and-face-not-detected/20266

kylemcdonald commented 8 years ago

the error says you're trying to load "/Users/foo/bin/data/301 0.234737 -0.304078 6301"

that doesn't look like an image name to me. maybe try a different image name.

jBachalo commented 8 years ago

Thanks but I think that error message is misleading and is due to errors elsewhere. Using the same image and pathing as faceSubstitution which works. Tried cleaning and rebuilding twice and now am getting another error in path.hpp

class BOOST_FILESYSTEM_DECL path
scrambleSuitDebug(2985,0x1011d4000) malloc: *** error for object 0x600000024d20: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

Will let you know if I discover a solution