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.5.tar.gz
(16.9 kB
view hashes)
Built Distribution
Close
Hashes for kornia_moons-0.2.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a00bb2dc13e4843d555f6c73c9dde0f7b33cf9f5d7dd84c6d0195844e254a234 |
|
MD5 | 89d96ea7dfe9f370b97bc9d26f7d5d80 |
|
BLAKE2b-256 | 1399bc7be88c0a11f6e8548e700bb67b54d68188cb2143f40aacd573bb05d256 |