Design pseudocode for the image comparison algorithm

Assignment Help Basic Computer Science
Reference no: EM13935266

Design an algorithm (using pseudocode) that takes in as an input, two 2-D int arrays that are assumed to be 2 black-and-white images: initialImage x, whose dimensions are IxJ, and finalImage y, whose dimensions are IxK. The algorithm will compare x to the y, row-by-row, as defined below. Your algorithm will employ a dynamic programming scheme to compare X to Y identifying the minimal difference between each row.

Because you are working with black-and-white images only, you should assume that each image is a 2-D int array consisting of 2 possible values: 0 or 1, where 0 represents black and 1 represents white. Thus, this 2-D grid of 0 and 1 values comprise a 2-D black-and-white image. Each row of this image is then simply a 1-D int array filled with either 0s or 1s. Therefore, you must define how you will measure the difference between the strings of 0s and 1s in each row.

Remember that you will do the comparison one row in the images at a time.
First, compare X1,* to Y1,*. (Here X1,* is the first row in image X and Y1,* is the first row in image Y ). Next, compare X2 to Y2... Each one of these comparisons will require the construction of a D (distance) matrix.

In the following example, the first row of X is X1,*, and the first row of Y is Y1,* = 00110.
https://class.coloradotech.edu/CbFileShareCommon/ctu/CS627/Assignment_Assets/158328_a.jpg

Use the following recurrence relation to develop your pseudocode:
https://class.coloradotech.edu/CbFileShareCommon/ctu/CS627/Assignment_Assets/158328_b.jpg

After the D matrix is completed, the minimum number in the bottom row is the minimal mismatch for this row. You will assign this value to the variable minVali. This number tells how different row X1,* is from row Y1,* . You will then repeat this comparison for all rows i and aggregate the difference when complete into variable totalDifference = Σi minVali.

As a result, the algorithm will compare the total difference to a threshold value called thresh. If total value is above the threshold, the images are declared different, otherwise they are declared to be similar images. You can assume that the thresh variable is supplied as an input to your algorithm.

Part 2a:

Design pseudocode for the image comparison algorithm discussed above, given input Images X, Y, and thresh. The output is a declaration: The images are similar, or the images are different.

Part 2b:

Discuss the optimality of the dynamic programming solution. Discuss the time complexity of this algorithm in terms of the size of the inputs X and Y.

Reference no: EM13935266

Questions Cloud

Ict technology for task2b according to the requirements : Use new ICT technology for task2B according to the requirements mentioned above. Already I have uploaded Assignment 1 for your reference because the current assignment deals with continuation of assignment 1 So please read the requirement carefull..
Which type of application presents the biggest challenge : When constructing cDNA libraries it is very important to copy the whole of an mRNA into cDNA. One way to try and ensure that the 5' end of a mRNA is represented in a cDNA copy is to use "cap-trapper" technology.
Employees in todays globalised business world : Its an essay based on the case study given in the assignment. Discuss the key factors in play in the competition for skilled and values employees in today's globalised business world.
Identify three types of manufacturing companies : Identify three types of manufacturing companies for which process costing would be an appropriate product costing system.
Design pseudocode for the image comparison algorithm : Design an algorithm (using pseudocode) that takes in as an input, two 2-D int arrays that are assumed to be 2 black-and-white images: initialImage x, whose dimensions are IxJ, and finalImage y, whose dimensions are IxK. The algorithm will compare ..
Explain the major differences between job order : Explain the major differences between job order and process costing systems.
Determine the required torque : Determine the required torque M as a function of (). The mass of eight cubes is 0.25 kg, and the center- of-mass distance r = 0.55r. Neglect friction, and assume that the resultant of the distributed normal force acting on the cube passes through ..
Recurrence relation to develop your pseudocode : Design an algorithm (using pseudocode) that takes in as an input, two 2-D int arrays that are assumed to be 2 black-and-white images: initialImage x, whose dimensions are IxJ, and finalImage y, whose dimensions are IxK. The algorithm will compare ..
Describes two functions of dna : Explain how knowledge of DNA and technology is being used today to do things that we could not have done 50 years ago. Address how control of gene expression affects biotechnology.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Explain the features of microsoft word 2013

Explain the features of Microsoft Word 2013 as it applies to office productivity. Explain the features of Microsoft Word 2013 as it applies to collaboration. Explain the features of Microsoft Word 2013 as it applies to security. The paper structure n..

  Does company culture impact security

Does company culture impact security? If so, in what way? How does this fit into computer ethics?

  Explain the difference between choosing four disjoint

Explain the difference between choosing four disjoint three-element sets from a twelve-element set and labelling a twelve-element set with three labels of type 1, three labels of type two, three labels of type 3, and three labels of type 4. How many ..

  Create and conducting an online questionnaire

Create a free SurveyMonkey or QuestionPro online questionnaire account. If you did not create one, revisit the Week 5 e-Activity to create an account before attempting this assignment.

  Websites be required to adhere to section standards

what is the purpose then? Do you think that all websites should be required to adhere to Section 508 standards? Why or why not?

  Devise an algorithm for multiplying two large numbers

Suppose you have available a pocket calculator that can multiply a four-figure number by a four-figure number and get the correct eight-figure answer

  Select a real or hypothetical business engaged in e-busines

Step 1: Establish a target audience and scope for your presentation. Select a real or hypothetical business engaged in e-business and outline its central offerings and/or services. Next, outline the categories of information that may require c..

  Change arp entry in computer for mac address

Print your ARP cache table. Find a server on your local network. Change its ARP entry in your computer to point to your computer's MAC address. Print new ARP cache table. Now use the service and see what happens.

  Review the content page for this extensive manual

Visit the U.S Postal Service web site at www.usps.com/cpim.ftp/hand/as805/. Review the content page for this extensive manual. Compare this program to the National Institute for Standards and Technology documements (NIST).Which areas are similiar to ..

  United nations high commissioner for refugees

According to the UNHCR (United Nations High Commissioner for Refugees), Turkey is the leading country hosting 2.5 millions of Syrian refugees. The European Union's executive arm confirmed in November 2015 that they will set up a 3 billion euro aid..

  What is a client-server network

What is a client-server network?

  Determine the maximum number

Determine the maximum number Determine the range (maximum - minimum) Displays a histogram that shows the numbers in each five-unit range.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd