#include <intfeaturespace.h>
List of all members.
Detailed Description
Definition at line 38 of file intfeaturespace.h.
Constructor & Destructor Documentation
tesseract::IntFeatureSpace::IntFeatureSpace |
( |
| ) |
|
Member Function Documentation
bool tesseract::IntFeatureSpace::DeSerialize |
( |
bool |
swap, |
|
|
FILE * |
fp |
|
) |
| |
Definition at line 50 of file intfeaturespace.cpp.
{
return false;
return false;
return false;
return true;
}
void tesseract::IntFeatureSpace::IndexAndSortFeatures |
( |
const INT_FEATURE_STRUCT * |
features, |
|
|
int |
num_features, |
|
|
GenericVector< int > * |
sorted_features |
|
) |
| const |
void tesseract::IntFeatureSpace::Init |
( |
uinT8 |
xbuckets, |
|
|
uinT8 |
ybuckets, |
|
|
uinT8 |
thetabuckets |
|
) |
| |
INT_FEATURE_STRUCT tesseract::IntFeatureSpace::PositionFromBuckets |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
theta |
|
) |
| const |
|
protected |
bool tesseract::IntFeatureSpace::Serialize |
( |
FILE * |
fp | ) |
const |
Definition at line 37 of file intfeaturespace.cpp.
{
return false;
return false;
return false;
return true;
}
int tesseract::IntFeatureSpace::Size |
( |
| ) |
const |
|
inline |
int tesseract::IntFeatureSpace::ThetaBucket |
( |
int |
theta | ) |
const |
|
inlineprotected |
int tesseract::IntFeatureSpace::XBucket |
( |
int |
x | ) |
const |
|
inlineprotected |
int tesseract::IntFeatureSpace::XYToFeatureIndex |
( |
int |
x, |
|
|
int |
y |
|
) |
| const |
Definition at line 91 of file intfeaturespace.cpp.
{
0, 0};
int index = -1;
for (
int theta = 0; theta <=
MAX_UINT8 && index < 0; ++theta) {
}
if (index < 0) {
tprintf(
"(%d,%d) does not exist in feature space!\n", x, y);
return -1;
}
tprintf(
"Click at (%d, %d) ->(%d, %d), ->(%d, %d)\n",
x, y, feature.
X, feature.
Y, x - feature.
X, y - feature.
Y);
if (x != 0 || y != 0) {
double angle = atan2(static_cast<double>(y), static_cast<double>(x)) +
PI;
if (index < 0) {
tprintf(
"Feature failed to map to a valid index:");
return -1;
}
}
return index;
}
int tesseract::IntFeatureSpace::YBucket |
( |
int |
y | ) |
const |
|
inlineprotected |
Member Data Documentation
uinT8 tesseract::IntFeatureSpace::theta_buckets_ |
|
protected |
uinT8 tesseract::IntFeatureSpace::x_buckets_ |
|
protected |
uinT8 tesseract::IntFeatureSpace::y_buckets_ |
|
protected |
The documentation for this class was generated from the following files: