comparison of query image feature and 1000 image feature which stored in .mat file
1 回表示 (過去 30 日間)
古いコメントを表示
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
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?
回答 (1 件)
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 件のコメント
Ameer Hamza
2020 年 4 月 7 日
Yes, the above code shows how to do that. Is there any issue when this method?
参考
カテゴリ
Help Center および File Exchange で Deep Learning for Image Processing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!