"My Camera give me back an RGBA Image R8|G8|B8|A8 = 32 Bit"
"size is : width*height*(bpp/3)"
Shouldn't that be width*height*(bpp/4) ?
Assuming it's 4 bytes per pixel, and that imgRaw is indeed of class uint8:
img = permute(reshape(imgRaw, 4, width, height), [3, 2, 1])
imgRGB = img(:, :, 1:3);
imshow(imgRGB);
This assumes that the image pixel are stored in row-major order, which your code also assumed.
Best Answer