# Register now to access 7 million high quality study materials (What's Course Hero?) Course Hero is the premier provider of high quality online educational resources. With millions of study documents, online tutors, digital flashcards and free courseware, Course Hero is helping students learn more efficiently and effectively. Whether you're interested in exploring new subjects or mastering key topics for your next exam, Course Hero has the tools you need to achieve your goals.

4 Pages

### assignment 4

Course: ASSIGNMENT 1606, Fall 2009
School: ECCD
Rating:

Word Count: 700

#### Document Preview

Problem ECOR1606 Solving and Computers ECOR1606 Assignment #4 Images A grayscale image can be represented by using integer numbers from 0 to 255 (i.e. an 8-bit number) to indicate the grayness of a pixel. This is illustrated in Figure 1. 0 64 120 176 232 8 72 128 184 240 16 80 136 192 248 32 88 144 200 255 40 96 152 208 255 48 104 160 216 255 56 112 168 224 255 Figure 1 The example file imagein.txt is...

Register Now

#### Unformatted Document Excerpt

Coursehero >> California >> ECCD >> ASSIGNMENT 1606

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
Problem ECOR1606 Solving and Computers ECOR1606 Assignment #4 Images A grayscale image can be represented by using integer numbers from 0 to 255 (i.e. an 8-bit number) to indicate the grayness of a pixel. This is illustrated in Figure 1. 0 64 120 176 232 8 72 128 184 240 16 80 136 192 248 32 88 144 200 255 40 96 152 208 255 48 104 160 216 255 56 112 168 224 255 Figure 1 The example file imagein.txt is 320240 image shown in Figure 2. The file contains 240 rows and 320 columns of integer numbers from 0 to 255 which make up this image. Figure 2 Image Preparation and Noise A Matlab file prepimage.m is provided for you to convert any image file into a appropriate text file for this assignment (a text files of numbers with 240 rows and 320 columns). The Matlab file will also add noise into the image. To run this start the program Matlab. Change the Current Directory to the directory the image file and prepimage.m is in. Run prepimage('lena_512.png') at the Matlab command prompt (note you can use your own image file in replace of the file provided for you). This will create the file imagein.txt. To display the image use the dispimage('imagein.txt') at the Matlab command prompt (make sure dispimage.m is in the same directory as well). Median filter To remove this type of noise that we introduced we can use a median filter. In this case we will be using a 33 median filter. To explain the median filter, let's look at an example. Summer 2008 ECOR1606 Problem Solving and Computers Figure 3 shows a segment of the input picture. Let's examine the pixel at row 1 and column 1 (highlighted in dark gray). As the median filter we are considering is 33, we will be examining the pixels that surround this pixel (highlighted in gray). These 9 pixels are examined to determine the median value (in this example, the median value is 23) which is used as the pixel value at row 1 and column 1 of the output image. For simplicity, assume you will not apply the median filter to pixels on the edges of the image (e.g. row 0, column 0, etc.). For these pixels, the output image will simply have the values as the input image. 20 120 42 32 50 203 12 12 23 12 21 12 32 120 12 54 25 210 31 78 45 201 31 60 32 201 45 21 Figure 3 Program Write a program that will process the input image in imagein.txt using a median filter, creating an output image in imageout.txt. This output image should be viewable in Matlab using dispimage.m. Program skeleton A skeleton of the program is provided for you below. Note that you may add additional functions as you see fit, have more #include statements, more constants, but etc., the main function must not be modified! #include <iostream.h> #include <fstream.h> const int NROW = 240; const int NCOL = 320; const int NFILENAME = 256; bool image_read(char filename[NFILENAME], int image[NROW][NCOL]); void image_write(char filename[NFILENAME], int image[NROW][NCOL]); void median_filt(int imagein[NROW][NCOL], int imageout[NROW][NCOL]); void main(void) { int imagein[NROW][NCOL]; int imageout[NROW][NCOL]; cout << "Reading file" << endl; if (image_read("imagein.txt",imagein) == false) { cout << "Error reading file" << endl; } else { cout << "Filtering image" << endl; median_filt(imagein,imageout); Summer 2008 ECOR1606 Problem Solving and Computers cout << "Writing file" << endl; image_write("imageout.txt",imageout); } } Function headers The following headers should provide sufficient information for you to implement each function. As well seeing how the main program is made, should also help decipher what is needed. /*------------------------------------------------------------------------bool image_read(char filename[NFILENAME], int image[NROW][NCOL]) Author Student ID Adrian Chan 123456 This is where the description of a_function goes. Inputs filename: filename of the file to read from Outputs image: multidimensional array containing the image bool: returns true if the file read was successful false otherwise Modifications 08/05/28 AC First created. ---------------------------------------------------...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

ECCD - ASSIGNMENT - 1606
ECOR1606 Problem Solving and ComputersECOR1606 Assignment #3Myoelectric control of upper arm prostheses use electrical signals from residual muscles to control motorized power prostheses (see http:/www.sce.carleton.ca/faculty/chan/4thyear/mes_pros
ECCD - ASSIGNMENT - 1606
ECOR1606 Problem Solving and ComputersECOR1606 Assignment #2You want to run an experiment on coin flipping and are writing a program to assist you in the analysis. In the program, the user will enter the character 'H' (or 'h') to indicate a coin f
ECCD - ASSIGNMENT - 1606
ECOR1606 Problem Solving and ComputersECOR1606 Assignment #1A line in a Cartesian co-ordinate system can be expressed as: y = Ax + B where A and B are values that define the line. A parabola in a Cartesian co-ordinate system can be expressed as: y
Oregon State - PHL - 201
Rhesus MacaqueOregon Science Health University Portland OR Cage 478EDUCATION Ph.D Candidate, Primatology PRACTICA Communications: Social Skills:Object throwing GroomingRESEARCH Researcher:Human behavior studies. Worked as an observer/partici
Wright State - PHL - 223
Spring 06PHILOSOPHY 223: SYMBOLIC LOGIC I SYLLABUSMeeting Time: Meeting Place: Instructor: Office: MWF 12:15-1:20 132 Oelman Dr. Irvine 383 M illett (Get off the elevator on the third floor. Take a left. Walk thirty paces. If there is an unmarked,
Wright State - PHL - 399
Winter 2006 PHL399-INNOVATION: A PHILOSOPHICAL EXAMINATION SYLLABUS Meeting Time: Meeting Place: Instructor: Office: MWF 1:30-2:35 148 Russ Dr. Irvine 383 Millett (Get off the elevator on the third floor. Take a left. Go all the way to the end of the
UC Davis - ATT - 0707
UC Davis - ATT - 0906
http:/13221.org - Order the cheapest medications now!
UC Davis - ATT - 0707
Vanderbilt - BSCI - 100
Biological Sciences 100 (BSCI 100) Biology Today Fall 2004 Course Syllabus Instructor: Mark A. Woelfle, PhD Senior Lecturer, Department of Biological Sciences 2121C Stevenson Center 343-4508 mark.woelfle@vanderbilt.edu M, 4 5 PM W, noon 1 PM Or by
Vanderbilt - L - 054
CANCELLATIVE RESIDUATED LATTICESP. BAHLS, J. COLE, N. GALATOS, P. JIPSEN, C. TSINAKIS Abstract. Cancellative residuated lattices are a natural generalization of lattice-ordered groups ( -groups). Although cancellative monoids are defined by quasi-eq
Fayetteville State University - MET - 5510
MET 5510C (Due: 11:15 a.m., 9/3/08)Fall 2008Basic ExercisesFirst, send me an email at pcunningham@fsu.edu with subject line &quot;MET5510 Your Name&quot; so I can put you on the class mailing list. This set of exercises is intended to allow you to (re)f
BU - CS - 105
.separator &quot;\t&quot;.import &quot;student.in&quot; student.import &quot;course.in&quot; course.import &quot;room.in&quot; room.import &quot;department.in&quot; department.import &quot;enrolled.in&quot; enrolled.import &quot;majorsin.in&quot; majorsin
BU - CS - 105
age range Younger than 30 Between 30-40 Between 40-50 Between 50-60 Between 60 - 70 Between 70 - 80 80+# actors 81 158 206 199 183 168 307
Vanderbilt - A - 133
Vanderbilt - CHEM - 220
Chapter 26: Lipids. Hydrophobic (non-polar, soluble in organic solvent), typically of low molecular compound or organic origin fatty acids and waxes essential oils many vitamins hormones (non-peptide) components of cell membranes (non-peptide) S
Carnegie Mellon - BIO - 03510
03-510/03-710 Final Exam 2006Name: _YOU ARE NOT PERMITTED TO HAVE ANY EMAIL OR MESSAGING PROGRAM OPEN AT ANY TIME DURING THE EXAM. ANY VIOLATION OF THIS PROHIBITION WILL RESULT IN A FAILING GRADE FOR THE COURSE.1. You are given the following re
Michigan - SW - 400
Reach Out Raise Hope Change SocietyvWhy is there poverty? vWhy are there so few services for children and families? vWhy are the mentally ill locked up in prisons? vHow do other countries confront their social problems? vWhat can social workers do?
Carnegie Mellon - MATH - 21120
21-120 Dierential and Integral Calculus, Summer II, 2004 ASSIGNMENT 8Section 3.4Due 7/13/04, Tuesday10. 16. 22. 37. 40.Section 3.517. 23. 27. 40. 42.
Carnegie Mellon - MATH - 21120
21-120 Dierential and Integral Calculus, Summer II, 2004 ASSIGNMENT 2Section 1.624. Due 7/1/04, ThursdaySection 2.212. 26. 27.Section 2.312. 13. 18. 23. 29. 48.
Carnegie Mellon - MATH - 21120
21-120 Dierential and Integral Calculus, Summer II, 2004 ASSIGNMENT 10Section 3.840. 43. Due 7/16/04, FridaySection 3.108. 20. 23.
Mt. Holyoke - GERM - 214
NMT - INFOHOST - 283
Lab 8. One-sample and two-sample T tests and C.I.'swww.nmt.edu/~olegm/283/Lab8.pdf Note: the menus and other things you will read or type on the computer are in italics. Attach the printouts whenever needed.The goal of this Lab is to show the diff
Union College - CH - 440
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|25 Mar 2009 22:10:38 -0000 vti_extenderversion:SR|6.0.2.8161 vti_author:SR|EVA\rapoff vti_modifiedby:SR|EVA\rapoff vti_timecreated:TR|09 Feb 2009 21:32:32 -0000 vti_title:SR|Slide 1 vti_backlinkinfo:VX|
Wilfrid Laurier - GEOG - 439
Geog 439, Winter 2001Assignment Two (60 Marks) Due Date: Tuesday, January 30 Objective: This assignment has three main goals. The first is to refresh your memory of common statistical terms that you will use and hear in this course. The second is to
Wilfrid Laurier - GEOG - 439
GEOG 439, Analytical Methods in Geography IIWINTER 2001Timetable: Lectures Labs Tues, Thurs Mondays 08:30- 09:50 14:00- 16:00 ES 430 SS 020 (or home)There will be weekly lab exercises or homework assignments. The Tri-Faculties Lab (SS 020) is boo
Northern Virginia - SPA - 103
Theresa Reiner reinertl@pwcs.edu SPA-103 April 24, 2006Bienvenidos a Coro! Welcome to ChorusA first-day-of-school lesson for students A &quot;Back-to-School Night&quot; presentation for parentsIntended age groups: This power point presentation was prepared
Fayetteville State University - EME - 5055
TRENDS AND ISSUES ALUMNI INTERVIEWSE-shen Mary Lee Michelle Meng Kwong Victoria NicholeNOVEMBER 30, 2000ALUMNI INTERVIEWED Christopher E. Iansiti Glen Hasling Brent Hewlett Dr. Ann Igoe Jim JolleyMOST IMPORTANT SKILLS Systematic appro
PHED 319 Physiology of Exercise Bogle Lab #4: Purpose: This lab is designed to administer assessments of muscular strength and endurance. The assessment tests are the one-repetition maximum (1RM) test for bench press, 1 RM for seated leg press, one m
Fayetteville State University - MGF - 1107
ADDITIONAL INFORMATION SHEET First learn your section number . Your specific section number must be written on all course assignments and forms. Failure to write your correct section number will result in a zero for the assignment or your form being
Fayetteville State University - MAC - 1105
Additional Information for MAC 1105 41 48 Lecturer: Mr. Gay Office Information: Location: 402- H MCH Office Hours: Monday &amp; Wednesday 2:15 3:15 Tuesday 9:15 10:15 Lecture Class: MW 5:15 6:30 275 FLH Contact Information: No office phone Send an em
UCLA - CS - 240
ROLAPs, Rollups and Cubes:an Introduction to Super GroupsCS240A Notes from A Complete Guide to DB2 Universal Database, by Don Chamberlin, Morgan Kaufmann Publishers, Inc., 1998 The Census DatabaseNAME Joe Chen Bob Karen Jim Jo
UCLA - CS - 240
Chapter 22: Advanced Querying and Information Retrieval! Decision-Support Systems&quot; Data Analysis# OLAP # Extended aggregation features in SQL Windowing and ranking&quot; Data Mining &quot; Data Warehousing! Information-Retrieval Systems&quot; Including W
UCLA - CS - 240
Knowledge discovery &amp; data mining Classification &amp; fraud detectionKnowledge discovery &amp; data mining Classification &amp; fraud detection5/24/00Click here to startTable of ContentsKnowledge discovery &amp; data mining Classification &amp; fraud detection M
UCLA - CS - 240
%!PS-Adobe-2.0 %Creator: dvips 5.58 Copyright 1986, 1994 Radical Eye Software %Title: apriori.dvi %CreationDate: Tue May 25 16:33:17 1999 %Pages: 7 %PageOrder: Ascend %Orientation: Landscape %BoundingBox: 0 0 612 792 %EndComments %DVIPSCommandLine: d
Northwestern State University of Louisiana - RESUME - 202
TRISTAN D. PEARCECURRENT EMPLOYMENT6 Gryphon Place Guelph, Ontario, Canada, N1G 4L7 Tel: (home) 5193622353 (work) 5198244120, Ext.52564 Email: tpearce@uoguelph.caResearch Associate
Vanderbilt - HOME - 309
V ANDERBIL TUNIVERSITYMEDICALCENTERHOUSE ORGANwww.mc.vanderbilt.edu/houseorganMarch 2009Cliffhanger!A. Scott Pearson's novel &quot;Rupture&quot; brings the medical thriller to VMCwatching th
Vanderbilt - HO - 0908
S U N D AYM O N D AYT U E S D AYW E D N E S D AYT H U R S D AYF R I D AYS AT U R D AYSEPTEMBERCampus walking tour NOON,KIRKLAND HALLFRIDAY NIGHT LIGHTS7 P.M. 9 P.M. M C TYEIRE PARKING LOTGarage Sale7 A.M. NOON 25TH AVE. STAF
Vanderbilt - ME - 243
ME243 DESIGN PROJECTS DESIGN JURY BALLOT PROJECT NAME :_ PROJECT CUSTOMER/SPONSOR: _ Ratings: Excellent 10.0, Very Good 9.0, Good 8.0, Fair 7.0, Poor 6.0, Unacceptable 5 or less, N/A not applicable This team has demonstrated: 1. 2. 3. 4. 5. 6
Vanderbilt - BSCI - 211
Annu. Rev. Genet. 2001. 35:43968 Copyright c 2001 by Annual Reviews. All rights reservedREGULATION OF GENE EXPRESSION BY CELL-TO-CELL COMMUNICATION:Acyl-Homoserine Lactone Quorum SensingClay Fuqua1, Matthew R. Parsek2, and E. Peter Greenberg31
Wisconsin - ENGR - 160
1Automatic Humidification for Plant ResearchDustin Behling Paul Bemis Joshua Boehm Jaime Campbell Dean Chamberlain Dan Davenport Tony Hanson Dalin Kim John Lynch Nick Marsh Dan Morgan Dan Pensinger Adam Rieves Hunter StrausIntroduction to Enginee
Carnegie Mellon - EE - 525
[M2] Huffman Encoder ProjectHowd - Zur Hung Eric Lai Wei Jie Lee Yu - Chiang Lee Design Manager: Jonathan P. LeeOverall Project Objective: Design a Low Power Huffman Encoder Presentation #12Huffman Encoder ProjectStatusDesign Proposal Chip Arc
N. Arizona - RAM - 239
Bono Commencement Address at the University of Pennsylvaniadelivered 19 May 2004 Thank you! My name is Bono and I am a rock star. Don't get me too excited 'cause I use I use four letter words when I get excited (.and.I'm that guy.) I'd just like t
Bethel VA - GER - 213
Deutsch 213: Goodbye Lenin! Wortschatzliste1abtransportieren aufkleben ausstreuen ausziehen das Etikett das Gefngnis das Geheimnis das Rendezvous das Sparbuch das Studio das Werbeplakat der Bericht der Brief der Cheeseburger der Filmemacher der F
East Los Angeles College - FILES - 485
XCOM 0251 XMCN 0251 DECA 2262SECOND PUBLIC EXAMINATIONHonour School of Computer Science: Paper CS4 Honour School of Mathematics and Computer Science: Paper CS4 Honour School of Engineering and Computing Science: Paper ECS4OBJECT ORIENTED PROGRAM
East Los Angeles College - FILES - 164
TRACE CHECKING WITH REAL-TIME SPECIFICATIONSRocco Deutschmann 1 , Matthias Fruth 1,2 , Horst Reichel 2 , Hans-Christian Reuss 3Dresden University of Technology, Institute for Combustion Engines and Automotive Engineering Address: D-01062 Dresden, G
S.F. State - HH - 382
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;Error&gt;&lt;Code&gt;NoSuchKey&lt;/Code&gt;&lt;Message&gt;The specified key does not exist.&lt;/Message&gt;&lt;Key&gt;f1e3e79e93b57828f3ec2e6e87ef3c5a43ad7a6a.doc&lt;/Key&gt;&lt;RequestId&gt;C 5B94D00ED67AA4B&lt;/RequestId&gt;&lt;HostId&gt;d1naVYxFvxRdfv+2oBU7vINaVDz
Carnegie Mellon - COSC - 149
Operating Systems - Fall 2001 Instructor: Craig A. Struble Compiling the Linux Kernel in 368 CudahyAssigned: Tuesday, Oct. 9, 2001 Due: None1IntroductionThis document covers the steps needed to build a kernel on the RedHat 7.1 machines in 368
Carnegie Mellon - COSC - 149
Operating Systems - Fall 2001 Instructor: Craig A. Struble Homework 1Assigned: Wednesday, Aug. 29, 2001 Due: Wednesday, Sep. 5, 20011. [25 pts.] On studsys, read the man page for man. (At the prompt, give the command &quot;man man&quot;.) Write a one paragr
Carnegie Mellon - MSCS - 231
MSCS 231 - Bioinformatics IIJan. 14, 20031Syllabus MSCS 231: Bioinformatics IISpring 2003 Call #85482 http:/www.mscs.mu.edu/~cstruble/class/mscs231/spring2003 Instructor: Craig A. Struble, Ph.D.Office: Office Hours: Phone: Email: 386 Cudahy H
Carnegie Mellon - BIIN - 200
BIIN200 Introduction to Bioinformatics Lab 1 Assigned:Lab 1: Accessing and Retrieving Data From Bioinformatics Databases IntroductionAccessing and retrieving data from bioinformatics databases is the first and most common step in all bioinformati
Carnegie Mellon - COSC - 159
COSC 159: Fundamentals of Artificial Intelligence Dr. Craig StrubleSpring 2002, Midterm Exam closed book, closed notes, calculators OK 100 points 20 questions 1 extra credit 14 pagesName:1Multiple Choice [3 pts each] 1. The Turing test is an e
Carnegie Mellon - COSC - 159
Study Guide For Spring 2003 COSC 159 Final Example Chapter 1 Four approaches of AI Rationality Foundations of AIChapter 2 Agents, environments, percepts, etc. Different types of agents, know the essential characteristics. What makes up a simpl
Carnegie Mellon - COSC - 159
~}{Ty | zi v xu7wc l d g d rw e p e s gutsWYdet p n&amp;u q o&amp;cfoe h ntq e e c s fvgumus l k i de h we g w jff7h gf7Wdh TUuh e y w q ssq i ed c t&amp;gExvutrphgfWUb a#`YUWV IHU1T5 R ' X 5\$ 8 5 S #A # ' #\$ C ' 8 A 8\$5 3 2 0 ' \$ !
Carnegie Mellon - COSC - 159
COSC 159 - Fundamentals of Artificial IntelligenceJan. 13, 20031Syllabus COSC 159: Fundamentals of Artificial IntelligenceSpring 2003 Call #65468 http:/www.mscs.mu.edu/~cstruble/class/cosc159/spring2003 Instructor: Craig A. Struble, Ph.D.Offi
Carnegie Mellon - COSC - 159
Fundamentals of Artificial Intelligence - Spring 2003 Instructor: Craig A. Struble, Ph.D. Homework 4Assigned: Monday, Feb. 24, 2003 Due: Monday, Mar. 24, 2003 In this homework, you will explore searching and optimization problems in more depth. To b
Carnegie Mellon - COSC - 159
Fundamentals of Artificial Intelligence - Spring 2003 Instructor: Craig A. Struble, Ph.D. Homework 2Assigned: Wednesday, Jan. 22, 2003 Due: Wednesday, Feb. 5, 2003 This homework assignment involves implementing and simulating an intelligent lawn mow
Carnegie Mellon - COSC - 159
Fundamentals of Artificial Intelligence - Spring 2003 Instructor: Craig A. Struble, Ph.D. Homework 1Assigned: Wednesday, Jan. 15, 2003 Due: Wednesday, Jan. 22, 2003Instructions: At the beginning of class on the due date, submit neatly prepared ans
Carnegie Mellon - COSC - 159
COSC 159: Fundamentals of Artificial Intelligence Dr. Craig StrubleSpring 2003, Midterm Exam closed book, closed notes, calculators OK 100 points 5 matching, 15 multiple choice, 5 short answer 1 extra credit 14 pagesName(1 pt.):1Section 1. Mat
Carnegie Mellon - COSC - 159
COSC 159: Fundamentals of Artificial Intelligence Dr. Craig StrubleSpring 2003, Final Exam closed book, closed notes, calculators OK 100 points 5 true/false, 15 multiple choice, 6 short answer 11 pagesName:1Section 1. True/False (2 pts. each)
Carnegie Mellon - COSC - 159
Fundamentals of Artificial Intelligence - Spring 2004 Instructor: Craig A. Struble, Ph.D. Lab 1: Intelligent AgentsAssigned: January 20, 2004 Due: February 18, 2004IntroductionCentral concepts for artificial intelligence are intelligent agents an