-1

I've recently started working with leptonica Image processing API. But every API function seems to be taking input image of 8bpp and my images are 32bpp (or could be anything else). So is there any function in Leptonica which could convert my image from 32bpp to 8bpp. I've searched but no luck. Is it so that there is no function to do that or we have to feed leptonica only 8bpp image to process it furthur (Such as binarization)? Or do we have to convert the image from any other 3rd party tool then feed it to leptonica.

I am new to image processing and leptonica. Thanks in advance for your suggestions.

BitKnight
  • 149
  • 7

1 Answers1

1

There are several methods, e.g., pixConvertRGBToGray, pixThresholdToBinary, etc. Check its documentation for usage.

http://tpgit.github.io/UnOfficialLeptDocs/leptonica/

http://tpgit.github.io/UnOfficialLeptDocs/leptonica/functions.html

nguyenq
  • 8,212
  • 1
  • 16
  • 16