質問

I have 256 x 256 x 3 double Array. How to create (RGB) picture from it in Mat-lab. The values are like (3091, 986, 1003, 1699). Thanks in advance..

役に立ちましたか?

解決

You can normalise the values in the matrix so that they lie between 0 and 1 and then use the command imshow:

// create a random example of a matrix
I = 4000*rand(256, 256, 3);

// normalise the values in I
for i = 1:3
    I(:, :, i) = I(:, :, i)/max(max(I(:, :, i)));
end

// display as image
imshow(I, 'InitialMagnification', 'fit')
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top