image processing - Find the LBP code in java -


hello new image processing in java , trying develop face recognizing system using linear binary pattern. trying calculate lbp code image recognizing face. not figure out how it. divided image using code below. not find lbp code then.

package project;  import javax.imageio.imageio;   import java.awt.image.bufferedimage;   import java.io.*;   import java.awt.*;    public class imagesplittest  {   public void split(string s) throws ioexception {     file file = new file(s);     bufferedimage image = imageio.read(file);      int rows = 3;     int cols = 3;       int chunks = rows * cols;        int chunkwidth = image.getwidth() / cols;        int chunkheight = image.getheight() / rows;       int count = 0;       bufferedimage imgs[] = new bufferedimage[chunks];       (int x = 0; x < rows; x++)      {           (int y = 0; y < cols; y++)          {               imgs[count] = new bufferedimage(chunkwidth, chunkheight, image.gettype());               graphics2d gr = imgs[count++].creategraphics();               gr.drawimage(image, 0, 0, chunkwidth, chunkheight, chunkwidth * y, chunkheight * x, chunkwidth * y + chunkwidth, chunkheight * x + chunkheight, null);               gr.dispose();           }       }       system.out.println("splitting done");         (int = 0; < imgs.length; i++) {           imageio.write(imgs[i], "jpg", new file("img" + + ".jpg"));       }       system.out.println("mini images created");   }   }   

is correct way divide image per lbp algorithm


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -