简体   繁体   中英

How do I create a border around a rectangle in an image(PIX) in Leptonica?

I have an image in PIX format, and I have a BOX[with the necessary coordinates] too, I would like to draw a border around the content that's in the box, like for example -
例

I've looked around in the documentation, but so far I've only found out how to border the whole image, not just a rectangle inside it.

Your method works only for images depth of 3 bpp. Use the pixPaintBoxa or pixDrawBoxa method. See https://tpgit.github.io/Leptonica/boxfunc3_8c.html#a2dca217227f62a99f6003910420b47ba for more details. These methods work for any bpp.

However to use these functions, you have to build leptonica again using static makefiles. See http://www.leptonica.com/source/README.html#DEVELOP for more details.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM