my faceDetector = vision.Cas​cadeObject​Detector does not work

2 次查看(过去 30 天)
I have MATLAB R2015a and the command faceDetector = vision.CascadeObjectDetector(); does not work in it. I do have the computer vision toolbox. The error display says Undefined variable "vision" or class "vision.CascadeObjectDetector".
  2 个评论
John  Wick
John Wick 2023-7-6
function Lung_Cancer(path) subplot(4,2,1); imshow(path); title("Step:1 Original Image"); img=rgb2gray(imread(path)); subplot(4,2,2); imshow(img); title("Step:2 Gray Image"); J=medfilt3(img); subplot(4,2,3); imshow(J); title("Step:3 Median Filter"); K = imadjust(J,[],[],2.5); subplot(4,2,4); imshow(K); title("Step:4 Contrast Adjust"); level = graythresh(K); BW = imbinarize(K,level); subplot(4,2,5); imshow(BW); title("Step:5 Binary Image"); SE = strel('disk',7); BW2 = imopen(BW, SE); subplot(4,2,6); imshow(BW2); title("Step:6 Opening Operation"); BW3 = imclearborder(BW2); subplot(4,2,7); imshow(BW3); title("Step:7 Clearing Border"); BW3 = imfill(BW3,"holes"); subplot(4,2,8); imshow(BW3); title("Step:8 Holes Filling"); props=regionprops(BW3, 'Area', 'Perimeter', 'Eccentricity'); disp("Area: "+props.Area); disp("Perimeter: "+props.Perimeter); disp("Eccentricity: "+props.Eccentricity);
John  Wick
John Wick 2023-7-6
image = imread('jump.jpg'); [height, width, planes] = size(image); rgb = reshape(image, height, width * planes); imagesc(rgb); r = image(:, :, 1); g = image(:, :, 2); b = image(:, :, 3); threshold = 100; imagesc(b < threshold); blueness = double(b) - max(double(r), double(g)); imagesc(blueness); mask = blueness < 20; imagesc(mask); labels = bwlabel(mask); id = labels(200, 200); man = (labels == id); imagesc(man); imshow(man);

请先登录,再进行评论。

回答(2 个)

Sean de Wolski
Sean de Wolski 2015-9-21
Do you have the Computer Vision System Toolbox installed?
ver

Dima Lisin
Dima Lisin 2015-9-21
编辑:Dima Lisin 2015-9-21
If you type
>> ver
Do you see Computer Vision System Toolbox among the installed products?
  2 个评论
John  Wick
John Wick 2023-7-6
I = imread('C:\Users\19b-099-cs\Desktop\pic.png'); imshow(I); >> Igray = rgb2gray(I); imshow(Igray); >> Ibw = im2bw(Igray,graythresh(Igray)); imshow(Ibw); >> Iedge = edge(uint8(Ibw)); imshow(Iedge); >> se = strel('square',2); Iedge2 = imdilate(Iedge, se); >> imshow(Iedge2); >> Ifill= imfill(Iedge2,'holes'); imshow(Ifill); >> [Ilabel, num] = bwlabel(Ifill); disp(num); Iprops = regionprops(Ilabel); Ibox = [Iprops.BoundingBox]; Ibox = reshape(Ibox,[4 50]); imshow(I) 50 >> hold on; for cnt = 1:50 rectangle('position',Ibox(:,cnt),'edgecolor','r'); end

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Computer Vision with Simulink 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by