Skip to content

UD123/scratch-inspection

Repository files navigation

Vision Based Scratch Inspection Quality Tool

Inspects surfaces to find scratches.

Data

  • Data is arranged as images in a folder with unique names
  • Output will be json/csv file
  • Setting file defines which test are run and parameters

Supported Platforms and Compute Environments

  • Windows

Installation on Windows

  1. Creating environment

PowerShell: C:\Users\udubin\AppData\Local\Programs\Python\Python310\python.exe -m venv C:\Users\udubin\Documents\Envs\pyqt5g

  1. Activating

Cmd: C:\Users\udubin\Documents\Envs\pyqt5g\Scripts\activate.bat

  1. OpenCV

pip install opencv-contrib-python

  1. PyQt

pip install PyQt5

  1. Matplotlib

pip install matplotlib

  1. PyInstaller

pip install pyinstaller

  1. Install realsense driver fpor image capture

pip install pyrealsense2

  1. skimage :

pip install scikit-image

  1. Sklearn

pip install scikit-learn

Compiling the App

In the lens_tool environment swicth to the lens_quality folder and run:

'''py pyinstaller --onefile inspection_tool_main.py '''

If this error occures: '''py _get_const_info argval = const_list[const_index] IndexError: tuple index out of range '''

Change in "C:\Users\udubin\AppData\Local\Programs\Python\Python310\Lib\dis.py":

'''py def _unpack_opargs(code): extended_arg = 0 for i in range(0, len(code), 2): op = code[i] if op >= HAVE_ARGUMENT: arg = code[i+1] | extended_arg extended_arg = (arg << 8) if op == EXTENDED_ARG else 0 else: arg = None extended_arg = 0 # Add this line yield (i, op, arg) '''

About

Vision based scratch on surface dataset processing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages