Borrar filtros
Borrar filtros

Can you help me with this error?

1 visualización (últimos 30 días)
raed bou aram
raed bou aram el 2 de Dic. de 2016
Comentada: Image Analyst el 24 de Dic. de 2016
Hi, I am trying to train matlab with positive and negative instances of a set of images. But, when i run the script it's say this:
Warning: Name is nonexistent or not a directory: C:\Program
Files\MATLAB\MATLAB Production
> In path (line 109)
In addpath (line 86)
In Ipositivas (line 4)
Index exceeds matrix dimensions.
Error in Ipositivas (line 6)
negativeImages = negative(negativeFolder);
This is the code I am running:
positiveInstances = positiveInstances(:,1:2);
imDir = fullfile(matlabroot,'toolbox','vision','visiondata','data_total');
negativeFolder = fullfile('Users','Raedalex','Desktop','MATLAB','Tesis','negative');
negativeImages = negative(negativeFolder);
trainCascadeObjectDetector('TubesDetector.xml',positiveInstances, ...

Respuestas (1)

Image Analyst
Image Analyst el 2 de Dic. de 2016
It looks like the folder does not exist. And it looks like data_total is the name of a mat file, not a subfolder of "C:\Program Files\MATLAB\MATLAB Production Server\R2015a\toolbox\vision\visiondata"
Try this:
imDir = fullfile(matlabroot,'toolbox','vision','visiondata');
Also, do you have the Computer Vision System Toolbox installed? What does your "ver" command report?
  5 comentarios
Walter Roberson
Walter Roberson el 24 de Dic. de 2016
It sounds as if negative is an array. but negativeFolder is a string, so you are trying to index an array at a string. For that statement to be valid then negative would have to be a function name or a function handle.
Image Analyst
Image Analyst el 24 de Dic. de 2016
Please attach 'data_total.mat' and your negative.m file.

Iniciar sesión para comentar.


Más información sobre Computer Vision Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by