Jump to content
You must now use your email address to sign in [click for more info] ×

How to extract scanned pencil sketches from the background?


Recommended Posts

Er, it's an awful lot easier.

Make sure the document is set to Transparent. Document > Transparent Background, then go Filters > Colours > Erase white paper. That's it.

It is also possible to adjust the transparency of the Alpha channel to lighten or darken the pencil strokes (or rather, the edges of them) by applying a Curves layer set to adjust Alpha.

alpha.jpg.0e6fcea5c065f36847c25df87d12d486.jpg

Windows PCs. Photo and Designer, latest non-beta versions.

Link to comment
Share on other sites

  • 1 year later...

Thanks @toltec for this post, I'll try this method for my pencil drawings. I used to do that by selecting the sampled color first (select sample color) and then hitting delete, but this method not always gives the desired effects.

Link to comment
Share on other sites

  • 3 years later...

In Affinity Photo I missed an action I used in Photoshop from Media Militia  used to isolate pencil strokes from a white background..
Today I discovered a quite simple order of steps, but had not the time to automate this (I am still not familiar with these steps in Affinity Photo yet).

Advice in advance: This description may look long at first read, but you can speed up with exercise quite good or even automate the standard adjustments and layer operations between the manual tasks as macros one day.

Knocking out the pencil strokes

  1. Adjust the basic lighting and contrast to get an almost white background and strong strokes matching the density of your expectations whenon white background.
  2. When using non destrive settings, combine the master and the adjustment layers in one group.
  3. Duplicate the group and keep at least one for later adjustments.
  4. Change the mixing mode of the copy of the group to multiply.
  5. Select the group and render the group as mask
  6. Put an opaque pixel layer below and fill with with full density of black (or later with experience with another stroke color)
  7. Select the mask and the pixel layer and make sure others are deselected to keep them as backup.
  8. Merge the selected layers into one.
  9. You now have one layer with isolated opaque black pencil strokes and mixing mode normal
  10. Usually you can duplicate this layer to increase density in the dark areas and merge these again or keep them for adjustment or later reuse.

Knocking out the background areas of objects in white and or prepare for coloration.

Motivation: For cartoon like content it is nice to have overlaying elements like e.g. a hand in front of the body, that covers up content behind.

  1. Duplicate the knocked out pencil layer and make the upper invisible and therefore lock it. You can alternatively keep it above , lock it and set transparency to 25% to keep the lines visible during the next task.
  2. We now remove isolated strokes and dirt/dust without fills completely from this layer (they are preserved in the backup/invisible stroke layer)
  3. Now adjust our pencil to a pencil stroke similar to the regular ones. Diameter, roughness etc. should match, but it is just a coarse match necessary. We use full black as colour
  4. Adjust the Eraser similar as well and select 100% opaque white as colour.
  5. We now use the black pencil tip to close open gaps between originally and intentionally not closing areas. We get them back later from the strokes layer.
  6. We use the white one later to cut back areas filled with white not matching our expectations. So we have a chance to fix minor mistakes later and can speed up the closing of the gaps
  7. With the magic wand we now create a selection and add/select all areas outside of intended white fills, and add / subtract holes as well.
  8. Now we expand the selection by minimum 2 pixels (more if necessary). It shrinks underneath the black lines, simliar to trapping.
  9. Add a new pixel layer under the strokes layer and invert the selection.
  10. Fill the whole selection with white.
  11. If your strokes layer is now set to visible, you can hide the selection master and keep it for backup. If you are lucky you are already done and have nice strokes with a seperate opaque white background.
  12. I prefer to touchup the often too clean gaps in the white layer using the rough pencil style eraser to trim the white contous uín gaps or below lighter grainy strokes to my needs. You can see at one how it ends up.

Now clean up your file, keep a masterversion with all you need for later adjustment and use the export persona to export nice PNG or tiffs with white background. If you like you can vectorize the stroke and fill layers and use then as startpoint for vector graphics as well.

Example with layers (adjustments are in german)
image.thumb.png.ca325764c62006be0e9d273c3c57367b.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.