how to convert image of size < 256*256unit8> into size<256*256double> on matlab
1 次查看(过去 30 天)
显示 更早的评论
i have two image(suppose a and b) of size 256*256unit8 and of size 256*256double. and i want to modulate both image so how to do? modulation means a.*b but due to different size a.*b gives an error, so how to make same size of both images?
0 个评论
采纳的回答
Jan
2017-3-22
编辑:Jan
2017-3-22
But both images have the same size, only the type differs. If you get an error, it would be useful if you post the complete message and the line of code, which produces the error.
The double array might have values between 0.0 and 1.0, while the uint8 image contains values in the range of 0 to 255. For the result this might be important. So perhaps you want:
a = randi([0, 255], 256, 256, 'uint8');
b = rand(256, 256);
c = double(a)/255 .* b;
0 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!