Package jjil.algorithm

Examples of jjil.algorithm.GrayConnComp


            if (this.dh != null && !this.dh.isEmpty()) {
                jjil.core.Gray8Image imMask = null;
                jjil.core.Image image = dh.getFront();
                if (image instanceof jjil.core.Gray8Image) {
                   imMask = (Gray8Image) image;
                   GrayConnComp gcc = new GrayConnComp();
                   gcc.push(imMask);
                   if (gcc.getComponents()> 0) {
                       // found a face
                       Rect r = gcc.getComponent(0);
                       // calculate center of face in mask coordinates
                       int x = r.getLeft() + r.getWidth() / 2;
                       int y = r.getTop() + r.getHeight() / 2;
                       // convert from mask to original image
                       x = (x * this.imInput.getWidth()) / imMask.getWidth();
View Full Code Here

TOP

Related Classes of jjil.algorithm.GrayConnComp

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.