Unable to resolve the name vision.BlobAnalysis

4 ビュー (過去 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 Center および File ExchangeImage 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