how to remove unwanted pixels

3 Ansichten (letzte 30 Tage)
nkumar
nkumar am 29 Jun. 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)

Antworten (1)

Image Analyst
Image Analyst am 29 Jun. 2013
Bearbeitet: Image Analyst am 29 Jun. 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 Kommentar
nkumar
nkumar am 1 Jul. 2013
the pic is at
tghe first imaeg is working correctly filled with white region,but second is not as first

Melden Sie sich an, um zu kommentieren.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by