Giter Site home page Giter Site logo

mnixry / python-orb-slam3 Goto Github PK

View Code? Open in Web Editor NEW
26.0 1.0 4.0 1.77 MB

A Python wrapper of ORB-SLAM3 feature extraction algorithm.

Home Page: https://pypi.org/project/python-orb-slam3/

License: GNU General Public License v3.0

CMake 1.35% C++ 85.73% Python 12.91%
cpp feature-extraction opencv opencv-python pybind11 python3

python-orb-slam3's Introduction

python-orb-slam3

A Python wrapper for the ORB-SLAM3 feature extraction algorithm.

Installation

From PyPI

Note
This package's pre-built binaries are only available for AMD64 architectures.

pip install python-orb-slam3

From source

There are a few steps to follow to install this package from the source code, please refer to the CI configuration file here for more details.

Usage

import cv2
from matplotlib import pyplot as plt

from python_orb_slam3 import ORBExtractor

source = cv2.imread("path/to/image.jpg")
target = cv2.imread("path/to/image.jpg")

orb_extractor = ORBExtractor()

# Extract features from source image
source_keypoints, source_descriptors = orb_extractor.detectAndCompute(source)
target_keypoints, target_descriptors = orb_extractor.detectAndCompute(target)

# Match features
bf = cv2.BFMatcher(cv2.NORM_HAMMING, crossCheck=True)
matches = bf.match(source_descriptors, target_descriptors)

# Draw matches
source_image = cv2.drawKeypoints(source, source_keypoints, None)
target_image = cv2.drawKeypoints(target, target_keypoints, None)
matches_image = cv2.drawMatches(source_image, source_keypoints, target_image, target_keypoints, matches, None)

# Show matches
plt.imshow(matches_image)
plt.show()

License

This repository is licensed under the GPLv3 license.

A Python wrapper for the ORB-SLAM3 feature extraction algorithm.
Copyright (C) 2022  Johnny Hsieh

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

python-orb-slam3's People

Contributors

mnixry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

raiots larrylin35

python-orb-slam3's Issues

Workflow 中无法编译通过

首先感谢作者的贡献~

目前存在如下问题:workflow 中 windows 平台下无法成功编译 opencv。

在 workflow 文件中删除 Windows 平台下验证后会在 Build Wheel 步骤报错如下:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'orb_slam3'

btw,请问为什么在 pypi 上搜不到这个包呀?

请问是否可以在pytorch上利用tensor进行操作呢

非常感谢作者的工作,我最近也想将orb的mathcing和feature extractor部分抽象出来,但是不知道怎么做。之前看到有些是通过pytorch自带的TORCH_LIBRARY,通过添加binding文件完成python和c++的数据交互,但是我发现对于orbfeature和matcher是有opencv的第三方库,因此没办法直接加载调用?想问下作者1. 这种思路是否可行? 2. 这份代码可以在外部配置orb feature提取的维度个数和层数吗?非常感谢!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.