Skip to content

squee72564/CAIR-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CAIR-Python

Content Aware Image Resizing in Python

Made using lessons from "Fundamentals of Dynamic Programming", a linkedin learning lesson made by Avik Das.

Das, Avik (2020). Fundamentals of Dynamic Programming [Video]. LinkedIn. https://www.linkedin.com/learning/fundamentals-of-dynamic-programming

You can use the scripts in the src folder to create the images below.

python energy.py <input_file> <output_file> will give you the heatmap of the image.

python seam.py <input_file> <output_file> will give you the lowest energy seam in the image.

python carve.py <input_file> <num_iterations> <output_file> will remove <num_iterations> lowest vertical seams from the image.

Original picture:

Example of energy heatmap:

Example of lowest energy seam visualized:

End result of 200 lowest energy seams removed:

About

Content Aware Image Resizing in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages