Live data from Hacker News

Content-aware image resize library

github.com

81–84 of 84 posts

Re: Content-aware image resize library

#81
post #74

Earlier quoted context omitted.

Well, there is this paper called "Real-time content-aware image resizing" , maybe that describes the method you are curious about? > In this paper, we present a more efficient algorithm for seam based content-aware image resizing, which searches seams through establishing the matching relation between adjacent rows or columns. We give a linear algorithm to find the optimal matches within a weighted bipartite graph co…

That's the one I implemented -- with a bit of low-level hackery, it could run fast enough to resize at ~5-8 fps on mobile back in 2013. But the result didn't look great on most images if you resized by more than ~15%. The technique works by calculating the "importance" field of the image once, and all the seams upfront. Then you can just number the seams from 1-n and remove the first m seams when you resize the image…

Hmm, then I don't know. Still, they mustn't have stood still since then and come up with new tricks.

I wonder if you could do a kind of quad-tree version where you hone in on the precise seam and minimise recalculations to bubbling new energy up the tree. That might also give a way to weigh global-to-local structure.

Re: Content-aware image resize library

#82

I think they had this in Photoshop circa 1999, or I def. remember seeing a demo of it by Adobe around that time. Anyways, neat! Nice contribution.

It was much more recent than that. Content Aware Fill was introduced in Photoshop CS5 which was released in 2010. Perhaps you were thinking of the Spot Healing Brush of Photoshop which is somewhat similar but much more manual and limited.

I distinctly remember the tech being demo'd in 1999-2000. Huge amounts of "wow's" being echo'd in the auditorium. This was around when PS 4.5/5 was out. I guess it was a feature to be slated for PS 6?

Re: Content-aware image resize library

#83
post #41

Earlier quoted context omitted.

Thanks for that. I used it way back when(mid 2010) to make it look like a a 30' cliff jump was a 60' one. Really impressed my friends with it.

High praise indeed - you know the software is good when you can use it to lie to your friends.

Now that this thread is essentially tially dead, I can let out my little secret - I'm not the bad boy you think I am. I told them thw truth eventually -about 30 seconds after showing them the doctored one. I hope this doesn't change your opinion of me.
Post reply on HN