coInvert.norm(src);
void ColorInvert::norm(Mat& image) {
Mat dst;
cout << image.type() << endl;
image.convertTo(image, CV_32F);
cout << dst.type() << endl;
normalize(image, dst, 1.0, 0, NORM_MINMAX);
cout << dst.type() << endl;
imshow("图像数据归一化", dst);
}

这篇文章介绍了如何使用OpenCV中的CoInvert函数进行色彩反转,并展示了如何将Mat对象转换为32位浮点类型以便进行归一化处理,最后显示了归一化后的图像数据归一化结果。
2214





