Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Divide an image iteratively

1 Ansicht (letzte 30 Tage)
NC
NC am 30 Jun. 2018
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
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 Kommentar
Image Analyst
Image Analyst am 30 Jun. 2018
Unfortunately it seems you forgot to attach your tif images, so no one is likely to do anything until you do.

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by