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
Server\R2015a\toolbox\vision\visiondata\data_total
> 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:
load('data_total.mat');
positiveInstances = positiveInstances(:,1:2);
imDir = fullfile(matlabroot,'toolbox','vision','visiondata','data_total');
addpath(imDir);
negativeFolder = fullfile('Users','Raedalex','Desktop','MATLAB','Tesis','negative');
negativeImages = negative(negativeFolder);
trainCascadeObjectDetector('TubesDetector.xml',positiveInstances, ...
negativeFolder,'FalseAlarmRate',0.1,'NumCascadeStages',5);

답변 (1개)

Image Analyst
Image Analyst 2016년 12월 2일

0 개 추천

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

Thanks for taking your time in helping me... It worked. but now its telling me this
Index exceeds matrix dimensions.
Error in Ipositivas (line 5)
negativeImages = negative(negativeFolder);
I think so, do not know what are you referring at.
Thanks Again.
Image Analyst
Image Analyst 2016년 12월 2일
I don't know what the function or array "negative" is. What is it?
raed bou aram
raed bou aram 2016년 12월 23일
Its for the negative instances i am using for training the program. I am new in this kind of training.
Walter Roberson
Walter Roberson 2016년 12월 24일
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 2016년 12월 24일
Please attach 'data_total.mat' and your negative.m file.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Image Processing and Computer Vision에 대해 자세히 알아보기

질문:

2016년 12월 2일

댓글:

2016년 12월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by