Package boofcv.alg.template
Class TemplateIntensityImage<T extends ImageBase<T>>
java.lang.Object
boofcv.alg.template.TemplateIntensityImage<T>
- All Implemented Interfaces:
TemplateMatchingIntensity<T>
- Direct Known Subclasses:
TemplateIntensityImage_MT
public class TemplateIntensityImage<T extends ImageBase<T>>
extends Object
implements TemplateMatchingIntensity<T>
Class which computes the templates' intensity across the entire image
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
TemplateIntensityImage.EvaluatorMethod<T extends ImageBase<T>>
-
Field Summary
-
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.protected void
processInner
(int w, int h) protected void
processInnerMask
(int w, int h) void
setInputImage
(T image) Specifies the input image which the template is going ot be matched against
-
Field Details
-
intensity
-
image
-
template
-
mask
-
borderX0
protected int borderX0 -
borderY0
protected int borderY0 -
borderX1
protected int borderX1 -
borderY1
protected int borderY1 -
method
-
-
Constructor Details
-
TemplateIntensityImage
-
-
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<T extends ImageBase<T>>
- 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<T extends ImageBase<T>>
- Parameters:
template
- Template image. Must be equal to or smaller than the input image. Not modified.
-
processInner
protected void processInner(int w, int h) -
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<T extends ImageBase<T>>
- 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.
-
processInnerMask
protected void processInnerMask(int w, int h) -
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<T extends ImageBase<T>>
- Returns:
- Feature intensity
-
getBorderX0
public int getBorderX0()Description copied from interface:TemplateMatchingIntensity
Thickness of border along the image left side (lower extent)- Specified by:
getBorderX0
in interfaceTemplateMatchingIntensity<T extends ImageBase<T>>
- 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<T extends ImageBase<T>>
- 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<T extends ImageBase<T>>
- 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<T extends ImageBase<T>>
- 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<T extends ImageBase<T>>
-
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<T extends ImageBase<T>>
- Returns:
- true if the border is processed and false otherwise.
-