Init from working directory of svn repository.
Here are my property and distance settings currently. Property
27 and 28 are weighted at 3. I am not sure why The disjoint property
had to be so heavily weighted.
void Component::setProperties(BitMap * map) // was BitMap
/*--------------------------------------------------------------
Primary Purpose: Set the property vector for this component
Arguments: The BitMap to which this component belongs
Return Value:
Effects: Property 0-24
The component is divided into a 5 by 5 grid. A gray
scale (0 - 255) for each section is determined. The gray scale
is 0 for all white, 255 for all black, but normally will be somewhere
between the two. The gray scales are represented in properties
0-24.
Property 25 is the grayscale accross the top.
Property 26 is the grayscale accross the bottom.
Property 27 is the width/height ratio again scaled to (0-255)
Actually the formula for property 27 is
width/ height * 255 if height > width
1- height/width * 255 if width > height
This way near 0 is very tall and thin
near 128 height near width
near 255 very wide
Property 28 is Indicator of a vertically disjoint character
like i and j. 0 - not disjoint. 255 - disjoint
Distance Component::distance(Component * comp)
/*--------------------------------------------------------------
Primary Purpose: Determines heuristic distance between two components
Arguments: Another component to compare
Return Value: integer value which represents the distance between two
components. Distance = sum over i of
weight *square (this->fproperty[i] - comp->fproperty[i])
weight for i == 27, 28 is 3 weight is 1 for all other
properties