Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 3: Line Detection for Bonus Mark A basic line detection algorithm looks at the difference of neighbouring values. You should convert the image to

Part 3: Line Detection for Bonus Mark A basic line detection algorithm looks at the difference of neighbouring values. You should convert the image to greyscale first. Using a threshold, you need to compare a pixels value to the neighbour below and to the right. If the difference in both is larger than a threshold (around 0.3 should work well) you have found an edge and you should set that pixels value to 0, otherwise to 255.

skeleton:

import matplotlib.pyplot import numpy myImage = matplotlib.pyplot.imread('flower.png') height=myImage.shape[0] width=myImage.shape[1] for x in range(0, height-1): for y in range(0,width-1): INSERT YOUR CODE HERE imgplot = matplotlib.pyplot.imshow(myImage) matplotlib.pyplot.show() 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Database Programming

Authors: Chris Fehily

1st Edition

1937842312, 978-1937842314

More Books

Students also viewed these Databases questions

Question

How many multiples of 4 are there between 10 and 250?

Answered: 1 week ago