Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Other Topics > Art & Graphic Design > Photoshop filter question...bitmap, white specks on black

Photoshop filter question...bitmap, white specks on black
Thread Tools
Junior Member
Join Date: Feb 2000
Location: Sherman Oaks, CA
Status: Offline
Reply With Quote
Aug 20, 2004, 10:23 PM
 
I'm just posting this as a curiosity...basically, I have various scanned 1200 dpi bitmap images that have lots of white specks in the solid black areas that I want to get rid of easily without affecting fine detail anywhere else.

Specifically, I'd love to get rid of all white one-pixel specks in black areas (all 8 adjacent pixels being black). Bigger specks would be nice too, but I'd be happy with one-pixel specks going away.

I DON'T want it to affect one-pixel black specks in white areas.

Any ideas?
     
Forum Regular
Join Date: Oct 2002
Status: Offline
Reply With Quote
Aug 29, 2004, 08:16 AM
 
There are several things you can try (always save a copy).

*Dust & Scratches filter

*Small-radius Gaussian blur, then one or more of the following: sharpen, levels, unsharp mask etc. Basically gaussian blur will dull edges and fill in small holes; use another filter to tighten up the edges. There are plenty that *might* work.

*A dirty trick, depending entirely on the scan. Select color range: black; then expand selection 1 pixel, then contract selection 1 pixel. All of the one-pixel holes will now be left out. Then fill in the selection with black on a new layer and toggle on and off to see if its working. If some parts worked better than others, just erase it from the layer.
(Last edited by FauxCaster; Aug 29, 2004 at 05:06 PM. )
     
Addicted to MacNN
Join Date: Jan 2001
Location: The Sar Chasm
Status: Offline
Reply With Quote
Aug 29, 2004, 11:29 AM
 
^^ What he said.

When a true genius appears in the world you may know him by this sign, that the dunces are all in confederacy against him. -- Jonathan Swift.
     
Junior Member
Join Date: Feb 2000
Location: Sherman Oaks, CA
Status: Offline
Reply With Quote
Sep 1, 2004, 04:11 AM
 
Thanks for the suggestions.

Unfortunately, all of those throw out the baby with the bathwater. The most promising seemed to be the expand/contract selection one, but even expanding by one and then contracting by 10 still does too much damage...I'd have to spend more time using the history brush than it would take me to just paint out the black areas by hand.

It seems to me it ought to be easy to WRITE a filter to do what I want. It would only take 12 steps...

1. Is current pixel black? If so, go to step 11
2. is pixel west of current pixel white? if so, go to step 11
3. is pixel east of current pixel white? if so, go to step 11
4. is pixel northwest of current pixel white? if so, go to step 11
4. is pixel north of current pixel white? if so, go to step 11
6. is pixel northeast of current pixel white? if so, go to step 11
7. is pixel southwest of current pixel white? if so, go to step 11
8. is pixel south of current pixel white? if so, go to step 11
9. is pixel southeast of current pixel white? if so, go to step 11
10. set current pixel to black
11. move to next pixel
12. go to step 1

or...
Code:
for pixels() { if (currpixel != 0) { if (neighbor(W) != 1 { if (neighbor(E) != 1 { if (neighbor(NW) != 1 { if (neighbor(N) != 1 { if (neighbor(NE) != 1 { if (neighbor(SW) != 1 { if (neighbor(S) != 1 { if (neighbor(SE) != 1 { setCurrPixel(0) } } } } } } } currpixel++; }
That's all I want...

Anyone know how to write filters?
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 11:41 AM.
All contents of these forums © 1995-2009 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.4 © 2000-2009, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2