kobejohn / python_brisk_demo

Quick demo using BRISK feature descriptors in Python to identify and then extract a target image from a scene.
MIT License
21 stars 13 forks source link

AttributeError: 'module' object has no attribute 'BRISK' #1

Open Geo-Trackers opened 7 years ago

Geo-Trackers commented 7 years ago

When i run the code i get the following attribute error. What did i do wrong?

I look forward to hear from you.

Thank you

kobejohn commented 7 years ago

I get the same thing. This is old so there must be a more official example now. I don't have time to fix this at the moment but I will if I get a chance. If you find a way to get access to cv2.BRISK please post here also. You might find something in a tutorial search for brisk.

Geo-Trackers commented 7 years ago

Okay...i will let you know if i find the solution. My plan is to detect and match features using BRISK algorithm, 3D reconstruction and creating orthomosaic and DSM from the multiple images captured from UAV...if you have any experience on this,...please share it with me..i am doing this for my master's thesis

Geo-Trackers commented 7 years ago

Okay...i will let you know if i find the solution. My plan is to detect and match features using BRISK algorithm, 3D reconstruction and creating orthomosaic and DSM from the multiple images captured from UAV...if you have any experience on this,...please share it with me..i am doing this for my master's thesis

mnmcnees commented 7 years ago

Anyone find a solution to this?

kobejohn commented 7 years ago

@mnmcnees @Geo-Trackers I just installed opencv2 version 2.4.11 from the anaconda menpo channel and the demo worked fine! I think it was probably simply that cv2.BRISK was missed in some earlier release?

I've put a specific set of instructions below that worked for me in case anyone gets stuck.

1) Install anaconda or miniconda. It's more or less python with an awesome environment/package manager called Conda. It's like virtualenv but much better in my opinion, especially for people using complex packages like opencv. 2) Create an environment conda create -n py2_env python=2 (of course py3 would be better, but this old demo uses py2) 3) Activate the environment source activate py2_env 4) Install opencv2 conda install -c https://conda.binstar.org/menpo opencv (The -c part specifies a channel where someone has kindly prepared an easy to install package). 5) Run the demo as originally documented python brisk_demo.py

If anyone tries that or gets this working please confirm / update.