public class IntegralImage extends Object
Reference: P. Viola, M. Jones. Rapid Object Detection Using A Boosted Cascade Of Simple Features. In Proc. CVPR. 2001.
| Modifier and Type | Field and Description |
|---|---|
private int |
height
Original image height.
|
private double[][] |
integralImage
The container of the integral values
|
private int |
width
Original image width.
|
| Constructor and Description |
|---|
IntegralImage(BufferedImage img)
Construct a new integral image.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getArea(int x1,
int y1,
int x2,
int y2)
Returns the area spanned by two points.
|
double |
getArea(Point p1,
Point p2)
Returns the area spanned by two points.
|
BufferedImage |
getAsImage()
Returns the integral image as normalized 8-bit grey value image.
|
double |
getValue(int x,
int y)
Returns the value at position x,y of the integral image.
|
private double[][] integralImage
private int width
private int height
public IntegralImage(BufferedImage img)
img - the image to create the integral image frompublic double getValue(int x,
int y)
x - x coordinatey - y coordinatepublic double getArea(Point p1, Point p2)
p1 - top left corner of the rectangular areap2 - bottom right corner of the rectangular areapublic double getArea(int x1,
int y1,
int x2,
int y2)
x1 - y1 - x2 - y2 - public BufferedImage getAsImage()
Copyright © 2009–2017 Helmut Ahammer, Philipp Kainz. All rights reserved.