Conversions between kornia and other computer vision libraries formats
Project description
Kornia-moons
Helper functions for navigating the space around planet Kornia ;)
Install
pip install kornia_moons
How to use
Here is an example how to use kornia-moons for local feature conversion from OpenCV ORB keypoints
%matplotlib inline
import matplotlib.pyplot as plt
import cv2
import torch
import kornia as K
from typing import List
import matplotlib.pyplot as plt
from kornia_moons.feature import *
img = cv2.cvtColor(cv2.imread('data/strahov.png'), cv2.COLOR_BGR2RGB)
det = cv2.ORB_create(500)
kps, descs = det.detectAndCompute(img, None)
out_img = cv2.drawKeypoints(img, kps, None, flags=cv2.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS)
plt.imshow(out_img)
lafs = laf_from_opencv_ORB_kpts(kps)
visualize_LAF(K.image_to_tensor(img, False), lafs, 0)
kps_back = opencv_ORB_kpts_from_laf(lafs)
out_img2 = cv2.drawKeypoints(img, kps_back, None, flags=cv2.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS)
plt.imshow(out_img2)
/opt/homebrew/Caskroom/miniforge/base/envs/python38/lib/python3.8/site-packages/kornia/augmentation/augmentation.py:1830: DeprecationWarning: GaussianBlur is no longer maintained and will be removed from the future versions. Please use RandomGaussianBlur instead.
warnings.warn(
<matplotlib.image.AxesImage at 0x179a196d0>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
kornia_moons-0.2.2.tar.gz
(15.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kornia_moons-0.2.2.tar.gz.
File metadata
- Download URL: kornia_moons-0.2.2.tar.gz
- Upload date:
- Size: 15.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.8.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f8544ac7526e791c5d8aee6a501a513303eb5a932eec2be4ba56c4394ed8d85
|
|
| MD5 |
fde998e67499cd4f1502dacddee43c1e
|
|
| BLAKE2b-256 |
b0a44deb5d2b07d895cc9f7c374d956f0e2317db64497d98e9c03aee4b86f8ab
|
File details
Details for the file kornia_moons-0.2.2-py3-none-any.whl.
File metadata
- Download URL: kornia_moons-0.2.2-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.8.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2656d730c5983c00b8495217162356f89246de762f16c3f6e94f05d61957cb4c
|
|
| MD5 |
e2a49d9aaebd615119a94e44bbcf9c65
|
|
| BLAKE2b-256 |
93ceae1e163b75aa72624273a97832fd96cbe1b3fbf1828a21c849e21d29e407
|