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) );

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值