michalivne / BGSubtraction

A C++/Python wrapper to bgs background subtraction library.
1 stars 1 forks source link

Fixed image size mismatch in python interface #2

Closed al42and closed 8 years ago

al42and commented 8 years ago

Because cv::Mat has somewhat inconsistent constructors: Mat(nrows, ncols) but Mat(Size(ncols,nrows)), the image data was reversibly mangled when passing from Python to C++ (and back): https://imgur.com/a/vJwzN This at least affected internal imshows in various bgs_package algorithms, probably their results too.

I also added checks for image dimensions in process wrapper.

michalivne commented 8 years ago

Thanks for the contribution!