class ipHaar

This class is designed to compute one Haar-like feature into an integral image

Inheritance:


Public Fields

[more]int width_image
width of the image to scan
[more]int height_image
height of the image to scan
[more]int width_pattern
width of the model
[more]int height_pattern
height of the model
[more]int mask_id
mask type
[more] location and size of the mask in the scanning window
[more] location and size of the scanning window in the image
[more]real* integralimage2
to normalize by mean/stdv

Public Methods

[more] ipHaar(int width_pattern_, int height_pattern_, int mask_id_, int x_mask_, int y_mask_, int w_mask_, int h_mask_)
create a Haar-like feature
[more]virtual ~ipHaar()
[more]void resetImage(int width_image_, int height_image_)
[more]void resetWindowX(int x_window_)
[more]void resetWindowY(int y_window_)
[more]void resetWindowXY(int x_window_, int y_window_)
[more]void resetWindowSize(int w_window_, int h_window_)
[more]virtual void process(Sequence* seq_in)
[more]virtual real applyMask(Sequence* seq_in) = 0
compute the feature
[more]real p2(Sequence* seq_in)
[more]real p3(Sequence* seq_in)
[more]real p4(Sequence* seq_in)
[more]real p5(Sequence* seq_in)
[more]real p6(Sequence* seq_in)
[more]real p7(Sequence* seq_in)
[more]real p8(Sequence* seq_in)
[more]real p9(Sequence* seq_in)
[more]real p12(Sequence* seq_in)
[more]real p23(Sequence* seq_in)
[more]real p14(Sequence* seq_in)
[more]real p36(Sequence* seq_in)
[more]real p47(Sequence* seq_in)
[more]real p69(Sequence* seq_in)
[more]real p78(Sequence* seq_in)
[more]real p89(Sequence* seq_in)
[more]real p15(Sequence* seq_in)
[more]real p35(Sequence* seq_in)
[more]real p75(Sequence* seq_in)
[more]real p95(Sequence* seq_in)
[more]virtual void loadXFile(XFile* file)
[more]virtual void saveXFile(XFile* file)
[more]void info()


Inherited from ipCore:

Public Fields

output field

input/output image coding field

Public Methods

constructor and destructor

initialization and processing

accessing and modifying output


Documentation

This class is designed to compute one Haar-like feature into an integral image

It seems long and tedious, but implemented to do a lot of precomputations and then speed up the execution.


         pattern image	
		               #width_pattern#
	           +--------------------------------------+
	           |                                      |
	           |                                      |
	           |     #x_mask#                         |
	           | #y_mask# +--------------+            |
		   |          |              |            |
		   |          |              |            |
		   |          |              | #h_mask#   |
		   |          |              |            |
		   |          |              |            |
 #height_pattern#  |          |              |            |
	           |          +--------------+            |
	           |              #w_mask#                |
	           |                                      |
	           |                                      |
	           .                                      .
	           .                                      .
	           .                                      .
	           .                                      .
	           .                                      .
	           .                                      .
	           |                                      |
	           |                                      |
	           +--------------------------------------+



         main image	
				          #width_image# (>= #width_pattern#)
	                  +-----------------------------------------------------------+
	                  |                                                           |
	                  |                                                           |
	                  |                                                           |
	                  |    #x_window#                                             |
	                  |   #y_window# +-------------+                              |
	                  |              |             |                              |
	                  |              |    +---+    |                              |
    #height_image#	  |              |    |X| |    | #h_window#                   |
 (>= #height_pattern#)	  |              |    |X| |    |                              |
	                  |              |    +-+-+    |                              |
	                  |              |             |                              |
	                  |              +-------------+                              |
	                  |                 #w_window#                                |
	                  .                                                           .
	                  .                                                           .
	                  .                                                           .
	                  .                                                           .
	                  .                                                           .
	                  .                                                           .
	                  .                                                           .
	                  .                                                           .
	                  |                                                           |
	                  |                                                           |
	                  +-----------------------------------------------------------+


	Bi-Vertical, Bi-Horizontal, and Diagonal masks can be computed using this representation:
	                  
 			P1      P2      P3
			  o       o       o           
	                   +-------+-------+
		           |       |       |
		        P4 |    P5 |    P6 |
		          o|      o|      o|
		           +-------+-------+
		           |       |       |
		        P7 |    P8 |    P9 |
		          o|      o|      o|
	                   +-------+-------+


	Bi-Vertical mask:
	                   +-------+-------+
		           |XXXXXXX|       |
		           |XXXXXXX|       |
		           |XXXXXXX|       |
		           |XXXXXXX|       |
		           |XXXXXXX|       |
		           |XXXXXXX|       |
	                   +-------+-------+

	Bi-Horizontal mask:
	                   +---------------+
		           |XXXXXXXXXXXXXXX|
		           |XXXXXXXXXXXXXXX|
		           |XXXXXXXXXXXXXXX|
		           +---------------+
		           |               |
		           |               |
		           |               |
	                   +---------------+

	Diagonal mask:
	                   +-------+-------+
		           |XXXXXXX|       |
		           |XXXXXXX|       |
		           |XXXXXXX|       |
		           +-------+-------+
		           |       |XXXXXXX|
		           |       |XXXXXXX|
		           |       |XXXXXXX|
	                   +-------+-------+

	Tri-Vertical and Tri-Horizontal masks can be computed using this representation:
	                  
 			 P1   P12    P23    P3
			  o     o      o     o           
	                   +-----+-----+-----+
		           |     |     |     |
		       P14 |     |     | P36 |
		          o|     |     |    o|
	                   +-----+-----+-----+
		           |     |     |     |
		       P47 |     |     | P69 |
		          o|     |     |    o|
	                   +-----+-----+-----+
		           |     |     |     |
		        P7 |  P78|  P89|  P9 |
		          o|    o|    o|    o|
	                   +-----+-----+-----+

	Tri-Vertical mask:
	                   +-----+-----+-----+
		           |     |XXXXX|     |
		           |     |XXXXX|     |
		           |     |XXXXX|     |
		           |     |XXXXX|     |
		           |     |XXXXX|     |
		           |     |XXXXX|     |
		           |     |XXXXX|     |
		           |     |XXXXX|     |
		           |     |XXXXX|     |
		           |     |XXXXX|     |
		           |     |XXXXX|     |
	                   +-----+-----+-----+

	Tri-Horizontal mask:
	                   +-----------------+
		           |                 |
		           |                 |
		           |                 |
	                   +-----------------+
		           |XXXXXXXXXXXXXXXXX|
		           |XXXXXXXXXXXXXXXXX|
		           |XXXXXXXXXXXXXXXXX|
	                   +-----------------+
		           |                 |
		           |                 |
		           |                 |
	                   +-----------------+

	Central mask:
	                   +-----------------+
		           |                 |
		           |                 |
	                   |    +-------+    |
		           |    |XXXXXXX|    |
		           |    |XXXXXXX|    |
		           |    |XXXXXXX|    |
	                   |    +-------+    |
		           |                 |
		           |                 |
	                   +-----------------+
    

oint width_image
width of the image to scan

oint height_image
height of the image to scan

oint width_pattern
width of the model

oint height_pattern
height of the model

oint mask_id
mask type

o location and size of the mask in the scanning window

oint x_mask

oint y_mask

oint w_mask

oint h_mask

o location and size of the scanning window in the image

oint x_window

oint y_window

oint w_window

oint h_window

oreal* integralimage2
to normalize by mean/stdv

o ipHaar(int width_pattern_, int height_pattern_, int mask_id_, int x_mask_, int y_mask_, int w_mask_, int h_mask_)
create a Haar-like feature

Parameters:
width_pattern_ - is the width of the pattern
height_pattern_ - is the height of the pattern
mask_id_ - is the type of the mask
x_mask_ - is the upper left x coordinate of the mask
y_mask_ - is the upper left y coordinate of the mask
w_mask_ - is the width of the mask
h_mask_ - is the height of the mask

ovirtual ~ipHaar()

ovoid resetImage(int width_image_, int height_image_)

ovoid resetWindowX(int x_window_)

ovoid resetWindowY(int y_window_)

ovoid resetWindowXY(int x_window_, int y_window_)

ovoid resetWindowSize(int w_window_, int h_window_)

ovirtual void process(Sequence* seq_in)

ovirtual real applyMask(Sequence* seq_in) = 0
compute the feature

o support points of Haar-like features

oreal p2(Sequence* seq_in)

oreal p3(Sequence* seq_in)

oreal p4(Sequence* seq_in)

oreal p5(Sequence* seq_in)

oreal p6(Sequence* seq_in)

oreal p7(Sequence* seq_in)

oreal p8(Sequence* seq_in)

oreal p9(Sequence* seq_in)

oreal p12(Sequence* seq_in)

oreal p23(Sequence* seq_in)

oreal p14(Sequence* seq_in)

oreal p36(Sequence* seq_in)

oreal p47(Sequence* seq_in)

oreal p69(Sequence* seq_in)

oreal p78(Sequence* seq_in)

oreal p89(Sequence* seq_in)

oreal p15(Sequence* seq_in)

oreal p35(Sequence* seq_in)

oreal p75(Sequence* seq_in)

oreal p95(Sequence* seq_in)

ovirtual void loadXFile(XFile* file)

ovirtual void saveXFile(XFile* file)

ovoid info()


Direct child classes:
triVertHaar
triHorizHaar
diagHaar
centralHaar
biVertHaar
biHorizHaar
Author:
Yann Rodriguez (yann.rodriguez@idiap.ch) Sebastien Marcel (marcel@idiap.ch)
Version:
2.0 Fri 15 Jul 2005 11:35:22 AM CEST
Since:
2.0

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.