How to know the co-ordinates/angle of the object detected (Rectangular)

asked 2015-12-21 13:13:06 -0500

pradeep_kb gravatar image

Hello,

I want to know the co-ordinates or angle with respect to y axis of the object detected. In my case we are detecting rectangular object placed in side the swimming pool or water. I should get the any of the object and I should make my robot to align and move in that direction. Please advice.

edit retag flag offensive close merge delete

Comments

How do you detect the object ?

pklab gravatar imagepklab ( 2015-12-21 13:16:44 -0500 )edit

@pkblab , I am very new to opencv.. I didn't think about it still. Please advice me your best.

pradeep_kb gravatar imagepradeep_kb ( 2015-12-21 13:30:58 -0500 )edit

@pradeep_kb check this tutorial though in your case using PCA might be too much overkill and you might be able to do it much simpler. Some hints to search about are findcontours(), boundingbox, boundingbox angle. I think with these you will be able to find quite some descriptive examples.

theodore gravatar imagetheodore ( 2015-12-21 18:10:20 -0500 )edit