如何使用图像在Java中实现面部识别?

如何比较两张脸部图像,无论它们是否属于同一个人.

让我解释:

代码将获得两个图像作为输入并识别它并比较它们.如果它属于同一个人(即使在不同时间拍摄),它将返回true或者为false.

像这样:

    boolean Compare (Image a,Image b)
    {
     if (Both_are_same-person's) 
       return true;
     else return false;
    }

给定图像可以是jpg,png,bmp,tiff等任何格式.

最佳答案
OpenCV应该对您的要求有用.

OpenCV is an open source computer vision library originally developed
by Intel. It is free for commercial and research use under a BSD
license. The library is cross-platform, and runs on Mac OS X, Windows
and Linux. It focuses mainly towards real-time image processing, as
such, if it finds Intel’s Integrated Performance Primitives on the
system, it will use these commercial optimized routines to accelerate
itself.

This implementation is not a complete port of OpenCV. Currently, this
library supports :

real-time capture video file import basic image treatment (brightness,
contrast, threshold, …)
object detection (face, body, …) blob detection

点赞