{"id":913,"date":"2013-07-10T21:49:41","date_gmt":"2013-07-10T13:49:41","guid":{"rendered":"http:\/\/www.youthtribe.com\/?p=913"},"modified":"2013-07-10T21:49:41","modified_gmt":"2013-07-10T13:49:41","slug":"opencv-cvhoughcircles%e6%89%be%e5%9c%86%e4%be%8b%e5%ad%90","status":"publish","type":"post","link":"http:\/\/www.youthtribe.com\/archives\/913","title":{"rendered":"opencv – cvHoughCircles\u627e\u5706\u4f8b\u5b50"},"content":{"rendered":"

\u5148\u6765\u770bopencv\u51fd\u6570 cvHoughCircles \u7684\u8bf4\u660e\uff1a<\/p>\n

\u51fd\u6570\uff1aCvSeq *cvHoughCircles(CvArr *image,void *circle_storage,int method,double dp,double min_dist,double param1,double param2,int min_radius,int max_radius)<\/p>\n

\u4e0b\u8fb9\u662f\u53c2\u6570\u8bf4\u660e\uff1a<\/p>\n

image:\u8f93\u51658bit\uff08\u7070\u5ea6\uff09\u56fe\u50cf\uff0c\u5176\u5185\u5bb9\u53ef\u88ab\u51fd\u6570\u6240\u6539\u53d8<\/div>\n
circle_storage:\u68c0\u6d4b\u5230\u7684\u5706\u5b58\u50a8\u4ed3,\u53ef\u4ee5\u662f\u5185\u5b58\u5b58\u50a8\u4ed3 (\u6b64\u79cd\u60c5\u51b5\u4e0b\uff0c\u4e00\u4e2a\u7ebf\u6bb5\u5e8f\u5217\u5728\u5b58\u50a8\u4ed3\u4e2d\u88ab\u521b\u5efa\uff0c\u5e76\u4e14\u7531\u51fd\u6570\u8fd4\u56de\uff09\u6216\u8005\u662f\u5305\u542b\u5706\u53c2\u6570\u7684\u7279\u6b8a\u7c7b\u578b\u7684\u5177\u6709\u5355\u884c\/\u5355\u5217\u7684CV_32FC3\u578b\u77e9\u9635(CvMat*). \u77e9\u9635\u5934\u4e3a\u51fd\u6570\u6240\u4fee\u6539\uff0c\u4f7f\u5f97\u5b83\u7684 cols\/rows \u5c06\u5305\u542b\u4e00\u7ec4\u68c0\u6d4b\u5230\u7684\u5706\u3002\u5982\u679c circle_storage \u662f\u77e9\u9635\uff0c\u800c\u5b9e\u9645\u5706\u7684\u6570\u76ee\u8d85\u8fc7\u77e9\u9635\u5c3a\u5bf8\uff0c\u90a3\u4e48\u6700\u5927\u53ef\u80fd\u6570\u76ee\u7684\u5706\u88ab\u8fd4\u56de,\u6bcf\u4e2a\u5706\u7531\u4e09\u4e2a\u6d6e\u70b9\u6570\u8868\u793a\uff1a\u5706\u5fc3\u5750\u6807(x,y)\u548c\u534a\u5f84.).<\/div>\n
method:Hough \u53d8\u6362\u65b9\u5f0f\uff0c\u76ee\u524d\u53ea\u652f\u6301CV_HOUGH_GRADIENT, which is basically 21HT, described in [Yuen03].<\/div>\n
dp:\u5bfb\u627e\u5706\u5f27\u5706\u5fc3\u7684\u7d2f\u8ba1\u5206\u8fa8\u7387\uff0c\u8fd9\u4e2a\u53c2\u6570\u5141\u8bb8\u521b\u5efa\u4e00\u4e2a\u6bd4\u8f93\u5165\u56fe\u50cf\u5206\u8fa8\u7387\u4f4e\u7684\u7d2f\u52a0\u5668\u3002\uff08\u8fd9\u6837\u505a\u662f\u56e0\u4e3a\u6709\u7406\u7531\u8ba4\u4e3a\u56fe\u50cf\u4e2d\u5b58\u5728\u7684\u5706\u4f1a\u81ea\u7136\u964d\u4f4e\u5230\u4e0e\u56fe\u50cf\u5bbd\u9ad8\u76f8\u540c\u6570\u91cf\u7684\u8303\u7574\uff09\u3002\u5982\u679cdp\u8bbe\u7f6e\u4e3a1\uff0c\u5219\u5206\u8fa8\u7387\u662f\u76f8\u540c\u7684\uff1b\u5982\u679c\u8bbe\u7f6e\u4e3a\u66f4\u5927\u7684\u503c\uff08\u6bd4\u59822\uff09\uff0c\u7d2f\u52a0\u5668\u7684\u5206\u8fa8\u7387\u53d7\u6b64\u5f71\u54cd\u4f1a\u53d8\u5c0f\uff08\u6b64\u60c5\u51b5\u4e0b\u4e3a\u4e00\u534a\uff09\u3002dp\u7684\u503c\u4e0d\u80fd\u6bd41\u5c0f\u3002<\/div>\n
min_dist:\u8be5\u53c2\u6570\u662f\u8ba9\u7b97\u6cd5\u80fd\u660e\u663e\u533a\u5206\u7684\u4e24\u4e2a\u4e0d\u540c\u5706\u4e4b\u95f4\u7684\u6700\u5c0f\u8ddd\u79bb\u3002<\/div>\n
param1:\u7528\u4e8eCanny\u7684\u8fb9\u7f18\u9600\u503c\u4e0a\u9650\uff0c\u4e0b\u9650\u88ab\u7f6e\u4e3a\u4e0a\u9650\u7684\u4e00\u534a\u3002<\/div>\n
param2:\u7d2f\u52a0\u5668\u7684\u9600\u503c\u3002<\/div>\n
The second method-specific parameter. In case of CV_HOUGH_GRADIENT it is accumulator threshold at the center detection stage. The smaller it is, the more false circles may be detected. Circles, corresponding to the larger accumulator values, will be returned first.<\/div>\n
min_radius:\u6700\u5c0f\u5706\u534a\u5f84\u3002<\/div>\n
max_radius:\u6700\u5927\u5706\u534a\u5f84\u3002<\/div>\n","protected":false},"excerpt":{"rendered":"

\u5148\u6765\u770bopencv\u51fd\u6570 cvHoughCircles \u7684\u8bf4\u660e\uff1a \u51fd\u6570\uff1aCvSeq *cvHoughCircles(CvArr *image,void *circle_storage,int method,double dp,double min_dist,double param1,double param2,int min_radius,int max_radius) \u4e0b\u8fb9\u662f\u53c2\u6570\u8bf4\u660e\uff1a image:\u8f93\u51658bit\uff08\u7070\u5ea6\uff09\u56fe\u50cf\uff0c\u5176\u5185\u5bb9\u53ef\u88ab\u51fd\u6570\u6240\u6539\u53d8 circle_storage:\u68c0\u6d4b\u5230\u7684\u5706\u5b58\u50a8\u4ed3,\u53ef\u4ee5\u662f\u5185\u5b58\u5b58\u50a8\u4ed3 (\u6b64\u79cd\u60c5\u51b5\u4e0b\uff0c\u4e00\u4e2a\u7ebf\u6bb5\u5e8f\u5217\u5728\u5b58\u50a8\u4ed3\u4e2d\u88ab\u521b\u5efa\uff0c\u5e76\u4e14\u7531\u51fd\u6570\u8fd4\u56de\uff09\u6216\u8005\u662f\u5305\u542b\u5706\u53c2\u6570\u7684\u7279\u6b8a<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[9,150],"tags":[155,139,156],"_links":{"self":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/913"}],"collection":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/comments?post=913"}],"version-history":[{"count":3,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/913\/revisions"}],"predecessor-version":[{"id":922,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/913\/revisions\/922"}],"wp:attachment":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/media?parent=913"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/categories?post=913"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/tags?post=913"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}