brightness_variation.m

来自「The aip file contains few Matlab routine」· M 代码 · 共 18 行

M
18
字号
function [out_img] =  brightness_variation(input_image,Num_of_Rows, Num_of_Cols)

%% This function adds a scalar value to all the pixels to increase the
%% brightness depending on the existing maximum intensity value

%%%% Brightness Variation of the Image %%%%%%%%%%%
    
min_value = min(min(input_image));
max_value = max(max(input_image));

thr_value = 255 - max_value ; 
    
    for i = 1 : Num_of_Rows
        for j = 1 : Num_of_Cols
                out_img(i,j) = input_image(i,j) + thr_value ;
        end
    end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?