Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

CSCI 3110 Assignment 5: Dynamic Programming

2022

This assignment is based on problem 15-8,  “Image compression by seam carving”, in Cormen et al.’s textbook although I disagree with their use of the word compression” here — which is in turn based on

Avidan and Shamir’s 2007 paper in ACM Transactions on  Graphics; see

http://www.faculty.idc.ac.il/arik/SCWeb/imret/index.html .

In the assignment folder on Brightspace, you’ll find two photos, coast .jpg and park .jpg; the Python scripts you don’t need them, but many thanks to Jackie Purdue for getting them working! — to convert those photos to greyscale and then take their gradients, to convert images to arrays, and to convert arrays into images; an almost complete C program that finds the least disruptive seam from a gradient array and highlights it; the modified gradient array for coast .jpg; and the image resulting from that array.

Your job is to complete and submit the C program (or something equivalent); no Mimir this time.  If you want, you can run it on the gradient array for park .jpg, then use the Python script to turn that into an image showing the least disruptive seam. The markers will do this and your mark will be based on how well it works. I’m not making you turn in the image because running the scripts requires installing Python libraries.

 


 

 

 

Figure 1: Above, a picture I took a while back, the same picture in greyscale, the “gradient”version showing where edges are, and the seam (on the right, shown in white) causing the least disruption (to the greyscale image, at least). Below, analogous pictures of a picture from a still used in my art class (where seam carving is implicitly done to focus on the subjects of the landscape), but missing the seam (which you should find).