how to remove unwanted pixels

3 ビュー (過去 30 日間)
nkumar
nkumar 2013 年 6 月 29 日
I have a face image and have created mask for it now i want tp remove the shoulder portion,i need only the mask,kindly help
my code
clc
clear all
I=imread('images.jpg');
a=rgb2gray(I);
bw=edge(a,'canny');
imshow(bw)
bw = bwareaopen(bw,30);
se = strel('disk',2);
bw2 = imclose(bw,se);,
bw1 = imfill(bw2,'holes');
L = bwlabel(bw1);
figure,imshow(bw1)

回答 (1 件)

Image Analyst
Image Analyst 2013 年 6 月 29 日
編集済み: Image Analyst 2013 年 6 月 29 日
I can't view your image on that web site. And I couldn't download it either. That has to be one of the mose annoying file sharing sites I've seen. Why not use snag.gy or tinypic.com or some site where we can immediately see the image and not have to do multiple clicks and download some executable?
In general I don't see that algorithm as being effective. I might try to do skin color detection and then look where the skin is wide (the face) then gets narrow for a stretch (in the neck) and then either vanishes (wearing a shirt) or widens way out again (no shirt covering the shoulders). But it depends on how reproducible and alike your photos are and what kind of hair and clothing you expect to be present on the subjects.
  1 件のコメント
nkumar
nkumar 2013 年 7 月 1 日
the pic is at
tghe first imaeg is working correctly filled with white region,but second is not as first

サインインしてコメントする。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by