title: OpenImaj - face detection - display found faces
body: <p>I'm using OpenImaj to detect faces in an image.</p>
  
  <pre><code>import java.io.FileInputStream;
  import java.io.FileNotFoundException;
  import java.io.IOException;
  import java.util.List;
  
  import org.openimaj.image.FImage;
  import org.openimaj.image.ImageUtilities;
  import org.openimaj.image.MBFImage;
  import org.openimaj.image.colour.Transforms;
  import org.openimaj.image.processing.face.detection.DetectedFace;
  import org.openimaj.image.processing.face.detection.FaceDetector;
  import org.openimaj.image.processing.face.detection.HaarCascadeDetector;
  
  public class FaceDetection {
  
      public static void main(String[] args) {
          MBFImage image;
          try {
              image = ImageUtilities.readMBF(new FileInputStream("image.jpg"));
              FaceDetector&lt;DetectedFace,FImage&gt; fd = new HaarCascadeDetector(80);
              List&lt;DetectedFace&gt; faces = fd. detectFaces (Transforms.calculateIntensity(image));
  
              System.out.println(faces.size());
          } catch (FileNotFoundException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          } catch (IOException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
      }
  }
  </code></pre>
  
  <p>To display an image we can use DisplayUtilities class: DisplayUtilities.display(image);
  However the found face is in type DetectedFace.</p>
  
  <p>Do you know how to display the face which is in the DetectedFace type?</p>
  
  <p>Thank you.</p>