Unable to resolve the name vision.BlobAnalysis

조회 수: 8 (최근 30일)
Dinu Th.
Dinu Th. 2020년 4월 17일
답변: Maadhav Akula 2020년 4월 22일
Hello, I was trying to replicate a matab tutorial to learn image processing. I used the same codes that was given in the tutorial. But in blob analysis it gives me as error as ''Unable to resolve the name vision.BlobAnalysis''. Can anyone expalain what I am doing wrong? I am still learning the basics. Thank you.
AuMat = imread('pic.png');
save pic.mat picMat;
%LOAD SAMPLE
load pic.mat
subplot(1,3,1)
imshow('pic.png')
%Threshold image
%Convert RGB image to chosen color space
I = rgb2hsv(picMat);
% Define thresholds for channel 1 based on histogram settings
channel1Min = 0.931;
channel1Max = 0.047;
% Define thresholds for channel 2 based on histogram settings
channel2Min = 0.735;
channel2Max = 1.000;
% Define thresholds for channel 3 based on histogram settings
channel3Min = 0.000;
channel3Max = 1.000;
% Create mask based on chosen histogram thresholds
sliderBW = ( (I(:,:,1) >= channel1Min) | (I(:,:,1) <= channel1Max) ) & ...
(I(:,:,2) >= channel2Min ) & (I(:,:,2) <= channel2Max) & ...
(I(:,:,3) >= channel3Min ) & (I(:,:,3) <= channel3Max);
BW = sliderBW;
subplot(1,3,2)
imshow(BW)
%remove disturbances
diskElem=strel('disk',2);
Ibwopen = imopen(BW,diskElem);
subplot(1,3,3)
imshow(Ibwopen)
%blob analysis
hBlobAnalysis= vision.BlobAnalysis('MinimumBlobArea',200,'MaximumBlobArea',5000);
[objArea,objCentroid,bboxOut]= step(hBlobAnalysis,Ibwopen);

답변 (1개)

Maadhav Akula
Maadhav Akula 2020년 4월 22일
Hi,
Can you possibly check whether Computer Vision Toolbox is installed or not by using the following command:
ver vision
Alternatively you can also check whether your account has License for Computer Vision Toolbox or not by checking the License Centre:

카테고리

Help CenterFile Exchange에서 Image Processing and Computer Vision에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by