Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Matlab image processing using hex2dec to generate two block of colour

1 visualización (últimos 30 días)
Peadar Conaghan
Peadar Conaghan el 11 de Ag. de 2019
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Any solution on how to generate the desired image would be greatly appreciated. I'm fairly new to matlab and unsure how to go about this question.
Thanks.

Respuestas (1)

Image Analyst
Image Analyst el 11 de Ag. de 2019
Here's a start on your homework:
hexColor = '05A7AB'
redChannel = hex2dec(hexColor(1:2)) * ones(100, 100, 'uint8');
greenChannel = hex2dec(hexColor(3:4)) * ones(100, 100, 'uint8');
blueChannel = hex2dec(hexColor(5:6)) * ones(100, 100, 'uint8');
rgbImageTop = cat(3, redChannel, greenChannel, blueChannel);
imshow(rgbImageTop);
hexColor = '7d3608'
% etc.
% Combine top and bottom
rgbImage = [rgbImageTop; rgbImageBottom]
It should be easy for you to finish.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by