Get time from the clock image in Matlab - Image Processing

心不动则不痛 提交于 2019-12-04 05:54:53

问题


clock http://img710.imageshack.us/img710/2623/circlock.jpg

I do not know how to determine the top of the needle of the clock. If you determine the coordinates of them, I can think of the time of the clock.

Please help me solve this problem. Thank you very much!


回答1:


Test points in a circle of radius M, around the centre of the clock. (You could use a for loop to vary the angle from -pi to pi.)

First set M so that the long hand will touch the circle but not the short hand. You will find a region of black points and these reveal the angle of the long hand.

Then repeat with smaller M, so your circle will cross both hands. If you identify two different black areas, you can decide which one is the long hand due to the previous step. (But if the hands are overlapping you may not see two different areas.)



来源:https://stackoverflow.com/questions/1951679/get-time-from-the-clock-image-in-matlab-image-processing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!