1. Homepage
  2. Programming
  3. COMP9517: Computer Vision 2022 Term 3 - Assignment: Image Background Substraction

COMP9517: Computer Vision 2022 Term 3 - Assignment: Image Background Substraction

Engage in a Conversation
AustraliaUniversity of New South WalesUNSWCOMP9517Computer VisionBackground SubstractionOpenCV

Assignment Specification CourseNana.COM


CourseNana.COM

Software: You are required to use OpenCV 3+ with Python 3+ and submit your code as a Jupyter notebook (see deliverables above and coding requirements below). CourseNana.COM

Objectives: This assignment is to familiarise you with basic image processing methods. It also introduces you to common image processing and analysis tasks using OpenCV. CourseNana.COM

Learning Outcomes: After completing this assignment, you will have learned how to: CourseNana.COM

  1. Open and read image files.
  2. Display and write image files.
  3. Perform mathematical operations on images.
  4. Apply basic image filtering operations.
  5. Perform image adjustment and restoration.

Description: Many computer vision applications use image processing techniques to suppress artifacts and enhance relevant features to prepare images for quantitative analysis. CourseNana.COM

The goal of this assignment is to write image processing code that can open a digital image, perform a sequence of pixel manipulation operations (step-by-step as listed under Tasks below), in order to remove background shading. CourseNana.COM

Below is an image (on the left) from an astronomy project where the goal is to count and measure the stars. However, these measurements are impeded by the haze of the Milkyway in the background. Thus, the shading needs to be removed (as on the right). CourseNana.COM

Tasks: This assignment consists of three tasks, described below. Each task depends on the previous one, so you need to do them in the given order. CourseNana.COM

Task 1 (4 marks): Background Estimation
Open the given image Stars.png. Like the example shown above, it has background shading patterns that need to be removed. The first step to get rid of the shading is to make an accurate estimate of the background of the image. CourseNana.COM

Write an algorithm that performs the following two steps: CourseNana.COM

  1. Create a new image, which we will call image ??, having the same size (number of pixel rows and columns) as the input image, which we call image ??.
  2. Go through the pixels of image ?? one by one, and for each pixel (??, ??) find the minimum gray value in a neighbourhood (see below) centred around that pixel, and then write that minimum value in the corresponding pixel location (??, ??) in ??.


CourseNana.COM

The resulting image ?? is called the min-filtered image of input image ??. CourseNana.COM

The neighbourhood is a square of size ?? × ?? pixels, where ?? is a free parameter of the algorithm and typically has an odd value (3, 5, 7, ...), with the pixel (??, ??) under consideration being the centre pixel. Manually try different values of ?? and mention in your report what is the smallest value of ?? that causes the stars in ?? to visually disappear altogether in image ??. Also explain why this value of ??, and not smaller values, causes the stars to disappear, and what is the effect of taking larger values than this smallest value. CourseNana.COM

The min-filtering causes the gray values in ?? to be smaller than the actual background values in ??, so a correction is needed. Extend your algorithm with two more steps: CourseNana.COM

  1. Create another new image, which we call image ?? here, of the same size as ?? and ??.
  2. Go through the pixels of ?? one by one, and for each pixel (??, ??) find the maximum gray value in a neighbourhood of the same size (?? × ?? pixels) centred around that pixel, and then write that maximum gray value to (??, ??) in ??.

The resulting image ?? is called the max-filtered image of the image ??. CourseNana.COM

Task 2 (1 mark): Background Subtraction CourseNana.COM

Now that your algorithm can estimate the background ?? of an image ??, removing the shading artifacts from ?? can be done simply by subtracting ?? from ?? pixel by pixel, resulting in the output image ??. Extend your algorithm to perform this subtraction. CourseNana.COM

Task 3 (5 marks): Algorithm Extensions
Open the given image Nuclei.png. It is a microscopy image showing many cell nuclei (the dark blobs). Like Stars.png, the image has a background shading pattern (also dark) that needs to be removed. There are three main differences between the two images: CourseNana.COM

  • The sizes of the images are different.
  • The sizes of the objects (stars versus cell nuclei) in the images are different.
  • The objects in Nuclei.png are dark and the background is bright (except for the dark shading pattern), whereas in Stars.png the objects are bright and the background is dark (except for the bright shading patterns).

the order of the min-filtering and max-filtering operations. Specifically:
* If the user sets ?? = 0, the algorithm should first perform min-filtering (image ?? to ??), then max-filtering (image ?? to ??), and then pixelwise subtraction (?? = ????).
* If the user sets ?? = 1, the algorithm should first perform max-filtering (image ?? to ??), then min-filtering (image ?? to ??), and then pixelwise subtraction (?? = ???? + 255). CourseNana.COM

In your report, explain why you must use the ?? = 0 (and not ?? = 1) variant of your algorithm to make it work for Stars.png, and conversely why you must use the ?? = 1 (and not ?? = 0) variant to make it work for Nuclei.png. Also explain why the ?? = 1 variant requires adding 255 (for 8-bit images) to each subtracted pixel value in image ?? (see above). CourseNana.COM

Furthermore, mention what is a good value of ?? for Nuclei.png and why. And include images ?? and ?? computed from Nuclei.png in your report. CourseNana.COM

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp
Australia代写,University of New South Wales代写,UNSW代写,COMP9517代写,Computer Vision代写,Background Substraction代写,OpenCV代写,Australia代编,University of New South Wales代编,UNSW代编,COMP9517代编,Computer Vision代编,Background Substraction代编,OpenCV代编,Australia代考,University of New South Wales代考,UNSW代考,COMP9517代考,Computer Vision代考,Background Substraction代考,OpenCV代考,Australiahelp,University of New South Waleshelp,UNSWhelp,COMP9517help,Computer Visionhelp,Background Substractionhelp,OpenCVhelp,Australia作业代写,University of New South Wales作业代写,UNSW作业代写,COMP9517作业代写,Computer Vision作业代写,Background Substraction作业代写,OpenCV作业代写,Australia编程代写,University of New South Wales编程代写,UNSW编程代写,COMP9517编程代写,Computer Vision编程代写,Background Substraction编程代写,OpenCV编程代写,Australiaprogramming help,University of New South Walesprogramming help,UNSWprogramming help,COMP9517programming help,Computer Visionprogramming help,Background Substractionprogramming help,OpenCVprogramming help,Australiaassignment help,University of New South Walesassignment help,UNSWassignment help,COMP9517assignment help,Computer Visionassignment help,Background Substractionassignment help,OpenCVassignment help,Australiasolution,University of New South Walessolution,UNSWsolution,COMP9517solution,Computer Visionsolution,Background Substractionsolution,OpenCVsolution,