For all Formatted Reads and Writes
페이지 정보
작성자 Megan 작성일25-11-28 14:51 조회6회 댓글0건관련링크
본문
1. Rasterops This can be a supply for a clear, fast implementation of rasterops. You'll find particulars starting on the Leptonica home page, and also by wanting instantly at the supply code. Among the low-level code is in roplow.c, and an interface is given in rop.c to the straightforward Pix image data structure. 2. Binary morphology This can be a source for efficient implementations of binary morphology Details are discovered starting at the Leptonica home page, and by studying the supply code. Binary morphology is applied two ways: (a) Successive full picture rasterops for arbitrary structuring parts (Sels) (b) Destination phrase accumulation (dwa) for particular Sels. This code is robotically generated. See, for example, the code in fmorphgen.1.c and fmorphgenlow.1.c. These recordsdata have been generated by operating this system prog/fmorphautogen.c. Method (b) is considerably faster than (a), which is the rationale we have gone to the effort of supporting the use of this methodology for all Sels.
We also help two completely different boundary circumstances for erosion. Similarly, dwa code for the overall hit-miss transform 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 capabilities with simple parsers are offered to execute a sequence of morphological operations (plus binary rank discount and replicative enlargement). See morphseq.c. The structuring factor is represented by a easy Sel knowledge construction outlined in morph.h. We provide (a minimum of) seven methods to generate Sels in sel1.c, and a number of other easy methods to generate hit-miss Sels for pattern discovering in selgen.c. In use, the most common morphological Sels are separable bricks, of dimension n x m (the place both n or m, however not each, is often 1). Accordingly, we provide separable morphological operations on brick Sels, 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 principle benefit in using the parsers is that you don't have to create and destroy Sels, or do any of the intermediate picture bookkeeping. We also give composable separable brick capabilities for binary photos, for both rasterop and dwa. These decompose every of the linear operations into a sequence of two operations at totally different scales, decreasing the operation depend to a sum of decomposition factors, somewhat than the (un-decomposed) product of things. As at all times, parsers are provided for a sequence of such operations. 3. Grayscale morphology and rank order filters We give an efficient implementation of grayscale morphology for brick Sels. See the Leptonica house page and the supply 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 is impartial of the size of the Sels. Implementations of tophat and hdome are also given.
We additionally provide grayscale rank order filters for brick filters. The rank order filter is a generalization of grayscale morphology, Wood Ranger shears that selects the rank-valued pixel (quite than the min or max). A colour rank order filter applies the grayscale rank operation independently to every of the (r,g,b) components. 4. Image scaling Leptonica supplies many easy and relatively efficient implementations of picture scaling. A few of them are listed here; for the complete set see the web web page and the supply code. Scaling operations with easy sampling could be performed at 1, 2, 4, 8, 16 and 32 bpp. Linear interpolation is slower but gives higher results, especially for upsampling. For reasonable downsampling, best results are obtained with space mapping scaling. With very high downsampling, either space mapping or antialias sampling (lowpass filter adopted by sampling) give good results. Fast space map with energy-of-2 discount are additionally provided. Optional sharpening after resampling is offered to improve look by lowering the visual effect of averaging throughout sharp boundaries.
For quick evaluation of grayscale and colour photographs, it is helpful to have integer subsampling mixed with pixel depth reduction. RGB coloration photographs can thus be transformed to low-decision grayscale and binary pictures. For binary scaling, the dest pixel could be selected from the closest corresponding source pixel. For the special case of energy-of-2 binary reduction, low-go rank-order filtering could be carried out prematurely. Isotropic integer growth is finished by pixel replication. We additionally provide 2x, 3x, 4x, 6x, 8x, and 16x scale-to-grey reduction on binary images, to produce high quality reduced grayscale images. These are integrated into a scale-to-grey perform with arbitrary reduction. Conversely, we have particular 2x and 4x scale-to-binary expansion on grayscale photos, using linear interpolation on grayscale raster line buffers adopted by either thresholding or Wood Ranger shears dithering. There are also image depth converters that don't have scaling, similar to unpacking operations from 1 bpp to grayscale, and thresholding and dithering operations from grayscale to 1, 2 and four bpp.
댓글목록
등록된 댓글이 없습니다.
