openbjk.Identificador.java Source code

Java tutorial

Introduction

Here is the source code for openbjk.Identificador.java

Source

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package openbjk;

import javax.print.DocFlavor;
import org.opencv.contrib.FaceRecognizer;
import org.opencv.core.Core;
import org.opencv.core.CvType;
import org.opencv.core.Mat;
import org.opencv.highgui.Highgui;

/**
 *
 * @author Gertrude
 */
public class Identificador {

    public Mat norm_0_255(Mat input) {

        Mat dst = null;
        switch (input.channels()) {
        case 1:
            Core.normalize(input, dst, 0, 255, 2, CvType.CV_8UC1);
            break;
        case 3:
            Core.normalize(input, dst, 0, 255, 2, CvType.CV_8UC3);
            break;
        default:
            input.copyTo(dst);
        }

        return dst;
    }

}