Image-Leptonica
view release on metacpan or search on metacpan
lib/Image/Leptonica/Func/ccthin.pm view on Meta::CPAN
(3) The examples are indexed as follows:
Thinning (e.g., run to completion):
index = 1 sel_4_1, sel_4_5, sel_4_6
index = 2 sel_4_1, sel_4_7, sel_4_7_rot
index = 3 sel_48_1, sel_48_1_rot, sel_48_2
index = 4 sel_8_2, sel_8_3, sel_48_2
index = 5 sel_8_1, sel_8_5, sel_8_6
index = 6 sel_8_2, sel_8_3, sel_8_8, sel_8_9
index = 7 sel_8_5, sel_8_6, sel_8_7, sel_8_7_rot
Thickening:
index = 8 sel_4_2, sel_4_3 (e.g,, do just a few iterations)
index = 9 sel_8_4 (e.g., do just a few iterations)
=head2 pixThinGeneral
PIX * pixThinGeneral ( PIX *pixs, l_int32 type, SELA *sela, l_int32 maxiters )
pixThinGeneral()
Input: pixs (1 bpp)
type (L_THIN_FG, L_THIN_BG)
sela (of Sels for parallel composite HMTs)
lib/Image/Leptonica/Func/morphapp.pm view on Meta::CPAN
pixSeedfillMorph()
Input: pixs (seed)
pixm (mask)
maxiters (use 0 to go to completion)
connectivity (4 or 8)
Return: pixd (after filling into the mask) or null on error
Notes:
(1) This is in general a very inefficient method for filling
from a seed into a mask. Use it for a small number of iterations,
but if you expect more than a few iterations, use
pixSeedfillBinary().
(2) We use a 3x3 brick SEL for 8-cc filling and a 3x3 plus SEL for 4-cc.
=head2 pixSelectiveConnCompFill
PIX * pixSelectiveConnCompFill ( PIX *pixs, l_int32 connectivity, l_int32 minw, l_int32 minh )
pixSelectiveConnCompFill()
Input: pixs (binary)
lib/Image/Leptonica/Func/seedfilllow.pm view on Meta::CPAN
6 7 8
This low-level filling operation consists of two scans,
raster and anti-raster, covering the entire seed image.
This is followed by a breadth-first propagation operation to
complete the fill.
During the anti-raster scan, every pixel p whose current value
could still be propagated after the anti-raster scan is put into
the FIFO queue.
The propagation step is a breadth-first fill to completion.
Unlike the simple grayscale seedfill pixSeedfillGraySimple(),
where at least two full raster/anti-raster iterations are required
for completion and verification, the hybrid method uses only a
single raster/anti-raster set of scans.
(2) The filling action can be visualized from the following example.
Suppose the mask, which clips the fill, is a sombrero-shaped
surface, where the highest point is 200 and the low pixels
around the rim are 30. Beyond the rim, the mask goes up a bit.
Suppose the seed, which is filled, consists of a single point
of height 150, located below the max of the mask, with
the rest 0. Then in the raster scan, nothing happens until
the high seed point is encountered, and then this value is
( run in 0.802 second using v1.01-cache-2.11-cpan-71847e10f99 )