Skip to content

Cuda-Chen/barrel-distortion-cpp

Repository files navigation

Barrel Distortion Cpp

A barrel distortion example written with OpenCV C++ API.

Why I Create This Project

OpenCV starts to deprecated its C API from 3.x. What's worse, it removes the part of C API from version 4. Also, I used the project create by HappyMan in my internship in Weeview. For showing the gratitude, I created this project which is compitible with OpenCV 4.x above. What's more, I learn some features about OpenCV Mat structure through this project.

Dependencies

  • CMake
  • OpenCV

How to Compile and Run

If you are using UNIX-like system type these commands:

$ mkdir build
$ cd build
$ cmake ..
$ make
$ cd ..
$ ./barrel_distort_cpp <input image path> <K: coefficient of barrel distortion> [x corrdinate of center of distortion (in pixel)] [y corrdinate of center of distortion (in pixel)]

Reference

The work of barrel distortion is originated from 逍遙文工作室.
You can find his work in the following link (Chinese website):

About

A barrel distortion example written in C++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published