Assignment 1
.pdf
keyboard_arrow_up
School
Western University *
*We aren’t endorsed by this school
Course
4445
Subject
Mechanical Engineering
Date
Dec 6, 2023
Type
Pages
3
Uploaded by DrWater10265
ECE4445 / MBP4445 / ECE9201 / ECE9021 / BME9509 / MBP9509
–
Fall 2023
–
Page 1/3
INTRODUCTION TO DIGITAL IMAGE PROCESSING
ASSIGNMENT 1
Due date: Friday, October 6, 2023 by 11:55 pm
Total marks: 5
Late penalty: 0.5 marks per day overdue. Late assignments will not be accepted after 11:55 pm on Monday,
October 9, 2023, and a mark of zero will be given.
All assignments will be done in
groups of 4
, and the same final mark for the assignment will be assigned to all
group members; there may be one group with fewer than 4 students because of the number of students in the course.
Currently, you have all been
randomly
placed in groups. Please see the Appendix on how to check in OWL which
group you are in.
The group names are of the form “AssignmentGroup
-
#” where # is an integer.
You are required
to stay in the same group for each subsequent assignment. The rationale for creating groups randomly is to
encourage you to meet others beyond those with whom you normally work/socialize. Besides, it
’
s good preparation
for the work environment where you will need to work with new people. Group members may interact with each
other either in-person or using Zoom or any other web conferencing tool of your choice.
Note
: An institutional version of Zoom is available to Western students that does not have some of the limitations
of the free version. Instructions on using the institutional version can be found at:
https://wts.uwo.ca/zoom/getting_started.html
If you are an
auditor
, you have not been assigned to a group and are not required to submit the assignment; you
may do it on your own and check the results when solutions are posted online.
Instructions for submitting answers are given with each question below. Note that I allow you to keep resubmitting
until the deadline. Only the last submission is available to the TAs for marking, hence if you submit a new version
after the due date, you will be marked as late. I recommend that all group members agree to a submission before
uploading it.
Only one person in the group needs to submit on behalf of the entire group.
CONVENTIONS
Fixed-point font (
Courier
) is used to denote MATLAB commands, variables, and filenames.
OBJECTIVES
1.
To meet others in the class to foster collaboration.
2.
To gain experience with writing functions in MATLAB using programming statements (
function
,
for
, etc).
3.
To help you become familiar with MATLAB’s help facilities.
4.
To reflect on ways that you can continue to keep abreast of changes in image processing tools.
PROBLEMS
1.
Write a MATLAB function that accepts a
uint8
image matrix called
im
and a 1
x
N
vector
v
of strictly
increasing positive integers (not necessarily of type
uint8
);
N
is the length of vector
v
. This function should
ECE4445 / MBP4445 / ECE9201 / ECE9021 / BME9509 / MBP9509
–
Fall 2023
–
Page 2/3
return as output a 1
x
(
N
-1) row vector,
y
, where
y(i)
is the total number of pixels in
im
that satisfy
v(i) ≤
im < v(i+1)
. The function header should be:
function y = countGL_#( im, v )
where # is your group number. For instance, if you are part of AssignmentGroup-01, your filename would be
countGL_01.m
. If you are part of AssignmentGroup-27, your filename would be
countGL_27.m
.
You may only use the following MATLAB keywords, functions and operators:
for … end, sum, &, >=, <, length, if…end
,
function, size, zeros
You are not required to use all the above, only as many commands as you think you need. You can also use any
other operator found by typing:
help ops
You are not allowed to use the
imhist
function.
The rationale for these restrictions is to require use of C-like programming statements and basic MATLAB
operators that do not rely on any specific toolbox.
For all assignments, you may assume that the user has entered the correct number and types of inputs to the
function since we are focusing on image processing instead of input parsing.
All code and answers requested below must be submitted using OWL. I have included instructions here
and will do so for every assignment. To provide answers via OWL:
1.
One group member should log into OWL and access the course site.
2.
Select the
“Assignments”
tool.
3.
From the page that comes up, select
“Assignment 1”.
4.
You will now reach the submission page for Assignment 1. Follow the instructions below for each
part to submit answers.
(a)
[3 marks]
Save the function in a file called
countGL_#.m
where # is your group number. For instance, if
you are part of AssignmentGroup-01, your filename would be
countGL_01.m
. If you are part of
AssignmentGroup-27, your filename would be
countGL_27.m
.
NOTE: Use the exact filename and
function name as specified above. Uppercase/lowercase is important. Your function should be
commented.
When you are on the submission page in OWL for Assignment 1, scroll to the bottom and attach your
M-file. Also, cut and paste this code into the text box taking care to label this as part 1(a).
(b)
[0.25 marks]
Generate a test image using the following set of MATLAB commands:
>> row = uint8(0:255);
>> im = repmat(row, 100, 1);
Now, create a stem
plot of the number of pixels at each graylevel 0, 1, …, 255 in
im
by typing the following:
>> stem( 0:255, countGL_#(im, 0:256))
>> set(gca, 'xlim', [0, 255], 'ylim', [0, 150])
>> title('Assignment 1', 'fontsize', 16)
ECE4445 / MBP4445 / ECE9201 / ECE9021 / BME9509 / MBP9509
–
Fall 2023
–
Page 3/3
>> xlabel('Gray level')
>> ylabel('No. Pixels')
Note:
In the first command (i.e.,
stem
) the # symbol will be replaced with your actual group number.
What you have generated is the gray-
level histogram of an image with “bin size” of 1. Histograms will be
discussed in class after we finish our discussion of MATLAB.
Once you generate the stem plot
, you should save the display by selecting “File” in the figure window and then
“Save As…”. In the dialog box that comes up, select “TIFF image (*.tif)” as the output type and for “File
name”, enter “1
b
_#” without quotes where # is your group number. This will save the figure in the file called
“1
b_
#.tif”.
Attach it in OWL as you did the M-file.
(c)
[0.25 marks]
What would you type at the MATLAB prompt to find the total number of pixels in the test image
im
from Part (b) using the function
countGL_#
?
Enter your answer in the text box on the assignment
submission page, taking care to label this as part 1(c).
2.
[1 mark]
Image processing software is constantly evolving, and this includes the MATAB Image Processing
Toolbox. Hence, if you decide to work in image processing and you use MATLAB, you will need to learn new
functionality throughout your career. Find and provide a list of resources you can use to learn new functionality
in MATLAB. Limit your answer to half a page.
Enter your answer in the text box on the assignment
submission page, taking care to label this as part 2.
3.
[0.5 marks]
For each group member, indicate by one sentence or even just a few words what the member did
for this assignment. Roles could include programming, testing, answering particular questions, proofreading,
etc.
Enter your answer in the text box on the assignment submission page, taking care to label this as part
3.
APPENDIX: Checking Assignment Group Membership
Below are instructions for checking your group membership.
Step 1:
Log into OWL and click on Site Info.
Step 2:
Click on the section near the bottom of the page that is labelled
Groups you are a member of
.
Step 3:
Your group’s name should come up. You should note th
e group number as you will need it for the
assignment. If you click on the link labeled “
View
Members”, you will see other members of the group.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
Please do one through 3
arrow_forward
Question and needed info below. Thank you in advance
arrow_forward
I Blackboard @ Texas Tech Uni x
Bb MasteringEngineering - Spri x
E MasteringEngineering Maste X
C Suppose That H = 3.8 M . (Fi x
X Mathway | Calculus Problem x
y! how to take a full page scree
A session.masteringengineering.com/myct/itemView?assignmentProblemID=12360392&offset=next
ABP O
Tp E
G
KAssignment #3
Fundamental Problem 2.29
5 of 6
>
I Review
Part A
Find the magnitude of the projected component of the force along the pipe AO.
(Figure 1)
Express your answer to three significant figures and include the appropriate units.
µA
FAO =
Value
Units
Submit
Request Answer
Figure
4 m
F = 400 N
6 m
5 m
B
4 m
10:31 PM
O Type here to search
2/7/2021
arrow_forward
4
arrow_forward
please answer do not image format
arrow_forward
I need help solving this problem.
arrow_forward
00
T
R
%24
Bb R
V qa
du/webapps/assessment/take/launch.jsp?course_assessment_id%=_254968_1&course_id%3D 3565256_1&content id= 52826
* Question Completion Status:
Attach File
Browse Local Files
Browse Content Collection
QUESTION 2
A company needs to choose one supplier for a particular type of silicon wafer used'in the production of
semiconductors. The company has three options. Supplier A sells the silicon wafers for $2.50 per wafer,
independently of the number of wafers ordered. Supplier B sells the wafers for $2.40 each but does not
consider an order for less than 2,000 wafers. Supplier C sells the wafers for $2.30 each but does not accept
an order for less than 3,000 wafers. Assume an order setup cost of $100 and an annual requirement of 20,000
wafers. Assume a 20% annual interest rate for holding cost calculations.
a. Which supplier should be chosen to minimize the total annual cost for the wafers, and what is the
optimal order quantity?
b. If the replenishment lead time for wafers…
arrow_forward
The answer from Bartleby is missing/blank. Can someone help answer it please and credit this question if possible since it would have been included/explained?
Thank you
Chapter 50 multiple Choice #5 what is the cause of an extremely hard brake pedal
arrow_forward
I can't find the symbols for the blank ones
arrow_forward
Given: Top, Front & Right Views Sketch: Isometric View MULTIVIEW Normal Surfaces Sketching .................... Lab Hr: ....
arrow_forward
Q1 – Area vs Die/wafer – a) What is the area ratio between a 300mm and 200mm diameter wafer? (The 300mm diameter waferhas x.xx times the area of a 200mm).b) How many 15x15mm die can be completely printed on a 100mm, 200mm, and 300mm wafer? Showyour work. Do not include partial fields; you may assume no scribe lines or edge exclusion zone. Thereis no flat, only a notch for the 200mm and 300mm wafers. How many times more die can you getwhen going from 200 to 300mm wafers? How does this number compare to the area increasebetween 200 and 300mm? c) Now assume a 100um scribe line and a 3mm edge exclusion zone. How may die per wafer for 200mmand 300mm wafers? How did you calculate this – show your work. How does this compare to the arearatio? Is it the same? If not, why not?
arrow_forward
Four months into a six month deployment, you are a solo pilot returning to home base after an uneventful overwatch mission to a non-disclosed desert
location. Your mission was extended 90 minutes requiring at least one additional aerial refuel. The moon has now set. A shift in prevailing winds causes an
infrequently used runway to be active. You are less familiar with the approach to this runway and have only used it during VFR conditions. The instrument
approach plate reveals you will fly a prolonged DME arc taking you out over the unlit desert away from the dimly lit base.
While flying the above instrument approach, you take another look at the approach plate. When you look up again the airfield lights are visible through the
upper portion of your canopy. You did not sense any change in your aircraft attitude. Which of the following best describes what happened while you looked
at the approach plate?
OA. The black hole effect has amplified the normal reflection of the airfield lights…
arrow_forward
Home
Insert
Draw
Design
Layout
References
Maili
OLYTECH
Calibri (Bo...
11
v A A
Aa v
m Air. Ma
Paste
в I
U v ab x,
x | A
Name:
ID No.:
rm Air. M
Date:
CRN:
Course Code: JACV 506E
Aircraft Mechanical Mainte
Practice.
ces ( CRI
Page
Originated By
Mark awarded -
Instructor/Assessor:
Assignment: Interpret engineering drawings and diagrams
bus
se Mat
hing Pl
Questions: -
1. Write 2 differences between isometric and oblique projections?
ssment
2. Write 5 details found on the drawing title block?
Feedba
3. Write 4 types of sectional views?
4. Name 3 methods how drawings are stored in?
5. Name 3 types of fits?
arrow_forward
D1M: Class Test (2024)
Max. Time: 2 Hrs.
Max. Marks: 20
Using the first angle
projection method and
view form
the X-
direction. Draw the
Sectional Front View
'A-A, Top View and
Side View (Right).
Note: All dimensions
are in mm.
#20
R20
040
#60
P14
22
#16
44
90
90
10
32
06
20
130
R20
2 HOLES #20
arrow_forward
O Week 2- 20527 22110L
x a MasteringEngineering Mastering x
M Inbox (10,309) - usmikail@gmail x
a Product Detail Page
a Central Service Technical Manual x
O 21) YouTube
i session.masteringengineering.com/myct/itemView?assignmentProblemiD=12443395&offset=next
KHW 1
Problem 12.3
6 of 16
I Review
A particle travels along a straight line with a velocity
v = (12 – 3t2) m/s, where t is in seconds. When
t = 1 s, the particle is located 10 m to the left of the
origin.
Express your answer to three significant figures and include the appropriate units.
As =
437
Submit
Previous Answers Request Answer
X Incorrect; Try Again; 4 attempts remaining
Part C
Determine the distance the particle travels during the time period given in previous part.
Express your answer to three significant figures and include the appropriate units.
?
ST =
Value
Units
arrow_forward
reful-files from the Internet can contain viruses. Unless you need to edit, it's safer to stay in Protected View.
Your Full Name
Enable Editing
ID:
Sec:
Q1: Which one is stronger; undeformed copper or
copper that has been plastically deformed?
Q2: Which one is stronger; unannealed copper or
copper annealed (heated) at 750° C?
Q3: Why?
101.
O
Focus
arrow_forward
answer the following BOTH questions, and i know the policy, the 2 questions is FINE and i have read the policy, thanks
arrow_forward
I need answers for problems 4, 5, and 6 pertaining to the print provided.
arrow_forward
I need answers to questions 10, 11, and 12 pertaining to the print provided.
Note: A tutor keeps putting 1 question into 3 parts and wasted so many of my questions. Never had a issue before until now, please allow a different tutor to answer because I was told I am allowed 3 of these questions.
arrow_forward
University of Babylon
Collage of Engineering\Al-Musayab
Department of Automobile
Engineering
Under Grad/Third stage
Notes:
1-Attempt Four Questions.
2- Q4 Must be Answered
3-Assume any missing data.
4 تسلم الأسئلة بعد الامتحان مع الدفتر
Subject: Mechanical
Element Design I
Date: 2022\01\25
2022-2023
Time: Three Hours
Course 1
Attempt 1
Q1/ Design a thin cylindrical pressure tank (pressure vessel) with hemispherical ends to the
automotive industry, shown in figure I below. Design for an infinite life by finding the
appropriate thickness of the vessel to carry a sinusoidal pressure varied from {(-0.1) to (6) Mpa}.
The vessel is made from Stainless Steel Alloy-Type 316 sheet annealed. The operating
temperature is 80 C° and the dimeter of the cylinder is 36 cm. use a safety factor of 1.8.
Fig. 1
(15 Marks)
Q2/ Answer the following:
1- Derive the design equation for the direct evaluation of the diameter of a shaft to a desired
fatigue safety factor, if the shaft subjected to both fluctuated…
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Elements Of Electromagnetics
Mechanical Engineering
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Oxford University Press
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:9780134319650
Author:Russell C. Hibbeler
Publisher:PEARSON
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:9781259822674
Author:Yunus A. Cengel Dr., Michael A. Boles
Publisher:McGraw-Hill Education
Control Systems Engineering
Mechanical Engineering
ISBN:9781118170519
Author:Norman S. Nise
Publisher:WILEY
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:9781337093347
Author:Barry J. Goodno, James M. Gere
Publisher:Cengage Learning
Engineering Mechanics: Statics
Mechanical Engineering
ISBN:9781118807330
Author:James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:WILEY
Related Questions
- Please do one through 3arrow_forwardQuestion and needed info below. Thank you in advancearrow_forwardI Blackboard @ Texas Tech Uni x Bb MasteringEngineering - Spri x E MasteringEngineering Maste X C Suppose That H = 3.8 M . (Fi x X Mathway | Calculus Problem x y! how to take a full page scree A session.masteringengineering.com/myct/itemView?assignmentProblemID=12360392&offset=next ABP O Tp E G KAssignment #3 Fundamental Problem 2.29 5 of 6 > I Review Part A Find the magnitude of the projected component of the force along the pipe AO. (Figure 1) Express your answer to three significant figures and include the appropriate units. µA FAO = Value Units Submit Request Answer Figure 4 m F = 400 N 6 m 5 m B 4 m 10:31 PM O Type here to search 2/7/2021arrow_forward
- 00 T R %24 Bb R V qa du/webapps/assessment/take/launch.jsp?course_assessment_id%=_254968_1&course_id%3D 3565256_1&content id= 52826 * Question Completion Status: Attach File Browse Local Files Browse Content Collection QUESTION 2 A company needs to choose one supplier for a particular type of silicon wafer used'in the production of semiconductors. The company has three options. Supplier A sells the silicon wafers for $2.50 per wafer, independently of the number of wafers ordered. Supplier B sells the wafers for $2.40 each but does not consider an order for less than 2,000 wafers. Supplier C sells the wafers for $2.30 each but does not accept an order for less than 3,000 wafers. Assume an order setup cost of $100 and an annual requirement of 20,000 wafers. Assume a 20% annual interest rate for holding cost calculations. a. Which supplier should be chosen to minimize the total annual cost for the wafers, and what is the optimal order quantity? b. If the replenishment lead time for wafers…arrow_forwardThe answer from Bartleby is missing/blank. Can someone help answer it please and credit this question if possible since it would have been included/explained? Thank you Chapter 50 multiple Choice #5 what is the cause of an extremely hard brake pedalarrow_forwardI can't find the symbols for the blank onesarrow_forward
- Given: Top, Front & Right Views Sketch: Isometric View MULTIVIEW Normal Surfaces Sketching .................... Lab Hr: ....arrow_forwardQ1 – Area vs Die/wafer – a) What is the area ratio between a 300mm and 200mm diameter wafer? (The 300mm diameter waferhas x.xx times the area of a 200mm).b) How many 15x15mm die can be completely printed on a 100mm, 200mm, and 300mm wafer? Showyour work. Do not include partial fields; you may assume no scribe lines or edge exclusion zone. Thereis no flat, only a notch for the 200mm and 300mm wafers. How many times more die can you getwhen going from 200 to 300mm wafers? How does this number compare to the area increasebetween 200 and 300mm? c) Now assume a 100um scribe line and a 3mm edge exclusion zone. How may die per wafer for 200mmand 300mm wafers? How did you calculate this – show your work. How does this compare to the arearatio? Is it the same? If not, why not?arrow_forwardFour months into a six month deployment, you are a solo pilot returning to home base after an uneventful overwatch mission to a non-disclosed desert location. Your mission was extended 90 minutes requiring at least one additional aerial refuel. The moon has now set. A shift in prevailing winds causes an infrequently used runway to be active. You are less familiar with the approach to this runway and have only used it during VFR conditions. The instrument approach plate reveals you will fly a prolonged DME arc taking you out over the unlit desert away from the dimly lit base. While flying the above instrument approach, you take another look at the approach plate. When you look up again the airfield lights are visible through the upper portion of your canopy. You did not sense any change in your aircraft attitude. Which of the following best describes what happened while you looked at the approach plate? OA. The black hole effect has amplified the normal reflection of the airfield lights…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Elements Of ElectromagneticsMechanical EngineeringISBN:9780190698614Author:Sadiku, Matthew N. O.Publisher:Oxford University PressMechanics of Materials (10th Edition)Mechanical EngineeringISBN:9780134319650Author:Russell C. HibbelerPublisher:PEARSONThermodynamics: An Engineering ApproachMechanical EngineeringISBN:9781259822674Author:Yunus A. Cengel Dr., Michael A. BolesPublisher:McGraw-Hill Education
- Control Systems EngineeringMechanical EngineeringISBN:9781118170519Author:Norman S. NisePublisher:WILEYMechanics of Materials (MindTap Course List)Mechanical EngineeringISBN:9781337093347Author:Barry J. Goodno, James M. GerePublisher:Cengage LearningEngineering Mechanics: StaticsMechanical EngineeringISBN:9781118807330Author:James L. Meriam, L. G. Kraige, J. N. BoltonPublisher:WILEY
Elements Of Electromagnetics
Mechanical Engineering
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Oxford University Press
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:9780134319650
Author:Russell C. Hibbeler
Publisher:PEARSON
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:9781259822674
Author:Yunus A. Cengel Dr., Michael A. Boles
Publisher:McGraw-Hill Education
Control Systems Engineering
Mechanical Engineering
ISBN:9781118170519
Author:Norman S. Nise
Publisher:WILEY
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:9781337093347
Author:Barry J. Goodno, James M. Gere
Publisher:Cengage Learning
Engineering Mechanics: Statics
Mechanical Engineering
ISBN:9781118807330
Author:James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:WILEY