0% found this document useful (0 votes)
94 views1 page

PH 21 Assignment 3: Image Processing

This document provides instructions for an image processing assignment involving edge detection. Students are asked to: 1) import an image into Python, 2) write a script to extract basic image info, 3) implement the Canny edge detector after researching it, 4) add blurring to reduce noise before edge detection, 5) experiment with different stencil widths to detect edges at different scales, and 6) optimize the system and explore other uses of edge detection algorithms.

Uploaded by

Comp 3rd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
94 views1 page

PH 21 Assignment 3: Image Processing

This document provides instructions for an image processing assignment involving edge detection. Students are asked to: 1) import an image into Python, 2) write a script to extract basic image info, 3) implement the Canny edge detector after researching it, 4) add blurring to reduce noise before edge detection, 5) experiment with different stencil widths to detect edges at different scales, and 6) optimize the system and explore other uses of edge detection algorithms.

Uploaded by

Comp 3rd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Ph 21 Assignment 3: Image Processing

This assignment covers some of the basic parts of image processing, a new(ish)
and growing field. If you don’t already have it, obtain the Python Imaging
Library (PIL). It is already installed on all the lab computers. Find the docu-
mentation, skim it to get an idea of what might be possible.
1. Import an image into your local directory, either by copy pasting or by
writing a script that takes an image from the internet. If you really liked
assignment 1, try taking an image result from a search engine.
2. Write a python script that imports the image into python. This can be
done using Image.open . Have it export some basic info about the image
to the command line, like its size!
3. We are going to write an algorithm for edge detection. This is an impor-
tant aspect of machine vision, and a good introduction to image processing
algorithms. First, skim the wikipedia page. The best general algorithm is
the Canny edge detector, which we will implement. You are encouraged
to try various ideas you might have before spoiling the fun by reading how
the pros do it. However, to get an idea of the effect you can achieve, try
the existing Image Filter called FIND_EDGES.
4. First, noise might prove to be a problem. Most edges are more obvious
than individual pixel values, which are subject to jitter. Therefore, con-
volve your image with a blurring filter. Common choices are Gaussian
profile, 55 stencil. How will you treat the edge pixels?
5. Next, edge detection on the slightly blurred image. An edge is a place
where the derivative of the pixel brightness function (red+green+blue,
with or without colour filtering) is quite large. Therefore you want some
way to measure the local derivative, or Del, of the image. This will take
the form of a stencil. The midpoint method is the least accurate way
of doing this. Some algorithms measure horizontally and vertically, then
take the square sum. Others measure in 45 degree increments, and sum
accordingly. The best stencil is the first derivative of a Gaussian. There is
a parameter left over in the width of the function, which has to be chosen,
normally with an idea of the scale of the edges or objects you want to
resolve in mind. To demonstrate this, produce a series of edge detection
images with different values of the width parameter.
6. Optimise the system to the extent of your patience. Try edge detec-
tion on different colours, with different stencils, with or without blurring,
and compare the signal-to-noise ratio obtained. How do you avoid dou-
ble detections? Do you think you could use an edge detector to defeat
CAPTCHAs? What other uses can you imagine for edge detection algo-
rithms?
7. Write a sentence or two on edge detectors and this assignment.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy