类 MatUtils
- java.lang.Object
-
- com.litongjava.opencv.utils.MatUtils
-
public class MatUtils extends Object
-
-
构造器概要
构造器 构造器 说明 MatUtils()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static intbSums(org.opencv.core.Mat src)static voiddebugToFile(Boolean isSave, org.opencv.core.Mat mat, String name, String extensionName, String savePath, Boolean isUpload, String uploadHost)static voiddebugToFile(org.opencv.core.Mat mat, String dstPath, String baseName)static voiddebugToFile(org.opencv.core.Mat mat, String imagePath, String oldName, String newName)static voiddebugToFileToFolder(org.opencv.core.Mat mat, String tempPath, String saveName)保存存mat文件到目录static StringgetBaseName(String baseName, String suffix)static StringgetDstPath(String tempPath, String baseName, String extensionName)static org.opencv.core.Matimread(byte[] imageBytes)static org.opencv.core.Matimread(String imagePath)static org.opencv.core.Matimread(String imagePath, int flags)static org.opencv.core.MatimRead(byte[] byteArray, int flags)static voidimwrite(String dstPath, org.opencv.core.Mat dst)static voidimwrite(String dstPath, org.opencv.core.Mat dst, String extensionName)1.先将 mat 写入 MatOfByte 2.再将 MatOfByte 3.转换 byte[] 再将 byte[] 写入文件static BufferedImagemat2BufferImage(org.opencv.core.Mat mat)转换图像static Stringupload(byte[] imageByte, String extensionName, String uploadHost)
-
-
-
方法详细资料
-
imread
public static org.opencv.core.Mat imread(String imagePath) throws FileNotFoundException, IOException
-
imread
public static org.opencv.core.Mat imread(String imagePath, int flags) throws FileNotFoundException, IOException
-
imread
public static org.opencv.core.Mat imread(byte[] imageBytes)
-
imRead
public static org.opencv.core.Mat imRead(byte[] byteArray, int flags)
-
imwrite
public static void imwrite(String dstPath, org.opencv.core.Mat dst, String extensionName) throws IOException
1.先将 mat 写入 MatOfByte 2.再将 MatOfByte 3.转换 byte[] 再将 byte[] 写入文件- 参数:
dstPath-dst-extensionName-- 抛出:
IOException
-
imwrite
public static void imwrite(String dstPath, org.opencv.core.Mat dst) throws IOException
- 抛出:
IOException
-
mat2BufferImage
public static BufferedImage mat2BufferImage(org.opencv.core.Mat mat)
转换图像
-
debugToFile
public static void debugToFile(org.opencv.core.Mat mat, String imagePath, String oldName, String newName) throws IOException- 抛出:
IOException
-
debugToFileToFolder
public static void debugToFileToFolder(org.opencv.core.Mat mat, String tempPath, String saveName) throws IOException保存存mat文件到目录- 参数:
hsv-tempPath-saveName-- 抛出:
IOException
-
debugToFile
public static void debugToFile(org.opencv.core.Mat mat, String dstPath, String baseName) throws IOException- 参数:
gray-grayDstPath-- 抛出:
IOException
-
debugToFile
public static void debugToFile(Boolean isSave, org.opencv.core.Mat mat, String name, String extensionName, String savePath, Boolean isUpload, String uploadHost) throws IOException
- 抛出:
IOException
-
bSums
public static int bSums(org.opencv.core.Mat src)
-
-