The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Object removal using seam carving, still fast

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Eigen Class

Posts: 358
Nickname: eigenclass
Registered: Oct, 2005

Eigenclass is a hardcore Ruby blog.
Object removal using seam carving, still fast Posted: Oct 5, 2007 4:32 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Eigen Class.
Original Post: Object removal using seam carving, still fast
Feed Title: Eigenclass
Feed URL: http://feeds.feedburner.com/eigenclass
Feed Description: Ruby stuff --- trying to stay away from triviality.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Eigen Class
Latest Posts From Eigenclass

Advertisement

The content-aware image resizer I presented a few days ago has gotten somewhat popular and triggered some discussion on reddit largely centered around its speed relative to the LiquidRescale GIMP plugin and whether OCaml can be "as fast as C". Here follows some more information about this particular case, where some OCaml code is outperforming some C code by a 6X margin.

In order to make the comparison meaningful, I implemented the main feature LiquidScale had over my code, energy biasing for object removal and/or preservation.

Take this image*1

policemen_by_jijis.jpg

Apply this energy bias, which indicates that we want the third policeman from the left to be removed

policemen_bias.jpg

Here's what you get:

policemen_carved.jpg

Implementation choices, cache efficiency

Both implementations use essentially the same algorithm, the main difference being the data structure used to represent the image and the energy map.

The governing principle is: if different parts of the structure are accessed at different times, separate them and pack each one as densely as possible.


Read more...

Read: Object removal using seam carving, still fast

Topic: Advice For Ruby Beginners 3 Previous Topic   Next Topic Topic: Exporting Keynote 3 as PDF

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use