Package com.marimon.image.framework.datamodel

Examples of com.marimon.image.framework.datamodel.ShortSampleValue


                .getSizeY()];
        for (int i = 0; i < signal.getSizeX(); i++) {
            for (int j = 0; j < signal.getSizeY(); j++) {
                Sample2D samp = signal.getPixel(i, j);
                Point2D point = samp.getPoint();
                samples[i][j] = new ShortSample2D(point, new ShortSampleValue(
                        samp.getValue().shortValue()));
            }
        }
        return new ShortMatrixSignal(samples);
    }
View Full Code Here


    public MatrixSignal getByteNoise(int width, int height) {
        Sample2D[][] result = new Sample2D[width][height];

        for (int i = 0; i < width; i++) {
            for (int j = 0; j < height; j++) {
                ShortSampleValue value = new ShortSampleValue((int) (Math
                        .random() * 255));
                Point2D point = new Point2D(i, j);
                result[i][j] = new ShortSample2D(point, value);
            }
        }
View Full Code Here

            for (int x = 0; x < getWidth(); x++) {
                Point2D point = new Point2D(x, y);
                int rgb = bufferedImage_.getRGB(x, y);
                value = (short) (colorModel.getRed(rgb)
                        + colorModel.getGreen(rgb) + colorModel.getBlue(rgb));
                signal[x][y] = new ShortSample2D(point, new ShortSampleValue(
                        value / 3));
            }
        }

        return signal;
View Full Code Here

TOP

Related Classes of com.marimon.image.framework.datamodel.ShortSampleValue

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.