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
Abstract 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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(DogArray_I32 onesIn, DogArray_I32 onesOut, DogArray_I32 zerosOut) Applies the mask.protected boolean
borderMask
(int cx, int cy) Slower code which uses a generic mask to handle image borderprotected abstract boolean
innerMask
(int indexIn) Specialized code optimized for the inner image
-
Constructor Details
-
Mask
protected Mask(byte[] mask)
-
-
Method Details
-
apply
Applies the mask.- 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
-