How to get the angel of object of irregular shape by openmv H7?

how to get the angel of object of irregular shape?


the left is wrong angle ,the right is OK.
how to get the angel of wrong object?
which function works for that? the color and the findblob is unfit for that, i have checked it.

Find_line_segments() with heavily filtering or find_lines() will do the job. Otherwise, you may wish to train an ML image classification model.

thank you. i will do some test