资源简介
人脸识别考勤系统
代码片段和文件信息
package net.betzel.bytedeco.javacv.bioinspired;
import org.bytedeco.javacpp.tools.Slf4jLogger;
import org.bytedeco.javacv.Canvasframe;
import org.bytedeco.javacv.Java2DframeConverter;
import org.bytedeco.javacv.OpenCVframeConverter;
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
import static org.bytedeco.javacpp.opencv_core.*;
import static org.bytedeco.javacpp.opencv_imgproc.*;
import static org.bytedeco.javacpp.opencv_bioinspired.*;
/**
* Bioinspired Retina demonstration
* This retina model allows spatio-temporal image processing
* As a summary these are the retina model properties:
* It applies a spectral whithening (mid-frequency details enhancement)
* high frequency spatio-temporal noise reduction
* low frequency luminance to be reduced (luminance range compression)
* local logarithmic luminance compression allows details to be enhanced in low light conditions
*
* Created by mbetzel on 04.09.2016.
*/
public class RetinaExample {
static {
System.setProperty(“org.bytedeco.javacpp.logger“ “slf4jlogger“);
System.setProperty(“org.slf4j.simpleLogger.defaultLogLevel“ “debug“);
}
private static final Slf4jLogger logger = (Slf4jLogger) org.bytedeco.javacpp.tools.Logger.create(RetinaExample.class);
public static void main(String[] args) {
try {
logger.info(String.valueOf(logger.isDebugEnabled()));
logger.info(“Start“);
new RetinaExample().execute(args);
logger.info(“Stop“);
} catch (Exception e) {
e.printStackTrace();
}
}
private void execute(String[] args) throws Exception {
BufferedImage bufferedImage = args.length >= 1 ? ImageIO.read(new File(args[0])) : ImageIO.read(this.getClass().getResourceAsStream(“BlackBalls.jpg“));
System.out.println(“Image type: “ + bufferedImage.getType());
Mat matrix = new OpenCVframeConverter.ToMat().convert(new Java2DframeConverter().convert(bufferedImage));
normalize(matrix matrix 0 255 NORM_MINMAX -1 noArray());
showImage(matrix);
matrix.convertTo(matrix CV_32F);
Mat gammaTransformedImage = new Mat(matrix.size() CV_32F);
pow(matrix 1. / 5 gammaTransformedImage);
Retina retina = createRetina(gammaTransformedImage.size());
Mat retinaOutput_parvo = new Mat();
Mat retinaOutput_magno = new Mat();
retina.clearBuffers();
retina.run(gammaTransformedImage);
retina.getParvo(retinaOutput_parvo);
retina.getMagno(retinaOutput_magno);
showImage(retinaOutput_parvo);
showImage(retinaOutput_magno);
}
private void showImage(Mat matrix) {
Canvasframe canvasframe = new Canvasframe(“Retina demonstration“ 1);
canvasframe.setDefaultCloseOperation(javax.swing.Jframe.EXIT_ON_CLOSE);
canvasframe.setCanvasSize(640 480);
Canvas canvas = canvasframe.getCanv
相关资源
- 通用电气公司基于Sun 平台部署其全球
- android语音识别两种方法讯飞+google
- android-extend-1.0.5.aar依赖库com.guo.andro
- Android车牌识别 Demo 源码 能识别蓝色和
- 基于Android系统的手机语音识别软件开
- Android端身份证识别
- java身份证自动识别源码
- Java生成和识别二维码Zxing2.2 支持JDK
- java版语音识别sdk的简单使用
- .NET C#利用ZXing生成、识别二维码/条形
- 腾讯身份证验证人脸识别代码java
- 腾讯人脸识别demo
- 图像识别源代码
- Android+OpenCV+人脸识别源码(完整)2
- 基于安卓系统语音识别的实现
- 基于java的人脸识别系统+源码---百度
- Android 基于Tesseract-OCR实现自动扫描识
- 简单手写数字识别程序
- 使用Java开发的OCR程序 根据图像识别转
- 百度语音识别Demo272493
- 科大讯飞SDK语言人脸识别Demo,Androi
- android平台的车牌识别so库
- 声纹识别代码
- opencv_3.4.1_android_sdk+android studio+人脸检
- java识别数字字母验证码
- Android语音播报、后台播报、语音识别
- android OCR 图像文字识别
- android人脸识别——HowOld测测你的年龄
- 强大的纯Java车牌识别程序源码
- javaanpr国外车牌识别系统
评论
共有 条评论