java 纯Java学习JavaCV

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11494546/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 05:18:41  来源:igfitidea点击:

Learning JavaCV in pure Java

javaopencvjavacv

提问by Lemon Juice

I am trying to learn JavaCV. As you all know, the lack of educational materials on this subject is a very big problem. In JavCV home page, they have provided lot of examples for the C++ examples in book "OpenCV CookBook". But the case is, they are not Java, they are in SCALA!!!! Now I have already gone crazy! I know lot of examples are in web, but I want to learn it from beginning to advance, then only I can do it properly. "OpenCV CookBook" is a very good book but it is all about OpenCV in C++, not anything about Java.

我正在尝试学习 JavaCV。众所周知,缺乏这方面的教材是一个很大的问题。在 JavaCV 主页中,他们为“OpenCV CookBook”一书中的 C++ 示例提供了大量示例。但情况是,它们不是 Java,它们在 SCALA 中!!!!现在我已经疯了!我知道网络上有很多例子,但我想从头到尾学习它,然后才能正确地做。“OpenCV CookBook”是一本非常好的书,但它完全是关于 C++ 中的 OpenCV,而不是关于 Java 的任何内容。

Someone please help me to find a better place to learn JavaCV. Provide me whatever, URL, Book, etc. But it must be about learning JavaCV in 100% Java, not in Scala, C++, C or whatever other language! Please help!

有人请帮我找到一个更好的地方来学习 JavaCV。提供任何东西,URL、书籍等。但它必须是关于用 100% Java 学习 JavaCV,而不是用 Scala、C++、C 或任何其他语言!请帮忙!

采纳答案by Sam

< update >

<更新>

Times change - and so does OpenCV. Right now, a pure Java wrapper (not Android) is growing fast, allowing anyone to use OpenCV functions directly in desktop Java apps/

时代在变——OpenCV 也是如此。现在,一个纯 Java 包装器(不是 Android)正在快速增长,允许任何人直接在桌面 Java 应用程序中使用 OpenCV 功能/

< /update >

</更新>

You can find some tutorials in Java in the OpenCV samples directory: samples/android.

您可以在 OpenCV 示例目录中找到一些 Java 教程:samples/android.

You can also find some more info here.

您还可以在此处找到更多信息。

Now, I am pretty sure you will say you want Java, but not Android :). But this requires an explanation.

现在,我很确定你会说你想要 Java,而不是 Android :)。但这需要一个解释。

For various reasons - the main one being efficiencyand the second one portabilityto embedded platforms, computer vision is done almost entirely in C/C++. It is the de facto standard. Everybody uses it, with good reasons, and good results.

由于各种原因——主要是效率,其次是嵌入式平台的可移植性,计算机视觉几乎完全用 C/C++ 完成。这是事实上的标准。每个人都使用它,有充分的理由和良好的结果。

There are different adapters to the C++ code base, like Python and Java, but they exist to fill some specific gaps: Python is used for fast prototyping, and Java for interfacing the Android main language. But in all scenarios, the 'real' algorithm development is done with C/C++. This is why nobody cares about tutorials/books/examples in other languages.

C++ 代码库有不同的适配器,如 Python 和 Java,但它们的存在是为了填补一些特定的空白:Python 用于快速原型设计,Java 用于连接 Android 主要语言。但在所有场景中,“真正的”算法开发都是用 C/C++ 完成的。这就是为什么没有人关心其他语言的教程/书籍/示例。

Conclusion: If you want to learn image processing, learn C++ or Python. If you want to build some app, learn the OpenCV java interface from docs/android tutorials. But do not expect flexibility or control over performance.

结论:如果你想学习图像处理,学习C++或Python。如果您想构建一些应用程序,请从 docs/android 教程中学习 OpenCV java 接口。但不要期望灵活性或对性能的控制。

Updated note

更新笔记

There are two more things to specify here.

这里还有两件事要指定。

First, as Android gets on its wheels, and Python proves more and more popular, the content available in the two languages (and others) are increasing dramatically. But for the years to come, the core development group - and the best docs - will be in the C++ area.

首先,随着 Android 的发展,以及 Python 越来越受欢迎,这两种语言(和其他语言)中可用的内容正在急剧增加。但在未来几年,核心开发组——以及最好的文档——将在 C++ 领域。

Last, but not least, you should keep in mind that in any work or programming area, if you stick to one language, you're dead. Principles matter, and you should be able to implement them in a variety of languages, and you should be able to read and understand from a variety of sources. What about a programmer that says he is not able to translate pseudo-code into Java? It's quite the same with other languages.

最后但并非最不重要的一点是,您应该记住,在任何工作或编程领域,如果您坚持使用一种语言,您就死定了。原则很重要,您应该能够以多种语言实现它们,并且您应该能够从各种来源阅读和理解。一个程序员说他不能将伪代码翻译成 Java 怎么办?这与其他语言完全相同。

You can read the great blog post Don't call yourself a programmerto understand why you should forget about programming in one language.

您可以阅读很棒的博客文章不要称自己为程序员,以了解为什么应该忘记使用一种语言进行编程。