Peek is a proof-of-concept project that investigates how manufacturing quality assurance can be inspected using computer vision.
- Python 2.7.13
- OpenCV 2.4.13.2 (built-in SIFT and SURF feature detection algorithms)
python main.py
- run example of alignment and difference
python src/align.py
- alignment example
python src/difference.py
- difference example
python test.py
- run script on a number of examples under good and less good lighting conditions (ideally, the score would be ~100 for good images and ~90 for damages ones)
For an arbitrary product image, a quality confidence score is computed by the following steps:
- Control and query images are loaded (control image has to be cropped to the very edges of the product)
- The query image is scaled, rotated and aligned to the control image
- Images are blurred and smoothed to minimise misalignment
- Images are subtracted and thresholded to produce a binary "damage map"
- A final confidence score is output based on damage map
- Images should ideally be captured under similar lighting conditions
- The camera should be fixed 90 degrees vertically above the products for inspection
- The product is not rotated from the query image more than 45 degrees
- Automatically crop control image
- Change feature detection algorithm from SIFT (patented) to BRISK or some other free alternative
- Update warping to rotate the query image any number of degrees
- Detect main geometric shape of the product to remove background
- Automatically compute blur and threshold values (color histogram comparison?)