surf
Class My_Integral_Image

java.lang.Object
  extended by surf.My_Integral_Image
All Implemented Interfaces:
Integral_Image

public class My_Integral_Image
extends java.lang.Object
implements Integral_Image

A standard implementation of the Integral_Image interface. Creates the integral image representation of supplied input image. Calculates pixel sums over upright rectangular areas.

Author:
Alessandro Martini, Claudio Fantacci

Constructor Summary
My_Integral_Image(processing.core.PImage img, processing.core.PApplet parent)
          Constructor of My_Integral_Image.
 
Method Summary
 float getIntegralSquare(int xA, int yA, int xD, int yD)
          The method needs only A and D, i.e. the upper left and bottom right vertex coordinates.
 float getIntegralValue(int x, int y)
          Given the coordinates of a point of the image, returns its integral value, ie the intensity of the rectangle whose vertices are the origin and (x, y).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

My_Integral_Image

public My_Integral_Image(processing.core.PImage img,
                         processing.core.PApplet parent)
Constructor of My_Integral_Image. The constructor receives the image and makes the conversion in its integral version. You allocate a matrix of integralValues of the same dimension of the given image. The Integral Image is full calculated as follows:

Method Detail

getIntegralValue

public float getIntegralValue(int x,
                              int y)
Description copied from interface: Integral_Image
Given the coordinates of a point of the image, returns its integral value, ie the intensity of the rectangle whose vertices are the origin and (x, y).

Specified by:
getIntegralValue in interface Integral_Image
Parameters:
x - x-coordinate
y - y-coordinate
Returns:
The integral value of the given point.

getIntegralSquare

public float getIntegralSquare(int xA,
                               int yA,
                               int xD,
                               int yD)
Description copied from interface: Integral_Image
The method needs only A and D, i.e. the upper left and bottom right vertex coordinates.

Specified by:
getIntegralSquare in interface Integral_Image
Parameters:
xA - x-coordinate of vertex A.
yA - y-coordinate of vertex A.
xD - x-coordinate of vertex D.
yD - y-coordinate of vertex D.
Returns:
The integral value of the square.


processing library SURF by Claudio Fantacci, Alessandro Martini. (c) 2009