draw rectangle change image property unexpected!
Hi, I have a question regarding the drawing function "rectangle" from opencv 3.2. I think there is a mistake.
The following methods suppose not to change the input "img", since it is a copy of "img" pass to the method. But the "rectangle" method change the property of the input "img" even no reference as input pass to the method.
See my example:
// input is a copy of image
void drawPatch (cv::Mat img){
rectangle (.....);
}
void drawCorner(cv::Mat img){
circle(....);
}
int main(){
cv::Mat img = imread('1.jpg');
imshow("1", img);
drawCorner(img);
imshow("2", img;) // it shows the original img, without drawn corners. no reference as input.
drawPatch(img);
imshow("3", img); // it shows the drawn rectangle even no reference as input.
return 0;
}
I hope that i have make my point clear. Please let me know if there is a mistake. Thx.