An open API service indexing awesome lists of open source software.

https://github.com/wadaboa/cv-con-rod-inspection

Visual inspection of motorcycle connecting rods for Computer Vision class at UNIBO
https://github.com/wadaboa/cv-con-rod-inspection

blob-analysis computer-vision euler-number motorcycle-connecting-rods

Last synced: about 2 months ago
JSON representation

Visual inspection of motorcycle connecting rods for Computer Vision class at UNIBO

Awesome Lists containing this project

README

        

# Connecting rods inspection

![Example image](img/task-1/01.bmp)

## Description
This university project is an implementation of a visual system which is able to analyze
motorcycle connecting rods, by applying the following steps:
1. A grayscale image is loaded and binarized using `Otsu's method`
2. The image is bitwise inverted to get a white foreground and a black background
3. Morphological operations are carried out in order to detach touching rods
4. Blobs are extracted using `connected components labeling`
5. Blobs are filtered using a threshold on the blob's area, to remove iron powder and distractors
6. Circles are calculated using a custom `contour finding` method and the `Haralick's circularity` measure
7. Blob's `moments` are calculated using a custom method
8. Blob's `orientation` and its bounding box are determined
9. Blob's `shape features`, like length and width, are calculated
10. The number of holes inside each rod is computed, based on the `Euler number`
11. Finally, results are printed out

In the whole execution, images of the happening processing are shown for debug purposes.

## Dependencies
This software is written in `Python 3.7.6`, using the following third-party libraries:
* `plac 1.1.3`, to parse from CLI "the easy way"
* `scipy 1.4.1`, to efficiently perform scientific computations
* `opencv-python 4.2.0.32`, to exploit some computer vision algorithms

## Installation & execution
To install the software, just clone this repository locally.\
To execute it, `cd` into the downloaded folder (`cv-con-rod-inspection`) and run
```bash
python inspection.py -i ""
```

## Todo
The last thing to refine is how to `detach touching rods`, without altering their main structure.