Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
Divide an image iteratively
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
The images are classified as resampled or not by the SVM. If the label of the classifed image is resampled which is one I want to divide the image again and apply the SVM until the exact location of resampling is found and draw a rectangle around the resampled area. My code for saved SVM classifier and main script is given below and the other coddes are attched. How to do this ?
function label = classifyImages(f1,f2,f3,f4)
load ImageFeaturesPredict.csv
t = ImageFeaturesPredict(1:end,:);
CompactMdl = loadCompactModel('SVMImageData');
label = predict(CompactMdl,t);
if label==0
fprintf('Non-Resampled');
end
if label==1
fprintf('Resampled');
end
end
mainScript.m
close all;
clear all;
clc;
%img = imread('Original\ucid\ucid00101.tif');
%img = imread('Original\ucid\ucid00099.tif');
img = imread('Original\ucid\ImageDataSet\ucid00426.tif');
img = rgb2gray(img);
img = double(img);
[f1,f3,f4,f5] = extractFeaturesFunctionNew(img);
label = classifyImages()
if true
% code
end if (label==1)
disp('This is a resampled image');
%resampled location finder
resamplelocator(img);
else
disp('This image is not resampled');
end
if true
% code
end
1 commentaire
Image Analyst
le 30 Juin 2018
Unfortunately it seems you forgot to attach your tif images, so no one is likely to do anything until you do.
Réponses (0)
Cette question est clôturée.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!