Catalano.Imaging.Filters
Class MoveTowards
- java.lang.Object
-
- Catalano.Imaging.Filters.MoveTowards
-
- All Implemented Interfaces:
- IApplyInPlace
public class MoveTowards extends java.lang.Object implements IApplyInPlace
Move towards filter.
The result of this filter is an image, which is based on source image, but updated in the way to decrease diffirence with overlay image - source image is moved towards overlay image. The update equation is defined in the next way: res = src + Min( Abs( ovr - src ), step ) * Sign( ovr - src ).
-
-
Constructor Summary
Constructors Constructor and Description MoveTowards()Initialize a new instance of the MoveTowards class.MoveTowards(FastBitmap overlayImage, int stepSize)Initialize a new instance of the MoveTowards class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidapplyInPlace(FastBitmap sourceImage)Apply filter to an image.intgetStepSize()Defines the maximum amount of changes per pixel in the source image.voidsetOverlayImage(FastBitmap overlayImage)Sets an overlay image, which will be used as the second image required to process source image.voidsetStepSize(int stepSize)Defines the maximum amount of changes per pixel in the source image.
-
-
-
Constructor Detail
-
MoveTowards
public MoveTowards()
Initialize a new instance of the MoveTowards class.
-
MoveTowards
public MoveTowards(FastBitmap overlayImage, int stepSize)
Initialize a new instance of the MoveTowards class.- Parameters:
overlayImage- Overlay image.stepSize- Step size, [0, 255].
-
-
Method Detail
-
getStepSize
public int getStepSize()
Defines the maximum amount of changes per pixel in the source image.- Returns:
- Step size, [0, 255].
-
setStepSize
public void setStepSize(int stepSize)
Defines the maximum amount of changes per pixel in the source image.- Parameters:
stepSize- Step size, [0, 255].
-
setOverlayImage
public void setOverlayImage(FastBitmap overlayImage)
Sets an overlay image, which will be used as the second image required to process source image.- Parameters:
overlayImage- Overlay image.
-
applyInPlace
public void applyInPlace(FastBitmap sourceImage)
Description copied from interface:IApplyInPlaceApply filter to an image.- Specified by:
applyInPlacein interfaceIApplyInPlace- Parameters:
sourceImage- Image to be processed.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG