Professional Documents
Culture Documents
I|Page
Matlab Tutorial Handout / AC6502701 Visual Servo Control / NTUST
II | P a g e
Matlab Tutorial Handout / AC6502701 Visual Servo Control / NTUST
The listed functions should help to find the adequate command for a given problem. However it is
up to the user to refer to the Matlab help to get more detailed information, since here only the
function name and the standard parameters are provided.
The second part of this handout contains several Matlab scripts which demonstrate the use of most
mentioned functions.
1 Matlab in General
This document is based on Matlab version 7.5.0 (R2007b).
Please refer to the Matlab help, section “Contents” for detailed information on a specific toolbox: e.g.
Matlab -> Help -> Contents -> Image Processing Toolbox -> Getting started
• plot(data, ‘linewidth’, val) … plot the line with the specified width
• plot(data, param) ... plot line in the specified color, param = [‘r’,’g’,’b’,’k’,’m’,’c’]
• plot(data, ‘- -‘) … plot dashed line
• plot(data, ‘-.’) … plot dash-dotted line
2|Page
Matlab Tutorial Handout / AC6502701 Visual Servo Control / NTUST
3|Page
Matlab Tutorial Handout / AC6502701 Visual Servo Control / NTUST
The data type of images is “uint8”. Some functions of the image processing toolbox only accept
“uint8”, whereas the standard data type of Matlab is “double”.
• [x,y] = ginput(n) … select points from the figure using the mouse
Distance Transform
• D = bwdist(bw) … distance transform of binary image
5|Page
Matlab Tutorial Handout / AC6502701 Visual Servo Control / NTUST
6|Page
Matlab Tutorial Handout / AC6502701 Visual Servo Control / NTUST
7|Page
Matlab Tutorial Handout / AC6502701 Visual Servo Control / NTUST
The original version was created by Luis Felipe Posada of the Technical University Dortmund. The
additional functions “robotInitWifi”, “switchSonar”, “getRobotCycleTime” and “setRobotCycleTime”
were integrated by the author of this handout.
8|Page
Matlab Tutorial Handout / AC6502701 Visual Servo Control / NTUST
A simple example for the use of robot motion commands can be found in the Matlab script
“demoDirectMotionCommands.m” in the folder “Matlab_Aria_Interface\test”.
9|Page
Matlab Tutorial Handout / AC6502701 Visual Servo Control / NTUST
Please be aware that the central server has to be running on the PC that processes the image data
from the ceiling camera (IP: 140.118.38.91), before you can use the functions of the interface.
10 | P a g e
Matlab Tutorial Handout / AC6502701 Visual Servo Control / NTUST
a) Matlab_Plotting_Functions_and_Figure_Properties.m
b) Matlab_Image_Processing_Basics.m
c) Matlab_Image_Acquisition_Basics.m
d) Matlab_Aria_Interface_Motion_Commands.m
e) Matlab_IPC_Interface_Example.m
11 | P a g e