我试了下调用两次不会出错,肯定是你代码里面有问题,可以贴出来帮你看看
int main()
{
IplImage* src = cvLoadImage("btvdst.jpg");
cvSetImageROI(src,Rect(0,0,10,10));
cvNamedWindow("src1");
cvShowImage("src1",src);
cvWaitKey(0);
cvResetImageROI(src);
cvSetImageROI(src,Rect(0,0,50,50));
cvNamedWindow("src2");
cvShowImage("src2",src);
cvWaitKey(0);
cvResetImageROI(src);
return 0;
}