Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version
Mat img_scene = imread(argv[2], IMREAD_GRAYSCALE);
namedWindow("image", CV_WINDOW_FREERATIO);
imshow("image", img_scene);
waitKey(0);

Rect croppedRectangle = Rect(181, 225, 400, 50);
Mat CroppedImage = img_scene(croppedRectangle);

namedWindow("Cropped", CV_WINDOW_FREERATIO);
imshow("Cropped", CroppedImage);
waitKey(0);