how to write a matlab code to convert hexformat into decimal format of a colour image.The image resolution is 320X430.Please help me....

2 visualizaciones (últimos 30 días)
Thanks
  5 comentarios
Tinkul
Tinkul el 7 de Sept. de 2012
FFFFFFA111
AAAAAAFFFF
FF0000AAAA
Jst take two values at a time from first row and then next two values and then next two vales.Now cnvert all these vales(2 values each at a time) into decimal format.I think now you got it.........
thanks
Image Analyst
Image Analyst el 7 de Sept. de 2012
But you didn't do what I asked. Are those letters in a string variable? Can you do "whos" on it?

Iniciar sesión para comentar.

Respuesta aceptada

Greg
Greg el 7 de Sept. de 2012
Assuming the hex numbers are in a 1xN char (test in this example):
Output will be Mx1 double array (ans in this example)
test = '0123456789ABCDEF';
ans = hex2dec(reshape(test, 2, numel(test)/2)');
  3 comentarios
Tinkul
Tinkul el 10 de Sept. de 2012
sir if i will take test='0123456789ABCDE' Then it gives error....why?
Tinkul
Tinkul el 10 de Sept. de 2012
sir,suppose A=['ff','ff','ff';'ab','fe','ba';'12','45','ab'] then how can i convert this matrix to decimal format.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Convert Image Type 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!

Translated by