I want to find earth mover's distance for two histograms.How do I do that?

18 ビュー (過去 30 日間)
Prachi Sharma
Prachi Sharma 2016 年 12 月 19 日
コメント済み: Ernest Woei 2017 年 4 月 22 日
I have two images and I have find out the rgb channel of both the images.Now I need to find out the earth mover's distance between red,green and blue channels for both the images consecutively.How do I do that?

回答 (1 件)

José-Luis
José-Luis 2016 年 12 月 19 日
  8 件のコメント
Prachi Sharma
Prachi Sharma 2016 年 12 月 21 日
1blue2pink-it is the original image perfblueup-is the upper part take out from the image perfpinkright-is the right part taken out from the image mid-is the intersection of the two color pens screenshot-shows vertically-histograms of rgb channels of blue cropped part,then histograms of rgb channels of pink cropped part then lastly histograms of rgb channels of mid(intersection of two pens).
Ernest Woei
Ernest Woei 2017 年 4 月 22 日
If I recall correctly, for this particular function,
F1 is a vector referring to locations, while W1 refers to the weights at each location. For example, suppose locations are in 3D and we have 3 points,
F1 = [1 2 3;
10 11 12;
20 20 20]
W1 = [1/4;
1/2;
1/4]
which means point (1, 2, 3) has 1/4 weight, (10, 11, 12) has 1/2 weight, and (20, 20, 20) has 1/4 weight.
In your case for images. For example, image 1, channel R. Using R's histogram where this histogram has bins, and each bin has an associated center, then you have the necessary pieces for F1 and W1.
Finally FUNC is a reference function that helps you compute distances between say 3D points or bin centers.

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

カテゴリ

Help Center および File ExchangeImage Filtering and Enhancement についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by