- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
第二章基本原理要点
2.5 Matlab图像的基本操作 数学运算符: Matlab数学运算符要求输入的是double类型的数据。 * 2.5 Matlab图像的基本操作 关系运算符: * 2.5 Matlab图像的基本操作 逻辑运算符与逻辑函数 A=[1 2 0; 0 4 5]; B= [1 -2 3;0 1 1]; AB; xor (A,B); All (A) Any(A) * 2.5 Matlab图像的基本操作 逻辑运算符与逻辑函数 * 2.5 Matlab图像的基本操作 重要的变量和常量 * 2.5 Matlab图像的基本操作 流控制 * 2.5 Matlab图像的基本操作 流控制 If expression Statement end If expression1 Statement1 elseif expression2 statement2 else statement3 end 条件语句 function av = average(A) %AVERAGE Computes the average value of an array. %AV = AVERAGE(A) computes the average value of input array, A, which must be a 1-D or 2-D array. Check the validity of the input. (Keep in mind that a 1-D array is a special case of a 2-D array.) if ndims(A) 2 error(The dimensions of the input cannot exceed 2.) end % Compute the average av = sum(A(:))/length(A(:)); * 2.5 Matlab图像的基本操作 流控制 for index =start:increment:end Statement end 循环语句 for index1 =start1:increment1:end1 Statement1 for index2 =start2:increment2:end2 Statement2 end end for q = 0:5:100 filename = sprintf (‘a_%3d.jpg,q); imwrite (f, filename,’quality’,q) end; * 2.5 Matlab图像的基本操作 流控制 while expression Statement end 循环语句 while expression1 Statement1 while expression2 Statement2 end statement3 end A = 10; B = 5; while A A = A-1; While B B=B-1; end end * 2.5 Matlab图像的基本操作 流控制 Switch switch expression case case expression1 statement1 case case expression2 statement2 … otherwise statement end 选择语句 switch newclass case ‘uint8’ g= im2uint8(f); case ‘uint16’ g= im2uint16(f); case ‘double’ g= im2double(f); otherwise error (‘unknown type’) end * 2.5 Matlab图像的基本操作 function s = subim(f, m, n, rx, cy) %SUBIM Extract subimage. %S = SUBIM(F, M, N, RX, CY) extracts a subimage, S,from the input image, F. The subimage is of size M-by-N, and the coordinates of its top,
您可能关注的文档
最近下载
- 九年级上册科学浙教版物质的分类教案.doc VIP
- 2022年福建技术师范学院计算机科学与技术专业《计算机组成原理》科目期末试卷A(有答案).docx VIP
- 企业职工基本养老保险退休时间申请书.docx VIP
- 2025至2030中国鼻胃管和口胃管行业产业运行态势及投资规划深度研究报告.docx VIP
- 短视频文案创新撰写方法.pptx
- 充电模块CEG75050 说明书用户手册.pdf
- jstz3902a jstz3905b jstz3907智能摆闸安装调试说明书中文版a1.pdf VIP
- 2025年黑龙江省生态环境厅下属事业单位考试真题.pdf VIP
- 2023年福建技术师范学院计算机科学与技术专业《计算机组成原理》科目期末试卷B(有答案).docx VIP
- 2023年福建技术师范学院计算机科学与技术专业《计算机组成原理》科目期末试卷A(有答案).docx VIP
原创力文档


文档评论(0)