Extract Matrix

1 次查看(过去 30 天)
Prashant Somani
Prashant Somani 2011-10-22
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.

采纳的回答

Walter Roberson
Walter Roberson 2011-10-22
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 个评论
Prashant Somani
Prashant Somani 2011-10-22
Thank you very much for quick response...

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Operating on Diagonal Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by