Skip to content

Commit 934f1df

Browse files
committed
update version
1 parent e3f6228 commit 934f1df

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "camera-intrinsic-model"
3-
version = "0.4.1"
3+
version = "0.5.0"
44
edition = "2021"
55
authors = ["Powei Lin <poweilin1994@gmail.com>"]
66
readme = "README.md"
@@ -10,7 +10,7 @@ homepage = "https://github.com/powei-lin/camera-intrinsic-model-rs"
1010
repository = "https://github.com/powei-lin/camera-intrinsic-model-rs"
1111
keywords = ["camera-intrinsic", "intrinsic", "fisheye"]
1212
categories = ["data-structures", "science", "mathematics", "science::robotics"]
13-
exclude = ["/.github/*", "*.ipynb", "./scripts/*", "examples/*", "tests/*", "data/*"]
13+
exclude = ["/.github/*", "*.ipynb", "./scripts/*", "examples/*", "tests/*", "data/*", "benches/*"]
1414

1515
[dependencies]
1616
image = "0.25.6"

benches/opencv_test.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import cv2
2+
import numpy as np
3+
from time import perf_counter
4+
5+
6+
def main():
7+
img = (255 * np.random.random((512, 512))).astype(np.uint8)
8+
mapx = (511 * np.random.random((1024, 1024))).astype(np.float32)
9+
mapy = (511 * np.random.random((1024, 1024))).astype(np.float32)
10+
# mapx, mapy = cv2.convertMaps(mapx, mapy, cv2.CV_16SC2)
11+
tt = 1000
12+
t0 = perf_counter()
13+
for i in range(tt):
14+
cv2.remap(img, mapx, mapy, cv2.INTER_LINEAR)
15+
t1 = perf_counter()
16+
print(f"{(t1 - t0) / tt}")
17+
18+
19+
if __name__ == "__main__":
20+
main()

0 commit comments

Comments
 (0)