Code

Rod detection

Routine that binarizes an image and find components' position and orientation. It performs best on high resolution images (e.g. right image), but can also work on artificially increased resolution image (e.g. left image).

Python notebook: Download

Mathematica notebook: Download