Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Divide an image iteratively

1 visualización (últimos 30 días)
NC
NC el 30 de Jun. de 2018
Cerrada: MATLAB Answer Bot el 20 de Ag. de 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 comentario
Image Analyst
Image Analyst el 30 de Jun. de 2018
Unfortunately it seems you forgot to attach your tif images, so no one is likely to do anything until you do.

Respuestas (0)

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by