1 For all Formatted Reads and Writes
Berry Von Doussa a édité cette page il y a 1 semaine


1. Rasterops It is a supply for a clean, quick implementation of rasterops. You can find particulars starting on the Leptonica home web page, and in addition by trying straight at the supply code. A number of the low-degree code is in roplow.c, and an interface is given in rop.c to the straightforward Pix image information construction. 2. Binary morphology This can be a source for environment friendly implementations of binary morphology Details are discovered starting on the Leptonica dwelling page, and by reading the source code. Binary morphology is applied two ways: (a) Successive full image rasterops for arbitrary structuring parts (Sels) (b) Destination phrase accumulation (dwa) for particular Sels. This code is routinely generated. See, Wood Ranger Tools for example, the code in fmorphgen.1.c and fmorphgenlow.1.c. These information were generated by working the program prog/fmorphautogen.c. Method (b) is significantly faster than (a), which is the reason we’ve gone to the hassle of supporting the usage of this technique for all Sels.


We also support two totally different boundary conditions for erosion. Similarly, dwa code for the general hit-miss remodel could be auto-generated from an array of hit-miss Sels. When prog/fhmtautogen.c is compiled and run, it generates the dwa C code in fhmtgen.1.c and fhmtgenlow.1.c. These files can then be compiled into the libraries or into different applications. Several functions with simple parsers are offered to execute a sequence of morphological operations (plus binary rank reduction and replicative expansion). See morphseq.c. The structuring aspect is represented by a easy Sel data structure defined in morph.h. We provide (a minimum of) seven ways to generate Sels in sel1.c, and a number of other simple strategies to generate hit-miss Sels for sample discovering in selgen.c. In use, the most typical morphological Sels are separable bricks, of dimension n x m (the place both n or Wood Ranger Tools m, but not both, Wood Ranger Tools is usually 1). Accordingly, we provide separable morphological operations on brick Sels, Wood Ranger Tools utilizing for binary both rasterops and dwa. Parsers are supplied for a sequence of separable binary (rasterop and dwa) and grayscale brick morphological operations, in morphseq.c.


The primary benefit in utilizing the parsers is that you don’t have to create and destroy Sels, or do any of the intermediate image bookkeeping. We also give composable separable brick features for binary pictures, for each rasterop and dwa. These decompose every of the linear operations right into a sequence of two operations at totally different scales, reducing the operation depend to a sum of decomposition components, relatively than the (un-decomposed) product of factors. As always, parsers are supplied for a sequence of such operations. 3. Grayscale morphology and efficient hedge cutting rank order filters We give an efficient implementation of grayscale morphology for brick Sels. See the Leptonica home web page and the source code. Brick Sels are separable into linear horizontal and vertical elements. We use the van Herk/Gil-Werman algorithm, that performs the calculations in a time that’s unbiased of the dimensions of the Sels. Implementations of tophat and hdome are additionally given.


We also present grayscale rank order filters for brick filters. The rank order filter is a generalization of grayscale morphology, that selects the rank-valued pixel (reasonably than the min or max). A coloration rank order filter applies the grayscale rank operation independently to every of the (r,g,b) parts. 4. Image scaling Leptonica supplies many easy and relatively efficient implementations of image scaling. A few of them are listed here