Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imskully/python-cv-fault-detection
Fault detection algorithm that determines whether or not a fault exists within a ring using raw computer vision.
https://github.com/imskully/python-cv-fault-detection
ccl computer-vision matplotlib morphology numpy opencv python
Last synced: 2 days ago
JSON representation
Fault detection algorithm that determines whether or not a fault exists within a ring using raw computer vision.
- Host: GitHub
- URL: https://github.com/imskully/python-cv-fault-detection
- Owner: ImSkully
- License: gpl-3.0
- Created: 2021-12-13T22:52:55.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-03-19T23:58:41.000Z (over 2 years ago)
- Last Synced: 2024-05-01T17:57:51.987Z (7 months ago)
- Topics: ccl, computer-vision, matplotlib, morphology, numpy, opencv, python
- Language: Python
- Homepage:
- Size: 942 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Computer Vision Ring Fault Detection Algorithm
![License](https://img.shields.io/github/license/ImSkully/python-cv-fault-detection)
![Repo Size](https://img.shields.io/github/languages/code-size/ImSkully/python-cv-fault-detection)
![Version](https://img.shields.io/github/v/tag/ImSkully/python-cv-fault-detection)A computer vision algorithm for fault detection to determine whether or not a fault exists within a ring using raw image input and no external libraries such as OpenCV.
# Requirements
The following Python packages are required before using:
* OpenCV: https://pypi.org/project/opencv-python/
* NumPy: https://pypi.org/project/numpy/
* matplotlib: https://pypi.org/project/matplotlib/All dependencies can be installed with the following command using `pip` in a shell terminal:
```
$ pip install opencv-python numpy matplotlib
```# Usage
The application takes images from the input directory, parses them using the detection algorithm and outputs the given results to the command line, and also to an optional output directory that includes the total execution time, fault state, and histogram of the image itself.## Image Input
The input images that need to be assessed should be placed in the [`ring_input`](./ring_input) directory, images should be grey-scaled such that the ring itself is black on a plain white background for best results.## Starting The Process
The process can be started by executing the main [`detection.py`](./detection.py) program, with optional additional parameters:
```
$ python detection.py
```__**Options**__
* `-t` Prevent verbose image output for every image that is processed.
* `-d` Enable a more detailed output for each image that is processed, includes additional data such as ring boundary values.# Example
The process takes any image with a black ring and initially applies thresholding to the image to convert all cells of the image into black and white, from there the image is parsed using binary morphology and gets converted to display black on white pixels respectively.
With the boundary of the ring detected, a green or red border is displayed with connected component labelling along with the total execution time to process the image through the algorithm. Additionally, a histogram of the images findings is generated for further detailing on how the image was constructed using computer vision.