python: 'cv2.' -> 'cv.' via 'import cv2 as cv'
This commit is contained in:
@@ -52,16 +52,16 @@ detector is called STAR detector in OpenCV)
|
||||
note, that you need [opencv contrib](https://github.com/opencv/opencv_contrib)) to use this.
|
||||
@code{.py}
|
||||
import numpy as np
|
||||
import cv2
|
||||
import cv2 as cv
|
||||
from matplotlib import pyplot as plt
|
||||
|
||||
img = cv2.imread('simple.jpg',0)
|
||||
img = cv.imread('simple.jpg',0)
|
||||
|
||||
# Initiate FAST detector
|
||||
star = cv2.xfeatures2d.StarDetector_create()
|
||||
star = cv.xfeatures2d.StarDetector_create()
|
||||
|
||||
# Initiate BRIEF extractor
|
||||
brief = cv2.xfeatures2d.BriefDescriptorExtractor_create()
|
||||
brief = cv.xfeatures2d.BriefDescriptorExtractor_create()
|
||||
|
||||
# find the keypoints with STAR
|
||||
kp = star.detect(img,None)
|
||||
|
||||
Reference in New Issue
Block a user