香港理工大学:Introduction to Matlab(PPT讲稿)Image Processing with MATLAB

Lab of comp 3 19 Image Processing with MATLAB Lab tutor: Shenghua ZHONG Email:Zsh696(@gmail.com cSshzhong@comp. polyu. edu. hk Lab 2: nov 9.2011
1 Lab of COMP 319 Lab tutor : Shenghua ZHONG Email: zsh696@gmail.com csshzhong@comp.polyu.edu.hk Lab 2: Nov 9, 2011 Image Processing with MATLAB

Outline of lab 3 1. Review of lab 2 2. user defined function 3. Execution control 4. Plots and graphs using Matlab 5. Basic manipulation in image processing 6. Color image compression
3 Outline of Lab 3 1. Review of Lab 2 2. User defined function 3. Execution control 4. Plots and graphs using Matlab 5. Basic manipulation in image processing 6. Color image compression

Review of Lab 2 about Data StructureA 1. Introduction the basic data structure in matlab Vector and array 2. The distinct attributes of these data structures Numerical value ndex /22 2 门 Index The second row and first collum mI m2 Value: a
4 Review of Lab 2 about Data Structure 1. Introduction the basic data structure in Matlab • Vector and Array 2. The distinct attributes of these data structures • Numerical Value • Index

Review of Lab 2 about Data StructureA 3. What we have learnt How to create them For example: A=3, 4, 5; 6,5.5,01 How to manipulate them For example: A(1, 1: 2)=A(1, 1: 2 )+2 How to access their elements For example: B=A(1, 1: 2) How to perform mathematical and logical operations on them For example: C=A /2.5; D= sum(sum(A) For example: E=A>0.5
5 Review of Lab 2 about Data Structure 3. What we have learnt • How to create them • For example: A = [3, 4, 5; 6, 5.5, 0] • How to manipulate them • For example: A(1,1:2) = A(1,1:2) + 2 • How to access their elements • For example: B = A(1,1:2) • How to perform mathematical and logical operations on them • For example: C = A./2.5; D = sum(sum(A)) • For example: E = A > 0.5

Review of lab 2 about m file File”-“New”-“ Script”/“ Function” 1)MATLAB 7.12.0(R2011a 口x File Edit Debug Desktop Window Help New Ctrl+N win 32\ Matlab\R2011a\ bin Ctrl+o Function Close Command window Enumeration 日x× Workspace Import Data see Demos Save Workspace As Curls Figure 回回喝区se variable value Set Path. Preferences GUI Page Setup Deployment Project Print Ctrl+P 1 D: \.A2\Lab2\exercise2.m 2 D: \.A2\Lab2\exercise1. m 3 C: \. Desktop\exercise1.m Command History 十口X 4 C: \. Desktop\exercises.m Exit MATLAB mean (A) omcc. bat mean (mean(A)) 自 mex. pl 可] mexext, bat exercise 回 mexsetup pm 回 mexutils pm mean (A) a msvc_modules_installer,pm Lmax v, max w]= max (A) %—2011-10-1119:52% a Start Ready 6
6 Review of Lab 2 about M file • “File” - “New” - “Script”/“Function

Review of lab 2 about m file Open the m-files and run it E Editor-J:starry\code\sub plot. m File Edit Text Go Cell Tools Debug Desktop window Help |哈0|公·付⊙②日省省即追 冒唱-1.0+÷1.1 Run sub plot. m (F 0:pi/20:2*pi olot (x subplot(2, 1, 2) 5- plot (x, sin(2*x)) mypolymx Untitled. m x sub _plot. m x n 1 Col 1 OVRI
7 Review of Lab 2 about M file • Open the M-file’s and run it

Outline of lab 3 1. Review of lab 2 2. User defined function 3. Execution control 4. Plots and graphs using Matlab 5. Basic manipulation in image processing 6. Color image compression
8 Outline of Lab 3 1. Review of Lab 2 2. User defined function 3. Execution control 4. Plots and graphs using Matlab 5. Basic manipulation in image processing 6. Color image compression

User-Defined Function A function is a piece of computer code that accepts ar input argument from the user and provides output to th ne program You may wish to define your own functions-those which are used commonly in your programming User-defined functions are stored as m-files and can be accessed by Matlab if they are in the current directory
User-Defined Function • A function is a piece of computer code that accepts an input argument from the user and provides output to the program. You may wish to define your own functions-those which are used commonly in your programming. User-defined functions are stored as M-files and can be accessed by Matlab if they are in the current directory. 9

User-Defined Function Each function consists of a name, user-provided input and calculated output. For example, the function my function (x) Is named my function, takes user input inside the parentheses(in this case, x), and calculate a result The user does not see the calculations performed but just accepts the answer. The function could be regarded as a black box Input output function
User-Defined Function • Each function consists of a name, user-provided input, and calculated output. For example, the function: my_function(x) – is named my_function, – takes user input inside the parentheses (in this case, x), and – calculate a result. • The user does not see the calculations performed, but just accepts the answer. The function could be regarded as a black box. input output function 10

User-Defined Function User-defined functions are stored as m-files. each must start with a function definition line that contains the word " function one or several variables that defines the function output a function name and one or several variables used for the input argument Save the function as M-file using the same name in your function · Some examples function output=my function(x) function [outputl, output2]=my function(x1, x2, 3) Hints: The function name and the names of the input and output variables are arbitrary and selected by the programmer, but the word function can not be changed
User-Defined Function • User-defined functions are stored as M-files. Each must start with a function definition line that contains ➢ the word “function”, ➢ one or several variables that defines the function output, ➢ a function name, and ➢ one or several variables used for the input argument. ➢ Save the function as M-file using the same name in your function • Some examples: • function output = my_function(x) • function [output1, output2] = my_function(x1,x2,x3) • Hints: The function name and the names of the input and output variables are arbitrary and selected by the programmer, but the word “function” can not be changed. 11
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 同济大学:《机器学习》课程教学资源(PPT讲稿)决策树 Decision Tree.pptx
- 河南中医药大学:《网络技术实训》课程教学资源(PPT课件讲稿)网络建设中的关键技术(主讲:路景鑫).pptx
- 微信公众平台开发与应用(PPT讲座,谭海兵).pptx
- 《计算机常用工具软件》教学资源(PPT讲稿)第8章 音频工具.ppt
- 应用层网络(PPT课件讲稿)Application-layer Overlay Networks.ppt
- 中国科学技术大学:《信息论与编码技术》课程教学资源(PPT课件讲稿)第6章 有噪信道编码定理.pptx
- 《单片机原理与应用》课程教学资源(PPT课件讲稿)第2章 MCS-51单片机结构及原理.pptx
- 深圳大学:《编译原理》课程教学资源(PPT课件讲稿,共四章,尹剑飞).ppt
- 山东大学:《微机原理及单片机接口技术》课程教学资源(PPT课件讲稿)第十章 人机交互接口(主讲:刘忠国).ppt
- 谈模式识别方法在林业管理问题中的应用(PPT讲稿).pptx
- 视觉系统(PPT课件讲稿)The Visual System.ppt
- 北京大学信息学院:《高级软件工程》课程教学资源(PPT课件讲稿)第五讲 新运行平台——云计算平台.pptx
- 《数字图像处理 Digital Image Processing》课程教学资源(PPT课件讲稿)第10章数字图像处理的应用.ppt
- 南京航空航天大学:《数据结构》课程教学资源(PPT课件讲稿)第九章 查找.ppt
- 香港科技大学:Information-Agnostic Flow Scheduling for Commodity Data Centers.pptx
- 同济大学:《软件测试》课程教学资源(PPT课件讲稿)第5章 单元测试(朱少民).ppt
- 《计算机网络安全》课程教学资源(PPT课件讲稿)第三章 网络防病毒.ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)契约式设计 Design by Contract.ppt
- 电子工业出版社:《计算机网络》课程教学资源(第五版,PPT课件讲稿)第四章 网络层.ppt
- 电子工业出版社:《计算机网络》课程教学资源(第五版,PPT课件讲稿)第三章 数据链路层.ppt
- 同济大学:《软件测试》课程教学资源(PPT课件讲稿)第6章 功能测试(朱少民).ppt
- A Unified Approach to Route Planning for Shared Mobility.pptx
- 《网络搜索和挖掘关键技术 Web Search and Mining》课程教学资源(PPT讲稿)Lecture 03 The term vocabulary and postings lists.ppt
- 河南中医药大学(河南中医学院):《计算机网络》课程教学资源(PPT课件讲稿)第二章 物理层.ppt
- 香港浸会大学:Programming Interest Group(PPT讲稿)Combinatorics & Number Theory.ppt
- 南京航空航天大学:《数据结构》课程教学资源(PPT课件讲稿)第七章 图(微软精品课程建设).ppt
- 河南中医药大学(河南中医学院):《计算机文化》课程教学资源(PPT课件讲稿)第五章 运输层.pptx
- C++ Basics(PPT讲稿).ppt
- 电子工业出版社:《计算机网络》课程教学资源(第五版,PPT课件讲稿)第五章 运输层.ppt
- 《计算机组成原理》课程电子教案(PPT课件讲稿)第4章 指令系统.ppt
- 演化计算(PPT讲稿)Evolutionary Computation(EC).ppt
- 上海交通大学:自然语言处理(PPT课件讲稿)Natural Language Processing.ppt
- 厦门大学:《大数据技术原理与应用》课程教学资源(PPT课件讲稿,2017)第4章 分布式数据库HBase.ppt
- 《软件工程》课程教学资源(PPT讲稿)软件测试——系统测试.pptx
- 香港浸会大学:《Data Communications and Networking》课程教学资源(PPT讲稿)Chapter 9 High Speed LANs and Wireless LANs.ppt
- Software Reliability & Testing(PPT讲稿)Overview of Software Reliability Engineering.ppt
- 《Java程序开发》课程教学资源(PPT课件讲稿)第11章 Struts2框架技术.ppt
- 北京航空航天大学:《数据挖掘——概念和技术(Data Mining - Concepts and Techniques)》课程教学资源(PPT课件讲稿)Chapter 02 Getting to Know Your Data.ppt
- 《计算机网络》课程教学资源(PPT课件讲稿)第三章 数据链路层.ppt
- 《信息系统与数据库技术》课程教学资源(PPT课件讲稿)第4章 T-SQL与可编程对象.ppt