src/classify/mfx.cpp
MicroFeature ExtractMicroFeature(MFOUTLINE Start, MFOUTLINE End) {
  MFEDGEPT *P1, *P2;

  P1 = PointAt(Start);
  P2 = PointAt(End);

  MicroFeature NewFeature;
  NewFeature[(int)MicroFeatureParameter::MFXPosition] = AverageOf(P1->Point.x, P2->Point.x);
  NewFeature[(int)MicroFeatureParameter::MFYPosition] = AverageOf(P1->Point.y, P2->Point.y);
  NewFeature[(int)MicroFeatureParameter::MFLength] = DistanceBetween(P1->Point, P2->Point);
  NewFeature[(int)MicroFeatureParameter::MFDirection] = NormalizedAngleFrom(&P1->Point, &P2->Point, 1.0);
  NewFeature[(int)MicroFeatureParameter::MFBulge1] = 0.0f;  // deprecated
  NewFeature[(int)MicroFeatureParameter::MFBulge2] = 0.0f; // deprecated

  return NewFeature;
}
/**
 * This routine computes the feature parameters which describe
 * the micro-feature that starts and Start and ends at End.
 * A new micro-feature is allocated, filled with the feature
 * parameters, and returned.  The routine assumes that
 * Start and End are not the same point.  If they are the
 * same point, nullptr is returned, a warning message is
 * printed, and the current outline is dumped to stdout.
 * @param Start starting point of micro-feature
 * @param End ending point of micro-feature
 * @return New micro-feature or nullptr if the feature was rejected.
 * @note Globals: none
 */
This routine computes the feature parameters which describe
the micro-feature that starts and Start and ends at End.
A new micro-feature is allocated, filled with the feature
parameters, and returned.  The routine assumes that
Start and End are not the same point.  If they are the
same point, nullptr is returned, a warning message is
printed, and the current outline is dumped to stdout.
@param Start starting point of micro-feature
@param End ending point of micro-feature
@return New micro-feature or nullptr if the feature was rejected.
@note Globals: none
This routine computes the feature parameters which describe the micro - feature that starts and Start and ends at End . A new micro - feature is allocated filled with the feature parameters and returned . The routine assumes that Start and End are not the same point . If they are the same point nullptr is returned a warning message is printed and the current outline is dumped to stdout . @param Start starting point of micro - feature @param End ending point of micro - feature @return New micro - feature or nullptr if the feature was rejected . @note Globals : none
MicroFeature ExtractMicroFeature(MFOUTLINE Start, MFOUTLINE End) {
  MFEDGEPT *P1, *P2;
  P1 = PointAt(Start);
  P2 = PointAt(End);
  MicroFeature NewFeature;
  NewFeature[(int)MicroFeatureParameter::MFXPosition] = AverageOf(P1->Point.x, P2->Point.x);
  NewFeature[(int)MicroFeatureParameter::MFYPosition] = AverageOf(P1->Point.y, P2->Point.y);
  NewFeature[(int)MicroFeatureParameter::MFLength] = DistanceBetween(P1->Point, P2->Point);
  NewFeature[(int)MicroFeatureParameter::MFDirection] = NormalizedAngleFrom(&P1->Point, &P2->Point, 1.0);
  NewFeature[(int)MicroFeatureParameter::MFBulge1] = 0.0f;  
  NewFeature[(int)MicroFeatureParameter::MFBulge2] = 0.0f; 
  return NewFeature;
}
MicroFeature ExtractMicroFeature ( MFOUTLINE Start , MFOUTLINE End ) { MFEDGEPT * P1 , * P2 ; P1 = PointAt ( Start ) ; P2 = PointAt ( End ) ; MicroFeature NewFeature ; NewFeature [ ( int ) MicroFeatureParameter :: MFXPosition ] = AverageOf ( P1 -> Point . x , P2 -> Point . x ) ; NewFeature [ ( int ) MicroFeatureParameter :: MFYPosition ] = AverageOf ( P1 -> Point . y , P2 -> Point . y ) ; NewFeature [ ( int ) MicroFeatureParameter :: MFLength ] = DistanceBetween ( P1 -> Point , P2 -> Point ) ; NewFeature [ ( int ) MicroFeatureParameter :: MFDirection ] = NormalizedAngleFrom ( & P1 -> Point , & P2 -> Point , 1.0 ) ; NewFeature [ ( int ) MicroFeatureParameter :: MFBulge1 ] = 0.0f ; NewFeature [ ( int ) MicroFeatureParameter :: MFBulge2 ] = 0.0f ; return NewFeature ; }
This routine computes the feature parameters which describe
 the micro-feature that starts and Start and ends at End.
This routine computes the feature parameters which describe the micro - feature that starts and Start and ends at End .
// deprecated // deprecated