Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
c1d73e4f
Commit
c1d73e4f
authored
Aug 08, 2016
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7059 from berak:doc_python_drawkeypoints
parents
0d8a21ef
d2a1994d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
py_fast.markdown
doc/py_tutorials/py_feature2d/py_fast/py_fast.markdown
+2
-2
py_orb.markdown
doc/py_tutorials/py_feature2d/py_orb/py_orb.markdown
+2
-2
py_sift_intro.markdown
...torials/py_feature2d/py_sift_intro/py_sift_intro.markdown
+2
-2
No files found.
doc/py_tutorials/py_feature2d/py_fast/py_fast.markdown
View file @
c1d73e4f
...
...
@@ -105,7 +105,7 @@ fast = cv2.FastFeatureDetector_create()
# find and draw the keypoints
kp = fast.detect(img,None)
img2 = cv2.drawKeypoints(img, kp, color=(255,0,0))
img2 = cv2.drawKeypoints(img, kp,
None,
color=(255,0,0))
# Print all default params
print "Threshold: ", fast.getInt('threshold')
...
...
@@ -121,7 +121,7 @@ kp = fast.detect(img,None)
print "Total Keypoints without nonmaxSuppression: ", len(kp)
img3 = cv2.drawKeypoints(img, kp, color=(255,0,0))
img3 = cv2.drawKeypoints(img, kp,
None,
color=(255,0,0))
cv2.imwrite('fast_false.png',img3)
@endcode
...
...
doc/py_tutorials/py_feature2d/py_orb/py_orb.markdown
View file @
c1d73e4f
...
...
@@ -79,8 +79,8 @@ kp = orb.detect(img,None)
kp, des = orb.compute(img, kp)
# draw only keypoints location,not size and orientation
img2 = cv2.drawKeypoints(img,
kp,
color=(0,255,0), flags=0)
plt.imshow(img2),plt.show()
img2 = cv2.drawKeypoints(img,
kp, None,
color=(0,255,0), flags=0)
plt.imshow(img2),
plt.show()
@endcode
See the result below:
...
...
doc/py_tutorials/py_feature2d/py_sift_intro/py_sift_intro.markdown
View file @
c1d73e4f
...
...
@@ -122,7 +122,7 @@ gray= cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
sift = cv2.xfeatures2d.SIFT_create()
kp = sift.detect(gray,None)
img=cv2.drawKeypoints(gray,kp)
img=cv2.drawKeypoints(gray,kp
,img
)
cv2.imwrite('sift_keypoints.jpg',img)
@endcode
...
...
@@ -135,7 +135,7 @@ OpenCV also provides **cv2.drawKeyPoints()** function which draws the small circ
of keypoints. If you pass a flag,
**cv2.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS**
to it, it will
draw a circle with size of keypoint and it will even show its orientation. See below example.
@code{.py}
img=cv2.drawKeypoints(gray,kp,flags=cv2.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS)
img=cv2.drawKeypoints(gray,kp,
img,
flags=cv2.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS)
cv2.imwrite('sift_keypoints.jpg',img)
@endcode
See the two results below:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment