how can i detect edge and eliminate it from face image ?

1 回表示 (過去 30 日間)
messaoudi nada
messaoudi nada 2021 年 11 月 2 日
回答済み: yanqi liu 2021 年 11 月 3 日
Hello, please some one tell me how can i detect edge from face image and than eliminate it for features point reduction ?

回答 (1 件)

yanqi liu
yanqi liu 2021 年 11 月 3 日
clc; clear all; close all;
img = imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/787205/image.png');
im = rgb2gray(img);
pointTracker = vision.PointTracker('MaxBidirectionalError', 2);
points = detectMinEigenFeatures(im);
figure; imshow(img, []);
hold on; plot(points);
ed = edge(im, 'sobel');
figure; imshow(ed, []);
ind = [];
wh = 3;
for i = 1 : length(points)
try
rc = round(points(i).Location);
edi = ed(rc(2)-wh:rc(2)+wh,rc(1)-wh:rc(1)+wh);
if any(edi(:))
ind = [ind i];
end
catch
end
end
points(ind) = [];
figure; imshow(img, []);
hold on; plot(points);

カテゴリ

Help Center および File ExchangeImage Segmentation and Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by