Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Mat::clone() issues

Hello,

I am using a method for thinning an image. The method is beeing executed by a single thread.

void applyThreadedThinning(Mat* input) { Mat output = input->clone(); ..... }

I use MSVC 2015 (32bit) and the plugin Image Watch, which lets me see the content of the image while debugging.

After I set a breakpoint do the line with the clone()... i noticed, that the input image looks fine, but the cloned one is a plain image, filled with values 217 (8bit greyscale).

After jumping to the next line in the debugger, both images are "invalid".

Strange thing is, if I execute the method directly in the main method (not using a thread), it works fine. The threaded(std::thread t1(...)) version aborts during runtime.

Why is the clone method not working as intended? Is it something with scopes?

Thanks