Search for question
Question

Welcome to Computer Vision! In this homework we will cover image access manipulation, image filtering, and edge detection topics. Few instructions to keep in mind before you start: 1. 2. 3. 4. 5. 6. 7. The assignments are slightly challenging yet they will be graded leniently. Hence, please attempt them on your own. The use of Al for all assignment is allowed per the course polices. However, make sure that you understand what is going on as Al is prohibited for other assessements. There are multiple vision libraries available in python (cv2, Pillow, PIL, etc..). The use of cv2 is recommended but there are no restrictions on that. Make sure to check the color format followed in the library you use (Ex. cv2 --> BGR). Some questions are formulated in a way that eliminates the possibilty of replicated answers. Cheating will not be tolerated. Please submit your answer as a notebook (.ipynb) along with any additional files in a zip file. Failure to do so will be penalized. Each assignment is worth 5% of your final grade but will be graded out of 100 to leave larger space for partial grades. For inquires about the homework please send an email to asajun@aus.edu Finally, have fun... ( /°-°)/ Q.1. Beyond What You See. (/35) All related files to this question are found under Q1 folder. 1.1. In the August of 1999, Japan decided to re-design its flag. The circle color was changed from #B0313F color to #BC002D color. The Japanese flag before these "significant" changes is provided to you in Q1 Folder. Your task is to apply the neccessary changes and show the flag before and after it was redesigned. [/10] #Solution 1.2. After hearing that Aokigahara Forest in Japan is a weird place, your curiosity pushes you into googling how it looks like. However, the image that you find (forest.jpg) seems too fascinating to be true. Find the issue in this image and fix it. [/10] #Solution 1.3. Vision data can extend beyond the visible RGB spectrum. While using google earth, you notice an area below the deadsea between Jordan and Palestine (Map_RGB.tiff) in which you are not sure whether it is a waterbody, a cropland, or a mountain. Our good friends at Sentinel satellites provide you with a Near-Infrared (NIR) image of the same map (Map_NIR.tiff) to help you identify the nature of that area. Use the provided images to draw a conclusion about this area (cmap: "Paired") and discuss your results. [/15] #Solution ANS: Q.2. Can you help out? (/40) All related files to this question is available in Q.2. Folder. 2.1. This question has three short answer sub-parts (/10) 2.1.1 Explain breifly the difference between cross-correlation and convolution. (/2) ANS: 2.2.2 What happens when a kernel is applied to an image without padding? (/2) ANS: 2.2.2 Apply two padding techinques on an image of your choice. show a clear padded images along with the original image (/6) 2.2. The Shawshank Redemption is my favorite movie. However, my TV is too old now and I cannot see things clearly. Can you fix my TV? I left a frame of the movie for you to have a look (shawshank.png). (/10) #Solution 2.3. This TV channel made a horrible mistake (TV.jpg). Could you help them out and fix it? Use box and gaussian filters and compare. (/10) #Solution ANS: 2.4. MNIST is a hand-written digits dataset. Sharpen the image obtained above by applying an appropriate kernel and show your results. The variable name of your image is called (img). [ /10] # @title Run the following cell import tensorflow as tf import matplotlib.pyplot as plt mnist = tf.keras.datasets.mnist (train_images, _), (_, _) = mnist.load_data() id = input("Please Enter your 5/6 digits AUS ID: ") if len(id) < 5 or id.isdigit() else: img == False: print("Please enter a valid AUS ID!") = train_images[(int(id) % len (train_images) plt.imshow(img, cmap='gray') # Solution 1)] Q.3. On the edge (/25) 3.1. Sign Language is a famous computer vision task. However, it needs a camera with a very high resolution to read images properly. Unfortunatly, with the background noise this task becomes very hard. Recent studies showed that the use of edge detectors can help solve this issue. Examine the sobel x and y derivatives and compare them to canny edge detector on the (hand.jpg) image provided. The background has been removed for simplicity. (/15) #Solution 3.2. Explain the working steps of a Canny Edge detector. Indicate the purpose of each step when applicable (/10) ANS: