freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

vc膨脹和腐蝕-資料下載頁(yè)

2025-07-24 21:40本頁(yè)面
  

【正文】 60。 膨脹的方法是,拿S的原點(diǎn)和X上的點(diǎn)一個(gè)一個(gè)地對(duì)比,如果S上有一個(gè)點(diǎn)落在X的范圍內(nèi),則S的原點(diǎn)對(duì)應(yīng)的點(diǎn)就為圖像。以下是詳細(xì)的代碼,并且附上測(cè)試圖片:includeincludeincludeincludeincludeunsigned char **get_matrix_space(int m,int n){int i。unsigned char **a。a=(unsigned char **)calloc(m,sizeof(unsigned char *))。for(i=0。ireturn a。}main(){FILE *fs,*fd。unsigned char c1,c2,**ps,**pd,**v,**get_matrix_space(int,int)。int width,height,L,i,j,l,m,windowSize,match。 if((fs= fopen(,rb)) ==NULL){ printf(can39。t open %s\n,)。 exit(1)。 } if((fd = fopen(,wb)) ==NULL){ printf(can39。t open %s\n,)。 exit(1)。 }fscanf(fs,%c%c\n%d%d\n%d\n,amp。c1,amp。c2,amp。width,amp。height,amp。L)。ps=get_matrix_space(height,width)。pd=get_matrix_space(height,width)。for(i=0。i for(j=0。j fread(amp。ps[i][j],sizeof(unsigned char),1,fs)。 }}match = 0。////////////////////////用2x2方塊作為膨脹的結(jié)構(gòu)元素。for(i=0。i for(j=0。j for(l=i。l for(m=j。m if(ps[l][m]==255){ match = 1。 } } } if(match == 1){ pd[i][j] = 255。 match = 0。 } }}//////////////////////fprintf(fd,%c%c\n%d %d\n%d\n,39。P39。,39。539。,width,height,L)。for(i=0。i for(j=0。j fwrite(amp。pd[i][j],sizeof(unsigned char),1,fd)。 }}}MatlaboriginalBW =imread(39。39。)。se=strel(39。line39。,20,0)。BW=imdilate(originalBW,se)。imshow(BW)imwrite(BW,39。39。) 一般先將處理圖像轉(zhuǎn)為整型或邏輯型再處理即可。 s2=logical(originalBW)%這是邏輯型的(二值圖像),你也可以用uint8轉(zhuǎn)為8位非負(fù)整型(灰度或彩色圖像) s3=imdilate(s2,s2,39。full39。)
點(diǎn)擊復(fù)制文檔內(nèi)容
范文總結(jié)相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1