我正在尝试检测图像内的矩形。我决定尝试 Boofcv 示例检测黑色多边形这些是本教程的 maven 依赖项。
<dependency>
<groupId>org.boofcv</groupId>
<artifactId>boofcv-core</artifactId>
<version>0.35</version>
</dependency>
<dependency>
<groupId>org.boofcv</groupId>
<artifactId>boofcv-geo</artifactId>
<version>0.36.1</version>
</dependency>
<dependency>
<groupId>org.boofcv</groupId>
<artifactId>boofcv-feature</artifactId>
<version>0.36.1</version>
</dependency>
<dependency>
<groupId>org.boofcv</groupId>
<artifactId>boofcv-all</artifactId>
<version>0.36.1</version>
</dependency>
<dependency>
<groupId>org.boofcv</groupId>
<artifactId>boofcv-swing</artifactId>
<version>0.36.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.boofcv</groupId>
<artifactId>boofcv-recognition</artifactId>
<version>0.36.1</version>
</dependency>
<dependency>
<groupId>org.boofcv</groupId>
<artifactId>boofcv-io</artifactId>
<version>0.36.1</version>
</dependency>
<dependency>
<groupId>org.boofcv</groupId>
<artifactId>boofcv-ip</artifactId>
<version>0.36.1</version>
</dependency>
<dependency>
<groupId>org.boofcv</groupId>
<artifactId>visualize</artifactId>
<version>0.26</version>
</dependency>
<dependency>
<groupId>org.ddogleg</groupId>
<artifactId>ddogleg</artifactId>
<version>0.18</version>
</dependency>
<dependency>
<groupId>org.georegression</groupId>
<artifactId>georegression</artifactId>
<version>0.22</version>
</dependency>
但是,我收到这样的错误。
线程“main”中的异常 java.lang.NoSuchMethodError: org.ddogleg.struct.FastQueue.(Ljava/lang/Class;Z)V at boofcv.struct.PackedSetsPoint2D_I32.(PackedSetsPoint2D_I32.java:43) at boofcv.struct.PackedSetsPoint2D_I32 .(PackedSetsPoint2D_I32.java:65) 在 boofcv.alg.filter.binary.LinearExternalContours.(LinearExternalContours.java:66) 在 boofcv.abst.filter.binary.BinaryContourFinderLinearExternal.(BinaryContourFinderLinearExternal.java:49) 在 boofcv.factory.filter .binary.FactoryBinaryContourFinder.linearExternal(FactoryBinaryContourFinder.java:49) 在 boofcv.factory.shape.FactoryShapeDetector.polygonContour(FactoryShapeDetector.java:115) 在 boofcv.factory.shape.FactoryShapeDetector.polygon(FactoryShapeDetector.java:100) 在 com。 application.ExampleDetectBlackPolygon.main(ExampleDetectBlackPolygon.java:36)
我真的不知道我应该使用哪个版本的依赖项。它应该可以工作,但我无法解决这个 org.ddogleg.struct.FastQueue 错误。