精华内容
下载资源
问答
  • Moments

    2019-10-28 10:27:25
    Moments
  • moments

    2015-04-04 15:19:47
    dummy function that adds OpenCV C header files in C file8.4.2.29.0. (cvMoments array moments binary) ...(packages/opencv/moments.lsh)/*F///////////////////////////////////////////////////////////////////

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

    展开全文
  • Melted Moments字体下载

    2020-12-26 10:00:03
    该文档为Melted Moments字体下载,是一份很不错的参考资料,具有较高参考价值,感兴趣的可以下载看看
  • 影像时刻Image Moments

    2021-04-20 19:47:32
    OpenCV影像时刻Image Moments影像时刻Image Moments目标代码结果 影像时刻Image Moments 目标 在本教程中,您将学习如何: 使用OpenCV函数cv :: moments 使用OpenCV函数cv :: contourArea 使用OpenCV函数cv :: arc...

    OpenCV影像时刻Image Moments

    影像时刻Image Moments

    目标

    在本教程中,您将学习如何:
    使用OpenCV函数cv :: moments
    使用OpenCV函数cv :: contourArea
    使用OpenCV函数cv :: arcLength

    代码

    #include "opencv2/imgcodecs.hpp"
    #include "opencv2/highgui.hpp"
    #include "opencv2/imgproc.hpp"
    展开全文
  • algebraic_moments 。 Github和Markdown数学 不幸的是,Github当前不支持,因此建议用户自己呈现此README.md(例如,使用VSCode + mdmath扩展名)。 时刻表达 令$ \ mathbf {w} $表示随机向量,$ \ mathbf {y} $表示...
  • Moments Sucks-crx插件

    2021-03-24 14:10:05
    如果您确实讨厌Twitter内的Moments标签,并且在尝试查看通知时始终单击此处,则只需安装此… 如果您确实讨厌Twitter内的Moments选项卡,并且在尝试查看通知时始终单击此处,则只需安装此轻量级扩展程序即可将其发送...
  • mirego_moments-源码

    2021-04-03 09:53:39
    mirego_moments 项目设置 npm install 编译和热重装以进行开发 npm run serve 编译并最小化生产 npm run build 整理和修复文件 npm run lint 自定义配置 请参阅。
  • moments-node-api-源码

    2021-03-26 01:42:39
    moments-node-api
  • The moments associated with the linear canonical transform is investigated. First, the relationship between the Wigner distribution and the linear canonical transform is reviewed, then the moments ...
  • moments是开发人员Trevor J Alt给Instagram情书,这是一个社交媒体平台和激情项目,旨在进行图像处理的持续发展和个人教育发展,以及如何实现条件重现的渲染环境以处理大量数据存储和检索。 真的,谁不喜欢滚动浏览...
  • moments函数

    千次阅读 2015-08-25 19:18:56
    moments函数 函数作用: opencv中的矩主要包括以下几种:空间矩,中心矩和中心归一化矩。  // 空间矩 double m00, m10, m01, m20, m11, m02, m30, m21, m12, m03; // 中心矩 double mu20, mu11, ...

    moments函数

    函数作用:

    opencv中的矩主要包括以下几种:空间矩,中心矩和中心归一化矩。

     // 空间矩

    double m00, m10, m01, m20, m11, m02, m30, m21, m12, m03;

    // 中心矩

    double mu20, mu11, mu02, mu30, mu21, mu12, mu03;

    // 中心归一化矩 double nu20, nu11, nu02, nu30, nu21, nu12, nu03;

     }


    1、空间矩的公式为:

    image

    可以知道,对于01二值化的图像,m00即为轮廓的面积。


    2、中心矩的公式为:

    image

    其中:

    image

    3、归一化的中心矩公式为:

    image
    距的作用:

    1、计算一幅二值化图像的白色区域的面积,其实是计算它的0阶矩:

    公式中x0和y0,不起作用,可以删除:

    image


    现在,在一幅二值化的图像中,一个像素点的值要么是0,要么是1;所以,对于每一个白色像素点,
    一个‘1’被加到矩中。(这是一种高效的计算二值化图像中白色点个数的方法)。

    2、计算物体的质心(或者是重心)

    我们得到了白色像素点的x坐标的和、y坐标的和。由于是一个和,所以,我们需要得到其均值,即通过除以白色像素点的个数。白色像素点的个数可以通过(2)计算面积中的公式实现,即图像的0阶矩,所以,得到:

    image

    这种计算物体质心的方法,它的一个优点是,对噪声不敏感。当,有外部噪声干扰的时候,计算出的质心不会有太大的偏离。
    从数学的角度来看,这种方法是计算一个连通域的质心,或者说,是计算一个团块(blob)的质心。如果,你的图像中有两个连通域,即有两个blob,那么,就需要把两个blob提取出来,分别计算它们的质心。

    3、中心矩----计算质心
    这种除法很常见-- 一个矩除以其0阶矩。由于很常见,所以,它有个专用的术语,称之为-- 中心矩。
    所以,计算质心,也说为:计算一阶中心矩。


    函数形式:

    C++: Moments moments(InputArray array, bool binaryImage=false )

    图像矩的声明:

    class Moments
    {
    public:
        Moments();
        Moments(double m00, double m10, double m01, double m20, double m11,
                double m02, double m30, double m21, double m12, double m03 );
        Moments( const CvMoments& moments );
        operator CvMoments() const;
    
        // spatial moments(空间矩)
        double  m00, m10, m01, m20, m11, m02, m30, m21, m12, m03;
        // central moments(中心矩)
        double  mu20, mu11, mu02, mu30, mu21, mu12, mu03;
        // central normalized moments(归一化中心矩)
        double  nu20, nu11, nu02, nu30, nu21, nu12, nu03;
    }

    Note

     

    \texttt{mu}_{00}=\texttt{m}_{00}\texttt{nu}_{00}=1 \texttt{nu}_{10}=\texttt{mu}_{10}=\texttt{mu}_{01}=\texttt{mu}_{10}=0 , hence the values are not stored.



    opencv代码:

    #include "opencv2/highgui/highgui.hpp"
    #include "opencv2/imgproc/imgproc.hpp"
    #include <iostream>
    #include <stdio.h>
    #include <stdlib.h>
    
    using namespace cv;
    using namespace std;
    
    Mat src; Mat src_gray;
    int thresh = 100;
    int max_thresh = 255;
    RNG rng(12345);
    
    /// 函数声明
    void thresh_callback(int, void* );
    
    /** @主函数 */
    int main( int argc, char** argv )
    {
      /// 读入原图像, 返回3通道图像数据
      src = imread( argv[1], 1 );
    
      /// 把原图像转化成灰度图像并进行平滑
      cvtColor( src, src_gray, CV_BGR2GRAY );
      blur( src_gray, src_gray, Size(3,3) );
    
      /// 创建新窗口
      char* source_window = "Source";
      namedWindow( source_window, CV_WINDOW_AUTOSIZE );
      imshow( source_window, src );
    
      createTrackbar( " Canny thresh:", "Source", &thresh, max_thresh, thresh_callback );
      thresh_callback( 0, 0 );
    
      waitKey(0);
      return(0);
    }
    
    /** @thresh_callback 函数 */
    void thresh_callback(int, void* )
    {
      Mat canny_output;
      vector<vector<Point> > contours;
      vector<Vec4i> hierarchy;
    
      /// 使用Canndy检测边缘
      Canny( src_gray, canny_output, thresh, thresh*2, 3 );
      /// 找到轮廓
      findContours( canny_output, contours, hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE, Point(0, 0) );
    
      /// 计算矩
      vector<Moments> mu(contours.size() );
      for( int i = 0; i < contours.size(); i++ )
         { mu[i] = moments( contours[i], false ); }
    
      ///  计算中心矩:
      vector<Point2f> mc( contours.size() );
      for( int i = 0; i < contours.size(); i++ )
         { mc[i] = Point2f( mu[i].m10/mu[i].m00 , mu[i].m01/mu[i].m00 ); }
    
      /// 绘制轮廓
      Mat drawing = Mat::zeros( canny_output.size(), CV_8UC3 );
      for( int i = 0; i< contours.size(); i++ )
         {
           Scalar color = Scalar( rng.uniform(0, 255), rng.uniform(0,255), rng.uniform(0,255) );
           drawContours( drawing, contours, i, color, 2, 8, hierarchy, 0, Point() );
           circle( drawing, mc[i], 4, color, -1, 8, 0 );
         }
    
      /// 显示到窗口中
      namedWindow( "Contours", CV_WINDOW_AUTOSIZE );
      imshow( "Contours", drawing );
    
      /// 通过m00计算轮廓面积并且和OpenCV函数比较
      printf("\t Info: Area and Contour Length \n");
      for( int i = 0; i< contours.size(); i++ )
         {
           printf(" * Contour[%d] - Area (M_00) = %.2f - Area OpenCV: %.2f - Length: %.2f \n", i, mu[i].m00, contourArea(contours[i]), arcLength( contours[i], true ) );
           Scalar color = Scalar( rng.uniform(0, 255), rng.uniform(0,255), rng.uniform(0,255) );
           drawContours( drawing, contours, i, color, 2, 8, hierarchy, 0, Point() );
           circle( drawing, mc[i], 4, color, -1, 8, 0 );
         }
    }


    展开全文
  • Hu moments

    2015-01-06 09:32:31
    #include #include #include using namespace std; int main() { IplImage* img1 = cvLoadImage("1.jpg",0); IplImage* img2 = cvLoadImage("2.jpg",0);...CvMoments moments; CvHuMoments hu_momen
    #include <cv.h>
    
    #include <highgui.h>
    #include <iostream>
    using namespace std;


    int main()
    {
    IplImage* img1 = cvLoadImage("1.jpg",0);
    IplImage* img2 = cvLoadImage("2.jpg",0);

    CvMoments moments;
    CvHuMoments hu_moments;
    cvMoments(img1, &moments, 0);
    cvGetHuMoments(&moments, &hu_moments);
    cout<<hu_moments.hu1 <<endl
    <<hu_moments.hu2 <<endl
    <<hu_moments.hu3 <<endl
    <<hu_moments.hu4 <<endl
    <<hu_moments.hu5 <<endl
    <<hu_moments.hu6 <<endl
    <<hu_moments.hu7 <<endl;
    cvMoments(img2, &moments, 0);
    cvGetHuMoments(&moments, &hu_moments);
    cout<<hu_moments.hu1 <<endl
    <<hu_moments.hu2 <<endl
    <<hu_moments.hu3 <<endl
    <<hu_moments.hu4 <<endl
    <<hu_moments.hu5 <<endl
    <<hu_moments.hu6 <<endl
    <<hu_moments.hu7 <<endl;


    cvReleaseImage(&img1);
    cvReleaseImage(&img2);
    return 0;
    }
    展开全文
  • A Survey of Orthogonal Moments for Image Representation Theory, Implementation, and Evaluation(1).pdf
  • A Survey of Orthogonal Moments for Image Representation Theory, Implementation, and Evaluation.pdf
  • Moments是一个小巧可爱的视频共享平台。 该项目将包括以下部分。 遗漏将在以后添加。 待办事项和使用的模块 使用Express进行服务器设置 使用护照进行用户身份验证 用快速闪光显示消息 使用webpack和babel构建 ...
  • 薛定谔 用于 Moments 应用程序的 Android 客户端
  • A Survey of Orthogonal Moments for Image Representation Theory, Implementation, and Evaluation.zip
  • We give a brief overview on the more than 50 years of development of the moment-based image description, the moment invariants, and the orthogonal moments. Some basic ideas for significantly improving...
  • hu Seven invariant moments

    2013-03-15 00:59:07
    是应用hu Seven invariant moments 方法对图像进行处理的代码
  • This letter presents the recursive formulas of the moments of queue length for the M/M/1 queue and M/M/1/B queue, respectively. The higher moments of queue length are important for optimization ...
  • 在twitter网站上隐藏“时刻”标签。 只需添加.moments {display:none!important;} CSS 支持语言:English
  • Combined Invariants to Similarity Transformation and to Blur Using Orthogonal Zernike Moments
  • Watermark is inserted into perceptually significant Krawtchouk moments of original, and watermark based on Krawtchouk moments is local. Independent component analysis (ICA) is utiliz
  • Nonparametric Blind Signal Detection Based on Logarithmic Moments in Very Impulsive Noise
  • 从Twitter界面移除“瞬间”选项卡。 当您想单击“通知”时,是否想单击Twitter的“时刻”选项卡? 安装此扩展程序以从Web界面中删除Moments选项卡。 支持语言:English (UK)
  • 2D and 3D Image Analysis by Moments 英文无水印pdf pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 12,663
精华内容 5,065
关键字:

moments