Deform Image: MLS

Share your advanced PureBasic knowledge/code with the community.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Deform Image: MLS :: [ an OpenCV application ]

Post by JHPJHP »

A while ago, I released an older version of the program, but removed it after having trouble with my download site.
- a similar example can be found in PureBasic Interface to OpenCV: cv_MLS_deformation.pb

MLS Deformation: Based on script from here.

Demo JavaScript version provided by the original author: Warp Image.

Additional Information: Image Deformation Using Moving Least Squares.

Image

Image
Last edited by JHPJHP on Thu Jul 12, 2018 3:39 am, edited 1 time in total.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Deform Image: MLS :: [ an OpenCV application ]

Post by JHPJHP »

Fred before and after a full day of working with PureBasic; feel the power :!:

Image Image
User avatar
djes
Addict
Addict
Posts: 1806
Joined: Sat Feb 19, 2005 2:46 pm
Location: Pas-de-Calais, France

Re: Deform Image: MLS :: [ an OpenCV application ]

Post by djes »

:lol:
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Deform Image: MLS :: [ an OpenCV application ]

Post by JHPJHP »

Updated:
- binaries from OpenCV v2.4.13.3 to OpenCV v2.4.13.6
- added DPI awareness: SetProcessDpiAwarenessContext
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Deform Image: MLS

Post by JHPJHP »

Updated:
- added Control Window
- some minor improvements

Control Window
Includes all the same options available from the Context Menu.

Quick Demo:
1. Load (default) Points Files
2. Run Deformed Animation

Image
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5342
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Deform Image: MLS

Post by Kwai chang caine »

Works fine here on W10 X64 / V5.70 X86
I have run "Run deformed animation" and it's really fun to see the works do alone :shock:
Thanks for sharing 8)
ImageThe happiness is a road...
Not a destination
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Deform Image: MLS

Post by JHPJHP »

Hi Kwai chang caine,

As always thank you for your comments and feedback.

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

Updated:
- extended shortcut keys to Control Window
- squashed a couple bugs

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

Updated:
- some minor improvements
- added a second example

Image Image
Little John
Addict
Addict
Posts: 4519
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Deform Image: MLS

Post by Little John »

Hi JHPJHP,

if you'll find a way to remove wrinkles, you can sell it to thousands and millions of ladies and get rich fast. :D
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Deform Image: MLS

Post by JHPJHP »

Hi Little John,
Little John wrote:if you'll find a way to remove wrinkles, you can sell it to thousands and millions of ladies and get rich fast.
You may be on to something, but the market for woman is already saturated with products; I was thinking...

Image
Little John
Addict
Addict
Posts: 4519
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Deform Image: MLS

Post by Little John »

:lol:
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Deform Image: MLS

Post by JHPJHP »

Updated:
- added Output Animated GIF

Output Animated GIF
FFmpeg Windows binaries are used to create the animated GIF.

Quick Demo
1. Load (default) Points Files
2. Output Animated GIF

NB*: Download size has increased due to the FFmpeg Windows binaries.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Deform Image: MLS

Post by JHPJHP »

Updated:
- optimized Output Animated GIF
- updated the FFmpeg binaries

Output Animated GIF
Previously 32 images were used to create the GIF animation, this has been reduced to 16 images.

Image
User avatar
Josh
Addict
Addict
Posts: 1183
Joined: Sat Feb 13, 2010 3:45 pm

Re: Deform Image: MLS

Post by Josh »

OMG, I am curious what we can expect from KCC with this tool :mrgreen:
sorry for my bad english
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Deform Image: MLS

Post by JHPJHP »

Hi Josh,
Josh wrote:OMG, I am curious what we can expect from KCC with this tool
I think I had Kwai chang caine in mind when I added the Output GIF option :)

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

Updated:
- minor cosmetic and code improvements
- added ADS - Alternate Data Streams

ADS - Alternate Data Streams
Saves the Control Window and Help Tooltips state; only applies to the executable.

NB*: Reset Image & Settings will not affect the Control Window or Help Tooltips state; only applies to the executable.
Locked