Page 2 of 2

Re: Deform Image: MLS

Posted: Fri Mar 29, 2019 6:58 pm
by Michael Vogel
Seems that the OpenCV libraries are doing a lot of stuff...

Some days ago I started to write a simple stretch function to be used as an external program for the Faststone Viewer to correct the perspective of photos. It uses the magick library (parameter -distort Perspective) for now but the lib is very large for this tiny stuff...

...can you tell me how to do a simple stretch for calculating a trapezium to a rectangle (or vice versa)?

Image

Re: Deform Image: MLS

Posted: Sun Mar 31, 2019 11:40 pm
by JHPJHP
Hi Michael Vogel,

See my reply to your question in the following OpenCV post: viewtopic.php?p=534612#p534612

-------------------------------------------------

Updated:
- selectable Border Color
- added support for single channel images
- some minor code improvements
- squashed a couple bugs

Border Color
Only accessible from the shortcut [ B ] Key.

NB*: Currently transparency is ignored, but should be included in the next release.

Re: Deform Image: MLS

Posted: Sun May 26, 2019 3:33 am
by JHPJHP
Updated:
- added four channel support for transparent images
- numerous minor improvements

NOTE:
The transparent background of a deformed PNG image can be changed to a solid color when the border color is changed from transparent and outputted to an animated GIF.
- Border Color defaults to transparent for PNG images and black for any other image type

Transparent Images
Using an FFmpeg Complex Filter I was able to output a transparent animated GIF, but using this method I was not able to modify the Disposal Method.
Not finding any documentation on the subject, I joined the FFmpeg Forum. After a few days without my question being answered, I wrote my own patch.

NB*: A version of the patch can be found in my GIF Toolkit download.

-----------------------------------------------------------------------

Updated:
- image sizes configured to use the built-in PureBasic DPI compiler option

Re: Deform Image: MLS

Posted: Fri May 29, 2020 6:08 am
by JHPJHP
Updated:
- some minor improvements to Output Animated GIF