In this example, we first read an image into a `cv::Mat` object named `image`. We then create another `cv::Mat` object named `scaled` and use the `convertTo` method to scale the pixel values of `image` between 0 and 255. The second parameter `CV_8U` specifies the target data type. The third parameter specifies the scaling factor. Example 2: Converting data type Here, we will convert the data type of a matrix from `CV_8UC3` (8-bit unsigned ints, 3 channels) to `CV_32FC1` (32-bit floats, 1 channel).c++ cv::Mat image = cv::imread("image.jpg"); cv::Mat converted; image.convertTo(converted, CV_32FC1); ``` In this example, we again read an image into a `cv::Mat` object named `image`. We then create another `cv::Mat` object named `converted` and use the `convertTo` method to convert the data type of `image` to `CV_32FC1`. This function is included in the OpenCV library.