diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a8cdd23 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 dev6699 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..9b024b3 --- /dev/null +++ b/README.md @@ -0,0 +1,45 @@ +# FisheyeDewarp 🐟👁️ + +[![GoDoc](https://pkg.go.dev/badge/github.com/dev6699/fisheyedewarp)](https://pkg.go.dev/github.com/dev6699/fisheyedewarp) +[![Go Report Card](https://goreportcard.com/badge/github.com/dev6699/fisheyedewarp)](https://goreportcard.com/report/github.com/dev6699/fisheyedewarp) +[![License](https://img.shields.io/github/license/dev6699/fisheyedewarp)](LICENSE) + +FisheyeDewarp dewarps fisheye distortion in images. + +## Installation + +Use `go get` to install this package: + +```bash +go get github.com/dev6699/fisheyedewarp +``` + +### Sample usage +Check [cmd/fisheyedewarp/main.go](cmd/fisheyedewarp/main.go) for more details. + +- For help +```bash +./fisheyedewarp --help +``` +```bash +Usage of ./fisheyedewarp: + -fov float + Input fisheye field of view in degrees. Must be between 0 and 180. (default 180) + -img string + Path to the input fisheye image file. (default "images/fisheye.jpg") + -pfov float + Output perspective field of view in degrees. Must be between 0 and 180. (default 120) + -ptype string + Type of projection to apply. Options: 'Linear', 'EqualArea', 'Orthographic', 'Stereographic' (default "Linear") + +``` + +### Examples + +| ![Image 1](/images/fisheye.jpg) | ![Image 2](/images/fisheye_Linear_180_120.jpg) | +|:-------------------------------:|:-------------------------------:| +| **Original Fisheye** | **Linear projection, 120 PFOV** | + +| ![Image 3](/images/fisheye_Linear_180_130.jpg) | ![Image 4](/images/fisheye_Linear_180_140.jpg) | +|:-------------------------------:|:-------------------------------:| +| **Linear projection, 130 PFOV** | **Linear projection, 140 PFOV** | diff --git a/images/fisheye_Linear_180_120.jpg b/images/fisheye_Linear_180_120.jpg new file mode 100644 index 0000000..dc06e40 Binary files /dev/null and b/images/fisheye_Linear_180_120.jpg differ diff --git a/images/fisheye_Linear_180_130.jpg b/images/fisheye_Linear_180_130.jpg new file mode 100644 index 0000000..b537d0f Binary files /dev/null and b/images/fisheye_Linear_180_130.jpg differ diff --git a/images/fisheye_Linear_180_140.jpg b/images/fisheye_Linear_180_140.jpg new file mode 100644 index 0000000..6da99a0 Binary files /dev/null and b/images/fisheye_Linear_180_140.jpg differ