It is currently Fri Mar 22, 2019 3:19 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: Deform Image: MLS
PostPosted: Wed Dec 20, 2017 2:45 am 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1525
-----------------------------------------------------------------------------------

Download Deform Image: MLS from My PureBasic Stuff

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

A standalone OpenCV application (PureBasic Interface to OpenCV not required).
- similar to the Funny Face app available for most smart phones

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

Tricks 'n' Tips
PureBasic Interface to OpenCV
PureBasic Interface to WinDivert
PureBasic Interface to WinRAR
PureBasic Interface to 7-Zip
PureBasic Interface to ImDisk
Windows Services & Other Stuff
Invading Space Aliens
Death Star vs Asteroids
GIF Toolkit
LSB File Embedding
Spider Web Drawing
Deform Image: MLS
Video Snipping Tool
Image Waves: LUT
HTML5 YouTube Player
HTML5 MP4 Player
Barcode Generator
Embed JS into PureBasic
Geolocation: Google Maps
Book & Viewer & Magnify
Video for Windows: VfW
Alternate Console
Network Share Management

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

Anchor Points: Static points placed around the border to pin the frame in-place (YELLOW).
Control Point: Dynamic point used to either pin an area in-place or expanded to Deform Points (BLUE).
Deform Points: Dynamic points used to either deform an area or reset to a Control Point (GREEN connecting RED).

Points are calculated relative to the original image, which is why it can be more accurate to add all the Control Points before executing a deformation.
Alternately, you can switch to the original image to place additional Control Points, but it is not required.

- Control Points and Deform Points can be selected, moved, and deleted
- at least 1 Deform Point is required to execute a deformation
- adjusting the grid size will directly affect the deformation algorithms, modifying the deformation

QUICK DEMO
* List of Shortcut Keys available from Enable Help Tooltips (context menu)
1. Press the [ L ] KEY to load a set of points files.
-- /points/default.src
2. Press the [ R ] KEY to run the deformed animation.

INSTRUCTIONS
1. Press the [ A ] KEY to set Anchor Points.
2. Add 5 Control Points (expanded to Deform Points in steps 3 - 5).
-- left eye, right eye, nose, left-side mouth, right-side mouth
3. Drag the "eyes and nose" Control Points DOWN approximately 1cm.
4. Drag the "left-side mouth" Control Point UP-LEFT approximately 1cm.
5. Drag the "right-side mouth" Control Point UP-RIGHT approximately 1cm.
6. Press the [ G ] KEY to toggle the grid ON / OFF.
-- change the TRACKBAR setting to modify the deformation
7. Press the [ P ] KEY to turn OFF points.
8. Press the [ T ] KEY to switch between the 3 transformations.
-- subtle changes become more drastic with modified settings
9. Press the SPACEBAR to toggle between the original and deformed image.

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Last edited by JHPJHP on Sun Mar 10, 2019 10:52 pm, edited 42 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Deform Image: MLS :: [ an OpenCV application ]
PostPosted: Wed Dec 20, 2017 2:45 am 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1525
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

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Last edited by JHPJHP on Thu Jul 12, 2018 3:39 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Deform Image: MLS :: [ an OpenCV application ]
PostPosted: Thu Dec 21, 2017 5:45 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1525
Fred before and after a full day of working with PureBasic; feel the power :!:

Image Image

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Top
 Profile  
Reply with quote  
 Post subject: Re: Deform Image: MLS :: [ an OpenCV application ]
PostPosted: Thu Dec 21, 2017 7:00 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2005 2:46 pm
Posts: 1769
Location: Pas-de-Calais, France
:lol:


Top
 Profile  
Reply with quote  
 Post subject: Re: Deform Image: MLS :: [ an OpenCV application ]
PostPosted: Sat May 19, 2018 7:24 pm 
Offline
Addict
Addict
User avatar

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

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Top
 Profile  
Reply with quote  
 Post subject: Re: Deform Image: MLS
PostPosted: Sun Mar 10, 2019 10:38 am 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1525
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

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Top
 Profile  
Reply with quote  
 Post subject: Re: Deform Image: MLS
PostPosted: Sun Mar 10, 2019 5:44 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Nov 05, 2006 11:42 pm
Posts: 4411
Location: Lyon - France
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


Top
 Profile  
Reply with quote  
 Post subject: Re: Deform Image: MLS
PostPosted: Mon Mar 11, 2019 8:03 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1525
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

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Top
 Profile  
Reply with quote  
 Post subject: Re: Deform Image: MLS
PostPosted: Mon Mar 11, 2019 8:39 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 07, 2007 3:25 pm
Posts: 3484
Location: Berlin, Germany
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

_________________
Please excuse my flawed English. My native language is PureBasic.
Search
RSBasic's backups


Top
 Profile  
Reply with quote  
 Post subject: Re: Deform Image: MLS
PostPosted: Tue Mar 12, 2019 6:44 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1525
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

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Top
 Profile  
Reply with quote  
 Post subject: Re: Deform Image: MLS
PostPosted: Wed Mar 13, 2019 1:22 am 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 07, 2007 3:25 pm
Posts: 3484
Location: Berlin, Germany
:lol:

_________________
Please excuse my flawed English. My native language is PureBasic.
Search
RSBasic's backups


Top
 Profile  
Reply with quote  
 Post subject: Re: Deform Image: MLS
PostPosted: Wed Mar 13, 2019 5:47 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1525
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.

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Top
 Profile  
Reply with quote  
 Post subject: Re: Deform Image: MLS
PostPosted: Fri Mar 15, 2019 8:45 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1525
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

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Top
 Profile  
Reply with quote  
 Post subject: Re: Deform Image: MLS
PostPosted: Fri Mar 15, 2019 8:57 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 13, 2010 3:45 pm
Posts: 800
OMG, I am curious what we can expect from KCC with this tool :mrgreen:

_________________
sorry for my bad english


Top
 Profile  
Reply with quote  
 Post subject: Re: Deform Image: MLS
PostPosted: Sun Mar 17, 2019 3:29 am 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1525
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 GIF option.

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

Updated:
- some minor improvements and optimizations

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye