Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to display an image

I want to display my image on right side of the screen within the rectangle. So for that I wrote the following code.

Rect dstRC(10,20,100,100);//The region I want to display image
Mat dstROI = frame(dstRC);
img1.copyTo(dstROI);//My image is img1.Copy to desired location
rectangle(frame1, dstRC, CV_RGB(255,0,0), 3, CV_AA);

But it shows only an empty rectangle.Why?