openframeworks/openFrameworks — Issue #839: ofxOpenCv should do smarter allocation
Author: ofTheo
Created: 2011-12-07 17:10:00+00:00
State: open

right now if you do

ofxCvColorImage color;
color = pixRef;

you get a nasty crash because you didn't call allocate first.
ofImage allocates as needed and ofxOpenCv should too.

There is of course some issues to do with ROIs but if the image width is 0 thats a no brainer.
Also if the current ROI or current cv image is larger than the input it makes sense to either reallocate or do a smart roi based copy.

either way we need to get rid of crashes relating to allocate not being called - it is just no fun.