Skip to main content
QUICK REVIEW

[Paper Review] Image Pre-processing Using OpenCV Library on MORPH-II Face Database

Benjamin Yip, Rachel Towner|arXiv (Cornell University)|Nov 16, 2018
Industrial Vision Systems and Defect DetectionEngineering1 references3 citations
TL;DR

This paper presents a six-stage OpenCV-based pre-processing pipeline for the MORPH-II face database to standardize 55,134 mugshots by detecting faces and eyes, correcting rotation, and cropping to a uniform 60×70 pixel size. The method improves image quality for downstream computer vision tasks by reducing noise from illumination, tilt, and background variation, with manual correction for failed detections and a key insight that re-detection after rotation was redundant and could be eliminated to save time.

ABSTRACT

This paper outlines the steps taken toward pre-processing the 55,134 images of the MORPH-II non-commercial dataset. Following the introduction, section two begins with an overview of each step in the pre-processing pipeline. Section three expands upon each stage of the process and includes details on all calculations made, by providing the OpenCV functionality paired with each step. The last portion of this paper discusses the potential improvements to this pre-processing pipeline that became apparent in retrospect.

Motivation & Objective

  • To reduce image noise and variability in the MORPH-II dataset caused by head tilt, lighting, background, and occlusion.
  • To standardize face images for improved performance in computer vision and pattern recognition tasks.
  • To develop a reproducible, automated pre-processing pipeline using OpenCV for large-scale face image analysis.
  • To identify inefficiencies in the pipeline, such as redundant re-detection after rotation, for optimization.

Proposed method

  • Convert all images to grayscale using OpenCV's cv2.cvtColor with BGR2GRAY to reduce illumination variance.
  • Detect faces using Haar-feature based cascade classifiers via OpenCV's cv2.CascadeClassifier.detectMultiScale with adjustable scale factor and minimum neighbors.
  • Detect eyes within the face ROI using the same cascade classifier with refined parameters and apply two filtering conditions: interocular distance > 1/5 image width and angle between eyes ≤ 15° to reject false positives.
  • Calculate rotation angle from eye center coordinates using vector subtraction and complex plane conversion to compute the rotation matrix via OpenCV's getRotationMatrix2D.
  • Apply rotation to the image using OpenCV's warpAffine function with the computed transformation matrix to align the face.
  • Re-detect faces and eyes in the rotated image to ensure accurate bounding boxes before cropping, though this step is later identified as redundant.

Experimental results

Research questions

  • RQ1How can image variability in the MORPH-II dataset—caused by head tilt, lighting, and background—be systematically reduced for consistent face analysis?
  • RQ2What is the optimal sequence of OpenCV-based operations to detect and align faces while minimizing false positives in eye detection?
  • RQ3To what extent can manual intervention be reduced in face pre-processing by optimizing the algorithmic pipeline?
  • RQ4Can the re-detection step after rotation be eliminated without compromising alignment accuracy?

Key findings

  • The pre-processing pipeline successfully processed 55,134 images from the MORPH-II dataset, significantly reducing noise from illumination, tilt, and background variation.
  • The use of grayscale conversion improved face and eye detection accuracy by minimizing the impact of lighting variance.
  • The filtering conditions for eye detection—interocular distance > 1/5 image width and angle ≤ 15°—effectively reduced false positives from facial blemishes and shadows.
  • The rotation step, based on eye center coordinates and a rotation matrix, achieved consistent face alignment across images.
  • The re-detection of faces and eyes after rotation was found to be redundant, as the same results could be achieved by transforming the original eye coordinates, suggesting a 30-40% reduction in processing time if this step were removed.
  • Manual detection was required for only a subset of images, and the pipeline’s efficiency could be further improved by applying the rotation matrix directly to original eye coordinates instead of re-detecting in the rotated image.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.