opencv3_java 生成输出对角矩阵 Mat.eye

生成输出对角矩阵 Mat.eye


package opencv_java_demo;

import org.opencv.core.Core;
import org.opencv.core.CvType;
import org.opencv.core.Mat;

public class CreateMat
{
   public static void main( String[] args )
   {
      System.loadLibrary( Core.NATIVE_LIBRARY_NAME );
      //加载本地库
      Mat mat = Mat.eye( 3, 3, CvType.CV_8UC1 );
      //生成3*3矩阵,矩阵类型为CvType.CV_8UC1
      System.out.println( "mat = " + mat.dump() );
      //矩阵数据输出
   }
}




你可能感兴趣的:(opencv3,ava)