I’ve written a program, wich saves an image to an opencv-Mat (Mat_Test_1).
If I debug, i can see, that there’s just one single value stored in “Mat_Test_1.data” (for example “W1!” / “87”).
When I use cv::imshow, the Image gets displayed correctly.
But I need to transform this single value in multiple Pixel-Values.
For example, “Mat_Test_2. data” should contain “Y1 Y1Y1Y1Y1Y0X0…” and so on.
A workaround, which works is the following:
cv::imwrite("test.png", Mat_Test_1); Mat_Test_2 = cv::imread("test.png", cv::IMREAD_COLOR);
But this is too slow to be done with 30fps or sth.