Fred's ImageMagick Script Unperspective NuGet Package

Attempts to automatically remove pespective distortion from an image without the need to manually pick control points.

This technique is limited and relies upon the ability to isolate the outline or boundary of the distorted quadrilateral in the input image from its surrounding background. This technique will not look for internal edges or other details to assess the distortion. This technique also works to correct affine distortions such as rotation and/or skew. The basic principal is to isolate the quadrilateral of the distorted region from its background to form a binary mask.

The mask is converted from cartesian coordinates to polar coordinates and averaged down to one row. This row is then processed either to find the highest peaks or the highest second derivative peaks. The four peaks identified are then converted back to cartesian coordinates and used with the ouput dimensions determined from the user specified (or computed) aspect ratio and user specified dimension.




Got any Fred's ImageMagick Script Unperspective Question?





Info

Version: 2.2020.822.858
Author(s): Dirk Lemstra, Fred Weinhaus
Last Update: Saturday, August 22, 2020
.NET Fiddle: Create the first Fiddle
Project Url: https://github.com/dlemstra/FredsImageMagickScripts.NET
NuGet Url: https://www.nuget.org/packages/FredsImageMagickScripts.Unperspective


Install
Install-Package FredsImageMagickScripts.Unperspective
dotnet add package FredsImageMagickScripts.Unperspective
paket add FredsImageMagickScripts.Unperspective
FredsImageMagickScripts.Unperspective Download (Unzip the "nupkg" after downloading)



Tags



STATS

must-have-score

.3

avg-downloads-per-day

1

days-since-last-release

1552