SHARE
TWEET

Untitled

a guest Nov 17th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Mat src = imread("C:/test/neymar.jpg");
  2.         Rect roi = new Rect(50, 50, 350, 300);
  3.         Mat cropped = new Mat(src, roi);
  4.         namedWindow("image", WINDOW_NORMAL);
  5.         imshow("image", src);
  6.         waitKey(0);
  7.         imshow("image", cropped);
  8.         waitKey(0);
  9.         Mat zdjecieobr = src;
  10.         System.out.println("Podaj wysokosc: ");
  11.         Scanner in = new Scanner(System.in);
  12.         double prostokatWysokosc = in.nextDouble();
  13.         System.out.println("Podaj szerokosc: ");
  14.         double prostokatSzerokosc = in.nextDouble();
  15.         Size wymiary = new Size(prostokatSzerokosc, prostokatWysokosc);
  16.         Mat zdjeciewyc = src;
  17.         Imgproc.resize(src, zdjeciewyc, wymiary);
  18.         namedWindow("image", WINDOW_NORMAL);
  19.         imshow("image", zdjeciewyc);
  20.         waitKey(0);
  21.         destroyAllWindows();
  22.         waitKey(0);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top