Post Reply 

Extracting pencil drawing from a photo

May 24, 2014, 04:33 (This post was last modified: May 24, 2014 04:39 by Joe.)
Post: #1
Extracting pencil drawing from a photo
This might be a little complicated... I've been trying for hours myself. I want to take this picture:

[Image: qVsyH8B.jpg]

And do 2 things:

1. Flatten it (Make the lighting as even as possible)
2. Extract the pencil lines only

So far I've done this:

[Image: Y5GglIC.png]

Using the grain extraction method found in this thread. But when I try to do Color to Alpha concentric bands show up as a byproduct of the grain extraction. I'd appreciate your help.
Find all posts by this user
Quote this message in a reply
May 24, 2014, 19:32
Post: #2
RE: Extracting pencil drawing from a photo
(May 24, 2014 08:43)ofnuts Wrote:  The solution is to do them over with the path tool, so you get perfect lines (this means: load you picture in Gimp and use it as a guide while using the path editor). Since you are using mostly polygons this will very easy and fast. But even the curves aren't very hard. See attached XCF for the paths (you can do one path per shape).

That isn't quite what I wanted to do; if I wanted simple shapes I would have just made them in inkscape. Sorry, I should have been more specific... I want to preserve the quality of the pencil line, to retain the fact that it was hand-drawn.

What I did manage to do so far is take the second one and

1. Convert it to alpha
2. Merge down onto a white layer
3. Adjust Levels, select the lines using "select by color" and grow/shrink selection
4. Invert selection and delete it
5. Invert selection and reapply color to alpha
6. Place onto a new white layer
7. Manually select and delete all the remaining noise from the top layer

The end result is I cleaned up all the noise around and within the shapes. I could then rearrange the shapes using ctrl-x, ctrl-v. Here is the result:

[Image: vw7OGYY.png]

I also attached the XCF if anyone wants to look at it. I would like to know, however, if there was a better way to go about this.


Attached File(s)
.xcf  Shapes 2.xcf (Size: 197.55 KB / Downloads: 23)
Find all posts by this user
Quote this message in a reply
May 24, 2014, 20:11
Post: #3
RE: Extracting pencil drawing from a photo
quick n dirty method
[Image: B8YJfY7.jpg]

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  How To Make Passport Photo? abrogard 0 127 Jun 4, 2018 00:38
Last Post: abrogard
  Derive duotone "colours" from an existing photo jrickards 1 203 Mar 7, 2018 22:10
Last Post: paynekj
  Best way to bucket fill ink drawing? southofmotown 1 235 Feb 11, 2018 20:59
Last Post: paynekj
  Enhancing photo taken from a LCD screen (not a screenshot) Gorstak 1 223 Jan 2, 2018 09:21
Last Post: paynekj
  Sizing photo to layer gshacte 1 282 Nov 8, 2017 19:27
Last Post: ythgilb

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS