aihot  2017-05-16 07:11:41  OpenCV |   查看评论   
  •     if (image1.rows != image2.rows || image1.cols != image2.cols ||  
  •         image1.rows != image3.rows || image1.cols != image3.cols ||  
  •         image1.step != image2.step || image1.step != image3.step) {  
  •         fprintf(stderr, "their size are different\n");  
  •         return -1;  
  •     }  
  •   
  •     for (int h = 0; h < image1.rows; ++h) {  
  •         const uchar* p1 = image1.ptr(h);  
  •         const uchar* p2 = image2.ptr(h);  
  •         const uchar* p3 = image3.ptr(h);  
  •   
  •         for (int w = 0; w < image1.cols; ++w) {  
  •             if (p1[w] != p2[w] || p1[w] != p3[w]) {  
  •                 fprintf(stderr, "their value are different\n");  
  •                 return -1;  
  •             }  
  •         }  
  •  

    除特别注明外,本站所有文章均为 赢咖4注册 原创,转载请注明出处来自OpenCV中imread/imwrite与imdecode/imencode的异同

    留言与评论(共有 0 条评论)
       
    验证码:
    [lianlun]1[/lianlun]