DanBloomberg / leptonica

Leptonica is an open source library containing software that is broadly useful for image processing and image analysis applications. The official github repository for Leptonica is: danbloomberg/leptonica. See leptonica.org for more documentation.
Other
1.76k stars 387 forks source link

I want to perform several operations on images. What interfaces do I need to use? Thank you very much! #637

Closed jueqing1015 closed 1 year ago

jueqing1015 commented 2 years ago

I want to perform several operations on images. What interfaces do I need to use? Thank you very much!

  1. Fills the rectangular area specified by the image with color

  2. Overlap one graph to another somewhere

  3. The image is horizontally and vertically mirrored

DanBloomberg commented 2 years ago
  1. How does the image "specify" a rectangular area.
  2. What does that mean?
  3. Not sure what you want. See: pixMirroredTiling(), pixAddMirroredBorder()
jueqing1015 commented 2 years ago
  1. How does the image "specify" a rectangular area.
  2. What does that mean?
  3. Not sure what you want. See: pixMirroredTiling(), pixAddMirroredBorder() @DanBloomberg As shown in the following figure: the area in the figure is filled with red. How should this effect be operated? 000

As shown in the following figure: how to merge the above two figures into the following one? 00000

DanBloomberg commented 2 years ago

(1) If you specify a region as a Box, for 32 bpp use pixSetInRectArbitrary(pix, box, val), where val is a 32-bit RGB pixel. See pixPaintBoxa() for a more general approach.

(2) pixRasterop() is your friend for putting arbitrary rectangular image regions on other images.

DanBloomberg commented 1 year ago

Issue appears to be resolved