title: How to crop image in opencv with android
body: <p>i Have a rectangle drawn by opencv+java+android. now i need to crop and display in my imagviwe how to crop it. submat methord is allow only int values. but rect.tl().x values are in double. casting is not a good solution. it make errors.</p>
  
  <p><code>Core.rectangle(ImageMatin, rect.tl(), rect.br(), new Scalar(255, 0, 0),1); // works
  Mat cropped = ImageMatin.submat(rect.tl().x, rect.height, rect.tl().x, rect.width); //error</code></p>