Package boofcv.alg.filter.binary.impl
Class BinaryThinning.Mask
- java.lang.Object
-
- boofcv.alg.filter.binary.impl.BinaryThinning.Mask
-
- Direct Known Subclasses:
BinaryThinning.Mask0,BinaryThinning.Mask1,BinaryThinning.Mask2,BinaryThinning.Mask3,BinaryThinning.Mask4,BinaryThinning.Mask5,BinaryThinning.Mask6,BinaryThinning.Mask7
- Enclosing class:
- BinaryThinning
protected abstract class BinaryThinning.Mask extends java.lang.ObjectAbstract class for applying the mask. Uses sparse list of black pixels. Determines if the pixel is along the border or not. If border then generic code is code, otherwise optimized code is called.
-
-
Constructor Summary
Constructors Constructor Description Mask(byte[] mask)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidapply(org.ddogleg.struct.GrowQueue_I32 onesIn, org.ddogleg.struct.GrowQueue_I32 onesOut, org.ddogleg.struct.GrowQueue_I32 zerosOut)protected booleanborderMask(int cx, int cy)Slower code which uses a generic mask to handle image borderprotected abstract booleaninnerMask(int indexIn)Specialized code optimized for the inner image
-
-
-
Method Detail
-
apply
public void apply(org.ddogleg.struct.GrowQueue_I32 onesIn, org.ddogleg.struct.GrowQueue_I32 onesOut, org.ddogleg.struct.GrowQueue_I32 zerosOut)- Parameters:
onesIn- (input) Indexes of pixels with a value of 1onesOut- (output) Indexes of pixels with a value of 1 after the mask is appliedzerosOut- (output) Indexes of pixels whose values have changed form 1 to 0
-
borderMask
protected boolean borderMask(int cx, int cy)Slower code which uses a generic mask to handle image border- Parameters:
cx- x-coordinate of center pixels, always 1cy- y-coordinate of center pixels, always 1- Returns:
- true means the pixels keeps the value of one, otherwise it is set to zero
-
innerMask
protected abstract boolean innerMask(int indexIn)
Specialized code optimized for the inner image- Parameters:
indexIn- Index of center pixels, always 1- Returns:
- true means the pixels keeps the value of one, otherwise it is set to zero
-
-