Skip to content

Instantly share code, notes, and snippets.

@hkhojasteh
Created January 30, 2019 05:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hkhojasteh/c1a60d4bc6858db8a7dece2a0208d29d to your computer and use it in GitHub Desktop.
Save hkhojasteh/c1a60d4bc6858db8a7dece2a0208d29d to your computer and use it in GitHub Desktop.
Mat3b img = imread(argv[1]); //Load image
Rect roi(0, 0, img.cols, img.rows / 1.11); //Setup a rectangle to define region of interest
Mat3b crop = img(roi); //Crop the full image to rectangle ROI
imshow("Original", img);
imshow("Crop", crop);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment