Live data from Hacker News

Content-aware image resizing in JavaScript

trekhleb.dev

51–60 of 68 posts

Re: Content-aware image resizing in JavaScript

#52

One of the good explanation of seam carving, but there are other facts as well. 1. It was first developed by Shai Avidan at MERL. 2. Then introduced in paper by Vidya Setlur, Saeko Takage, Ramesh Raskar, Michael Gleicher and Bruce Gooch in 2005 which won 10-year impact award in 2015. 3. Adobe Systems acquired a non-exclusive license to seam carving technology from MERL and implemented in Photoshop CS4.

Do you meant that this is patented?

Re: Content-aware image resizing in JavaScript

#53
I was very impressed with this algorithm when I first found it and am very happy to see this implementation that seems really polished.

What are the performance implications of this? Would it be possible and or a good idea to implement this in WebASM?

Re: Content-aware image resizing in JavaScript

#54

Earlier quoted context omitted.

Wow, that's incredibly interesting! My first reaction is how actor's faces look surprisingly like traditional caricatures that illustrators do -- e.g. shrinking foreheads and chins which are detail-light but keeping eyes and ears which are detail-heavy. But my second thought is that the extreme jumpiness in frames occurs because each frame is processed separately. But if you considered each seam not to be a "jagged l…

That's quite an insight! Actually the authors of the seam carving paper went on to do just that [0]. From the abstract: "We present video retargeting using an improved seam carving operator. Instead of removing 1D seams from 2D images we remove 2D seam manifolds from 3D space-time volumes. To achieve this we replace the dynamic programming method of seam carving with graph cuts that are suitable for 3D volumes." [0]…

Interesting.

Re: Content-aware image resizing in JavaScript

#57
post #52

One of the good explanation of seam carving, but there are other facts as well. 1. It was first developed by Shai Avidan at MERL. 2. Then introduced in paper by Vidya Setlur, Saeko Takage, Ramesh Raskar, Michael Gleicher and Bruce Gooch in 2005 which won 10-year impact award in 2015. 3. Adobe Systems acquired a non-exclusive license to seam carving technology from MERL and implemented in Photoshop CS4.

Do you meant that this is patented?

As I said licence is non-exclusive so anyone can use it but it was mentioned that adobe used Content Aware Scaling.

Re: Content-aware image resizing in JavaScript

#58
Worked well with the "Pale Blue Dot" by Voyager regardless of which sub-region containing the dot I uploaded.

Then, when uploading the Solar System, it managed to capture each planet and its label without distorting them while only removing the space in-between... except for Saturn's rings which became wobbly :)

Architecture pictures tends to perform horrible because they contain so many straight lines and perspective cues. Faces are too stretched regardless of aspect ratio.

Re: Content-aware image resizing in JavaScript

#60
post #28

There's an improvement to seam carving using something termed "forward energy", see: https://avikdas.com/2019/07/29/improved-seam-carving-with-fo...

I wonder if further research on this has been done.

For example, what if some ML tagging mechanism is used to find the silhouette of interesting objects in the image (people, animals, traffics signs, etc), and then "freezing" them to prevent the energy function from operating on those areas, thus preserving those objects intact, while resizing the rest of the image.

Post reply on HN