Package boofcv.alg.template
Class TemplateCorrelationFFT
java.lang.Object
boofcv.alg.template.TemplateCorrelationFFT
- All Implemented Interfaces:
TemplateMatchingIntensity<GrayF32>
Correlation based template matching which uses FFT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Thickness of border along the image left side (lower extent)int
Thickness of border along the image right side (upper extent)int
Thickness of border along the image top (lower extent)int
Thickness of border along the image bottom (upper extent)Contains results of template matching.boolean
Does this algorithm process the image's border.boolean
If true then a better fit is a larger number, otherwise a smaller number is a better fitvoid
Matches the template to the image and computes an intensity image.void
Matches the template with a mask to the image and computes an intensity image.void
setInputImage
(GrayF32 image) Specifies the input image which the template is going ot be matched against
-
Constructor Details
-
TemplateCorrelationFFT
public TemplateCorrelationFFT()
-
-
Method Details
-
setInputImage
Description copied from interface:TemplateMatchingIntensity
Specifies the input image which the template is going ot be matched against- Specified by:
setInputImage
in interfaceTemplateMatchingIntensity<GrayF32>
- Parameters:
image
- Input image. Not modified.
-
process
Description copied from interface:TemplateMatchingIntensity
Matches the template to the image and computes an intensity image. Must callTemplateMatchingIntensity.setInputImage(ImageBase)
first- Specified by:
process
in interfaceTemplateMatchingIntensity<GrayF32>
- Parameters:
template
- Template image. Must be equal to or smaller than the input image. Not modified.
-
process
Description copied from interface:TemplateMatchingIntensity
Matches the template with a mask to the image and computes an intensity image. Must callTemplateMatchingIntensity.setInputImage(ImageBase)
first- Specified by:
process
in interfaceTemplateMatchingIntensity<GrayF32>
- Parameters:
template
- Template image. Must be equal to or smaller than the input image. Not modified.mask
- Mask that identifies how translucent pixels. 0 = 100% transparent and all values above increase its importance. Typical values are 0 to 255 for integer images and 0.0 to 1.0 for floating point.
-
getIntensity
Description copied from interface:TemplateMatchingIntensity
Contains results of template matching. Higher intensity values correspond to a better match. Local matches can be found usingNonMaxSuppression
. See comment about processing the image border.- Specified by:
getIntensity
in interfaceTemplateMatchingIntensity<GrayF32>
- Returns:
- Feature intensity
-
isBorderProcessed
public boolean isBorderProcessed()Description copied from interface:TemplateMatchingIntensity
Does this algorithm process the image's border. If it does not process the border- Specified by:
isBorderProcessed
in interfaceTemplateMatchingIntensity<GrayF32>
- Returns:
- true if the border is processed and false otherwise.
-
getBorderX0
public int getBorderX0()Description copied from interface:TemplateMatchingIntensity
Thickness of border along the image left side (lower extent)- Specified by:
getBorderX0
in interfaceTemplateMatchingIntensity<GrayF32>
- Returns:
- Border in pixels
-
getBorderX1
public int getBorderX1()Description copied from interface:TemplateMatchingIntensity
Thickness of border along the image right side (upper extent)- Specified by:
getBorderX1
in interfaceTemplateMatchingIntensity<GrayF32>
- Returns:
- Border in pixels
-
getBorderY0
public int getBorderY0()Description copied from interface:TemplateMatchingIntensity
Thickness of border along the image top (lower extent)- Specified by:
getBorderY0
in interfaceTemplateMatchingIntensity<GrayF32>
- Returns:
- Border in pixels
-
getBorderY1
public int getBorderY1()Description copied from interface:TemplateMatchingIntensity
Thickness of border along the image bottom (upper extent)- Specified by:
getBorderY1
in interfaceTemplateMatchingIntensity<GrayF32>
- Returns:
- Border in pixels
-
isMaximize
public boolean isMaximize()Description copied from interface:TemplateMatchingIntensity
If true then a better fit is a larger number, otherwise a smaller number is a better fit- Specified by:
isMaximize
in interfaceTemplateMatchingIntensity<GrayF32>
-