title: How to remove this Error "The method getBufferedImage() is undefined for the type opencv_core.IplImage"
body: <p>Here is my code. It keeps on showing this message "The method getBufferedImage() is undefined for the type opencv_core.IplImage". How can I get rid of it? Is there any alternative way of getting the buffered image?? If anyone have any idea please tell me as soon as possible</p>
  
  <pre><code>public IplImage snapIm = null;
  public Rectangle faceRect;
  public void paintComponent(Graphics g){ 
          super.paintComponent(g);
          Graphics2D g2 = (Graphics2D) g;
  
          if (snapIm != null)
              g2.drawImage(snapIm.getBufferedImage(), 0, 0, this); //This Line is causing problem
  
          drawRect(g2);
          writeStats(g2);
          writeName(g2);
  }
  public void recogFace(IplImage img)
  {
      BufferedImage clipIm = null;
      synchronized(faceRect) {
          if (faceRect.width == 0) {
              System.out.println("No face selected");
              return;
          }
          clipIm = ImageUtils.clipToRectangle(img.getBufferedImage(),faceRect.x, faceRect.y, faceRect.width, faceRect.height); //This Line is causing problem
      }
      if (clipIm != null) 
      matchClip(clipIm);
  }
  </code></pre>