org.openimaj.image.analysis.algorithm

Class SummedSqTiltAreaTable

• All Implemented Interfaces:
ImageAnalyser<FImage>

public class SummedSqTiltAreaTable
extends SummedSqAreaTable
Implementation of an Integral Image or Summed Area Table. This Implementation calculates both the sum, squared sum values, and (optionally) 45-degree tilted sum values.

See http://en.wikipedia.org/wiki/Summed_area_table and http://research.microsoft .com/en-us/um/people/viola/Pubs/Detect/violaJones_IJCV.pdf

Basically, this provides an efficient way to find the sum of all pixels in a rectangular area of an image.

Author:
Jonathon Hare (jsh2@ecs.soton.ac.uk)

• Constructor Detail

• SummedSqTiltAreaTable

public SummedSqTiltAreaTable(FImage image)
Construct a SAT for normal sum, squared sum and tilted sum from the provided image.
Parameters:
image - the image.
• SummedSqTiltAreaTable

public SummedSqTiltAreaTable(FImage image,
boolean computeTilted)
Construct a SAT for normal sum, squared sum and (optionally) tilted sum from the provided image.
Parameters:
image - the image.
computeTilted - if true compute the tilted features.
• Method Detail

• calculateTiltedSumArea

public float calculateTiltedSumArea(int x,
int y,
int width,
int height)
Calculate the sum of pixels in the image used for constructing this SAT within the 45 degree tilted rectangle.
Parameters:
x -
y -
width -
height -
Returns:
sum of pixels in given rectangle
• calculateTiltedSumArea

public float calculateTiltedSumArea(Rectangle r)
Calculate the sum pixels in the image used for constructing this SAT within the given 45-degree tilted rectangle.
Parameters:
r - rectangle
Returns:
sum of pixels in given rectangle