Borrar filtros
Borrar filtros

Extract Matrix

1 visualización (últimos 30 días)
Prashant Somani
Prashant Somani el 22 de Oct. de 2011
I am using impixel as below, after selecting pixels, it returns column and row values respectively in "c" and "r".
[c,r,P] = impixel(im)
Now than after I am converting it in hsv format
imh=rgb2hsv(im)
Now trying to fetch hue, saturation and value from imh of desired pixels as below, it is not give exact answers.
h=imh(r,c,1)
s=imh(r,c,2)
v=imh(r,c,3)
Can any one help in this.

Respuesta aceptada

Walter Roberson
Walter Roberson el 22 de Oct. de 2011
h = imh(sub2ind(size(imh),r,c,1*ones(size(r))));
s = imh(sub2ind(size(imh),r,c,2*ones(size(r))));
v = imh(sub2ind(size(imh),r,c,3*ones(size(r))));
  1 comentario
Prashant Somani
Prashant Somani el 22 de Oct. de 2011
Thank you very much for quick response...

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Operating on Diagonal Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by