moments

dummy function that adds OpenCV C header files in C file

8.4.2.29.0. (cvMoments array moments binary)
(packages/opencv/moments.lsh)

/*F///////////////////////////////////////////////////////////////////////////////////////
//
// Name: cvMoments
// Purpose:
// Calculates moments(up to third order) of the image ROI.
// It fills moments state and after that, it is possible to
// return concrete moments using
// cvGetSpatialMoment, cvGetCentralMoment or
// cvGetNormalizedCentralMoment
// Context:
// Parameters:
// img - input image
// moments - output moments state.
// binary - if non zero, function treats non-zero pixels as 1s.
// Returns:
//F*/
OPENCVAPI void cvMoments( const CvArr* array, CvMoments* moments, int binary CV_DEFAULT( 0 ));

8.4.2.29.1. (cvGetSpatialMoment moments xorder yorder)
(packages/opencv/moments.lsh)

/*F///////////////////////////////////////////////////////////////////////////////////////
//
// Name: cvGetSpatialMoment, cvGetCentralMoment, cvGetCentralNormalizedMoment
// Purpose:
// Returns different moments(up to third order) from moments state.
// for raster image, these moments are defined as:
// mij = spatial_moment(i,j) = sum(y=0,H-1) sum(x=0,W-1) [I(x,y) (x^i) (y^j)]
// (where I(x,y) means pixel value at point(x,y). x^y means x power y).
//
// muij = central_moment(i,j) = sum(y=0,H-1) sum(x=0,W-1)
// [I(x,y) (x-mean_x)^i) ((y-mean_y)^j)]
// (where mean_x = m10/m00, mean_y = m01/m00.
// it’s easy to see that mu00 = m00, mu10 = mu01 = 0)
//
// nu_ij = central_normalized_moment(i,j) = muij/(m00^((i+j)/2+1))
// Context:
// Parameters:
// moments - moment state( filled by cvMoments or cvContourMoments )
// x_order - x order of the moment
// y_order - y order of the moment.
// The following condition has to be satifsied:
// 0 <= x_order + y_order <= 3
// Returns:
// Required moment
//F*/
OPENCVAPI double cvGetSpatialMoment( CvMoments* moments, int x_order, int y_order );

8.4.2.29.2. (cvGetCentralMoment moments xorder yorder)
(packages/opencv/moments.lsh)

/*F///////////////////////////////////////////////////////////////////////////////////////
//
// Name: cvGetSpatialMoment, cvGetCentralMoment, cvGetCentralNormalizedMoment
// Purpose:
// Returns different moments(up to third order) from moments state.
// for raster image, these moments are defined as:
// mij = spatial_moment(i,j) = sum(y=0,H-1) sum(x=0,W-1) [I(x,y) (x^i) (y^j)]
// (where I(x,y) means pixel value at point(x,y). x^y means x power y).
//
// muij = central_moment(i,j) = sum(y=0,H-1) sum(x=0,W-1)
// [I(x,y) (x-mean_x)^i) ((y-mean_y)^j)]
// (where mean_x = m10/m00, mean_y = m01/m00.
// it’s easy to see that mu00 = m00, mu10 = mu01 = 0)
//
// nu_ij = central_normalized_moment(i,j) = muij/(m00^((i+j)/2+1))
// Context:
// Parameters:
// moments - moment state( filled by cvMoments or cvContourMoments )
// x_order - x order of the moment
// y_order - y order of the moment.
// The following condition has to be satifsied:
// 0 <= x_order + y_order <= 3
// Returns:
// Required moment
//F*/
OPENCVAPI double cvGetCentralMoment( CvMoments* moments, int x_order, int y_order );

8.4.2.29.3. (cvGetNormalizedCentralMoment moments xorder yorder)
(packages/opencv/moments.lsh)

/*F///////////////////////////////////////////////////////////////////////////////////////
//
// Name: cvGetSpatialMoment, cvGetCentralMoment, cvGetCentralNormalizedMoment
// Purpose:
// Returns different moments(up to third order) from moments state.
// for raster image, these moments are defined as:
// mij = spatial_moment(i,j) = sum(y=0,H-1) sum(x=0,W-1) [I(x,y) (x^i) (y^j)]
// (where I(x,y) means pixel value at point(x,y). x^y means x power y).
//
// muij = central_moment(i,j) = sum(y=0,H-1) sum(x=0,W-1)
// [I(x,y) (x-mean_x)^i) ((y-mean_y)^j)]
// (where mean_x = m10/m00, mean_y = m01/m00.
// it’s easy to see that mu00 = m00, mu10 = mu01 = 0)
//
// nu_ij = central_normalized_moment(i,j) = muij/(m00^((i+j)/2+1))
// Context:
// Parameters:
// moments - moment state( filled by cvMoments or cvContourMoments )
// x_order - x order of the moment
// y_order - y order of the moment.
// The following condition has to be satifsied:
// 0 <= x_order + y_order <= 3
// Returns:
// Required moment
//F*/
OPENCVAPI double cvGetNormalizedCentralMoment( CvMoments* moments,
int x_order, int y_order );

8.4.2.29.4. (cvGetHuMoments moments humoments)
(packages/opencv/moments.lsh)

/*F///////////////////////////////////////////////////////////////////////////////////////
//
// Name: cvGetHuMoments
// Purpose:
// Calculates seven Hu invariants from normalized moments
// Context:
// Parameters:
// moments - moments state.
// hu_moments - Hu moments
// Returns:
//F*/
typedef struct CvHuMoments
{
double hu1, hu2, hu3, hu4, hu5, hu6, hu7; /* Hu invariants */
} CvHuMoments;
OPENCVAPI void cvGetHuMoments( CvMoments* moments, CvHuMoments* hu_moments );

8.4.2.29.5. (cvNorm imga imgb normtype mask)
(packages/opencv/moments.lsh)

/*F///////////////////////////////////////////////////////////////////////////////////////
//
// Name: cvNorm, cvNormMask
// Purpose:
// Calculates different types of norm for single or a pair of images
// Context:
// Parameters:
// imgA - first input image
// imgB - second input image
// mask - determine pixels that are considered in norm calculation
// norm_type - type of the norm.
// imgB == 0 imgB != 0
// —————————————————————————
// CV_C: ||imgA||_inf ||imgA - imgB||_inf
// CV_L1: ||imgA||_L1 ||imgA - imgB||_L1
// CV_L2: ||imgA||_L2 ||imgA - imgB||_L2
// —————————————————————————
// CV_RELATIVE_C: forbidden ||imgA - imgB||_inf/||imgB||_inf
// CV_RELATIVE_L1: forbidden ||imgA - imgB||_L1/||imgB||_L1
// CV_RELATIVE_L2: forbidden ||imgA - imgB||_L2/||imgB||_L2
// Returns:
// required norm
//F*/
OPENCVAPI double cvNorm( const CvArr* imgA, const CvArr* imgB, int normType,
const CvArr* mask CV_DEFAULT(0) );

你可能感兴趣的:(moments)