如果运行不通,可尝试不直接点击“运行”,而是点击“运行并前进”按钮。
这个MATLAB函数将灰度图像I中的强度值映射到J中的新值,使得1%的数据在I的低强度和高强度下饱和。对图像f中任意像素的灰度值x进行变换,得到图像f 中对应像素的灰度值XF。
具体的算法步骤如下:
i. Set adjustment linearity value;
ii. Read in the image to be processed and assign it to I;
iii. Assign image data to R. Change the original image into a monochrome image and keep the red color. Use the function imadjust to adjust the gray level of R, and the result returns R1;
iv. Assign image data to G. Change the original image into a monochrome image and keep the green color. Use the function imadjust to adjust the gray level of R, and the result returns G1;
v. Assign image data to B. Change the original image into a monochrome image and keep the blue color. Use the function imadjust to adjust the gray level of R, and the result returns B1;
vi. Get RGB image after transformation;
vii. Draw R, R1, G, G1, B, B1 images and observe the results of linear gray-scale transformation.
结果一般。
版权声明:本文为CSDN博主「灵泉matlab」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_31434537/article/details/104562388
1