Histogram of Luv image

1 回表示 (過去 30 日間)
Maria Kanwal
Maria Kanwal 2016 年 10 月 29 日
コメント済み: Maria Kanwal 2016 年 11 月 1 日
I need to compute a single histogram with 125 bins (5^3) for an Luv image. I can get separate channels using L=img(:,:,1) and so on and get a 1D array against them as L=L(:). And i can use histc function with setting r = [5 5 5] and passing 0:prod(r)-1 as second argument (binranges). But I don't understand how the L,u and v channels should be consolidated into a single vector to pass as first argument to histc so i get right histogram. Some help please.

採用された回答

Image Analyst
Image Analyst 2016 年 10 月 29 日
Simply use histogram:
histObject = histogram(img);
It will treat img and one single object - all the L, U, and V channels lumped together with no distinction. I have no idea why you'd want to do this deceptive thing however.
Or you can use histcounts(). histc() is deprecated so you should use these two new functions.
  8 件のコメント
Image Analyst
Image Analyst 2016 年 11 月 1 日
There was no sarcasm there. Sorry you misinterpreted it. It's not unusual for people to hire experts to carry out projects for a variety of reasons - it's done all the time. We do it extensively in my company.
Maria Kanwal
Maria Kanwal 2016 年 11 月 1 日
oh i am sorry about that.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by