Homework 6 Solution

$35.00 $29.00

Instructions: There are three problems in this assignment. For each problem, you may assume that both the function’s input and output are a n m 3 Numpy array. Name your script hw6.py and submit it on CCLE. Add comments to each function. Problem 1: Write a function heart(im) that takes an image im as input,…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Description

5/5 – (2 votes)

Instructions:

There are three problems in this assignment. For each problem, you may assume that both the function’s input and output are a n m 3 Numpy array. Name your script hw6.py and submit it on CCLE. Add comments to each function.

Problem 1:

Write a function heart(im) that takes an image im as input, and outputs a heart-shaped cut-out of it on a pink background. The shape of the heart will need to depend on the dimensions of the image, so that you do not cut too much of the image.

Figure 1: (Left) Original gure; (Right) Figure with a heart-shaped mask.

Problem 2:

Write a function blurring(im, method) that takes a gray-scale picture, and o ers two options for noise blurring: uniform or Gaussian.

Figure 2: (Left) Grey-scale gure with Gaussian noise; (Center) After Gaussian blurring; (Right) After uniform blurring

Problem 3:

Write a function detect edge(im, method) that takes a gray-scale image and detects edges, with the option of horizontal, vertical or both.

Figure 3: (From left) original gure; edge detection in vertical, horizontal, or both directions.

Homework 6 Solution
$35.00 $29.00