Using Image Magic to produce effect like Lunapic's Waves.

Discuss digital image processing techniques and algorithms. We encourage its application to ImageMagick but you can discuss any software solutions here.
Post Reply
blinkybagger
Posts: 4
Joined: 2017-07-30T03:37:18-07:00
Authentication code: 1151

Using Image Magic to produce effect like Lunapic's Waves.

Post by blinkybagger » 2017-07-30T04:13:00-07:00

I'm curious to discus & learn what ImageMagick can do with regards to providing effects like https://www.lunapic.com/editor/index.ph ... ves] Waves
(& other Art effects) which I guess are using image templates as modifiers.

Though I've written a bit of shell script & am comfortable working at the terminal, image processing is a new area of research.

The intention for me is to be able to animate film footage, which I can later use for composite video....when the story is slow, or I'm looking to suggest a state of mind to a film audience that can't (reasonably) be done in camera. I'd been looking at automating the push of files to Lunapic for processing, particularly under the create your own template/stencil/effect, but it seems that Image Magick may be doing much of the work for Lunapic....many effects are very similar in appearance. The process of using Lunapic for animation seems very inefficient & may include some unwanted downsizing.

I've had a look at some of Fred's scripts, to produce effects such as hexagons, but would like to be able to (reasonably) take any image as a template for processing a series of images that I can import into a post-production tool to further tweak and stitch back into video.

I've also done some experiments overcranking when filming and using optical flow/motion blur to add extra frames to mimic high speed filming effects such as bullet time. What I've found with the the stock effects in Final Cut Pro is that rather than blending from one frame to the next, it seems to dissolve the image out to nothing, rather than attempting to add frames that morph to the next filmed frame. I'd guess there are vendors selling plugins with additional control surfaces to allow effects to be fine-tuned, but I'm keen to take a look under the hood, if anyone's got any insight to share....the creative misuse of tools is a nice area to consider.

snibgo
Posts: 9403
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Using Image Magic to produce effect like Lunapic's Waves.

Post by snibgo » 2017-07-30T09:45:38-07:00

Any image processing can be applied to the frames of a video. I have a couple of examples on YouTube.
snibgo's IM pages: im.snibgo.com

User avatar
fmw42
Posts: 22105
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

Re: Using Image Magic to produce effect like Lunapic's Waves.

Post by fmw42 » 2017-07-30T11:02:15-07:00


User avatar
fmw42
Posts: 22105
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

Re: Using Image Magic to produce effect like Lunapic's Waves.

Post by fmw42 » 2017-07-30T12:14:54-07:00

See more of this neural net painting references at https://github.com/jcjohnson/neural-sty ... ural-Style

blinkybagger
Posts: 4
Joined: 2017-07-30T03:37:18-07:00
Authentication code: 1151

Re: Using Image Magic to produce effect like Lunapic's Waves.

Post by blinkybagger » 2017-07-30T13:53:32-07:00

@snibgo Keen to understand how you've subtracted the background from the moving components to create an isolated layer of movement, which at times you've then added effects to and added back what I assume to be the previously removed layer. Is this anywhere near accurate on your process?

When I attempt to subtract a still of the background from a still containing the subject, I'm getting an unchanged image. (doh).
eg convert frame-025100.jpg subme.jpg -compose ChangeMask -composite overlay_removed_bg.jpg

@fmw42 Yeah that neural network stuff is fancy, though I guess trying to keep it relatively simple whilst taking the first few steps might help.
Lunapic allows the upload of a custom template to then process against an image (or images). What I found several weeks ago was that an image of multiple small spiderswebs used as the stencil for an image of city blocks from high above produced a decent effect....city blocks made of spiders web, rather than using large components (eg a single web) as template.

snibgo
Posts: 9403
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Using Image Magic to produce effect like Lunapic's Waves.

Post by snibgo » 2017-07-31T00:39:38-07:00

blinkybagger wrote:When I attempt to subtract a still of the background from a still containing the subject, I'm getting an unchanged image.
I use "-compose Difference", eg where "f0004.png" is a frame with people and "fBack.png" has no people:
Image

Image

Code: Select all

convert fBack.png f0004.png -compose Difference -composite -level 3%,4% -colorspace Gray mask.png
Then mask.png is white where there are people, black where there aren't, perhaps with a slight transition. If the mask needs to be more accurate, morphology or connected components can be used.
Image
Then I can put the people back in with transparency or a colour shift or whatever effect I want:

Code: Select all

convert backgrnd.png frame_0043_with_fx.png mask.png -compose Over -composite out_frame_0043.png
snibgo's IM pages: im.snibgo.com

blinkybagger
Posts: 4
Joined: 2017-07-30T03:37:18-07:00
Authentication code: 1151

Re: Using Image Magic to produce effect like Lunapic's Waves.

Post by blinkybagger » 2017-07-31T05:49:49-07:00

@snibgo And by generating a mask for each frame, we can isolate the movement we seek, which then can do as we please with.

I'm a bit distracted and short of sleep at the moment....when I get my head together, I'll have another attempt.

Thanks for the example!

blinkybagger
Posts: 4
Joined: 2017-07-30T03:37:18-07:00
Authentication code: 1151

Re: Using Image Magic to produce effect like Lunapic's Waves.

Post by blinkybagger » 2017-07-31T05:52:52-07:00

@snibgo And by generating a mask for each frame, we can isolate the movement we seek & then move onto the next frame. After, which then can do as we please with the isolated layer....I'd tried this with some Audio some months ago.

I'm a bit distracted and short of sleep at the moment....when I get my head together, I'll have another attempt.

Thanks for the example!

Post Reply