类 RecognitionShapeUtils
- java.lang.Object
-
- com.litongjava.opencv.utils.RecognitionShapeUtils
-
public class RecognitionShapeUtils extends Object
识别形状- 作者:
- Ping
-
-
构造器概要
构造器 构造器 说明 RecognitionShapeUtils()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static List<Shape>colorDivisionAndFindShape(org.opencv.core.Mat mat, String color, String colorSuffix, org.opencv.core.Scalar lower, org.opencv.core.Scalar upper, DebugInfo debugInfo)分离图片颜色并且查找图形static List<Shape>findShape(org.opencv.core.Mat mask, String color, DebugInfo debugInfo)查找图形static String[]formatToArray(List<Shape> shapList)static ShapegetShape(org.opencv.core.MatOfPoint contour)获取图形形状static List<Shape>index(byte[] imageBytes, DebugInfo debugInfo)static List<Shape>recgnizeV1(byte[] imageBytes, DebugInfo debugInfo)第一个版本的图像识别static List<Shape>recognizeShape(org.opencv.core.Mat src, DebugInfo debugInfo)
-
-
-
方法详细资料
-
index
public static List<Shape> index(byte[] imageBytes, DebugInfo debugInfo) throws FileNotFoundException, IOException
-
recgnizeV1
public static List<Shape> recgnizeV1(byte[] imageBytes, DebugInfo debugInfo) throws FileNotFoundException, IOException
第一个版本的图像识别- 参数:
imageBytes-recognize-- 返回:
- 抛出:
IOExceptionFileNotFoundException
-
recognizeShape
public static List<Shape> recognizeShape(org.opencv.core.Mat src, DebugInfo debugInfo) throws IOException
- 参数:
src-debugInfo-tempPath- 临时文件保存目录- 抛出:
IOException
-
colorDivisionAndFindShape
public static List<Shape> colorDivisionAndFindShape(org.opencv.core.Mat mat, String color, String colorSuffix, org.opencv.core.Scalar lower, org.opencv.core.Scalar upper, DebugInfo debugInfo) throws IOException
分离图片颜色并且查找图形- 参数:
recognize-tempPath-debug-mat-matFilename-- 抛出:
IOException
-
findShape
public static List<Shape> findShape(org.opencv.core.Mat mask, String color, DebugInfo debugInfo) throws IOException
查找图形- 参数:
color-redMask-debugInfo-- 返回:
- 抛出:
IOException
-
getShape
public static Shape getShape(org.opencv.core.MatOfPoint contour)
获取图形形状- 参数:
contour-
-
-