title: Crop face from the CameraSource
body: <p>I am implementing the example given in <a href="https://github.com/googlesamples/android-vision/tree/master/visionSamples/FaceTracker" rel="noreferrer">google-vision face tracker</a>.
  <code>MyFaceDetector</code> class:</p>
  
  <pre><code>public class MyFaceDetector extends Detector&lt;Face&gt; {
      private Detector&lt;Face&gt; mDelegate;
  
      MyFaceDetector(Detector&lt;Face&gt; delegate) {
          mDelegate = delegate;
      }
  
      public SparseArray&lt;Face&gt; detect(Frame frame) {
          return mDelegate.detect(frame);
      }
  
      public boolean isOperational() {
          return mDelegate.isOperational();
      }
  
      public boolean setFocus(int id) {
          return mDelegate.setFocus(id);
      }
  
  }
  </code></pre>
  
  <p><code>FaceTrackerActivity</code> class:</p>
  
  <pre><code>private void createCameraSource() {
  
      imageView = (ImageView) findViewById(R.id.face);
  
      FaceDetector faceDetector = new FaceDetector.Builder(this).build();
      myFaceDetector = new MyFaceDetector(faceDetector);
      myFaceDetector.setProcessor(new MultiProcessor.Builder&lt;&gt;(new GraphicFaceTrackerFactory())
              .build());
      mCameraSource = new CameraSource.Builder(this, myFaceDetector)
              .setRequestedPreviewSize(640, 480)
              .setFacing(CameraSource.CAMERA_FACING_FRONT)
              .setRequestedFps(60.0f)
              .build();
  
      if (!myFaceDetector.isOperational()) {
          Log.w(TAG, "Face detector dependencies are not yet available.");
      }
  }
  </code></pre>
  
  <p>I need to crop the face and set it on <code>ImageView</code>. I am not able to implement my custom <code>Frame</code> here. <code>frame.getBitmap()</code> always returns <code>null</code> in <code>detect(Frame frame)</code>. How do I achieve this?</p>