浪翻《intrans函数》2018-10-09

写函数,函数名与文件名同名

调用函数新建个文件。


imag=imread('C:\Users\liulang\Desktop\test.jpg') gray=rgb2gray(imag) log=intrans(gray,'log',1) neg=intrans(gray,'neg') stretch=intrans(gray,'stretch',1,2) gam5=intrans(gray,'gamma',5) gam1=intrans(gray,'gamma',1) stretch15=intrans(gray,'stretch',1,5) stretch105=intrans(gray,'stretch',1,0.5) stretch51=intrans(gray,'stretch',5,1) stretch55=intrans(gray,'stretch',5,5) figure(1),subplot(331),imshow(ori); subplot(332),imshow(neg);title('反转') subplot(333),imshow(log);title('log,c=1') subplot(334),imshow(stretch);title('对比度拉伸m=1,e=2') subplot(335),imshow(gam5);title('gamma=5') subplot(336),imshow(gam1);title('gamma=1') subplot(337),imshow(stretch15);title('m=1,e=5') subplot(338),imshow(stretch105);title('m=1,e=0.5') subplot(339),imshow(stretch51);title('m=5,e=1') subplot(339),imshow(stretch55);title('m=5,e=5')

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容