图像算法:图像阈值分割

SkySeraph Dec 21st 2010  HQU

Email:zgzhaobo@gmail.com    QQ:452728574

Latest Modified Date:Dec.21st 2010 HQU

一、工具:VC+OpenCV

二、语言:C++

三、原理(略)

四、程序

主程序(核心部分) 

  1.  
  2. 代码
  3.  
  4. 1 /*===============================图像分割=====================================*/
  5. 2 /*---------------------------------------------------------------------------*/
  6. 3 /*手动设置阀值*/
  7. 4 IplImage* binaryImg = cvCreateImage(cvSize(w, h),IPL_DEPTH_8U, 1);
  8. 5 cvThreshold(smoothImgGauss,binaryImg,71,255,CV_THRESH_BINARY); 
  9. 6 cvNamedWindow("cvThreshold", CV_WINDOW_AUTOSIZE );
  10. 7 cvShowImage( "cvThreshold", binaryImg );
  11. 8 //cvReleaseImage(&binaryImg); 
  12. 9  /*---------------------------------------------------------------------------*/
  13. 10 /*自适应阀值 //计算像域邻域的平均灰度,来决定二值化的值*/
  14. 11 IplImage* adThresImg = cvCreateImage(cvSize(w, h),IPL_DEPTH_8U, 1);
  15. 12 double max_value=255;
  16. 13 int adpative_method=CV_ADAPTIVE_THRESH_GAUSSIAN_C;//CV_ADAPTIVE_THRESH_MEAN_C
  17. 14  int threshold_type=CV_THRESH_BINARY;
  18. 15 int block_size=3;//阈值的象素邻域大小
  19. 16  int offset=5;//窗口尺寸
  20. 17   cvAdaptiveThreshold(smoothImgGauss,adThresImg,max_value,adpative_method,threshold_type,block_size,offset);
  21. 18 cvNamedWindow("cvAdaptiveThreshold", CV_WINDOW_AUTOSIZE );
  22. 19 cvShowImage( "cvAdaptiveThreshold", adThresImg );
  23. 20 cvReleaseImage(&adThresImg);
  24. 21 /*---------------------------------------------------------------------------*/
  25. 22 /*最大熵阀值分割法*/ 
  26. 23 IplImage* imgMaxEntropy = cvCreateImage(cvGetSize(imgGrey),IPL_DEPTH_8U,1);
  27. 24 MaxEntropy(smoothImgGauss,imgMaxEntropy);
  28. 25 cvNamedWindow("MaxEntroyThreshold", CV_WINDOW_AUTOSIZE );
  29. 26 cvShowImage( "MaxEntroyThreshold", imgMaxEntropy );//显示图像
  30. 27   cvReleaseImage(&imgMaxEntropy ); 
  31. 28 /*---------------------------------------------------------------------------*/
  32. 29 /*基本全局阀值法*/
  33. 30 IplImage* imgBasicGlobalThreshold = cvCreateImage(cvGetSize(imgGrey),IPL_DEPTH_8U,1);
  34. 31 cvCopyImage(srcImgGrey,imgBasicGlobalThreshold);
  35. 32 int pg[256],i,thre; 
  36. 33 for (i=0;i<256;i++) pg[i]=0;
  37. 34 for (i=0;i<imgBasicGlobalThreshold->imageSize;i++) // 直方图统计
  38. 35   pg[(BYTE)imgBasicGlobalThreshold->imageData[i]]++; 
  39. 36 thre = BasicGlobalThreshold(pg,0,256); // 确定阈值
  40. 37   cout<<"The Threshold of this Image in BasicGlobalThreshold is:"<<thre<<endl;//输出显示阀值
  41. 38   cvThreshold(imgBasicGlobalThreshold,imgBasicGlobalThreshold,thre,255,CV_THRESH_BINARY); // 二值化 
  42. 39   cvNamedWindow("BasicGlobalThreshold", CV_WINDOW_AUTOSIZE );
  43. 40 cvShowImage( "BasicGlobalThreshold", imgBasicGlobalThreshold);//显示图像
  44. 41   cvReleaseImage(&imgBasicGlobalThreshold);
  45. 42 /*---------------------------------------------------------------------------*/
  46. 43 /*OTSU*/
  47. 44 IplImage* imgOtsu = cvCreateImage(cvGetSize(imgGrey),IPL_DEPTH_8U,1);
  48. 45 cvCopyImage(srcImgGrey,imgOtsu);
  49. 46 int thre2;
  50. 47 thre2 = otsu2(imgOtsu);
  51. 48 cout<<"The Threshold of this Image in Otsu is:"<<thre2<<endl;//输出显示阀值
  52. 49 cvThreshold(imgOtsu,imgOtsu,thre2,255,CV_THRESH_BINARY); // 二值化 
  53. 50 cvNamedWindow("imgOtsu", CV_WINDOW_AUTOSIZE );
  54. 51 cvShowImage( "imgOtsu", imgOtsu);//显示图像 
  55. 52 cvReleaseImage(&imgOtsu);
  56. 53 /*---------------------------------------------------------------------------*/
  57. 54 /*上下阀值法:利用正态分布求可信区间*/
  58. 55 IplImage* imgTopDown = cvCreateImage( cvGetSize(imgGrey), IPL_DEPTH_8U, 1 );
  59. 56 cvCopyImage(srcImgGrey,imgTopDown);
  60. 57 CvScalar mean ,std_dev;//平均值、 标准差
  61. 58 double u_threshold,d_threshold;
  62. 59 cvAvgSdv(imgTopDown,&mean,&std_dev,NULL); 
  63. 60 u_threshold = mean.val[0] +2.5* std_dev.val[0];//上阀值
  64. 61 d_threshold = mean.val[0] -2.5* std_dev.val[0];//下阀值
  65. 62 //u_threshold = mean + 2.5 * std_dev; //错误
  66. 63 //d_threshold = mean - 2.5 * std_dev;
  67. 64 cout<<"The TopThreshold of this Image in TopDown is:"<<d_threshold<<endl;//输出显示阀值
  68. 65 cout<<"The DownThreshold of this Image in TopDown is:"<<u_threshold<<endl;
  69. 66 cvThreshold(imgTopDown,imgTopDown,d_threshold,u_threshold,CV_THRESH_BINARY_INV);//上下阀值
  70. 67 cvNamedWindow("imgTopDown", CV_WINDOW_AUTOSIZE );
  71. 68 cvShowImage( "imgTopDown", imgTopDown);//显示图像 
  72. 69 cvReleaseImage(&imgTopDown);
  73. 70 /*---------------------------------------------------------------------------*/
  74. 71 /*迭代法*/
  75. 72 IplImage* imgIteration = cvCreateImage( cvGetSize(imgGrey), IPL_DEPTH_8U, 1 );
  76. 73 cvCopyImage(srcImgGrey,imgIteration);
  77. 74 int thre3,nDiffRec;
  78. 75 thre3 =DetectThreshold(imgIteration, 100, nDiffRec);
  79. 76 cout<<"The Threshold of this Image in imgIteration is:"<<thre3<<endl;//输出显示阀值
  80. 77 cvThreshold(imgIteration,imgIteration,thre3,255,CV_THRESH_BINARY_INV);//上下阀值
  81. 78 cvNamedWindow("imgIteration", CV_WINDOW_AUTOSIZE );
  82. 79 cvShowImage( "imgIteration", imgIteration);
  83. 80 cvReleaseImage(&imgIteration);

模块程序

迭代法

  1. 代码
  2. /*======================================================================*/
  3. /* 迭代法*/
  4. /*======================================================================*/
  5. // nMaxIter:最大迭代次数;nDiffRec:使用给定阀值确定的亮区与暗区平均灰度差异值
  6. int DetectThreshold(IplImage*img, int nMaxIter, int& iDiffRec) //阀值分割:迭代法
  7. {
  8. //图像信息
  9. int height = img->height;
  10. int width = img->width;
  11. int step = img->widthStep/sizeof(uchar);
  12. uchar *data = (uchar*)img->imageData;
  13.  
  14. iDiffRec =;
  15. int F[]={ }; //直方图数组
  16. int iTotalGray=;//灰度值和
  17. int iTotalPixel =;//像素数和
  18. byte bt;//某点的像素值
  19.  
  20. uchar iThrehold,iNewThrehold;//阀值、新阀值
  21. uchar iMaxGrayValue=,iMinGrayValue=;//原图像中的最大灰度值和最小灰度值
  22. uchar iMeanGrayValue1,iMeanGrayValue2;
  23.  
  24. //获取(i,j)的值,存于直方图数组F
  25. for(int i=;i<width;i++)
  26. {
  27. for(int j=;j<height;j++)
  28. {
  29. bt = data[i*step+j];
  30. if(bt<iMinGrayValue)
  31. iMinGrayValue = bt;
  32. if(bt>iMaxGrayValue)
  33. iMaxGrayValue = bt;
  34. F[bt]++;
  35. }
  36. }
  37.  
  38. iThrehold =;//
  39. iNewThrehold = (iMinGrayValue+iMaxGrayValue)/;//初始阀值
  40. iDiffRec = iMaxGrayValue - iMinGrayValue;
  41.  
  42. for(int a=;(abs(iThrehold-iNewThrehold)>0.5)&&a<nMaxIter;a++)//迭代中止条件
  43. {
  44. iThrehold = iNewThrehold;
  45. //小于当前阀值部分的平均灰度值
  46. for(int i=iMinGrayValue;i<iThrehold;i++)
  47. {
  48. iTotalGray += F[i]*i;//F[]存储图像信息
  49. iTotalPixel += F[i];
  50. }
  51. iMeanGrayValue1 = (uchar)(iTotalGray/iTotalPixel);
  52. //大于当前阀值部分的平均灰度值
  53. iTotalPixel =;
  54. iTotalGray =;
  55. for(int j=iThrehold+;j<iMaxGrayValue;j++)
  56. {
  57. iTotalGray += F[j]*j;//F[]存储图像信息
  58. iTotalPixel += F[j];
  59. }
  60. iMeanGrayValue2 = (uchar)(iTotalGray/iTotalPixel);
  61.  
  62. iNewThrehold = (iMeanGrayValue2+iMeanGrayValue1)/; //新阀值
  63. iDiffRec = abs(iMeanGrayValue2 - iMeanGrayValue1);
  64. }
  65.  
  66. //cout<<"The Threshold of this Image in imgIteration is:"<<iThrehold<<endl;
  67. return iThrehold;
  68. }

Otsu代码一

  1. 代码
  2. /*======================================================================*/
  3. /* OTSU global thresholding routine */
  4. /* takes a 2D unsigned char array pointer, number of rows, and */
  5. /* number of cols in the array. returns the value of the threshold */
  6. /*parameter:
  7. *image --- buffer for image
  8. rows, cols --- size of image
  9. x0, y0, dx, dy --- region of vector used for computing threshold
  10. vvv --- debug option, is 0, no debug information outputed
  11. */
  12. /*
  13. OTSU 算法可以说是自适应计算单阈值(用来转换灰度图像为二值图像)的简单高效方法。
  14. 下面的代码最早由 Ryan Dibble提供,此后经过多人Joerg.Schulenburg, R.Z.Liu 等修改,补正。
  15. 算法对输入的灰度图像的直方图进行分析,将直方图分成两个部分,使得两部分之间的距离最大。
  16. 划分点就是求得的阈值。
  17. */
  18. /*======================================================================*/
  19. int otsu (unsigned char*image, int rows, int cols, int x0, int y0, int dx, int dy, int vvv)
  20. {
  21.  
  22. unsigned char*np; // 图像指针
  23. int thresholdValue=; // 阈值
  24. int ihist[]; // 图像直方图,256个点
  25.  
  26. int i, j, k; // various counters
  27. int n, n1, n2, gmin, gmax;
  28. double m1, m2, sum, csum, fmax, sb;
  29.  
  30. // 对直方图置零
  31. memset(ihist, , sizeof(ihist));
  32.  
  33. gmin=; gmax=;
  34. // 生成直方图
  35. for (i = y0 +; i < y0 + dy -; i++)
  36. {
  37. np = (unsigned char*)image[i*cols+x0+];
  38. for (j = x0 +; j < x0 + dx -; j++)
  39. {
  40. ihist[*np]++;
  41. if(*np > gmax) gmax=*np;
  42. if(*np < gmin) gmin=*np;
  43. np++; /* next pixel */
  44. }
  45. }
  46.  
  47. // set up everything
  48. sum = csum =0.0;
  49. n =;
  50.  
  51. for (k =; k <=; k++)
  52. {
  53. sum += (double) k * (double) ihist[k]; /* x*f(x) 质量矩*/
  54. n += ihist[k]; /* f(x) 质量 */
  55. }
  56.  
  57. if (!n)
  58. {
  59. // if n has no value, there is problems...
  60. fprintf (stderr, "NOT NORMAL thresholdValue = 160\n");
  61. return ();
  62. }
  63.  
  64. // do the otsu global thresholding method
  65. fmax =-1.0;
  66. n1 =;
  67. for (k =; k <; k++)
  68. {
  69. n1 += ihist[k];
  70. if (!n1)
  71. {
  72. continue;
  73. }
  74. n2 = n - n1;
  75. if (n2 ==)
  76. {
  77. break;
  78. }
  79. csum += (double) k *ihist[k];
  80. m1 = csum / n1;
  81. m2 = (sum - csum) / n2;
  82. sb = (double) n1 *(double) n2 *(m1 - m2) * (m1 - m2);
  83. /* bbg: note: can be optimized. */
  84. if (sb > fmax)
  85. {
  86. fmax = sb;
  87. thresholdValue = k;
  88. }
  89. }
  90.  
  91. // at this point we have our thresholding value
  92.  
  93. // debug code to display thresholding values
  94. if ( vvv & )
  95. fprintf(stderr,"# OTSU: thresholdValue = %d gmin=%d gmax=%d\n",
  96. thresholdValue, gmin, gmax);
  97.  
  98. return(thresholdValue);
  99. }

Otsu代码二 

  1. 代码
  2. /*======================================================================*/
  3. /* OTSU global thresholding routine */
  4. /*======================================================================*/
  5. int otsu2 (IplImage *image)
  6. {
  7. int w = image->width;
  8. int h = image->height;
  9.  
  10. unsigned char*np; // 图像指针
  11. unsigned char pixel;
  12. int thresholdValue=; // 阈值
  13. int ihist[]; // 图像直方图,256个点
  14.  
  15. int i, j, k; // various counters
  16. int n, n1, n2, gmin, gmax;
  17. double m1, m2, sum, csum, fmax, sb;
  18.  
  19. // 对直方图置零...
  20. memset(ihist, , sizeof(ihist));
  21.  
  22. gmin=; gmax=;
  23. // 生成直方图
  24. for (i =; i < h; i++)
  25. {
  26. np = (unsigned char*)(image->imageData + image->widthStep*i);
  27. for (j =; j < w; j++)
  28. {
  29. pixel = np[j];
  30. ihist[ pixel]++;
  31. if(pixel > gmax) gmax= pixel;
  32. if(pixel < gmin) gmin= pixel;
  33. }
  34. }
  35.  
  36. // set up everything
  37. sum = csum =0.0;
  38. n =;
  39.  
  40. for (k =; k <=; k++)
  41. {
  42. sum += k * ihist[k]; /* x*f(x) 质量矩*/
  43. n += ihist[k]; /* f(x) 质量 */
  44. }
  45.  
  46. if (!n)
  47. {
  48. // if n has no value, there is problems...
  49. //fprintf (stderr, "NOT NORMAL thresholdValue = 160\n");
  50. thresholdValue =;
  51. goto L;
  52. }
  53.  
  54. // do the otsu global thresholding method
  55. fmax =-1.0;
  56. n1 =;
  57. for (k =; k <; k++)
  58. {
  59. n1 += ihist[k];
  60. if (!n1) { continue; }
  61. n2 = n - n1;
  62. if (n2 ==) { break; }
  63. csum += k *ihist[k];
  64. m1 = csum / n1;
  65. m2 = (sum - csum) / n2;
  66. sb = n1 * n2 *(m1 - m2) * (m1 - m2);
  67. /* bbg: note: can be optimized. */
  68. if (sb > fmax)
  69. {
  70. fmax = sb;
  71. thresholdValue = k;
  72. }
  73. }
  74.  
  75. L:
  76. for (i =; i < h; i++)
  77. {
  78. np = (unsigned char*)(image->imageData + image->widthStep*i);
  79. for (j =; j < w; j++)
  80. {
  81. if(np[j] >= thresholdValue)
  82. np[j] =;
  83. else np[j] =;
  84. }
  85. }
  86.  
  87. //cout<<"The Threshold of this Image in Otsu is:"<<thresholdValue<<endl;
  88. return(thresholdValue);
  89. }

最大熵阀值 

  1. 代码
  2. /*============================================================================
  3. = 代码内容:最大熵阈值分割
  4. = 修改日期:2009-3-3
  5. = 作者:crond123
  6. = 博客:http://blog.csdn.net/crond123/
  7. = E_Mail:crond123@163.com
  8. ===============================================================================*/
  9. // 计算当前位置的能量熵
  10. double caculateCurrentEntropy(CvHistogram * Histogram1,int cur_threshold,entropy_state state)
  11. {
  12. int start,end;
  13. int total =;
  14. double cur_entropy =0.0;
  15. if(state == back)
  16. {
  17. start =;
  18. end = cur_threshold;
  19. }
  20. else
  21. {
  22. start = cur_threshold;
  23. end =;
  24. }
  25. for(int i=start;i<end;i++)
  26. {
  27. total += (int)cvQueryHistValue_1D(Histogram1,i);//查询直方块的值 P304
  28. }
  29. for(int j=start;j<end;j++)
  30. {
  31. if((int)cvQueryHistValue_1D(Histogram1,j)==)
  32. continue;
  33. double percentage = cvQueryHistValue_1D(Histogram1,j)/total;
  34. /*熵的定义公式*/
  35. cur_entropy +=-percentage*logf(percentage);
  36. /*根据泰勒展式去掉高次项得到的熵的近似计算公式
  37. cur_entropy += percentage*percentage;*/
  38. }
  39. return cur_entropy;
  40. // return (1-cur_entropy);
  41. }
  42.  
  43. //寻找最大熵阈值并分割
  44. void MaxEntropy(IplImage *src,IplImage *dst)
  45. {
  46. assert(src != NULL);
  47. assert(src->depth ==&& dst->depth ==);
  48. assert(src->nChannels ==);
  49. CvHistogram * hist = cvCreateHist(,&HistogramBins,CV_HIST_ARRAY,HistogramRange);//创建一个指定尺寸的直方图
  50. //参数含义:直方图包含的维数、直方图维数尺寸的数组、直方图的表示格式、方块范围数组、归一化标志
  51. cvCalcHist(&src,hist);//计算直方图
  52. double maxentropy =-1.0;
  53. int max_index =-;
  54. // 循环测试每个分割点,寻找到最大的阈值分割点
  55. for(int i=;i<HistogramBins;i++)
  56. {
  57. double cur_entropy = caculateCurrentEntropy(hist,i,object)+caculateCurrentEntropy(hist,i,back);
  58. if(cur_entropy>maxentropy)
  59. {
  60. maxentropy = cur_entropy;
  61. max_index = i;
  62. }
  63. }
  64. cout<<"The Threshold of this Image in MaxEntropy is:"<<max_index<<endl;
  65. cvThreshold(src, dst, (double)max_index,, CV_THRESH_BINARY);
  66. cvReleaseHist(&hist);
  67. }

基本全局阀值法 

  1. 代码
  2. /*============================================================================
  3. = 代码内容:基本全局阈值法
  4. ==============================================================================*/
  5. int BasicGlobalThreshold(int*pg,int start,int end)
  6. { // 基本全局阈值法
  7. int i,t,t1,t2,k1,k2;
  8. double u,u1,u2;
  9. t=;
  10. u=;
  11. for (i=start;i<end;i++)
  12. {
  13. t+=pg[i];
  14. u+=i*pg[i];
  15. }
  16. k2=(int) (u/t); // 计算此范围灰度的平均值
  17. do
  18. {
  19. k1=k2;
  20. t1=;
  21. u1=;
  22. for (i=start;i<=k1;i++)
  23. { // 计算低灰度组的累加和
  24. t1+=pg[i];
  25. u1+=i*pg[i];
  26. }
  27. t2=t-t1;
  28. u2=u-u1;
  29. if (t1)
  30. u1=u1/t1; // 计算低灰度组的平均值
  31. else
  32. u1=;
  33. if (t2)
  34. u2=u2/t2; // 计算高灰度组的平均值
  35. else
  36. u2=;
  37. k2=(int) ((u1+u2)/); // 得到新的阈值估计值
  38. }
  39. while(k1!=k2); // 数据未稳定,继续
  40. //cout<<"The Threshold of this Image in BasicGlobalThreshold is:"<<k1<<endl;
  41. return(k1); // 返回阈值
  42. }

五 效果(略)

 

Author:         SKySeraph

Email/GTalk: zgzhaobo@gmail.com    QQ:452728574

From:         http://www.cnblogs.com/skyseraph/

本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,请尊重作者的劳动成果。

【图像算法】七种常见阈值分割代码(Otsu、最大熵、迭代法、自适应阀值、手动、迭代法、基本全局阈值法)的更多相关文章

  1. 七种常见阈值分割代码(Otsu、最大熵、迭代法、自适应阀值、手动、迭代法、基本全局阈值法)

    http://blog.csdn.net/xw20084898/article/details/17564957 一.工具:VC+OpenCV 二.语言:C++ 三.原理 otsu法(最大类间方差法, ...

  2. 【转】七种常见阈值分割代码(Otsu、最大熵、迭代法、自适应阀值、手动、迭代法、基本全局阈值法)

    http://blog.csdn.net/xw20084898/article/details/17564957 一.工具:VC+OpenCV 二.语言:C++ 三.原理 otsu法(最大类间方差法, ...

  3. 灰度图像的自动阈值分割(Otsu 法)(转载)

    灰度图像的自动阈值分割(Otsu 法) 机器视觉领域许多算法都要求先对图像进行二值化.这种二值化操作阈值的选取非常重要.阈值选取的不合适,可能得到的结果就毫无用处.今天就来讲讲一种自动计算阈值的方法. ...

  4. 七种常见经典排序算法总结(C++实现)

    排序算法是非常常见也非常基础的算法,以至于大部分情况下它们都被集成到了语言的辅助库中.排序算法虽然已经可以很方便的使用,但是理解排序算法可以帮助我们找到解题的方向. 1. 冒泡排序 (Bubble S ...

  5. Java枚举的七种常见用法

    用法一:常量 在JDK1.5之前,我们定义常量都是:publicstaticfianl.....现在好了,有了枚举,可以把相关的常量分组到一个枚举类型里,而且枚举提供了比常量更多的方法. Java代码 ...

  6. 七种常见经典排序算法总结(C++)

    最近想复习下C++,很久没怎么用了,毕业时的一些经典排序算法也忘差不多了,所以刚好一起再学习一遍. 除了冒泡.插入.选择这几个复杂度O(n^2)的基本排序算法,希尔.归并.快速.堆排序,多多少少还有些 ...

  7. 灰度图像的自动阈值分割(Otsu 法)

    关于otsu分割方法,这个文章讲的是最好的,清晰易懂,一看就是作者认真思考过的. 因为在看这个算法的时候我就想,如果一个很大的图像上,大部分像素值都在0 - 50范围内,但是有很小一块像素值在240的 ...

  8. 七种常见的核酸序列蛋白编码能力预测工具 | ncRNAs | lncRNA

    注:这些工具的应用都是受限的,有些本来就是只能用于预测动物,在使用之前务必用ground truth数据来测试一些.我想预测某一个植物的转录本,所以可以拿已经注释得比较好的拟南芥来测试一下.(测试的结 ...

  9. 第十四节,OpenCV学习(三)图像的阈值分割

    图像的阈值处理 图像的阈值分割:图像的二值化(Binarization) 阈值分割法的特点是:适用于目标与背景灰度有较强对比的情况,重要的是背景或物体的灰度比较单一,而且总可以得到封闭且连通区域的边界 ...

随机推荐

  1. 反向Ajax,第2部分:WebSocket

    转自:http://kb.cnblogs.com/page/112616/ 前言 时至今日,用户期待的是可通过web访问快速.动态的应用.这一文章系列展示了如何使用反向Ajax(Reverse Aja ...

  2. win8.1 cygwin编译java轻量虚拟机avian

    1.背景 昨天在网上看到别人用aauto写本地小程序写的很爽,我觉得如果java的jre能小一点,凭借java庞大的第三方类库写小工具也还算不错的.本人就经常用eclipse+一些commons包写些 ...

  3. 用Chrome devTools 调试Android手机app中的web页面。

    (1) 手机要满足Android系统为4.4或更高版本,低版本不支持这种方式.(2) 确保App已经开启了webview的debug调试模式,由Android工程师协助.(2) 用usb数据线连接好手 ...

  4. angular 嵌套实现树结构 ng-repeat ng-include

    效果图 ang.html <!doctype html><html lang="en"><head>    <meta charset=& ...

  5. BZOJ1565 植物大战僵尸

    AC通道:http://www.lydsy.com/JudgeOnline/problem.php?id=1565 这题看上去并不会做,结果又是最大权闭合子图的裸题. 于是就去看了一发论文,明白建图的 ...

  6. 4-Highcharts 3D图之3D普通饼图

    <!DOCTYPE> <html lang='en'> <head> <title>4-Highcharts 3D图之3D普通饼图</title& ...

  7. frequentism-and-bayesianism-chs-iii

    frequentism-and-bayesianism-chs-iii   频率主义 vs 贝叶斯主义 III:置信(Confidence)与可信(Credibility),频率主义与科学,不能混为一 ...

  8. Hadoop伪分布模式配置

    本作品由Man_华创作,采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可.基于http://www.cnblogs.com/manhua/上的作品创作. 请先按照上一篇文章H ...

  9. Sqli-labs less 35

    Less-35 35关和33关是大致的一样的,唯一的区别在于sql语句的不同. $sql="SELECT * FROM users WHERE id=$id LIMIT 0,1"; ...

  10. zoj Fibonacci Numbers ( java , 简单 ,大数)

    题目 //f(1) = 1, f(2) = 1, f(n > 2) = f(n - 1) + f(n - 2) import java.io.*; import java.util.*; imp ...