ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

You use CV_8UC1 in normalize(). Because of this image_norm should be CV_8UC1 and image_scaled should be CV_8UC1, too. But you use image_scaled.at<float> !

A good practice is do use the Wrapper Mat_<uchar> image_scaled. Because:

  1. You can use a shorter method to access the elements (image_scaled(j,i))
  2. The types can be tested at compile time.