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

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

資源簡介

基于最小交叉熵(minimum cross entropy)圖像分割,

資源截圖

代碼片段和文件信息

function?level?=?MinimumCrossEntropyThreshold(I)
%?Nikhil?R.?Pal?On?Minimum?Cross-Entorpy?Thresholding?
%?Pattern?Recognition?29(4)?1996?575-580?
%
%
%???Example
%???-------
%???????I?=?imread(‘coins.png‘);
%???????level?=?MinimumCrossEntropyThreshold(I);
%?
%?Update:?2009.2.28?23:42:00
%?Author:?WangJun?wangjun_sytu@sina.com
I1=imread(‘11.jpg‘);
I=rgb2gray(I1);
L?=?256;
gray?=?0:1:L-1;
h?=?hist(reshape(I?1?size(I1)*size(I2))?gray);
p?=?h/sum(h);
%?warning?off?MATLAB:divideByZero
%?
%?s_lower?=?2;
%?s?=?2;
%?while?sum(h(1:s))?==?0
%?????s_lower?=?s_lower?+?1;
%?????s?=?s+1;
%?end
%?s_upper?=?L-1;
%?s?=?L-1;
%?while?sum(h(s+1:L))?==?0
%?????s_upper?=?s_upper?-?1;
%?????s?=?s-1;
%?end

for?s?=?2:?L-1?????????%?s:?閾值
????%?Compute?p_o?and?p_b?using?equation?(5)?and?(6)
????sum_ho?=?sum(h(1:s));
????sum_hb?=?sum(h(s+1:L));
????po?=?zeros(1s);
????if?sum_ho?~=0
????????po?=?h(1:s)/sum_ho;
????end
????pb(s+1:L)?=?zeros(1?L-s);
????if?sum_hb?~=?0
????????pb(s+1:L)?=?h(s+1:L)/sum_hb;
????end
????
????%?Compute?landa_o?and?landa_b?using?equation?(10)?and?(11)
????landa_o?=?0;
????if?sum_ho?~=?0
???????

評論

共有 條評論