필터 지우기
필터 지우기

Error using vision.int​ernal.Casc​adeClassif​ier/load

조회 수: 2 (최근 30일)
Ndoum ekanga Steve willy
Ndoum ekanga Steve willy 2017년 7월 19일
편집: Ndoum ekanga Steve willy 2017년 7월 19일
I have the following error with my Matlab code I want to use vision.CascadeObjectDetector to detect object in image. I have created my labelsession successfully. But when Im running i have this error. I do not have open CV install. Do i need that to use the vision.CascadeObjectDetector?. Also how to set UseROI to true?
this is my error.
Error using vision.internal.CascadeClassifier/load Invalid OpenCV XML file. An error occurred while reading C:\Users\drake\OneDrive\Documents\MATLAB\diamonds.mat.
Error in vision.CascadeObjectDetector/loadXMLFromClassModel (line 455) obj.pCascadeClassifier.load(obj.getModelPath(obj.ClassificationModel));
Error in vision.CascadeObjectDetector/set.ClassificationModel (line 231) loadXMLFromClassModel(obj);
Error in matlab.system.SystemProp/parseInputs
Error in matlab.system.SystemProp/setProperties
Error in vision.CascadeObjectDetector (line 209) setProperties(obj,nargin,varargin{:},'ClassificationModel');
Error in Ass1 (line 121) detector = vision.CascadeObjectDetector('diamonds.mat');
and here is my code. load('diamonds.mat'); detector = vision.CascadeObjectDetector('diamonds.mat');
card1 = imread('card1.bmp');
%detect the diamonds.
bbox = step(detector,card1);
%insert bounding box rectangles and return the marked image
detectedImg = insertObjectAnnotation(card1, 'rectangle', bbox, 'diamonds');
figure;imshow(detectedImg);
Thank you for help

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by