# find the most similar vector from 10 vectors

3 visualizzazioni (ultimi 30 giorni)
talayeh ghodsi il 30 Giu 2019
Modificato: Stephen23 il 30 Giu 2019
hello every one.
I have one echo image and 10 ct images. i have extract Local binary pattern of them, and i have calculated the squared error between lbp of echo and lbp of each of the 10 ct images. now could anyone answer me how can i find the most similar ct image to echo image from 10 squared errors?
lbpct124 = extractLBPFeatures(ct124,'Upright',false);
lbpct125 = extractLBPFeatures(ct125,'Upright',false);
lbpct126 = extractLBPFeatures(ct126,'Upright',false);
lbpct127 = extractLBPFeatures(ct127,'Upright',false);
lbpct128 = extractLBPFeatures(ct128,'Upright',false);
lbpct129 = extractLBPFeatures(ct129,'Upright',false);
lbpct130 = extractLBPFeatures(ct130,'Upright',false);
lbpct131 = extractLBPFeatures(ct131,'Upright',false);
lbpct132 = extractLBPFeatures(ct132,'Upright',false);
lbpct133 = extractLBPFeatures(ct133,'Upright',false);
lbpct134 = extractLBPFeatures(ct134,'Upright',false);
lbpct135 = extractLBPFeatures(ct135,'Upright',false);
lbpct136 = extractLBPFeatures(ct136,'Upright',false);
lbpct137 = extractLBPFeatures(ct137,'Upright',false);
lbpct138 = extractLBPFeatures(ct138,'Upright',false);
lbpecho = extractLBPFeatures(echo,'Upright',false);
echoVsct124 = (lbpecho - lbpct124).^2;
echoVsct125 = (lbpecho - lbpct125).^2;
echoVsct126 = (lbpecho - lbpct126).^2;
echoVsct127 = (lbpecho - lbpct127).^2;
echoVsct128 = (lbpecho - lbpct128).^2;
echoVsct129 = (lbpecho - lbpct129).^2;
echoVsct130 = (lbpecho - lbpct130).^2;
echoVsct131 = (lbpecho - lbpct131).^2;
echoVsct132 = (lbpecho - lbpct132).^2;
echoVsct133 = (lbpecho - lbpct133).^2;
echoVsct134 = (lbpecho - lbpct134).^2;
echoVsct135 = (lbpecho - lbpct135).^2;
echoVsct136 = (lbpecho - lbpct136).^2;
echoVsct137 = (lbpecho - lbpct137).^2;
echoVsct138 = (lbpecho - lbpct138).^2;
figure
bar([echoVsct124; echoVsct125; echoVsct126; echoVsct127; echoVsct128; echoVsct129; echoVsct130; echoVsct131; echoVsct132; echoVsct133; echoVsct134; echoVsct135; echoVsct136; echoVsct137; echoVsct138]','grouped')
title('Squared Error of LBP Histograms')
xlabel('LBP Histogram Bins')
legend('echo vs ct124','echo vs ct125','echo vs ct126','echo vs ct127','echo vs ct128','echo vs ct129','echo vs ct130','echo vs ct131','echo vs ct132','echo vs ct133','echo vs ct134','echo vs ct135','echo vs ct136','echo vs ct137','echo vs ct138')
##### 2 CommentiMostra NessunoNascondi Nessuno
Stephen23 il 30 Giu 2019
Modificato: Stephen23 il 30 Giu 2019
Note that copy-and-pasting code is a sign that you are doing something wrong.
Note that using numbered variables is a sign that you are doing something wrong.
You would be much better of using indexing, exactly as shown in the MATLAB documentation:
talayeh ghodsi il 30 Giu 2019
is it possible for you to tell me how? could you please rewrite my code in simple way? sorry i am a beginner in matlab

Accedi per commentare.

### Risposte (1)

Image Analyst il 30 Giu 2019
Have you tried similarity metrics such as ssim(), immse(), and psnr()?
##### 1 CommentoMostra -1 commenti meno recentiNascondi -1 commenti meno recenti
talayeh ghodsi il 30 Giu 2019
sorry but the images are multimodal, i have extract features of images (LBP) and now i want to find the best match features
i have 1 vector of feature from calss A,which is 1*10 against 10 vector of features from calss B each is 1*10
i want to find the best feature vector from class B to be the most similar to feature vector of class A

Accedi per commentare.

### Categorie

Scopri di più su Image Arithmetic in Help Center e File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by