lesialin / image_warp

image warp in c function

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Image Warp

This repo is implementation image warp in c function, there are floating and fixed function for warping image.

I reference the python function in https://github.com/eborboihuc/rotate_3d . And you may refine the cal_trans_matrix input in main.cpp to get the warping matrix.

// the input rotation order, roll, pitch, yaw in degree
cal_trans_matrix(0.0, 0.0,10, image_width, image_height, trans_matrix);

usage

mkdir build
cd build
cmake ..
cmake --build .

and there will be prebuilt/image_warp.exe

run

./image_warp.exe ../lean.png

result

--------------------------
Image warp in float operation:
Time measured: 0.014680 seconds.
--------------------------
Image warp in fixed-point operation:
Time measured: 0.008530 seconds.

rotate yaw 10 degree

test_fixed

About

image warp in c function


Languages

Language:C++ 93.1%Language:C 6.9%