I'm writing a Qt GUI program in conjuction with OpenCV to create a people tracking application. OpenCV has a lot of functions that take a matrix as input and output, for example a color conversion one:
cvtColor(inputArray src, outputArray dst, int code, int dstCn=0);
Mat is the default matrix class of OpenCV, and assuming I have a Mat object called frame, I would implement the function like this to change its properties:
cvtColor(frame, frame, CV_RGB2HSV,0);
Is there any downside on using the same variable as input and output on any function? or should I create a copy first?
or should I look in every function documentation?