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)
• ### Field Summary

Fields
Modifier and Type Field and Description
`FImage` `tiltSum`
The tilted sum data
• ### Fields inherited from class org.openimaj.image.analysis.algorithm.SummedSqAreaTable

`sqSum, sum`
• ### Constructor Summary

Constructors
Constructor and Description
`SummedSqTiltAreaTable()`
Construct an empty SAT.
`SummedSqTiltAreaTable(FImage image)`
Construct a SAT for normal sum, squared sum and tilted sum from the provided image.
```SummedSqTiltAreaTable(FImage image, boolean computeTilted)```
Construct a SAT for normal sum, squared sum and (optionally) tilted sum from the provided image.
• ### Method Summary

All Methods
Modifier and Type Method and Description
`void` `analyseImage(FImage image)`
Analyse an image.
`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.
`float` `calculateTiltedSumArea(Rectangle r)`
Calculate the sum pixels in the image used for constructing this SAT within the given 45-degree tilted rectangle.
`protected void` `computeRotSqSumIntegralImages(FImage image)`
`protected void` `computeSqSumIntegralImages(FImage img)`
• ### Methods inherited from class org.openimaj.image.analysis.algorithm.SummedSqAreaTable

`calculateSqSumArea, calculateSqSumArea, calculateSumArea, calculateSumArea, computeTable`
• ### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ### Field Detail

• #### tiltSum

`public FImage tiltSum`
The tilted sum data
• ### Constructor Detail

• #### SummedSqTiltAreaTable

`public SummedSqTiltAreaTable()`
Construct an empty SAT.
• #### 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

• #### computeSqSumIntegralImages

`protected void computeSqSumIntegralImages(FImage img)`
• #### computeRotSqSumIntegralImages

`protected final void computeRotSqSumIntegralImages(FImage image)`
• #### 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
• #### analyseImage

`public void analyseImage(FImage image)`
Description copied from interface: `ImageAnalyser`
Analyse an image.
Specified by:
`analyseImage` in interface `ImageAnalyser<FImage>`
Overrides:
`analyseImage` in class `SummedSqAreaTable`
Parameters:
`image` - The image to process in place.