Package me.uits.aiphial.imaging

Examples of me.uits.aiphial.imaging.FastMatrixMS


    public static void main(String[] args) throws IOException
    {
        // read a buffered image from file
        BufferedImage srcimg = ImageIO.read(new File("../../images/DSCN4909s400.bmp"));
        // then create a Clusterer, FastMatrixMS is a simple Mean Shift Clusterer for images
        FastMatrixMS a = new FastMatrixMS(Tools.matrixFromImage(srcimg));

        // setup filter parametrs
        a.setColorRange(7f);
        a.setSquareRange((short)20);

        // process
        a.doClustering();

        // paint clusters on image
        BufferedImage img = Tools.paintClusters(srcimg.getWidth(), srcimg.getHeight(), a.getClusters(), false);

        // write results to file
        ImageIO.write(img, "bmp", new File("./out_.bmp"));
    }
View Full Code Here

TOP

Related Classes of me.uits.aiphial.imaging.FastMatrixMS

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.