Conversions between kornia and other computer vision libraries formats
Project description
Kornia_moons
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
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 laf_from_opencv_ORB_kpts, opencv_ORB_kpts_from_laf
from kornia_moons.viz import visualize_LAF
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)
libpng warning: iCCP: known incorrect sRGB profile
<matplotlib.image.AxesImage>
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.9.tar.gz
(16.8 kB
view details)
Built Distribution
File details
Details for the file kornia_moons-0.2.9.tar.gz
.
File metadata
- Download URL: kornia_moons-0.2.9.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/6.6.0 pkginfo/1.7.0 requests/2.31.0 requests-toolbelt/0.9.1 tqdm/4.65.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6e6b3523296a38f099712a322d708730720cfb97de437aa90fa586a86556455 |
|
MD5 | e7f901f27c6dbf25fbb078ab91be8187 |
|
BLAKE2b-256 | 374b10defe8ac68c3ab2b42c58ed302d36e3ba69a33f092f5798a8248e0e0f68 |
File details
Details for the file kornia_moons-0.2.9-py3-none-any.whl
.
File metadata
- Download URL: kornia_moons-0.2.9-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/6.6.0 pkginfo/1.7.0 requests/2.31.0 requests-toolbelt/0.9.1 tqdm/4.65.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d35e799b29031365c7b57fee3d84b4be547c0513f7c013e8234e05d33d2b1061 |
|
MD5 | 03da0e337c5f26d78c2181cae95d0d12 |
|
BLAKE2b-256 | dd612d7b4383eab721c785c318d06e412f49a4e04568b46291d30aa3d2e7dba5 |