Plotting results of SVM on the trained images in Matlab
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am trying to find horizon line with hog feature extraction and svm training in sea images. The SVM training is done and it is working. I would like to show predicted labels on test images.
`% Bring predicted label to the horizon/background split
hPredict_label = Predict_label(1:length(hlabelTest));
bPredict_label = Predict_label(length(hlabelTest)+1:length(hlabelTest)+length(blabelTest));
% Vizualize predicted/classified data
for i=1:original_imagestest_db.Count
original_file = original_imagestest_db.ImageLocation{i};
figure(200)
x = imread(original_file);
x = imresize(x,[400,400]);
imshow(x);
hold on
num_hf = size(dataset.HorizonFeatsTest{i},1);
num_bf = size(dataset.BgFeatsTest{i},1);
for n=1:num_hf
plot(hxhy(:,1),'ro');
end
for n=1:num_bf
plot(bxby(:,1),'go');
end
end `
actually bxby and hxhy are the x and y coordinates of randomly chosen on the images but the problem is i should not plot them. because they are from training part. I wanna plot the labels and show correct or wrong. When I try to plot hPredict_label it gaves 1 1 1 1 coordinates because these are the 1 labels for horizon on the image.
Do you have any suggestions or any idea?
Thank you
0 Kommentare
Antworten (1)
Image Analyst
am 6 Jun. 2017
I can't reproduce your results or help you since I don't have your data or code up until then. But if you "wanna plot the labels and show correct or wrong" I suggest you use sprintf() to make up text strings for labels, and use text() to place those strings in the overlay above the image.
1 Kommentar
Siehe auch
Kategorien
Mehr zu Image Processing and Computer Vision finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!