title: Initial BufferedImage and converted BufferedImage objects are not giving same result
body: <p>I am writing a test process which will act as duplicate to original processors</p>
  
  <p>My class will take a video file as input then generates frame related information</p>
  
  <pre><code>Java2DFrameConverter bufferedImgConverter = new Java2DFrameConverter();
  String filePath = "Palivala.mp4";
  File tsFile = new File(filePath);
  FFmpegFrameGrabber ffmpegFrameGrabber = new FFmpegFrameGrabber(tsFile);
  OpenCVFrameConverter matConverter = new OpenCVFrameConverter.ToMat();
  ffmpegFrameGrabber.start();
  try {
          while ((frame = ffmpegFrameGrabber.grabFrame(false, true, true, false)) != null) {
              BufferedImage bufferedImage = bufferedImgConverter.convert(frame);
              ByteArrayOutputStream buffer = new ByteArrayOutputStream();
              try {
                  ImageIO.write(bufferedImage, "jpeg", buffer);
              } catch (IOException e) {
                  e.printStackTrace();
              }
              byte frameAsBytes[] = buffer.toByteArray();
              start = System.currentTimeMillis();
              BufferedImage bufferedImage2 = ImageIO.read(new ByteArrayInputStream(frameAsBytes));
              Mat mat = matConverter.convertToMat(bufferedImgConverter.convert(bufferedImage)); //problem is here, I explained problem at the bottom
              if (mat.empty())
                  continue;
              if (prevMat != null) {
                  // here I am generating required data and sending to the method which I want to test
              }
              prevMat = mat.clone();
              numProcessedFrames++;
  
          }
      } catch (org.bytedeco.javacv.FrameGrabber.Exception e) {
          System.out.println("Exception while grabbing frames for segment " + e);
      }
  ffmpegFrameGrabber.stop();
  </code></pre>
  
  <p>If I use initial <code>BufferedImage</code> object(<code>bufferedImage</code>) its working as expected but when I use converted <code>BufferedImage</code> object(<code>bufferedImage2</code>) its not working as expected i.e actually my process finds info about frozen frames, If the video is frozen for 20seconds </p>
  
  <ul>
  <li><p>Its giving final output as 20seconds (if I use <code>bufferedImage</code> object) </p></li>
  <li><p>Its giving final output as 14seconds (if I use <code>bufferedImage2</code> object)</p></li>
  </ul>
  
  <p>I am generating <code>standard-deviation</code> using <code>mat</code> object which is getting from </p>
  
  <pre><code>Mat mat = matConverter.convertToMat(bufferedImgConverter.convert(bufferedImage)); //it works fine
  
  Mat mat = matConverter.convertToMat(bufferedImgConverter.convert(bufferedImage2)); its the problem
  </code></pre>
  
  <p>I am getting frozen-frame info using <code>standard-deviation</code> and my <code>standard-deviation-threshold</code> is <code>90</code></p>
  
  <ul>
  <li><p><code>standard-deviation</code> is continuously below <code>90</code> If I use <code>bufferedImage</code> object</p></li>
  <li><p><code>standard-deviation</code> is continuously below <code>90</code> till 6 seconds then for 1 frame I am getting <code>standard-deviation</code> value as <code>[118.0, 118.0, 119.0]</code> then next frame again below <code>90</code> If I use <code>bufferedImage2</code> object</p></li>
  </ul>