Package org.opencv.core

Examples of org.opencv.core.Mat.channels()


    }

    @Test
    public void testBufferedImageToMat() throws IOException {
        Mat mat = matForImage(TEST_4_CHANNEL_IMAGE, 4);
        assertEquals(4, mat.channels());

        mat = matForImage(TEST_3_CHANNEL_IMAGE, 3);
        assertEquals(3, mat.channels());

        mat = matForImage(TEST_GRAYSCALE_IMAGE, 1);
View Full Code Here


    public void testBufferedImageToMat() throws IOException {
        Mat mat = matForImage(TEST_4_CHANNEL_IMAGE, 4);
        assertEquals(4, mat.channels());

        mat = matForImage(TEST_3_CHANNEL_IMAGE, 3);
        assertEquals(3, mat.channels());

        mat = matForImage(TEST_GRAYSCALE_IMAGE, 1);
        assertEquals(1, mat.channels());
    }
View Full Code Here

        mat = matForImage(TEST_3_CHANNEL_IMAGE, 3);
        assertEquals(3, mat.channels());

        mat = matForImage(TEST_GRAYSCALE_IMAGE, 1);
        assertEquals(1, mat.channels());
    }


    private Mat matForImage(String imageName, int expectedComponents) throws IOException {
        ClassLoader cl = Thread.currentThread().getContextClassLoader();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.