- •1. TABLE OF CONTENTS
- •2. AN INTRODUCTION TO UNIX
- •2.1 OVERVIEW
- •2.2 UNIX
- •2.2.1 Using UNIX Workstations in general:
- •2.2.2 Directories, Files, Etc.
- •2.2.3 Advanced Concepts
- •2.3 THE NETWORK
- •2.4 GOOD MANNERS
- •3. THE INTERNET
- •3.1 NETWORKS
- •3.1.1 Computer Addresses
- •3.2 NETWORK TYPES
- •3.2.1 Permanent Wires
- •3.2.2 Phone Lines
- •3.3 NETWORK PROTOCOLS
- •3.3.1 Mail Transfer Protocols
- •3.3.1.1 - Attachments
- •3.3.1.2 - Mail Lists
- •3.3.2 FTP - File Transfer Protocol
- •3.3.3 News
- •3.3.4 HTTP - Hypertext Transfer Protocol
- •3.3.5 Chat
- •3.3.6 Novell
- •3.3.7 Security
- •3.4 DATA FORMATS
- •3.4.1 HTML - Hyper Text Markup Language
- •3.4.1.1 - Publishing Web Pages
- •3.4.2 URLs
- •3.4.3 Hints
- •3.4.4 Specialized Editors
- •3.4.6 Encryption
- •3.4.7 Compression
- •3.5 PULLING ALL THE PROTOCOLS AND FORMATS TOGETHER WITH BROWSWERS
- •3.6 OTHER STUFF
- •3.6.1 Clients and Servers
- •3.6.2 Java
- •3.6.3 Javascript
- •3.6.5 Searches
- •3.6.6 ActiveX
- •3.6.7 Graphics
- •3.6.8 Animation
- •3.6.9 Video
- •3.6.10 Sounds
- •3.6.11 Other Program Files
- •3.6.12 Fancy Stuff
- •4. TEACHING WITH THE INTERNET
- •4.1 LECTURES
- •4.1.1 Equipment
- •4.1.2 Techniques
- •4.2 ON-LINE NOTES
- •4.3 ON-LINE MARKING
- •4.3.1 Web Pages
- •4.3.2 email
- •4.4 The Time-Line For My First On-Line Course (Fall 1996)
- •5. WWW and HTML
- •5.1 Why Bother?
- •5.2 Where to Find Netscape
- •5.3 How to Get Your Own Home Page
- •5.4 How to Create a file
- •5.5 Resources
- •6. A BASIC INTRODUCTION TO ‘C’
- •6.2 BACKGROUND
- •6.3 PROGRAM PARTS
- •6.4 HOW A ‘C’ COMPILER WORKS
- •6.5 STRUCTURED ‘C’ CODE
- •6.6 ARCHITECTURE OF ‘C’ PROGRAMS (TOP-DOWN)
- •6.7 CREATING TOP DOWN PROGRAMS
- •6.8.1 Objectives:
- •6.8.2 Problem Definition:
- •6.8.3 User Interface:
- •6.8.3.1 - Screen Layout (also see figure):
- •6.8.3.2 - Input:
- •6.8.3.3 - Output:
- •6.8.3.4 - Help:
- •6.8.3.5 - Error Checking:
- •6.8.3.6 - Miscellaneous:
- •6.8.4 Flow Program:
- •6.8.5 Expand Program:
- •6.8.6 Testing and Debugging:
- •6.8.7 Documentation
- •6.8.7.1 - Users Manual:
- •6.8.7.2 - Programmers Manual:
- •6.8.8 Listing of BeamCAD Program.
- •6.9 PRACTICE PROBLEMS
- •7. GUI DESIGN
- •7.1 PRACTICE PROBLEMS
- •8. AN EXAMPLE - BEAMCAD
- •9. PROGRAMMING IN JAVA
- •9.1 OVERVIEW
- •9.2 THE LANGUAGE
- •9.3 OBJECT ORIENTED PROGRAMMING
- •9.4 REFERENCES/BIBLIOGRAPHY
- •10. DATABASES
- •11. MESSAGE PASSING ON NETWORKS
- •12. MATHEMATICAL ELEMENTS OF COMPUTER GRAPHICS
- •12.1 INTRODUCTION
- •12.2 PIXELS
- •12.2.1 The Perspective Transform
- •12.3 LINE DRAWING
- •12.3.1 Hidden Lines
- •12.4 POLYGON DRAWING
- •12.5 SHADED POLYGONS
- •12.6 COLORS
- •12.6.1 Color Maps
- •12.6.1.1 - Quantization with an Octree RGB Cube
- •12.6.1.1.1 - Algorithm and Implementation
- •12.6.1.1.2 - Color Quantization Data Structures
- •12.7 DITHERING
- •12.7.1 A Model for Light Ray Reflection
- •12.7.2 A Model for Light Ray Refraction:
- •12.7.3 A Model for Specular Reflection of Point Light
- •12.8 RAY TRACING
- •12.8.1 Basic Ray Tracing Theory
- •12.8.1.1 - A Model for Diffuse Reflection of Ambient Light
- •12.8.1.2 - A Model for Diffuse Reflection of Point Light:
- •12.8.1.3 - Collision of a Ray with a Sphere:
- •12.8.1.4 - Collision of a Ray With a Plane:
- •12.8.1.5 - Mapping a Pattern
- •12.8.2 Ray Tracer Algorithms
- •12.8.3 Bounding Volumes
- •12.8.4 Shadows
- •12.8.5 Aliasing
- •12.8.6 Advanced topics
- •12.9 RADIOSITY
- •12.10 ADVANCED GRAPHICS TECHNIQUES
- •12.10.1 Animation
- •12.11 REFERENCES
- •12.12 PRACTICE PROBLEMS
- •13. NEW TOPICS
- •13.1 VIRTUAL REALITY
- •13.2 MULTIMEDIA
- •14. VISIONS SYSTEMS
- •14.1 OVERVIEW
- •14.2 APPLICATIONS
- •14.3 LIGHTING AND SCENE
- •14.4 CAMERAS
- •14.5 FRAME GRABBER
- •14.6 IMAGE PREPROCESSING
- •14.7 FILTERING
- •14.7.1 Thresholding
- •14.8 EDGE DETECTION
- •14.9 SEGMENTATION
- •14.9.1 Segment Mass Properties
- •14.10 RECOGNITION
- •14.10.1 Form Fitting
- •14.10.2 Decision Trees
- •14.11 PRACTICE PROBLEMS
- •15. SIMULATION
- •15.1 MODEL BUILDING
- •15.2 ANALYSIS
- •15.3 DESIGN OF EXPERIMENTS
- •15.4 RUNNING THE SIMULATION
- •15.5 DECISION MAKING STRATEGY
- •15.6 PLANNING
- •15.7 NEURAL NETWORK THEORY
- •16. ARTIFICIAL INTELLIGENCE (AI)
- •16.1 OVERVIEW
- •16.2 EXPERT SYSTEMS
- •16.3 FUZZY LOGIC
- •16.4 NEURAL NETWORKS
- •16.4.1 Neural Network Calculation of Inverse Kinematics
- •16.4.1.1 - Inverse Kinematics
- •16.4.1.2 - Feed Forward Neural Networks
- •16.4.1.3 - The Neural Network Setup
- •16.4.1.4 - The Training Set
- •16.4.1.5 - Results
page 170
14.11 PRACTICE PROBLEMS
1.Consider a circle and an ellipse that might be viewed by a vision system. The circle has a 4” radius, whereas the ellipse has a minor and major radius of 2” and 4”. Compare the two definitions using form factors (compactness and thickness) and show how they differ.
page 171
ans.
circle |
|
|
|
circle |
|
|
|
|
|
R = 4 |
|
|
R1 = 2 |
R2 = 4 |
|||||
Dmin |
= 8 |
Dmax = 8 |
Dmin |
= 4 |
Dmax |
= 8 |
|||
A = π R2 = 50.3 |
A = π |
R1R2 = 25.1 |
|
||||||
P = π ( 2R) |
= 25.1 |
P ≈ 2π |
R12 + R22 |
= |
19.9 |
||||
|
|
|
|
------------------ |
|||||
|
|
|
|
|
|
2 |
|
|
|
|
|
|
Compactness values differ |
|
|
|
|
|
|
C = |
P2 |
= 12.5 |
C = |
P2 |
|
|
|
||
----- |
----- = 15.8 |
|
|
||||||
|
A |
|
|
|
A |
|
|
|
|
|
|
|
the min/max values are the same for the circle |
||||||
|
|
|
Dmin |
T |
= |
Dmin |
= |
0.16 |
|
Tmin |
= |
Tmax |
----------- |
||||||
= ----------- = 0.16 |
min |
|
A |
|
|
|
|||
|
|
|
A |
|
|
Dmax |
|
|
|
|
|
|
|
Tmax |
= |
= |
0.32 |
||
|
|
|
|
----------- |
|||||
|
|
|
|
|
|
A |
|
|
|
2. Describe image resolution in vision systems.
ans. Resolution of a video image describes the number of rows and columns of pixels in a video image. A higher resolution means that there are more rows of pixels in the images, and therefore we can distinguish smaller details.
3. An image has been captured from a video camera, and stored in the matrix below.
64 |
87 |
54 |
64 |
12 |
35 |
22 |
36 |
|
|
|
|
|
|
|
|
36 |
57 |
76 |
24 |
84 |
26 |
63 |
74 |
|
|
|
|
|
|
|
|
84 |
187 |
201 |
234 |
195 |
222 |
198 |
25 |
|
|
|
|
|
|
|
|
54 |
78 |
197 |
198 |
34 |
75 |
218 |
74 |
|
|
|
|
|
|
|
|
25 |
9 |
84 |
202 |
194 |
213 |
192 |
79 |
|
|
|
|
|
|
|
|
37 |
25 |
57 |
98 |
93 |
95 |
91 |
89 |
|
|
|
|
|
|
|
|
page 172
a) Use a threshold of 100 to filter the image.
ANS. |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
|
||||||||
|
|
|
|
|
|
|
|
|
|
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
|
|
|
|
|
|
|
|
|
|
0 |
1 |
1 |
1 |
1 |
1 |
1 |
0 |
|
|
|
|
|
|
|
|
|
|
0 |
0 |
1 |
1 |
0 |
0 |
1 |
0 |
|
|
|
|
|
|
|
|
|
|
0 |
0 |
0 |
1 |
1 |
1 |
1 |
0 |
|
|
|
|
|
|
|
|
|
|
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
|
|
|
|
|
|
|
|
|
b) Perform an edge detection on the thresholded image.
ANS. |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
|
||||||||
|
|
|
|
|
|
|
|
|
|
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
|
|
|
|
|
|
|
|
|
|
0 |
1 |
1 |
1 |
1 |
1 |
1 |
0 |
|
|
|
|
|
|
|
|
|
|
0 |
0 |
1 |
1 |
0 |
0 |
1 |
0 |
|
|
|
|
|
|
|
|
|
|
0 |
0 |
0 |
1 |
1 |
1 |
1 |
0 |
|
|
|
|
|
|
|
|
|
|
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
|
|
|
|
|
|
|
|
|
c) Segment the image into distinct regions.
page 173
ANS. |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
|
||||||||
|
|
|
|
|
|
|
|
|
|
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
|
|
|
|
|
|
|
|
|
|
0 |
1 |
1 |
1 |
1 |
1 |
1 |
0 |
|
|
|
|
|
|
|
|
|
|
0 |
0 |
1 |
1 |
2 |
2 |
1 |
0 |
|
|
|
|
|
|
|
|
|
|
0 |
0 |
0 |
1 |
1 |
1 |
1 |
0 |
|
|
|
|
|
|
|
|
|
|
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
|
|
|
|
|
|
|
|
|
d) Calculate the compactness and thickness for the region above the threshold.
ANS. |
( 22) 2 |
T = |
3 |
6 |
-----OR----- |
||||
C = |
------------ |
|
13 |
13 |
|
13 |
|
|
|
e) Calculate form factors including perimeter, area, centroid, compactness and minimum and maximum thickness.
4.We have four part shapes (as listed below) that will be arriving on a conveyor.We want to develop a decision tree for the vision system to tell them apart. We also need to find their centroids relative to the top left of the image so that a robot may pick them up.
Isosceles triangle 6” per side Rectangle 2” by 8”
Triangle with side lengths 8”, 5” and 4” Circle 5” Radius
page 174
ans.
First, calculate the form factors
Form |
Area |
Perimeter |
Compact |
Tmin |
isosceles triangle |
15.59 |
18 |
20.78 |
0.3333 |
rectangle |
16 |
20 |
25 |
0.125 |
odd triangle |
8.18 |
17 |
35.33 |
0.25 |
circle |
78.54 |
31.42 |
12.57 |
0.127 |
A > 40
|
|
|
|
circle |
|
A < 40 |
Tmin < 0.18 |
|
rectangle |
|
|
|
|
|
|
|
|
|
|
|
|
Tmin > 0.18 |
C > 28 |
|
|
|
|
|
odd triangle |
|
|
|
|
|
|
|
|
C < 28 |
|
|
|
|
|
isosceles triangle |
|
|
|
|