public ConvertColor() {
        File file = new File("E:\\blackhand.jpeg");
//        File file = new File("E:\\dog.jpg");
        String path = file.getAbsolutePath();
        BufferedImage image;
        if (!file.isFile()) {
            System.err.print("Error");
        }
        InputStream stream = null;
        JFrame frame = new JFrame("RGB");
        try {
            stream = new FileInputStream(file);
            image = ImageIO.read(stream);
            Image img = image.getScaledInstance(image.getWidth(), image.getHeight(), Image.SCALE_DEFAULT);
            MyCanvas canvasRGB = new MyCanvas();
            MyCanvas canvasH = new MyCanvas();
            MyCanvas canvasS = new MyCanvas();
            MyCanvas canvasV = new MyCanvas();

            convert(image);
            canvasRGB.setImage(img);
            canvasRGB.setLocation(0, 20);
            canvasRGB.setSize(image.getWidth(), image.getHeight());
            canvasRGB.paint(image.getGraphics());
            canvasH.setImage(this.hImage);
            canvasH.setSize(image.getWidth(), image.getHeight());
//            canvasH.setWidth(image.getWidth());
            canvasH.setLocation(image.getWidth() + 10, 20);

            canvasH.paint(image.getGraphics());
            frame.add(canvasRGB);
            frame.add(canvasH);

            final XYDataset dataset = createDataset(this.renderR, this.renderG, this.renderB);
            final JFreeChart chartR = createChart(dataset);
            final ChartPanel chartPanelR = new ChartPanel(chartR);
            chartPanelR.setPreferredSize(new java.awt.Dimension(1020, 770));
            frame.setContentPane(chartPanelR);

            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setMinimumSize(new java.awt.Dimension(image.getWidth() * 2, image.getHeight()));
            frame.setLocation(0, 0);
            frame.setVisible(true);

        } catch (IOException ex) {
            Logger.getLogger(ConvertColor.class.getName()).log(Level.SEVERE, null, ex);
        } catch (Exception ex) {
            System.err.println("Error : ");
        } finally {
            try {
                stream.close();
            } catch (IOException ex) {
                Logger.getLogger(ConvertColor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }

    }