how to remove unwanted pixels

1 vue (au cours des 30 derniers jours)
nkumar
nkumar le 29 Juin 2013
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)

Réponses (1)

Image Analyst
Image Analyst le 29 Juin 2013
Modifié(e) : Image Analyst le 29 Juin 2013
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 commentaire
nkumar
nkumar le 1 Juil 2013
the pic is at
tghe first imaeg is working correctly filled with white region,but second is not as first

Connectez-vous pour commenter.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by