Homework 1 Computer Vision (Term 3 2022-23) The purpose of this homework is to write an image filtering function to apply on input images. Image filtering (or convolution) is a fundamental image processing tool to modify the image with some smoothing or sharpening affect. You will be writing your own function to implement image filtering from scratch. More specifically, you will implement filter( ) function should conform to the following: (1) support grayscale images, (2) support arbitrarily shaped filters where both dimensions are odd (e.g., 3 × 3 filters, 5 × 5 filters), (3) pad the input image with the same pixels as in the outer row and columns, and (4) return a filtered image which is the same resolution as the input image. You should read a color image and then convert it to grayscale. Then define different types of smoothing and sharpening filters such as box, sobel, etc. Before you apply the filter on the image matrix, apply padding operation on the image so that after filtering, the output filtered image resolution remains the same. (Please refer to the end the basic image processing notebook file that you used for first two labs to see how you can pad an image) Then you should use nested loops (two for loops for row and column) for filtering operation by matrix multiplication and addition (using image window and filter). Once filtering is completed, display the filtered image. Please use any image for experiment. Submission You should submit (using Blackboard link) the source file which includes the code (Jupiter notebook) and a report containing different filters and corresponding filtered images. Deadline: May 11th, Thursday, End of the day.

Answers

Answer 1

Here is information on image filtering in spatial and frequency domains.

Image filtering in the spatial domain involves applying a filter mask to an image in the time domain to obtain a filtered image. The filter mask or kernel is a small matrix used to modify the pixel values in the image. Common types of filters include the Box filter, Gaussian filter, and Sobel filter.

To apply image filtering in the spatial domain, one can follow the steps mentioned in the prompt, such as converting the image to grayscale, defining a filter, padding the image, and using nested loops to apply the filter.

Both spatial and frequency domain filtering can be used for various image processing tasks such as noise reduction, edge detection, and image enhancement.

Learn more about frequency domain at:

brainly.com/question/14680642

#SPJ1


Related Questions

In this lab, you use what you have learned about searching an array to find an exact match to complete a partially prewritten C++ program. The program uses an array that contains valid names for 10 cities in Michigan. You ask the user to enter a city name; your program then searches the array for that city name. If it is not found, the program should print a message that informs the user the city name is not found in the list of valid cities in Michigan.

The file provided for this lab includes the input statements and the necessary variable declarations. You need to use a loop to examine all the items in the array and test for a match. You also need to set a flag if there is a match and then test the flag variable to determine if you should print the the Not a city in Michigan. message. Comments in the code tell you where to write your statements. You can use the previous Mail Order program as a guide.

Instructions
Ensure the provided code file named MichiganCities.cpp is open.
Study the prewritten code to make sure you understand it.
Write a loop statement that examines the names of cities stored in the array.
Write code that tests for a match.
Write code that, when appropriate, prints the message Not a city in Michigan..
Execute the program by clicking the Run button at the bottom of the screen. Use the following as input:
Chicago
Brooklyn
Watervliet
Acme

Answers

Based on your instructions, I assume the array containing the valid names for 10 cities in Michigan is named michigan_cities, and the user input for the city name is stored in a string variable named city_name.

Here's the completed program:

#include <iostream>

#include <string>

int main() {

   std::string michigan_cities[10] = {"Ann Arbor", "Detroit", "Flint", "Grand Rapids", "Kalamazoo", "Lansing", "Muskegon", "Saginaw", "Traverse City", "Warren"};

   std::string city_name;

   bool found = false;  // flag variable to indicate if a match is found

   std::cout << "Enter a city name: ";

   std::getline(std::cin, city_name);

   for (int i = 0; i < 10; i++) {

       if (city_name == michigan_cities[i]) {

           found = true;

           break;

       }

   }

   if (found) {

       std::cout << city_name << " is a city in Michigan." << std::endl;

   } else {

       std::cout << city_name << " is not a city in Michigan." << std::endl;

   }

   return 0;

}

In the loop, we compare each element of the michigan_cities array with the user input city_name using the equality operator ==. If a match is found, we set the found flag to true and break out of the loop.

After the loop, we use the flag variable to determine whether the city name was found in the array. If it was found, we print a message saying so. If it was not found, we print a message saying it's not a city in Michigan.

When the program is executed with the given input, the output should be:

Enter a city name: Chicago

Chicago is not a city in Michigan.

Enter a city name: Brooklyn

Brooklyn is not a city in Michigan.

Enter a city name: Watervliet

Watervliet is a city in Michigan.

Enter a city name: Acme

Acme is not a city in Michigan.

Read more about programs here:

https://brainly.com/question/26134656

#SPJ1

Who can prevent unauthorized users from accessing data resources and how?
A
can prevent unauthorized users from accessing data resources with the help of
that filter traffic.

Answers

Answer: TRUE

Explanation:

The main goals of system security are to deny access to legitimate users of technology, to prevent legitimate users from gaining access to technology, and to allow legitimate users to use resources in a proper manner. As a result, the following assertion regarding access control system security is accurate.

Describe the use of one of the following protocols: FTP, HTTP, HTTPS ,SMTP and SFTP. Which one considers as a security protocol?

Answers

SMTP is a communication protocol used for sending and receiving email messages over the internet. While SMTP itself is not primarily a security protocol, it can be used in conjunction with other security protocols such as SSL/TLS encryption to provide secure email communication. When used with SSL/TLS encryption, SMTP is commonly referred to as SMTPS.

Python Yahtzee:


Yahtzee is a dice game that uses five die. There are multiple scoring abilities with the highest being a Yahtzee where all five die are the same. You will simulate rolling five die 777 times while looking for a yahtzee.


Program Specifications :


Create a list that holds the values of your five die.


Populate the list with five random numbers between 1 & 6, the values on a die.


Create a function to see if all five values in the list are the same and IF they are, print the phrase "You rolled ##### and its a Yahtzee!" (note: ##### will be replaced with the values in the list)


Create a loop that completes the process 777 times, simulating you rolling the 5 die 777 times, checking for Yahtzee, and printing the statement above when a Yahtzee is rolled.

Answers

The program to simulate rolling five dice 777 times and checking for a Yahtzee is given below.

How to write the program

import random

def check_yahtzee(dice):

   """Check if all five dice have the same value"""

   return all(dice[i] == dice[0] for i in range(1, 5))

for i in range(777):

   # Roll the dice

   dice = [random.randint(1, 6) for _ in range(5)]

   # Check for Yahtzee

   if check_yahtzee(dice):

       print("You rolled {} and it's a Yahtzee!".format(dice))

In conclusion, this is the program to simulate rolling five dice 777 times and checking for a Yahtzee.

Learn more about program on

https://brainly.com/question/26642771

#SPJ1

There is a limit of 15 slides that PowerPoint will allow you to have for any presentation:
O True
O False

Answers

False, on PowerPoint there is no limit of slides but there is a limit of storage before upgrading

A blank provides power to a hydraulic system by pumping oil from a reservoir into the supply lines

Answers

In a hydraulic system a reservoir baffle prevents the hydraulic oil from moving directly from the system return line to the pump suction line.

It should be understood that a hydraulic system simply means a mechanical function that operates through the force of liquid pressure.

In this case, in a hydraulic system a reservoir baffle prevents the hydraulic oil from moving directly from the system return line to the pump suction line.

Learn more about hydraulic system on:

brainly.com/question/1176062

#SPJ1

Other Questions
Identify the sentence type. I took my dog for a walk. a. simple c. complex b. compound d. compound-complex Please select the best answer from the choices provided A B C D Mark this and return Why is Egon Schieles portrait of Wallys cultural heritage at risk? 9x - 3x = 3x(3) is it true This sont Use a calculator or program to compute the first 10 iterations of Newton's method for the given function and initial approximation, f(x) = 2 sin x + 3x + 3, Xo = 1.5 Complete the table. (Do not round until the final answer. Then found to six decimal places as needed) k k XX 1 6 2 7 3 8 4 9 5 10 Were u successful in what u were set out to achieve? Drama gcse 6. paraphrase lines 119-134, breaking the information into two or more sentences. whatdoes the speaker's "prayer" or hope for his sister reveal about him? Wages have been rising at 6% per year in your area. If this continues, how much will you need to pay your $14 per hour employees in two years? a) $14. 37 b) $15. 00 c) $15. 73 d) $16. 12 Define Marketing and briefly explain how your definition relates to a product/service of your choice. Make sure you link all the components of the definition specifically toyour example. Question 11 (Multiple Choice Worth 5 points)(Laws of Exponents with Integer Exponents MC)Choose the expression that is equivalent to992 In the system characterized by an unstable equilibrium, the outcome of competition depends on what? A rectangle that is 7 feet wide has an area of 56 square feet 2.Milki,a 17-years old boy bought a bike from Abel at the price of 2500 birr on the making of the contract, Milki stated that he is over 18. After a while, Milki's tutor, Melat, brought action forthe invalidation of the contract on the ground of incapacity. Abel argued the contract couldn't be invalidated since at the time the contract was concluded Milki stated he is over 18 years and he concluded the contract with the belief that Milki is over 18. Do you think the contract would be invalidated? consider the time taken to completion time (in months) for the construction of a particular model of homes: 4.1 3.2 2.8 2.6 3.7 3.1 9.4 2.5 3.5 3.8 Find the mean, median mode, first quartile and third quartile. Find the outlier? PLEASE HELP!!!! ITS DUE AT 11:59 TONIGHT!!!!! WILL GIVE 65 POINTS!!!!Now that you have reviewed the labor laws and the responsibilities of human resources, your instructor will group you into teams of 2 3. You will work together as the human resource department at Wright Technologies for the rest of this project. Before creating an affirmative action plan, your team will look for real-life examples of equal employment opportunity issues. On the Internet, find three cases that illustrate equal opportunity issues. Using the chart below, provide a brief summary of the case and how it deals with equal employment policy. Then, describe how the case was resolved, including the suggested action plan. Provide source information for the cases you find. As you will be writing an affirmative action plan, you must include one affirmative action case. Case 1SummaryEqual Employment IssueResolutionSourceCase 2SummaryEqual Employment IssueResolutionSourceCase 3SummaryEqual Employment IssueResolutionSourceUse the cases you researched to write a brief response to the prompts below.1. Do you think the implementation of the affirmative action program was different than any other equal employment issue resolution? Use examples from the cases to support your answer.2. List the communication or interpersonal tools or skills that were missing in these companies that led to these cases. Do you think that this was a single persons fault or the company as a whole?3. Identify the general steps needed to develop an affirmative action plan. What skills are associated with each part?Your Assignment, Part IIIYou will now work together as the Wright Technologies human resource team to develop an affirmative action plan. Suggest a method to implement the recommended changes in your plan to address the demographic gap.Once you have completed your affirmative action plan, write a brief analysis of the plan. Examine the following points: Why is your plan the best for Wright Technologies? How is the chain of responsibility designed? How is the plan communicated to both the outside community and internal workplace? How will you ensure the plan is maintained in the company? What interpersonal skills could you apply with coworkers, supervisors, and subordinates to ensure the plan is maintained? What are the benefits of the plan internally and externally if implemented properly? Assume 4 identical peptide chains assemble into a singlesheet. a) Each peptide has 8 residues, and each residue can take on 3 conformations independentlywhen the peptide is free (before assembly). The assembled peptides have no conformationaldegree of freedom (W=1).b) 25 h-bonds are formed in the assembled structure, with each h-bond contributing = -3.00kJ/mol in stabilizing the assembly.c) 30% of all residues are hydrophobic (HP) and each of the HP residue have 3 water moleculesin contact when the peptide is free. All these water molecules will be release into bulk uponassembly and water configuration increases when they move from the HP residue to bulkwater (= 4). We are ignoring the translational and rotational entropy change duringthe assembly.Please compute the standard state , , and of the assembly process.The " means (assembly free). Use T=300.0 K. Round the S (kJ/mol/K) to 3 decimal places. Hand G (kJ/mol) to 1 decimal place.I think I got the enthalpy but I'm not sure on the entropies A triangular roof is built so that its height is half its base. If the base of the roof is 32 feet long, what is the area of the roof? A pet border keeps a dog-to-cat ratio 5;2. If the boarder has room for 98 animals then how many of them can be dogs? How many ions would form from the dissociation of ammonium dichromate (nh4)2cr2o7? Collect a set of data (from the internet) about any school-appropriate topic. Examples: rainfall data, and testing scores. Or make up your own set of data. The data set must contain at least 20 values. Fill out the questions below regarding your data.1. List your data below in numerical order.2. Explain your data. What does each data point represent?3. What is the mean of your data?4. What is the minimum and maximum within your data? Goal/ Purpose of the Speech of Tecumsehs speech and between the logs speech