imageprocessing/guidedVectorize.c
double calculateFit(POINT_T* pHead,double* pStdev)
{
  int count = 0;
  double sumDistance = 0.0;
  double sumSquares = 0.0;
  double mean = 0;
  POINT_T* pCurrent = pHead;
  while (pCurrent != NULL)
    {
    count++;
    sumDistance += pCurrent->matchdistance;
    sumSquares += (pCurrent->matchdistance * pCurrent->matchdistance);
    pCurrent = pCurrent->next;
    }
  mean = sumDistance/count;
  *pStdev = sqrt((sumSquares/count - mean*mean)/(count-1));
  return mean;
}
/* Calculate the mean distance between exp points and the ref points
 * based on the data stored in the POINT_T structures, and the standard
 * deviation. 
 * @param pHead     First point in experimental feature linked list
 * @param pStdev    Pointer for returning the standard deviation
 * Returns the mean distance as the function value
 */
Calculate the mean distance between exp points and the ref points
based on the data stored in the POINT_T structures, and the standard
deviation.
@param pHead     First point in experimental feature linked list
@param pStdev    Pointer for returning the standard deviation
Returns the mean distance as the function value
Calculate the mean distance between exp points and the ref points based on the data stored in the POINT_T structures and the standard deviation . @param pHead First point in experimental feature linked list @param pStdev Pointer for returning the standard deviation Returns the mean distance as the function value
double calculateFit(POINT_T* pHead,double* pStdev)
{
  int count = 0;
  double sumDistance = 0.0;
  double sumSquares = 0.0;
  double mean = 0;
  POINT_T* pCurrent = pHead;
  while (pCurrent != NULL)
    {
    count++;
    sumDistance += pCurrent->matchdistance;
    sumSquares += (pCurrent->matchdistance * pCurrent->matchdistance);
    pCurrent = pCurrent->next;
    }
  mean = sumDistance/count;
  *pStdev = sqrt((sumSquares/count - mean*mean)/(count-1));
  return mean;
}
double calculateFit ( POINT_T * pHead , double * pStdev ) { int count = 0 ; double sumDistance = 0.0 ; double sumSquares = 0.0 ; double mean = 0 ; POINT_T * pCurrent = pHead ; while ( pCurrent != NULL ) { count ++ ; sumDistance += pCurrent -> matchdistance ; sumSquares += ( pCurrent -> matchdistance * pCurrent -> matchdistance ) ; pCurrent = pCurrent -> next ; } mean = sumDistance / count ; * pStdev = sqrt ( ( sumSquares / count - mean * mean ) / ( count - 1 ) ) ; return mean ; }
Calculate the mean distance between exp points and the ref points
 based on the data stored in the POINT_T structures, and the standard
 deviation.
Calculate the mean distance between exp points and the ref points based on the data stored in the POINT_T structures and the standard deviation .