how to convert image of size < 256*256unit8> into size<256*256double> on matlab
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
ajeet verma
el 22 de Mzo. de 2017
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 comentarios
Respuesta aceptada
Jan
el 22 de Mzo. de 2017
Editada: Jan
el 22 de Mzo. de 2017
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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Image Preview and Device Configuration en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!