Clear Filters
Clear Filters

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

2 views (last 30 days)
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 Comments
John  Wick
John Wick on 6 Jul 2023
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 on 6 Jul 2023
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);

Sign in to comment.

Answers (2)

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

Dima Lisin
Dima Lisin on 21 Sep 2015
Edited: Dima Lisin on 21 Sep 2015
If you type
>> ver
Do you see Computer Vision System Toolbox among the installed products?
  2 Comments
John  Wick
John Wick on 6 Jul 2023
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

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!