Screw-rotation program using the framework OpenCV.
Steps done by program:
- Threshholding the given image, to filter the needed pixels/information
- Morphologycal transformation using a 3x3 kernel/quadar
- Draw a contour around our transformed image
- Calculate the longst axis using the biggest eigenvector (Calculate the orientation of our screw using center of mass, main rotation axis and the PCACompute function)
- Rotate the image using the longest symmatrical axis in the screw image (So that this longest axis is parallel to the x-axis in our coordinate system)