Adptive Thresholding Using the Integral Image
来源:互联网 发布:h5炫酷动画效果源码 编辑:程序博客网 时间:2024/06/05 02:31
论文作者 Derek Bradley* Gerhard Roth
论文给的伪代码:
void vvAdaptiveThreshold( IplImage* inImg, IplImage* outImg){int S = inImg->width >> 5;int T = 10;char *input, *bin;input = inImg->imageData;bin = outImg->imageData;int width = inImg->width;int height = inImg->height;unsigned long* integralImg = 0;int i, j;long sum=0;int count=0;int index;int x1, y1, x2, y2;int s2 = S/2;//bin = new unsigned char[width*height];// create the integral imageintegralImg = (unsigned long*)malloc(width*height*sizeof(unsigned long*));for (i=0; i<width; i++){// reset this column sumsum = 0;for (j=0; j<height; j++){index = j*width+i;sum += input[index];if (i==0)integralImg[index] = sum;elseintegralImg[index] = integralImg[index-1] + sum;}}// perform thresholdingfor (i=0; i<width; i++){for (j=0; j<height; j++){index = j*width+i;// set the SxS regionx1=i-s2; x2=i+s2;y1=j-s2; y2=j+s2;// check the borderif (x1 < 0) x1 = 0;if (x2 >= width) x2 = width-1;if (y1 < 0) y1 = 0;if (y2 >= height) y2 = height-1;count = (x2-x1)*(y2-y1);// I(x,y)=s(x2,y2)-s(x1,y2)-s(x2,y1)+s(x1,x1)sum = integralImg[y2*width+x2] -integralImg[y1*width+x2] -integralImg[y2*width+x1] +integralImg[y1*width+x1];if ((long)(input[index]*count) < (long)(sum*(100-T)/100))bin[index] = 0;elsebin[index] = 255;}}free (integralImg);}这个源码请参考 http://blog.csdn.net/hhygcy/article/details/4280165
+++++++++++++++++++++++++
论文效果
而 我跑了下:
- Adptive Thresholding Using the Integral Image
- Adaptive thresholding using the integral image
- Adaptive Thresholding Using the Integral Image ( Derek Bradley* Gerhard Roth)
- using switch case block not just under the integral type
- 关于Integral Image
- 积分图像(Integral Image)
- 用遗传算法对图像进行多阈值分割(Multi-Thresholding Image Segmentation Using Genetic Algorithm)翻译
- 积分图像matlab实现(The implementation of integral image by matlab)
- 跟踪算法之一_《Robust fragments-based tracking using the integral histogram》阅读心得
- 积分图像(Integral Image)与积分直方图 (Integral Histogram)
- 积分图像(Integral Image)与积分直方图 (Integral Histogram)
- Thresholding
- Thresholding
- OpenCV中Integral Image的源码
- 关于积分图(Integral Image)
- integral image(积分图) 和 boxfilter
- image channels和integral images的解释
- Color-based object detection using Hue and Saturation thresholding
- test
- Android 读取APK签名信息
- 使用Navicat For MySql 将mysql中的数据导出,包括数据库表创建脚本和数据
- JPBM整合SSH
- Android上MediaScanner是如何工作的
- Adptive Thresholding Using the Integral Image
- C#进化史-属性
- oracle -dump events
- hdu1846 Brave Game
- Menu
- linux ftp批量上传和下载文件
- spring 注解
- AOP 实现的原理简析
- ThreadPoolExecutor中策略的选择与工作队列的选择(java线程池)