+ if (normblurImage)
+ {
+ auto temp = zImage8.clone();
+ for ( int i = 1; i < MAX_KERNEL_LENGTH; i = i + 2 )
+ {
+ blur( temp, zImage8, Size( i, i ), Point(-1,-1) );
+ }
+ }
+
+ //// Debug: show column part of image
+ // Mat subimg = zImage8(Rect((zImage.cols/num_dist_columns_)*3,0, zImage.cols/num_dist_columns_ , zImage8.rows));
+ // imshow ("column", subimg);
+
+ //detect column distance
+ auto col_width = zImage.cols/num_dist_columns_;
+ for (uint32_t col=0; col<num_dist_columns_; col++)
+ {
+ auto col_y_start = col*col_width;
+ Mat subimg = zImage8(Rect(col_y_start, 0, col_width , zImage8.rows));
+ double min, max;
+ minMaxLoc(subimg,&min,&max);
+ latest_min_distance_diff_[col]=min-latest_min_distance_[col];
+ latest_min_distance_[col]=min;
+ std::cout << "col" << col << " min:" << min << "("<<latest_min_distance_diff_[col]<<")"<< " max:" << max << std::endl;
+ }
+