public videoPanel() {
    cr = new CameraReader();
    cr.Start();
    this.size = new Dimension(cr.getColorFrame().width() + 20, cr.getColorFrame().height() + 50);

    iv = cr.getColorFrame();
    this.add(new JLabel(new ImageIcon(iv.getBufferedImage())));

    // this.run();
  }
  public videoPanel(CameraReader cr) {
    this.cr = cr;
    this.size = new Dimension(cr.getColorFrame().width(), cr.getColorFrame().height());

    cr.Start();
    // kr.Start();
    iv = cr.getColorFrame();
    // this.add(new JLabel(new ImageIcon(io.getBufferedImage())));

    // this.run();
  }
  public videoPanel(KinectReader kr) {
    this.cr = kr;
    // kr.Start();
    this.size = new Dimension(kr.getColorFrame().width() + 20, kr.getColorFrame().height() + 50);
    iv = cr.getColorFrame();
    // this.add(new JLabel(new ImageIcon(io.getBufferedImage())));

    // this.run();
  }
  @Override
  public void run() {
    while (true) {
      ic = cr.getColorFrame();
      id = cr.getDepthFrame();
      // iv = cr.getOverlayFrame();
      // cvAddWeighted(ic, 1.0, id, 0.5, 0.0, iv);
      this.removeAll();
      if (output == "Overlay") {
        this.add(new JLabel(new ImageIcon(scale(iv, scale).getBufferedImage())));
      } else if (output == "Color") {
        this.add(new JLabel(new ImageIcon(scale(ic, scale).getBufferedImage())));
      } else if (output == "Depth") {
        this.add(new JLabel(new ImageIcon(scale(id, scale).getBufferedImage())));
      }
      this.revalidate();
    }
    // System.out.println("Done");

  }