Opencv for pcb parts detection and angle calculation

Hi,
I’m new in Opencv .
I want to detect pcb parts (Es. capactors, resistors etc.) with opencv and calculate current rotation angle.
There is an easy and optimized way to do this ?

Hi,
You can use in order:
//for filter:
cvtColor
Laplacian
Canny
adaptiveThreshold
dilate
erode
//for find contour
findContours
//for detect part of each contour
minAreaRect

But, you need for each step to find the parameters of the goods (you can use imshow), it depends on your input picture.
Good luck.

there isn’t. opencv is a library. it doesn’t simply solve your problem with a single function. it has a lot of the parts you might need, but you have to know what to do.

what is your intended approach? what is your background in machine vision?

perhaps a course or book on the topic would be a good idea?