Ask Your Question
0

Brute-Force Matching with ORB Descriptors

asked 2017-11-03 12:46:47 -0600

Turcsi96 gravatar image

updated 2017-11-03 12:56:35 -0600

berak gravatar image

Hi, I tried to use this Brute-Force Matchng, but i get this error message:

TypeError: Incorrect type of self (must be 'Feature2D' or its derivative)

belov this line kp1, des1 = orb.detectAndCompute(img1,None)

Can you help me with this?

edit retag flag offensive close merge delete

Comments

more code (context) needed. the "line above that" is ovioiusly useless, on its own

what is orb, exactly ?

also: opencv version ?

berak gravatar imageberak ( 2017-11-03 12:55:22 -0600 )edit

I used the code from the documentation. It is the same just with own pictures. https://docs.opencv.org/3.0-beta/doc/... VERSION 3.3.0-dev

Turcsi96 gravatar imageTurcsi96 ( 2017-11-04 01:51:40 -0600 )edit

the 3.0-beta code won't run any more, so you cannot be using that.

please use the tutorials from master

berak gravatar imageberak ( 2017-11-04 02:36:03 -0600 )edit

I updated it, but it is still the same error.

Turcsi96 gravatar imageTurcsi96 ( 2017-11-04 09:28:10 -0600 )edit

Ok i used the other solution with SHIFT. Btw thanks for the help on StackO. :D I saw there your answers. :)

Turcsi96 gravatar imageTurcsi96 ( 2017-11-04 16:33:35 -0600 )edit

I have the same problem.. What is SHIFT? Can you help me? Thanks

pichy gravatar imagepichy ( 2018-02-03 15:02:19 -0600 )edit

@pichy, it will get better, if you spell it correctly -- SIFT

berak gravatar imageberak ( 2018-02-03 15:04:15 -0600 )edit

I have now this problem: sift = cv2.SIFT() AttributeError: 'module' object has no attribute 'SIFT' I'm using opencv 3.4.0

pichy gravatar imagepichy ( 2018-02-03 15:13:55 -0600 )edit

@pichy, do all of us a favour, and ask a new question, include your code, the opencv version you're using, how you installed that, etc.

(though most likely it is -- you have a documentation tproblem, and try to use 2.4 code with opencv 3.4 (there's a decade between those)

berak gravatar imageberak ( 2018-02-03 15:21:39 -0600 )edit

Yes, I'm using the new version but I not found new documentation. I will search in sample code something..

pichy gravatar imagepichy ( 2018-02-03 15:36:14 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2017-11-30 04:14:53 -0600

Just initialize orb with

orb = cv2.ORB_create()

instead of

orb = cv2.ORB()

for opencv 3.3.1 dev

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-11-03 12:46:47 -0600

Seen: 5,726 times

Last updated: Nov 03 '17