Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Is there a danger with using the same Mat object for both source and destination?

I'm using the OpenCV library for a Java project. Although this question probably really isn't specific to Java. Many of the OpenCV methods I'm using in my application like Imgproc.threshold() and Imgproc.equalize() all have a source and destination Mat as their parameters. I'm using the same object for both the source and destination and the application is working properly. Is there a danger to using the same object for both the source and destination Mat?

click to hide/show revision 2
retagged

updated 2014-03-24 01:59:52 -0600

berak gravatar image

Is there a danger with using the same Mat object for both source and destination?

I'm using the OpenCV library for a Java project. Although this question probably really isn't specific to Java. Many of the OpenCV methods I'm using in my application like Imgproc.threshold() and Imgproc.equalize() all have a source and destination Mat as their parameters. I'm using the same object for both the source and destination and the application is working properly. Is there a danger to using the same object for both the source and destination Mat?