comparison of query image feature and 1000 image feature which stored in .mat file

1 回表示 (過去 30 日間)
vijaylakshmi sajwan
vijaylakshmi sajwan 2020 年 4 月 5 日
コメント済み: Ameer Hamza 2020 年 4 月 7 日
I have stored 1000 image features(16 feature) in v1.mat file and query image feature(16 feature) store in v.mat file how can we compare query image feature(v.mat) with each image feature of(v1.mat) .
  4 件のコメント
Image Analyst
Image Analyst 2020 年 4 月 5 日
What does compare mean to you? Do you have a class for each of the 1000 images, and want to find out which class the query image belongs to using some classification method like KNN or a decision tree or something?
vijaylakshmi sajwan
vijaylakshmi sajwan 2020 年 4 月 7 日
compare mean to find the minimum distance between query image feature and database images feature and 5 least distance images will display

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

回答 (1 件)

Ameer Hamza
Ameer Hamza 2020 年 4 月 5 日
編集済み: Ameer Hamza 2020 年 4 月 5 日
Try this,
V1 = rand(1000,16); % random values for example
V = rand(1,16);
[~,idx] = min(sum((V1-V).^2, 2));
closest_sample = V1(idx,:);
It finds a sample from v1 closest to v, based on Euclidean distance.
  2 件のコメント
vijaylakshmi sajwan
vijaylakshmi sajwan 2020 年 4 月 7 日
sir i have two mat file one is v1.mat file (that store 1000 image feature) and v.mat file (that store query image feature). both are different file. but now i want to use eucledian distance matrix find out the minimum distance images.
Ameer Hamza
Ameer Hamza 2020 年 4 月 7 日
Yes, the above code shows how to do that. Is there any issue when this method?

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

カテゴリ

Help Center および File ExchangeDeep Learning for Image Processing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by