Click here to Skip to main content
13,089,433 members (58,635 online)
Rate this:
Please Sign up or sign in to vote.
See more: , +
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 6:18am
Manfred R. Bihy 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?
asma89 27-Jun-11 12:40pm
i mean a real picture of any human and i want to make his hairs bald
Ankur\m/ 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
Christian Graus 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
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[^] 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.

Kim Togo 27-Jun-11 13:07pm
Good answer, and link. My 5.
SAKryukov 28-Jun-11 0:42am
Disagree. Please look at my answer and get a sobering view.
Rate this: bad
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.

Roger Gonsalves 28-Jun-11 0:46am
Good answer.
My 5.
TheyCallMeMrJames 28-Jun-11 9:36am
This is a comment, not a solution, you should move it to the comments section.
SAKryukov 29-Jun-11 5:58am
Thank you, Roger.
SAKryukov 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!
TheyCallMeMrJames 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.

SAKryukov 29-Jun-11 12:31pm
All factor is irrelevant. Is some information is absent, it is absent.
TheyCallMeMrJames 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 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".


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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.170813.1 | Last Updated 28 Jun 2011
Copyright © CodeProject, 1999-2017
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