Pages: [1] 2   Go Down

Author Topic: Help with extracting letters  (Read 7322 times)

Slobodan Blagojevic

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 18090
  • When everyone thinks the same, nobody thinks
    • My website
Help with extracting letters
« on: January 26, 2016, 09:22:06 pm »

I would appreciate some ideas about the best way to extracts letters from an image. The letters could be extracted as an outline, to be filled with another color, or they could retain the color and brightness of the original (but eliminate the gray background). Once extracted, they would be merged with another image with a white background. I tried "select color range" in PS, but because of the uneven lighting, it picks either some background or leaves some letters out. I am on LR/PS CC 2015.

Schewe

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 6229
    • http:www.schewephoto.com
Re: Help with extracting letters
« Reply #1 on: January 26, 2016, 10:11:01 pm »

I would appreciate some ideas about the best way to extracts letters from an image.

Sadly, in my experience, the only way to do that is using Photoshop's Path tool. Yes, it's time consuming and tedious but that's really the only way to get a clean, accurate outline. Over the years, I got really quick and accurate using the Path tool. One trick is to turn on the Rubber Band option in the Tools Option.
Logged

Slobodan Blagojevic

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 18090
  • When everyone thinks the same, nobody thinks
    • My website
Re: Help with extracting letters
« Reply #2 on: January 26, 2016, 10:35:19 pm »

Sadly, in my experience, the only way to do that is using Photoshop's Path tool...

I was afraid you are going to say that ;)

langier

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1503
    • Celebrating Rural America, the Balkans and beyond
Re: Help with extracting letters
« Reply #3 on: January 26, 2016, 10:59:43 pm »

Добер вече, Слободан!

Faster and easier than the path tool would be using the Select->Color Range tool. Use the eyedropper tool to expand the color. It's not perfect but will get you most of the way there. You can adjust the tolerance and can use the other selection tools to modify your selection.

The other way is to use the Quick-Select tool (It may be under the tragic-wand tool). This tool does magic!

If you need to add or subtract from the election, you can use some of the other tools.

I generally will build a mask on a separate layer of my selection so I can select little-by-little. Once I'm happy with the mask, then I'll save it and then use the "tragic wand" to select what I wish to copy.

If needed, you can use an adjustment layer to pop the color or contrast. I usually will use a curves layer and either pop the contrast with a curve or Blend->Screen to lighten the image a stop. You can also use vibrance, saturation and other layer effects.

Either will save you hours of piddling with the path tool.

Another possibility is to open the image in Illustrator and use the auto-trace tool.

Надам се да ће ово помоћи, мој пријатељу!
Logged
Larry Angier
ASMP, ACT, & many more! @sacred_icons
https://angier-fox.photoshelter.com

sniper

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 670
Re: Help with extracting letters
« Reply #4 on: January 27, 2016, 03:05:52 am »

If you have illustrator auto trace might work, I've used it for similar things in the past but I'm away from the studio so I cant test it for you.
Logged

tom b

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1471
    • http://tombrown.id.au
Re: Help with extracting letters
« Reply #5 on: January 27, 2016, 05:02:53 am »

My thought is that the background is much more continuous, you could select it and then invert the  selection.

You could use the Marquee Tool to draw rectangles around the groups of letters and then copy and paste in place to further make selection easier.

Then use the Magic Wand Tool to make your selections.

Cheers,
Logged
Tom Brown

rdonson

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3263
Re: Help with extracting letters
« Reply #6 on: January 27, 2016, 06:47:20 am »

I agree with Jeff.  Perhaps the pen tool to create the paths.  Tedious but best results.
Logged
Regards,
Ron

TonyW

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 643
Re: Help with extracting letters
« Reply #7 on: January 27, 2016, 10:51:14 am »

Several methods quoted all sound reasonable.  I agree that the pen tool probably best as you could scale if required without IQ penalty.

Still another way is to make use of Channels to create a mask.  Two issues with this 1. your image shows two drop shadows which you would not retain and need to add back and 2. potential for poor lost edges.

Not to be put off I had a quick using a copy of the red channel with a touch of levels, apply image and overlay painting white and black.  Attached is the result.  BTW hope this in order I am aware of your copyright and will remove image if required
Logged

AFairley

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1486
Re: Help with extracting letters
« Reply #8 on: January 27, 2016, 11:59:15 am »

If you first use the lasso tool to make a close selection of the letters and then the color range selector (which will select colors only inside the lasso-selected area), that will mitigate the effect of the variable background and you may be able to get a clean selection of the letters.
Logged

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8914
Re: Help with extracting letters
« Reply #9 on: January 27, 2016, 12:13:34 pm »

Several methods quoted all sound reasonable.  I agree that the pen tool probably best as you could scale if required without IQ penalty.

Still another way is to make use of Channels to create a mask.  Two issues with this 1. your image shows two drop shadows which you would not retain and need to add back and 2. potential for poor lost edges.

Not to be put off I had a quick using a copy of the red channel with a touch of levels, apply image and overlay painting white and black.  Attached is the result.  BTW hope this in order I am aware of your copyright and will remove image if required

I agree with Tony. While creating a path with the pen tool, or with an auto trace (e.g. with InkScape, or Illustrator), is the best to create a selection that scales at high quality, it is a cumbersome process.

Masking also has its benefits, especially if you first enlarge the image to the required final output size, selections can be very accurate. To aid in smooth edge selections, you can also use a Photoshop custom filter (see attached) to trace the exact edge positions. Preblurring a bit or enlarging before applying the filter will smoothen the edge aliasing.

Cheers,
Bart
Logged
== If you do what you did, you'll get what you got. ==

kirkt

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 604
Re: Help with extracting letters
« Reply #10 on: January 28, 2016, 08:57:24 am »

Not to be put off I had a quick using a copy of the red channel with a touch of levels, apply image and overlay painting white and black.  Attached is the result.  BTW hope this in order I am aware of your copyright and will remove image if required

This is how I approached it - I brought the result into Illustrator and used Auto Trace to make a vectorized version of the resulting logo art.

kirk
Logged

TonyW

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 643
Re: Help with extracting letters
« Reply #11 on: January 28, 2016, 12:44:23 pm »

This is how I approached it - I brought the result into Illustrator and used Auto Trace to make a vectorized version of the resulting logo art.

kirk
Interesting, as I do not have access to Illustrator can I ask how much work/time you think it would take to edit the vector image to acceptable levels for reasonable enlargement?
Logged

Peano

  • Full Member
  • ***
  • Offline Offline
  • Posts: 155
    • Radiant Pics
Re: Help with extracting letters
« Reply #12 on: January 28, 2016, 12:58:44 pm »

Is it possible to re-shoot the image? You're starting with the handicap of a small image and poor lighting. A high-res image with decent lighting might make this job a whole lot easier.

You might also farm this out to one of the overseas clipping mask services. They work dirt cheap and could deliver a vector image for under $5. Here is one example (base price $3 per image). Google photo masking services. There are tons of them.
« Last Edit: January 28, 2016, 01:03:09 pm by Peano »
Logged

Slobodan Blagojevic

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 18090
  • When everyone thinks the same, nobody thinks
    • My website
Re: Help with extracting letters
« Reply #13 on: January 28, 2016, 01:35:57 pm »

Is it possible to re-shoot the image? You're starting with the handicap of a small image and poor lighting. A high-res image with decent lighting might make this job a whole lot easier.

You might also farm this out to one of the overseas clipping mask services. They work dirt cheap and could deliver a vector image for under $5. Here is one example (base price $3 per image). Google photo masking services. There are tons of them.

The original file is 50 Mpx. The lighting might be improved, however, given the high reflectivity of the letters I doubt the result would be significantly different. I guess I could erect a frosted shower curtain in front of it and light it up from behind with strobes, but that seems even more hassle than a pen tool.

Outsourcing clipping/masking could be a good idea, though.

Slobodan Blagojevic

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 18090
  • When everyone thinks the same, nobody thinks
    • My website
Re: Help with extracting letters
« Reply #14 on: January 28, 2016, 01:36:38 pm »

Thanks everyone for the input. I'll keep you posted.

Peano

  • Full Member
  • ***
  • Offline Offline
  • Posts: 155
    • Radiant Pics
Re: Help with extracting letters
« Reply #15 on: January 28, 2016, 01:46:48 pm »

The original file is 50 Mpx. The lighting might be improved, however, given the high reflectivity of the letters I doubt the result would be significantly different. I guess I could erect a frosted shower curtain in front of it and light it up from behind with strobes, but that seems even more hassle than a pen tool.

Outsourcing clipping/masking could be a good idea, though.

Sorry, I should have been more specific about the lighting problems. If the color of the letters were more evenly illuminated, that color could then be enhanced (increased saturation) and perhaps shifted to a different hue in Photoshop. Such adjustment often make it very easy to then use calculations to create a clean mask. Perhaps using a diffuser on the strobe and bouncing off the ceiling would do the job.

Rajan Parrikar

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3950
    • Rajan Parrikar
Re: Help with extracting letters
« Reply #16 on: January 28, 2016, 02:10:45 pm »

Have you tried the Topaz ReMask plugin?

Slobodan Blagojevic

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 18090
  • When everyone thinks the same, nobody thinks
    • My website
Re: Help with extracting letters
« Reply #17 on: January 28, 2016, 03:04:30 pm »

...If the color of the letters were more evenly illuminated...

Indeed. It was more of a grab shot, during a visit with a different purpose. The store had several customers moving around and it wasn't easy to find a proper vantage point. Had I expected such a trouble with extracting, I would have paid more attention to the reflections or waited for an empty store.

kirkt

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 604
Re: Help with extracting letters
« Reply #18 on: January 28, 2016, 03:27:25 pm »

Interesting, as I do not have access to Illustrator can I ask how much work/time you think it would take to edit the vector image to acceptable levels for reasonable enlargement?

I did not really play around with it.  The Image Trace engine has some controls that permit you to specify the amount of control points on the curves that it fits, the number of curves it fits, etc.  You could probably get pretty close without much extra work if you create a clean image like yours.  It would probably also depend on the final application for the vector art and how precise it needs to be.

kirk

EDIT - I copied Tony's logo and brought it into Illustrator and produced the attached in a few seconds with Image Trace - it is a PNG (has transparency) at 300dpi exported from Illustrator.  The vector could use a little clean up, but is a pretty good starting point out of the box.
« Last Edit: January 28, 2016, 03:35:40 pm by kirkt »
Logged

TonyW

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 643
Re: Help with extracting letters
« Reply #19 on: January 28, 2016, 04:10:29 pm »

I did not really play around with it.  The Image Trace engine has some controls that permit you to specify the amount of control points on the curves that it fits, the number of curves it fits, etc.  You could probably get pretty close without much extra work if you create a clean image like yours.  It would probably also depend on the final application for the vector art and how precise it needs to be.

kirk

EDIT - I copied Tony's logo and brought it into Illustrator and produced the attached in a few seconds with Image Trace - it is a PNG (has transparency) at 300dpi exported from Illustrator.  The vector could use a little clean up, but is a pretty good starting point out of the box.
I think a pretty good job considering you copied the logo I submitted.  This was not intended to be perfect and just proof of concept.  On my version you will see the missing/ dark areas on the 'e' curlicues as one example.  This could/would be improved working on the full size raw image and taking a little time and care getting a better looking start for auto trace to do its job

Logged
Pages: [1] 2   Go Up