Catalano.Imaging.Filters
Class BlobsFiltering
- java.lang.Object
-
- Catalano.Imaging.Filters.BlobsFiltering
-
- All Implemented Interfaces:
- IApplyInPlace
public class BlobsFiltering extends java.lang.Object implements IApplyInPlace
Eliminates blobs with certain area or size.- Supported types: Grayscale.
- Coordinate System: Matrix.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classBlobsFiltering.Filterstatic classBlobsFiltering.Logic
-
Constructor Summary
Constructors Constructor and Description BlobsFiltering()Initialize a new instance of the BlobsFiltering class.BlobsFiltering(int minArea)Initialize a new instance of the BlobsFiltering class.BlobsFiltering(int minArea, boolean remove)Initialize a new instance of the BlobsFiltering class.BlobsFiltering(int minWidth, int minHeight)Initialize a new instance of the BlobsFiltering class.BlobsFiltering(int minWidth, int minHeight, BlobsFiltering.Logic logic)Initialize a new instance of the BlobsFiltering class.BlobsFiltering(int minWidth, int minHeight, BlobsFiltering.Logic logic, boolean remove)Initialize a new instance of the BlobsFiltering class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidapplyInPlace(FastBitmap fastBitmap)Apply filter to an image.BlobsFiltering.FiltergetFilter()Get filtering type.intgetMinArea()Minimum area allowed for eliminate.intgetMinHeight()Get Minimum height allowed.intgetMinWidth()Get Minimum width allowed.booleanisRemove()Check if the filter gonna remove the blobs.voidsetFilter(BlobsFiltering.Filter filter)Set filtering type.voidsetMinArea(int minArea)Minimum area allowed for eliminate.voidsetMinHeight(int minHeight)Set Minimum height allowed.voidsetMinWidth(int minWidth)Set Minimum width allowed.voidsetRemove(boolean remove)Remove or keep the blobs.
-
-
-
Constructor Detail
-
BlobsFiltering
public BlobsFiltering()
Initialize a new instance of the BlobsFiltering class.
-
BlobsFiltering
public BlobsFiltering(int minArea)
Initialize a new instance of the BlobsFiltering class.- Parameters:
minArea- Minimum area to remove.
-
BlobsFiltering
public BlobsFiltering(int minArea, boolean remove)Initialize a new instance of the BlobsFiltering class.- Parameters:
minArea- Minimum area to remove or keep.remove- True if you want to remove, otherwise if you want to keep.
-
BlobsFiltering
public BlobsFiltering(int minWidth, int minHeight)Initialize a new instance of the BlobsFiltering class.- Parameters:
minWidth- Minimum width to remove.minHeight- Minimum height to remove.
-
BlobsFiltering
public BlobsFiltering(int minWidth, int minHeight, BlobsFiltering.Logic logic)Initialize a new instance of the BlobsFiltering class.- Parameters:
minWidth- Minimum width to remove.minHeight- Minimum height to remove.logic- Logic.
-
BlobsFiltering
public BlobsFiltering(int minWidth, int minHeight, BlobsFiltering.Logic logic, boolean remove)Initialize a new instance of the BlobsFiltering class.- Parameters:
minWidth- Minimum width to remove or keep.minHeight- Minimum height to remove or keep.logic- Logic.remove- True if you want to remove, otherwise if you want to keep.
-
-
Method Detail
-
getFilter
public BlobsFiltering.Filter getFilter()
Get filtering type.- Returns:
- Filter.
-
setFilter
public void setFilter(BlobsFiltering.Filter filter)
Set filtering type.- Parameters:
filter- Filter.
-
getMinWidth
public int getMinWidth()
Get Minimum width allowed.- Returns:
- Minimum width.
-
setMinWidth
public void setMinWidth(int minWidth)
Set Minimum width allowed.- Parameters:
minWidth- Minimum width.
-
getMinHeight
public int getMinHeight()
Get Minimum height allowed.- Returns:
- Minimum height.
-
setMinHeight
public void setMinHeight(int minHeight)
Set Minimum height allowed.- Parameters:
minHeight- Minimum height.
-
getMinArea
public int getMinArea()
Minimum area allowed for eliminate.- Returns:
- Minimum area.
-
setMinArea
public void setMinArea(int minArea)
Minimum area allowed for eliminate.- Parameters:
minArea- Minimum area.
-
isRemove
public boolean isRemove()
Check if the filter gonna remove the blobs.- Returns:
- True if the blobs will be removed, otherwise false.
-
setRemove
public void setRemove(boolean remove)
Remove or keep the blobs.- Parameters:
remove- True if you want to remove, otherwise if you want to keep.
-
applyInPlace
public void applyInPlace(FastBitmap fastBitmap)
Description copied from interface:IApplyInPlaceApply filter to an image.- Specified by:
applyInPlacein interfaceIApplyInPlace- Parameters:
fastBitmap- Image to be processed.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG