1、帮助 | 留言交流 | 首页 我的图书馆 主题阅读 精彩目录 精品文苑 Tags 会员浏览 好书推荐 图象细化算法(转载)mtjs 收录于 2009-01-09 阅读数: 公众公开 tags: vc 图象 算法 图象细化算法#include “StdAfx.h“#include #include void beforethin(unsigned char *ip, unsigned char *jp, unsigned long lx, unsigned long ly)unsigned long i,j;for(i=0; i0)jpi*lx+j=1;elsejpi*lx+j=0;/Hildi
2、tch 细化算法/功能:对图象进行细化/参数:image:代表图象的一维数组/ lx:图象宽度/ ly:图象高度主题阅读 吸烟的危害 吸烟与癌症 吸烟等于吸入重金属 男性如此吸烟害上加害 如何戒烟 中药戒烟处方四则 戒烟:生活中的经济学 公开戒烟秘方 给男士们推荐戒烟方法 令人不寒而栗的戒烟广告 马克思戒烟 关于吸烟这件事,有趣 热点推荐 少见的文革“群丑图“ 精心整理的80 个管理类. 135 个治病小偏方,从. 中国历史朝代 让“开心穴”帮/ 无返回值void ThinnerHilditch(void *image, unsigned long lx, unsigned long ly)c
3、har *f, *g;char n10;unsigned int counter;short k, shori, xx, nrn;unsigned long i, j;long kk, kk11, kk12, kk13, kk21, kk22, kk23, kk31, kk32, kk33, size;size = (long)lx * (long)ly;g = (char *)malloc(size);if(g = NULL)printf(“error in allocating memory!n“);return;f = (char *)image;for(i=0; i=1)bdr1|=0
4、x80k;if(bdr1fkk = 2;b=“0“;for(k=0; kk);if(b=1)bdr1|=0x80k;if(nk=2)bdr2|=0x80k;if(bdr1=bdr2)fkk = 4;continue;if(fkk!=2)continue;if(bdr2else if(bdr2else if(bdr2else if(bdr2for(i=1; i=4)bdr4|=0x80k;if(nk=5)bdr5|=0x80k;if(bdr4continue;if(bdr4continue;if(fkk=3|fkk=4)fkk = c;erase = 0;for(i=1; i0)if(!cond
5、)continue;gkk = 0;shori = 1;continue;if(n6=1 gkk = 0;shori = 1;continue;if(n8=1 gkk = 0;shori = 1;continue;if(n4=1 gkk = 0;shori = 1;continue;if(n5=1 gkk = 0;shori = 1;continue;if(n7=1 gkk = 0;shori = 1;continue;if(n1=1 gkk = 0;shori = 1;continue;if(n3=1 gkk = 0;shori = 1;continue;cond = 1;if(!cond)continue;gkk = 0;shori = 1;for(i=0; i发表评论 发送评论时内容自动复制到剪切板