2016-06-10 13 views
0

我在茱莉亞重寫這個OpenCV的程序:的OpenCV:drawKeypoints()在Python與朱莉婭

import numpy as np 
import cv2 
from matplotlib import pyplot as plt 

img = cv2.imread('simple.jpg',0) 

# Initiate STAR detector 
orb = cv2.ORB() 

# find the keypoints with ORB 
kp = orb.detect(img,None) 

# compute the descriptors with ORB 
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() 

如何轉換這條線在Python

img2 = cv2.drawKeypoints(img, kp, color=(0,255,0), flags=0) 

朱莉婭格式?

+4

請包括MWE。 這可以複製並直接粘貼到python解釋器並運行。 包括導入語句。沒有那件事,我們只能猜測你在說什麼。 例如,cv2是一個opencv綁定?誰知道。 –

+1

是的,cv2是Python中的一個類(需要成爲Julia中的一個類型)或現有的庫導入等。沒有足夠的信息來幫助這裏。 – Dan

+0

對不起,希望我的編輯能幫到您 – haxtar

回答

0

在朱莉婭的等效行工作將是:

img2 = cv2.drawKeypoints(img, kp, 0, color=(0,255,0), flags=0) 

的變化是在POS3,你應該爲outImage提供了爭執,儘管標量值0會做。