Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: image ImageProcessing , +
i have a picture that contain a real time image of any human and i want to make make him bald like i want that his hairs should be get removed from his head at run time on any button click , how shoud i do that in c# ?
Posted 27-Jun-11 7:18am
asma89396
Comments
Manfred R. Bihy at 27-Jun-11 12:37pm
   
"A picture that contains a real time image"
Now what would that be? Please feel free to explain what you mean by "real time image"!
Are you talking about a video stream maybe?
Ankur\m/ at 28-Jun-11 0:48am
   
[moved from comment below the answer]
OP wrote:
i mean a real picture of any human and i want to make his hairs bald
asma89 at 27-Jun-11 12:40pm
   
i mean a real picture of any human and i want to make his hairs bald
Christian Graus at 28-Jun-11 1:17am
   
As others have said, you're living in a fantasy. You can't just invent a spec, post here, and expect people to give you code to do what you want.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Asma, this is no small task and the question you're asking isn't really specific enough for this forum.
 
You can make use of libraries such as AForge.net[^] which will have you on your way down this kind of development, but you'll have to do the heavy lifting on your own.
 
Facial recognition components might also help: you would be able to get bearings on where the face is in the picture. This might allow you to "extract" the face, then you could perhaps use that in combination with AForge to make your magic.
 
If you do, however, find a Imaging.HumanFaceManipulation library let me know!
 
When you start plowing through the deeper parts of the problem, and if you run into any specific questions, please do not hesitate to post them here.
 
Cheers.
  Permalink  
Comments
Kim Togo at 27-Jun-11 13:07pm
   
Good answer, and link. My 5.
SAKryukov at 28-Jun-11 0:42am
   
Disagree. Please look at my answer and get a sobering view.
--SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Let's be serious: is it about programming or art? Formally, part of information about person's head is hidden by the hair. From the stand point of a person having just a photograph, this information does not exist. You can only fantasize about the shape, color and other characteristics of the persons head and draw it somehow. This is called art. Nothing or very little of technology or science. In this way, the problem is off-topic for this forum.
 
—SA
  Permalink  
Comments
Roger Gonsalves at 28-Jun-11 0:46am
   
Good answer.
My 5.
SAKryukov at 29-Jun-11 5:58am
   
Thank you, Roger.
--SA
TheyCallMeMrJames at 28-Jun-11 9:36am
   
This is a comment, not a solution, you should move it to the comments section.
SAKryukov at 29-Jun-11 6:06am
   
No. It completely solves the problem, in an implicit form. The answer is: you cannot do it based on pure technology and rational approach.
 
You have a strange notion of the solution. The negative solution is also a solution. Imagine the question "how can I create a perpetuum mobile?" According to your logic, the answer based on the conservation law is "not a solution".
 
When I want to write a comment, I post it as a comment. It that your vote of 3? Ha!
--SA
TheyCallMeMrJames at 29-Jun-11 9:41am
   
Yeah, it was my vote of 3, but only because I see it as a comment and not a solution. It would have been a 5 of a comment, though ;o).
 
We don't know many factors:
1) Is this any random photo, or posed?
2) What are the lighting conditions?
3) Is the person looking at the camera?
 
All of these things, plus complications like hair, make it difficult to know whether or not it's plausible.
 
Here's a reality, though: you can walk into my local Walmart, step up to a kiosk in cosmetics and alter your hair style, hair color and make up. If you're into that.
 
The kiosk gives instructions on where to stand, how to line up, and to move your hair out of the way of your face.
 
Given the question above, that's immediately where my mind went...a department store kiosk. But you can see that, given my response, I still made it clear that the solution would be 'heavy lifting' and 'magic'. Magic == good innovation == hard work.
 
Cheers.
SAKryukov at 29-Jun-11 12:31pm
   
All factor is irrelevant. Is some information is absent, it is absent.
--SA
TheyCallMeMrJames at 29-Jun-11 14:55pm
   
You're only saying it's irrelevant because you're operating under the assumption that the work is impossible. I'm certain it's not. While not by any means trivial, it's definitely doable and already exists, and it's not too far gone to suggest plausible starting points.
 
We'll have to agree to disagree for now. And the next time you're in town I'll take you to Wal-Mart ;o)
SAKryukov at 29-Jun-11 15:29pm
   
OK, now it's how you define "possible". It depends on who is commissioning the work. There is a known practical problem: contouring of the image; for example, a image of a person could be cut out of background, new background is added.
 
You would say solving the problem is possible just because a number of software products solving this problem is sold, including Photoshop.
 
I would say, this is purely impossible to do. The reasons are similar to what I explained about balding. This software is solving similar, highly simplified problem. So far, in all I saw I was able to tell this trick was done with some automatic processing. When I cannot see the lousy editing, it all about cases when it was by a good re-touch artist. But this is art: the artist uses his/her fantasy and real-life experience, knowledge of user perception, not formal modeling of the scene.
 
The problem is that we apply criteria of different "quality". By my criteria balding of photo is purely impossible. It's quite a format approach: if some information is lost, it cannot be re-covered, only re-created "from fantasy".
 
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 386
1 Marcin Kozub 225
2 Sergey Alexandrovich Kryukov 215
3 /\jmot 189
4 Praneet Nadkar 173
0 OriginalGriff 8,289
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,624
3 Maciej Los 4,989
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 28 Jun 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100