简单的编程理论题

发布于 2024-08-18 05:45:13 字数 116 浏览 5 评论 0 原文

大家好,有人知道为什么与 Java 编程语言相比,C++ 编程语言在生物识别安全应用中使用更广泛吗?到目前为止我收集到的答案是 1) 虚拟编译器 2) C++ 提供的 OpenCV 库。有谁能帮忙解答一下这个问题吗??

Hi guys does anyone know why the programming language C++ is used more widely in biometric security applications compared to the programming language Java? The answers that I have collected so far are 1) Virtual Compilers 2) OpenCV Library provided by C++. Can anyone help with this question??

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

晚雾 2024-08-25 05:45:13

也许是硬件支持:我编写了一个使用指纹传感器的应用程序。该设备的库支持是 C++,因此我用 C++ 编写了该应用程序。现在他们有了 .NET 版本,所以我的下一个应用程序将是 C#。

Maybe it's the hardware support: I wrote an app that uses a fingerprint sensor. The library support for the device is C++, so I wrote the app in C++. Now they have a .NET version, so my next app will be C#.

鸵鸟症 2024-08-25 05:45:13

我不太了解生物识别应用程序,但一般来说,当安全性很重要时,Java 可能会成为绊脚石。根据安全要求的编写方式,它们可以涵盖必须在 C++ 中手动完成但由 Java 自动完成的事情。这会带来一个问题,因为需要证明 Java 正确(并且及时!)满足要求。在 C++ 代码中表明满足这些要求要容易得多,因为满足要求的代码是相关程序的一部分。

如果安全人员/需求/客户明确表示依赖 Java 实现某些安全功能是可以接受的,那么这没什么大不了的。我们可以反复讨论依赖/信任 Java 来满足安全需求是否合理,这实际上取决于具体的安全需求。

I don't know specifically about biometric applications, but in general when security is important Java can be a stumbling block. Depending on how the security requirements are written, they can cover things that one must do manually in C++, but which are done automatically by Java. This poses a problem because one would need to demonstrate that Java properly (and in a timely manner!) satisfies the requirement. It is a lot easier to show that these requirements are met in C++ code, because the code the meets the requirement is part of the program in question.

If the security person/requirements/customer make it clear that relying on Java for some security features is acceptable, then this is no big deal. We could go round-and-round about whether or not it is reasonable to rely on/trust Java to satisfy security requirements, it really just depends on the specific security needs.

鸠魁 2024-08-25 05:45:13

我愿意花钱的原因很简单,硬件的访问 API 是用 C++ 编写的。大多数现代/高级语言不会轻松地与最初通过 C/C++ API 公开的硬件进行通信。

在某种程度上相关的说明中, Vala 具有现代\高级语言所期望的所有语言功能(然后是一些),但编译为 C 二进制文件和源代码,并且可以轻松使用用 C 编写的任何库(不确定 c++)。看看吧,我没怎么用过它,但它很酷。

I am willing to put money on the reason being simply that the access api's for the hardware are written in c++. Most of the modern/higher-level languages are not going to easily communicate with hardware originaly exposed through a C/C++ api.

On a somewhat related note, Vala has all the languages features expected of a modern\high-level language(and then some), but compiles to C binary and source, and can easily make use of any library written in C (not sure about c++). Check it out, I havnt used it much, but its pretty cool.

蒗幽 2024-08-25 05:45:13

用 C++ 实现库比 java 提供了很多功能。编写完成后,C++ 库几乎可以在任何平台(包括嵌入式平台)上运行,并且可以通过 SWIG。 Java 只能在具有足够速度和内存来运行 JVM 的程序上运行,并且唯一的其他 Java 程序可以将代码作为本机导入包含在内。对于生物识别应用程序,尤其是我认为在嵌入式系统上运行将是一个大问题,因为您可以将其构建到小型传感器中。

更圆滑的答案是没有人愿意等待垃圾收集周期来发射弗里​​根导弹。

Implementing a library in C++ provide a lot over java. Once written, C++ library can run on almost any platform (including embedded ones), and can be made available as a native import to a variety of other languages through tools like SWIG. Java can only run on something with enough speed and memory to run a JVM, and the only other Java programs can include the code as a native import. For biometric applications especially I think running on embedded systems would be a large concern, since you could build this into a small sensor.

The more glib answer would be no one wants to wait for your garbage collection cycle to launch the friggen missiles.

携余温的黄昏 2024-08-25 05:45:13

您可以用任何其他语言替换 Java。可能与 API 和硬件有更多关系。

此外,Java 更适合 Web 应用程序。它不是桌面应用程序的最佳选择。

You could replace Java with any other language there. Probably it has more to do with the APIs and hardware.

Also, Java is more suited for Web Applications. Its not the best choice for desktop applications.

樱花细雨 2024-08-25 05:45:13

对于某些生物识别应用程序,执行速度至关重要。

例如,假设您正在对检查点进行面部识别,而 Java 运行算法所需的时间是 C++ 等编译语言的两倍。这意味着,如果您使用 Java,要么:

  • 检查站队伍的长度将增加一倍,
  • 您必须向工作人员支付两倍的检查站费用, 或者
  • 您的系统在识别人脸方面的表现将减半

这些通常都不是可接受的选项,这使得使用 Java 成为不可能的事情。

For some biometric applications, execution speed is crucial.

For instance, let's say you're doing facial recognition for a checkpoint, and Java takes twice the time to run the algorithm that a compiled language like C++ does. That means if you go with Java, either:

  • The checkpoint lines will be twice as long,
  • You'll have to pay to staff twice as many checkpoints, or
  • Your system will do half as good a job at recognizing faces

None of those are usually acceptable options, which makes using Java a non-starter.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文