Seam Carving
Seam Carving is a content-aware image resizing algorithm. It is a way to change the aspect ratio of a picture without scaling or cropping.
Suppose we have the following image that we want to resize into a square shape.
Should it be scaled?
Should it be cropped?
What about Seam Carving?
Seam Carving works by removing the least important seam of pixels from the photo. What we define as "important" is what makes the algorithm work so well. We can say important information happens at edges, and create an algorithm to measure the "edginess" of a photo.
Now we decide which seams we can remove. We want the columns with the most black.
We are saying these "seams" are least important, they can be removed.
Rip em out and you get this
Pretty cool!
Did you know Adobe Photoshop has this feature. It's called "Content Aware Scaling"
And now I leave you with a video that shows seam carving's capabilities when used for video.
z?
wee?!
jio
rrr
jor
g
f
a
ja
gen
fe
a
y
b
b
7
1
2
3
3
22
ff
bbbaa
ffe
four
z!
jj
oi
ii
!!
a
b
c
d
e
f
g
h
d
ea
be
e
de
do
dea
da
doo
daoo
ab
doa
baa
eo
dameo
elio
eleo
ereo
fre
omd
dfr
c
b
d
c
e
d
f
b
d
e
tru
hth
lof
nok
c
Thanks for entering this week's #nowplaying!
Thanks for entering this week's #nowplaying!
Thanks for entering this week's #nowplaying!
Thanks for entering this week's #nowplaying!
woah, this is crazy cool. I'll test it out with some photos in photoshop later.
Really crazy stuff, I wrote this algorithm last year, I could see if i still have it somewhere in my computer
Thanks for entering this week's #nowplaying!
Thanks for entering this week's #nowplaying!
Thanks for entering this week's #nowplaying!