我有一个框架,并希望在specefic位置绘制一个矩形,矩形:
#include "opencv2/opencv.hpp" #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include<conio.h> int main () { cv::Mat frame = cv::imread("cmd.png"); cvRectangle( &frame,cvPoint(5,10),cvPoint(20,30),cvScalar(255,255,255) ); cv::imshow("test ",frame); while (cv::waitKey() != 23) ; return 1; }
Unhandled exception at 0x000007fefd42caed in OpenCV_capture.exe: Microsoft C++ exception: cv::Exception at memory location 0x0018ead0..
知道为什么我会这样做,我该如何解决它