Local dimming algorithm in matlab (2)

Local dimming algorithm in matlab

Local dimming algorithm in matlab

1 function L_init = Linit(In) 2 [m,n]=size(In); 3 num_p=m*n; 4 s=0; 5 h = histogram(In,256); 6 counts=h.Values ; 7 for i2 = 1:256 8 h = counts(i2); 9 ii= i2^2; 10 s=s+(h*ii); %求得所有像素与灰度级平方的乘积。 11 % s=s+(h*i2); 12 end 13 num_p = double (num_p); 14 s = double (s); 15 L_temp=(0.0625/num_p)*s; 16 L_init = min(63,L_temp); 17 end

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zwfzwp.html