{"id":6776,"date":"2019-04-25T12:23:16","date_gmt":"2019-04-25T03:23:16","guid":{"rendered":"http:\/\/www.gisdeveloper.co.kr\/?p=6776"},"modified":"2020-05-28T11:37:18","modified_gmt":"2020-05-28T02:37:18","slug":"python%ea%b3%bc-opencv-32-shi-tomasi-corner-detection","status":"publish","type":"post","link":"http:\/\/www.gisdeveloper.co.kr\/?p=6776","title":{"rendered":"Python\uacfc OpenCV \u2013 32 : Shi-Tomasi Corner Detection"},"content":{"rendered":"<p>\uc774 \uae00\uc758 \uc6d0\ubb38\uc740 https:\/\/opencv-python-tutroals.readthedocs.io\/en\/latest\/py_tutorials\/py_feature2d\/py_shi_tomasi\/py_shi_tomasi.html \uc785\ub2c8\ub2e4.<\/p>\n<p>Shi-Tomasi Corner Detection\ub294 Harris Corner Detector\ub97c \uae30\ubcf8\uc73c\ub85c \uac1c\uc120\uc744 \ud1b5\ud574 \uc880\ub354 \uc815\ud655\ud55c Corner\ub97c \ucd94\ucd9c\ud574 \ub0b4\ub294 \uc54c\uace0\ub9ac\uc998\uc73c\ub85c cv2.goodFeaturesToTrack \ud568\uc218\ub85c \uad6c\ud604\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4. \uc774\uc5d0 \ub300\ud55c \uc608\uc81c\ub294 \uc544\ub798\uc640 \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">\r\nimport numpy as np\r\nimport cv2\r\nfrom matplotlib import pyplot as plt\r\n\r\nfilename = '.\/data\/blox.jpg'\r\nimg = cv2.imread(filename)\r\ngray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)\r\n\r\ncorners = cv2.goodFeaturesToTrack(gray,30,0.01,10)\r\ncorners = np.int0(corners)\r\n\r\nfor i in corners:\r\n    x,y = i.ravel()\r\n    cv2.circle(img,(x,y),3,255,-1)\r\n\r\nplt.imshow(img),plt.show()\r\n<\/pre>\n<p>cv2.goodFeaturesToTrack \ud568\uc218\ub294 4\uac1c\uc758 \uc778\uc790\ub97c \ubc1b\ub294\ub370, \uccab\ubc88\uc9f8\ub294 \ud2b9\uc9d5\uc810\uc778 Corner\ub97c \ucd94\ucd9c\ud560 \uc785\ub825 \uc774\ubbf8\uc9c0\ub85c 1\ucc44\ub110\uc778 Grayscale \uc774\ubbf8\uc9c0\ub97c \ubc1b\uc2b5\ub2c8\ub2e4. \ub450\ubc88\uc9f8\ub294 \ucd94\ucd9c\ud560 \ud2b9\uc9d5\uc810\uc758 \uac1c\uc218\uc774\uace0 \uc138\ubc88\uc9f8\ub294 \ud2b9\uc9d5\uc810\uc73c\ub85c\uc368\uc758 \ucd5c\uc18c \ud488\uc9c8\uc778\ub370 \ud488\uc9c8\uc758 \ubc94\uc704\ub294 0-1 \uc0ac\uc774\uac12\uc785\ub2c8\ub2e4. \uc774 \ucd5c\uc18c \ud488\uc9c8\ubcf4\ub2e4 \ub0ae\uc73c\uba74 \ud2b9\uc9d5\uc810\uc73c\ub85c\uc368 \ubc84\ub824\uc9d1\ub2c8\ub2e4. \uadf8\ub9ac\uace0 \ub9c8\uc9c0\ub9c9 \uc778\uc790\ub294 \ucd5c\uc18c \uac70\ub9ac\ub85c\uc368 \uc5bb\uc5b4\uc9c4 \ud2b9\uc9d5\uc810\uc5d0\uc11c \uc774 \ucd5c\uc18c \uac70\ub9ac \uc774\ub0b4\uc758 \ud2b9\uc9d5\uc810\uc740 \ubc84\ub824\uc9d1\ub2c8\ub2e4. \uc544\ub798\ub294 \uc704 \uc608\uc81c\uc758 \uacb0\uacfc\uc785\ub2c8\ub2e4.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.gisdeveloper.co.kr\/wp-content\/uploads\/2019\/04\/Shi-Tomasi_Corner_Detection.png\" alt=\"\" width=\"642\" height=\"546\" class=\"aligncenter size-full wp-image-6777\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uc774 \uae00\uc758 \uc6d0\ubb38\uc740 https:\/\/opencv-python-tutroals.readthedocs.io\/en\/latest\/py_tutorials\/py_feature2d\/py_shi_tomasi\/py_shi_tomasi.html \uc785\ub2c8\ub2e4. Shi-Tomasi Corner Detection\ub294 Harris Corner Detector\ub97c \uae30\ubcf8\uc73c\ub85c \uac1c\uc120\uc744 \ud1b5\ud574 \uc880\ub354 \uc815\ud655\ud55c Corner\ub97c \ucd94\ucd9c\ud574 \ub0b4\ub294 \uc54c\uace0\ub9ac\uc998\uc73c\ub85c cv2.goodFeaturesToTrack \ud568\uc218\ub85c \uad6c\ud604\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4. \uc774\uc5d0 \ub300\ud55c \uc608\uc81c\ub294 \uc544\ub798\uc640 \uac19\uc2b5\ub2c8\ub2e4. import numpy as np import cv2 from matplotlib import pyplot as plt filename = &#8216;.\/data\/blox.jpg&#8217; img = cv2.imread(filename) gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) corners = cv2.goodFeaturesToTrack(gray,30,0.01,10) corners = &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.gisdeveloper.co.kr\/?p=6776\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;Python\uacfc OpenCV \u2013 32 : Shi-Tomasi Corner Detection&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[130,131],"tags":[],"class_list":["post-6776","post","type-post","status-publish","format-standard","hentry","category-opencv","category-python"],"_links":{"self":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/6776","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6776"}],"version-history":[{"count":3,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/6776\/revisions"}],"predecessor-version":[{"id":9440,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/6776\/revisions\/9440"}],"wp:attachment":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6776"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6776"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6776"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}