/*---------------------------------------------------------------------------*/ BOOL8 DummyFastMatch ( FEATURE Feature, PROTO Proto) /* ** Parameters: ** Feature feature to be "fast matched" to proto ** Proto proto being "fast matched" against ** Globals: ** training_tangent_bbox_pad bounding box pad tangent to proto ** training_orthogonal_bbox_pad bounding box pad orthogonal to proto ** Operation: This routine returns TRUE if Feature would be matched ** by a fast match table built from Proto. ** Return: TRUE if feature could match Proto. ** Exceptions: none ** History: Wed Nov 14 17:19:58 1990, DSJ, Created. */ { FRECT BoundingBox; FLOAT32 MaxAngleError; FLOAT32 AngleError; MaxAngleError = training_angle_pad / 360.0; AngleError = fabs (Proto->Angle - Feature->Params[PicoFeatDir]); if (AngleError > 0.5) AngleError = 1.0 - AngleError; if (AngleError > MaxAngleError) return (FALSE); ComputePaddedBoundingBox (Proto, training_tangent_bbox_pad * GetPicoFeatureLength (), training_orthogonal_bbox_pad * GetPicoFeatureLength (), &BoundingBox); return PointInside(&BoundingBox, Feature->Params[PicoFeatX], Feature->Params[PicoFeatY]); } /* DummyFastMatch */
/** * This routine returns TRUE if Feature would be matched * by a fast match table built from Proto. * * @param Feature feature to be "fast matched" to proto * @param Proto proto being "fast matched" against * * Globals: * - training_tangent_bbox_pad bounding box pad tangent to proto * - training_orthogonal_bbox_pad bounding box pad orthogonal to proto * * @return TRUE if feature could match Proto. * @note Exceptions: none * @note History: Wed Nov 14 17:19:58 1990, DSJ, Created. */ BOOL8 DummyFastMatch ( FEATURE Feature, PROTO Proto) { FRECT BoundingBox; FLOAT32 MaxAngleError; FLOAT32 AngleError; MaxAngleError = training_angle_pad / 360.0; AngleError = fabs (Proto->Angle - Feature->Params[PicoFeatDir]); if (AngleError > 0.5) AngleError = 1.0 - AngleError; if (AngleError > MaxAngleError) return (FALSE); ComputePaddedBoundingBox (Proto, training_tangent_bbox_pad * GetPicoFeatureLength (), training_orthogonal_bbox_pad * GetPicoFeatureLength (), &BoundingBox); return PointInside(&BoundingBox, Feature->Params[PicoFeatX], Feature->Params[PicoFeatY]); } /* DummyFastMatch */