Matlab Bindings Bridge Class Core OpenCV Conversion [closed]

asked 2014-02-26 23:05:48 -0600

Fabricio Guzman gravatar image

The explicit conversion from Bridge object to cv::Size does not appear to be working properly for me. The method is defined in the Bridge.hpp file as:

cv::Size toSize() const { return cv::Size(); }

When I call this method from a properly parsed bridge object I get back a new cv:Size object that has been initialized (by the default constructor) to a width and height of zero. There does not appear to be any marshaling of the MxArray data into this new Size object. The return statement in the method above is simply instantiating a new Size object.

In contrast, the explicit integral type conversion:

int toInt() { return ptr_.scalar< int >(); }

Properly returns the MxArray scalar value when called, as can be seen by the MxArray call to 'scalar< int >'.

I guess my point is that the integral conversion actually does something with the MxArray pointer to convert the data type, while the cv::Size conversion simply returns a new instance of the core object. Is there an overload of the core OpenCV type that I'm not seeing? Or did my Bridge class not get properly generated? This problem occurs to all the core OpenCV type conversion.

I’m using Matlab 2013a, Visual Studio 2010, openCV 3.0 dev, and winxp x86. Any insight would be greatly appreciated. Thank you.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-10-15 09:41:25.616113

Comments

The core OpenCV type conversions have not yet been implemented; they're currently only stubbed. Bug #3465 is addressing the issue.

Fabricio Guzman gravatar imageFabricio Guzman ( 2014-02-28 14:29:50 -0600 )edit