All Projects → hakaboom → py_image_registration

hakaboom / py_image_registration

Licence: Apache-2.0 license
图像配准算法。包括 SIFT、ORB、SURF、AKAZE、BRIEF、matchTemplate

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to py image registration

cam-track
Windows, Unix, Raspberry Pi Computer python program to Track Camera X, Y Movements and Convert to Camera Pointing Position. Useful for Stabilization or Robotics Course Correction
Stars: ✭ 27 (-49.06%)
Mutual labels:  template-matching
KCC
Kernel Cross-Correlator (KCC) for Tracking and Recognition (AAAI 2018)
Stars: ✭ 43 (-18.87%)
Mutual labels:  template-matching
node-opencv-templatematching-test
Test for template matching using node-opencv
Stars: ✭ 20 (-62.26%)
Mutual labels:  template-matching
MultiTemplateMatching-Python
Object-recognition using multiple templates in python
Stars: ✭ 103 (+94.34%)
Mutual labels:  template-matching
scarplet
Topographic edge detection of fault scarps and other landforms in digital elevation data
Stars: ✭ 14 (-73.58%)
Mutual labels:  template-matching
imgalign
Webapplication for image stitching and aligning
Stars: ✭ 162 (+205.66%)
Mutual labels:  template-matching
template-matching-android
Augmented Reality Template Matching for >= Android 4.0 using OpenCV
Stars: ✭ 15 (-71.7%)
Mutual labels:  template-matching
Basic-Image-Processing
Implementation of Basic Digital Image Processing Tasks in Python / OpenCV
Stars: ✭ 102 (+92.45%)
Mutual labels:  template-matching
ComputerVision-Essentials
Computer Vision Essentials in Python Programming Language 🎉
Stars: ✭ 28 (-47.17%)
Mutual labels:  template-matching
PyTrx
PyTrx is a Python object-oriented programme created for the purpose of calculating real-world measurements from oblique images and time-lapse image series. Its primary purpose is to obtain velocities, surface areas, and distances from oblique, optical imagery of glacial environments.
Stars: ✭ 31 (-41.51%)
Mutual labels:  template-matching
rectified-features
[ECCV 2020] Single image depth prediction allows us to rectify planar surfaces in images and extract view-invariant local features for better feature matching
Stars: ✭ 57 (+7.55%)
Mutual labels:  feature-matching
ezSIFT
ezSIFT: An easy-to-use standalone SIFT library written in C/C++
Stars: ✭ 80 (+50.94%)
Mutual labels:  feature-matching
LoFTR
Code for "LoFTR: Detector-Free Local Feature Matching with Transformers", CVPR 2021
Stars: ✭ 1,046 (+1873.58%)
Mutual labels:  feature-matching
Semi-Supervised-Learning-GAN
Semi-supervised Learning GAN
Stars: ✭ 72 (+35.85%)
Mutual labels:  feature-matching
Feature-Detection-and-Matching
Feature Detection and Matching with SIFT, SURF, KAZE, BRIEF, ORB, BRISK, AKAZE and FREAK through the Brute Force and FLANN algorithms using Python and OpenCV
Stars: ✭ 95 (+79.25%)
Mutual labels:  feature-matching
PCLoc
Pose Correction for Highly Accurate Visual Localization in Large-scale Indoor Spaces (ICCV 2021)
Stars: ✭ 37 (-30.19%)
Mutual labels:  feature-matching

py_image_registration

GitHub issues GitHub forks GitHub stars GitHub license PyPI - Downloads

该项目已移到另外一个库进行后续开发 https://github.com/hakaboom/image_registration

Image registration algorithm. Includes SIFT, ORB, SURF, AKAZE, BRIEF, matchTemplate

同时包含cuda加速(ORB, SURF, matchTemplate)

Requirements

  • 开发时使用的是python 3.8
  • opencv需要自己安装或自行编译,读取的到cv2模块就行

Installation

pip3 install py-image-registration

Example

  1. create
from image_registration import ORB, SIFT, RootSIFT, SURF, BRIEF, AKAZE, CUDA_SURF, CUDA_ORB, match_template

orb = ORB()
sift = SIFT()
# Other
# orb = ORB(nfeatures=1000, nlevels=9)
# 提取器的参数可以根据opencv文档调整
  1. MatchTemplate

模板匹配

from image_registration import match_template
from baseImage import Image, Rect

im_source = Image('test.png')
im_search = Image('star.png')

tpl = match_template()
result = tpl.find_best(im_source=im_source, im_search=im_search)
# expect output
# {
#  'rect': Rect,  # 返回一个baseImage.Rect类的识别范围
#  'confidence': 0.99 # 返回识别结果的置信度
# }
# Other
# tpl.find_best(im_source=im_source, im_search=im_search, threshold=0.8, rgb=False)
# threshold: 匹配度 0~1
# rgb: 是否判断rgb颜色


tpl.find_all(im_source=im_source, im_search=im_search)
# expect output
# {
#  {
#     'rect': Rect,  # 返回一个baseImage.Rect类的识别范围
#     'confidence': 0.99 # 返回识别结果的置信度
#  },
#  {
#     'rect': Rect
#     'confidence': 0.95
#  },
#  ...
# }
# Other
# tpl.find_all(im_source=im_source, im_search=im_search, threshold=0.8, max_count=20, rgb=False)
# threshold: 匹配度 0~1
# max_count: 最多匹配数量
# rgb: 是否判断rgb颜色
  1. keypoint detector and descriptor extractor

基于特征点的匹配

from image_registration import ORB, SIFT, RootSIFT, SURF, BRIEF, AKAZE, CUDA_SURF, CUDA_ORB

orb = ORB()
sift = SIFT()

im_source = Image('test.png')
im_search = Image('star.png')

orb.find_best(im_source=im_source, im_search=im_search)
orb.find_all(im_source=im_source, im_search=im_search)
# 返回结果MatchTemplate

Exceptions

  1. NoModuleError

模块未找到, 检查opencv库是否安装正确

  1. CreateExtractorError

创建特征提取器失败, 检查传入参数以及opencv库是否安装正确

  1. NoEnoughPointsError

当特征提取器提取特殊数量少于2时弹出异常

  1. CudaSurfInputImageError

图像大小不符合cuda_surf的要求时弹出异常opencv_surf.cuda

  1. CudaOrbDetectorError

提取特征时出现的错误,需要调整orb的初始参数(scaleFactor, nlevels, firstLevel)

  1. HomographyError

An error occurred while findHomography

  1. MatchResultError

An error occurred while result out of screen

  1. PerspectiveTransformError

An error occurred while perspectiveTransform

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].