最近的 Java API 中缺少 OpenCV 枚举变量(如 CV_BGR2GRAY 或 CV_AA)?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19545487/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
OpenCV enum variables(like CV_BGR2GRAY or CV_AA) missing in the recent Java API?
提问by Rui d'Orey
I've setup a Java project in Eclipse to detect faces and eyes in images.
Everything is working fine except that I'm forced to use numeric values to represent the enum variables like CV_BGR2GRAY
or CV_AA
.
Is there some import(or there is a way to reference them) that can be done to access them?
我在 Eclipse 中设置了一个 Java 项目来检测图像中的人脸和眼睛。一切正常,除了我被迫使用数值来表示枚举变量,如CV_BGR2GRAY
or CV_AA
。是否有一些导入(或有一种方法可以引用它们)可以访问它们?
采纳答案by andriy
CV_BGR2GRAY
should be defined as Imgproc.COLOR_BGR2GRAY
, and CV_AA
as Core.LINE_AA
.
CV_BGR2GRAY
应该被定义为Imgproc.COLOR_BGR2GRAY
,与CV_AA
作为Core.LINE_AA
。