Face Detection

This function block detects human faces in an input image and returns visual and numeric results for downstream processing.

πŸ“₯ Inputs

Image Any The image to analyze for faces (color or grayscale). Provide frames from cameras or loaded images.

πŸ“€ Outputs

Image Any Annotated image with detected face boxes drawn.

Face Area Coordinates List of rectangle coordinates for each detected face.

Face Count Number of faces detected in the input image.

πŸ•ΉοΈ Controls

Confidence Threshold % A slider to set minimum detection confidence. Increase to reduce false positives, decrease to be more permissive.

✨ Features

  • Real-time face detection suitable for live camera frames or static images.

  • Returns both visual feedback (annotated image) and structured data (coordinates and count) for downstream logic.

  • Adjustable confidence level to control detection strictness.

πŸ“ Usage Instructions

  1. Connect an image-producing block (camera or file loader) to the Image Any input.

  2. Adjust the Confidence Threshold % slider to the desired sensitivity.

  3. Use the outputs as needed:

    • Preview the annotated image via a display block.

    • Read Face Area Coordinates for ROI processing or tracking.

    • Use Face Count for alerts, logging or simple analytics.

πŸ“Š Evaluation

When the block runs, it scans the incoming image for faces above the configured confidence and produces the annotated image, a list of face rectangles, and the detected face count.

πŸ’‘ Tips and Tricks

  • For visual inspection, connect this block output to the Show Image block to open the image viewer and inspect detections.

  • If you only need to monitor one area (e.g., doorway), crop first with Image ROI Select to reduce false positives and speed up processing.

  • To reduce CPU usage or increase processing speed, insert Image Resize before this block to lower frame size.

  • Use Draw Detections to combine detection rectangles with custom overlays or status text for clearer on-screen results.

  • Save examples of successful or failed detections with Image Logger for offline review and tuning.

  • Preprocess noisy inputs with Blur or a thresholding block (like Image Threshold) to improve detection stability in low-quality images.

πŸ› οΈ Troubleshooting

  • No faces detected: Lower the Confidence Threshold % and ensure the image contains clear frontal or slightly angled faces. Try increasing image contrast or use Image Resize to a sensible working size.

  • Too many false positives: Increase Confidence Threshold % and crop the scene with Image ROI Select to exclude irrelevant areas.

  • Performance issues: Reduce input resolution with Image Resize or run detection only on selected frames using a control signal or batching strategy.

Last updated

Was this helpful?