2

I want to know what function shall I use to get the Region of Interest of an image of type Pix using Leptonica Image Processing Library. I already done this in OpenCV and I wanted a version of it in Leptonica. Thanks in Advance.

OpenCV Code:

Mat processedImage;
imwrite( "processedImage.tif", processedImage);
Rect region_of_interest = Rect(9, 10,11,20);
Mat tmp = processedImage(region_of_interest);

1 Answers1

0

There is a similar question with answer here. You need to define a box to crop the region:

BOX* region = boxCreate(x, y, w, h);
PIX* imgCrop = pixClipRectangle(img, region, NULL);
Community
  • 1
  • 1
cyberdecker
  • 574
  • 12
  • 24