I would like to skew/rotate an image as if I was viewing it from the side/top.
Given a horizontal and vertical angle and a distance of viewer from the image, I wonder if anyone could advise the correct API functions to call to achieve this.
The image is of a 2D object flat on to the camera, specifically a license plate which I would like to simulate being viewed from an observer/camera at the side of the road.
I found the rotate3D script in Fred's Scripts, which I think does what I require, but I am wanting to achieve this using the C# API rather than Unix command line calls.
Any help would be most appreciated.
Regards, Paul
Skew image as if viewed from the side
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Skew image as if viewed from the side
What version of IM? Do you use MagickCore or MagickWand?
You need a perspective transformation (aka distortion), of course.
You need a perspective transformation (aka distortion), of course.
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Skew image as if viewed from the side
My better script is 3Drotate. But I do not know how to convert that to any of the APIs other than the command line. The basic IM command is +distort perspective.
Re: Skew image as if viewed from the side
You could create an issue here https://github.com/dlemstra/FredsImageMagickScripts.NET and ask me to add this script.
Re: Skew image as if viewed from the side
Hi, I'm using Magick.NET-Q8-AnyCPU Nuget package 7.0.4.701
Thanks dlemstra, I will do that.
Thanks dlemstra, I will do that.