91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 1KB
    文件類型: .m
    金幣: 1
    下載: 0 次
    發布日期: 2021-05-06
  • 語言: Matlab
  • 標簽: light??compensate??

資源簡介

這是一個用matlab編寫的圖像處理光照補償的源代碼,能夠實現彩色圖像的光線補償,增強圖像的亮度。

資源截圖

代碼片段和文件信息

function?im=LightCompensate(I)

[m0n0l]=size(I);
%figure(1)imshow(I)
thresholdco=0.05;???%比例系數
thresholdnum=100;???%像素個數的臨界常數
histogram=zeros(1256);??%灰度級?數組
if?m0*n0*thresholdco????disp(‘輸入圖像太小,請換一張!‘);
????return
end
gray=0;
index0=0;
for?i=1:m0????????%scan?image
?????for?j=1:n0
??????????gray=round(I(ij1)*.299+I(ij2)*.587+I(ij3)*.114);
??????????index0=gray+1;
??????????histogram(1index0)=?histogram(1index0)+1;
?????end
?end
?calnum=0;
?total=m0*n0;
?num=0;
?%next獲得滿足系數thresholdco的臨界灰度級
?index1=0;
?for?i=1:256
?????if?calnum/total?????????index1=256-i+1;
?????????calnum=calnum+histogram(1index1);
?????????num=i;
?????e

評論

共有 條評論