Thread Tools
Jun 08, 2021, 04:05 AM
WMD
WMD
Womble of Model Depiction
WMD's Avatar
Thread OP
Discussion

Image processing for old plans - greyscale and photos


This is a slightly random question. In short, can anyone tell me how to achieve this effect, using say Photoshop? See attached jpg and pdf file.

It's a greyscale image that has been reduced to binary (black and white pixels only) for print purposes. What I like about it is the level of good sharp visual detail remaining.

The longer explanation is I want a better way of dealing with old plans that happen to include greyscale photos embedded in them. Currently, in Photoshop I do filter/ColourHalftone (at max 4 pixel size) then I posterize down to 2 colurs. In the end I flatten everything to 2-colour bitmap, in order to get a nice compact filesize. This works, but it is ugly. I know there has to a better way, because I've seen it. This here. I just don't know what you call it, and how you do it - yet.
Last edited by WMD; Jun 08, 2021 at 04:11 AM.
Sign up now
to remove ads between posts
Jun 08, 2021, 04:21 AM
WMD
WMD
Womble of Model Depiction
WMD's Avatar
Thread OP
Here is a comparison of the two styles, see attached pdf file. The bottom image is how I would do this, currently. The top image is better. I'd like to know how to do it like the top one.
Jun 08, 2021, 05:40 AM
Registered User
Strange you should come up with this one, about four weeks ago I was going to ask you how to do this. I picked up a six page PDF which had a 9k file size. Problem was, three of the pages, which contain the component dimensions, the part drawing had a grey background with the components as white line. Front page was twisted and not same frame size as rest.
First job was to "Burst" original PDF into six separate PDF pages, then convert to Jpegs at 600dpi. RGB to greyscale and then save as PSD. After "Squaring up" the sheets, found a common frame size for the first five sheets by cropping to size and then, cropped out and saved the three greyed background sections and did the "Inversion" bit. Then cleaned and re-layered them back onto their respective sheets, the greyed sections of which had been erased. The front sheet had to have a fair bit of "Cloning" to fill the edge shading and saved. Haven't used Posterize for quite a while now as thanks to some of the plans from our past model mags, suffer from abysmal printing and loose detail when doing that, Bitmap has also had its moments but seems better before save as PDF.
Problem was/is, when going from PSD to Bitmap, photos were bleached out loosing contrast and going from PSD direct to PDF resulted in good contrast detail of photo BUT big file size. Tried various other PDF to Jpeg converters and back again but couldn't get six page modded article to less than or equal file size to original. Bugger, checked with Ray to find which progs he used, but they didn't help, downloaded Acrobat full version but again to no avail, been using P/S to convert to PSD for years. Drawing and text file pages NO problem, just pages with photos. Got to point of aiming Laptop at third pane on the right (window for windoze).
Not saying this is the final answer but it worked for me and got the completed PDF to less than 1M. Changed all individual pages filesize to 150DPI., Did the Bitmap bit on the text/drawing only pages and then save as PDF. Went from PSD to PDF on photo content and cover pages only and then did a merge to one PDF. Individual photo pages were 1point odd M size PDFs originally after Tiffling but were back down to low K sizes after page size reduction.
Enclosed final result, Will find original and repost.

Regards Ian.

Edit, shows .97M on my file.

Double ediit, original added.
Last edited by Circlip; Jun 08, 2021 at 07:29 AM.
Jun 08, 2021, 06:26 AM
WMD
WMD
Womble of Model Depiction
WMD's Avatar
Thread OP
Hi Ian,

Yes this is kind of like that. I'm trying to keep the filesize down - and you've done that very well on your example. I think my biggest problem is this is all one file. I mean I don't have the option of splitting out some pages and dealing with them (saving them) separately, because the plan is just one big page. This Hellcat example is taken from the corner of a finished plan.

So, for me at least, that means I know (or at least I think I know) that I will have to save the whole file at the end, the finished plan, as a 2 colour bitmap wrapped up inside a pdf. That just leaves the small matter of what exactly I do to it before I finish. But the finished plan can't include any greyscale, it has to be all binary.
Jun 08, 2021, 07:33 AM
Registered User
Hope someone more versed with P/S can solve this one for you Steve. RChopper might have an answer. Might be complete Bovine Excreta but is it possible to do a mod on a PDF file?

Regards Ian.
Last edited by Circlip; Jun 08, 2021 at 07:36 AM. Reason: Spullin
Jun 08, 2021, 08:33 AM
AMA 8711, FCC K4WZA
DPlumpe's Avatar
Steve-

The F4F image you want to replicate was done with a diffusion dither.

To make a 2-color ("bitmap", "black & white" or "BW") image from a grayscale plan that includes a photo, I make a duplicate of the image. I work on one copy to clean up the plan portion, ignoring the photo, and convert it to BW with no diffusion (any pixel brighter than 50% becomes white and any below 50% is black). On the other copy I work on the photo portion, cleaning it and setting levels (brightness & contrast), then convert it to BW with diffusion dithering. At this point, both files are in BW format.

Then I select the image portions of the second (dithered) copy and copy them to the first copy. It helps to copy not just the image portion, but also include a small rectangle at one corner to help with locating the copy. The resulting combined file will be larger than a simple BW conversion, but much clearer - and smaller than a jpeg.

See the attached file as an example.

-Dave
Jun 08, 2021, 08:47 AM
WMD
WMD
Womble of Model Depiction
WMD's Avatar
Thread OP
Aha. Diffusion dither. That's it - or that's about 95% of it, anyway. Excellent. Many thanks.

I have spent far too long looking for a filter for this. But of course it's not a filter at all, it's an export method. Doh.

Funny thing is... I suddenly remember now that 25 years ago I knew all this. Because I was using this to create buttons for websites, etc. But that was a lifetime ago, and nowadays who's exporting to GIF and then selecting carefully from the dither options? That's my excuse, anyway
Jun 08, 2021, 08:56 AM
Thermals, Tom
RyanNX211's Avatar
When I’ve scanned plans for OZ, the machine prompts me B&W or grayscale. The staff tells me they are the same.

???
Latest blog entry: Steak and Old Timers
Jun 08, 2021, 09:04 AM
WMD
WMD
Womble of Model Depiction
WMD's Avatar
Thread OP
The language is confusing, I agree. For me there are 3 types of image: colour, greyscale or BW. In my scheme BW means harsh 2 colour black and white ie every pixel can be only competely black or completely white. Like this see https://en.wikipedia.org/wiki/Binary_image

But what I call 'BW' lots of other people call 'binary'. And what I call 'greyscale' a lot of people call 'BW'.

Also here's my explanation (of my way of thinking) in the Oz tutorial pages: https://outerzone.co.uk/tutorials/01/index.asp

[Edit] Thinking about this, from now on I should just start using the terms Colour, Greyscale and Binary. That's clearer.
Last edited by WMD; Jun 08, 2021 at 09:13 AM. Reason: thinking about this
Jun 08, 2021, 12:46 PM
WMD
WMD
Womble of Model Depiction
WMD's Avatar
Thread OP
Ok, I think I have this kind of figured out now. Am just writing some notes here now for myself really.

So. The Hellcat plan in question was found today online here: https://swm1.com/models/plans/ with thanks to LesOtsig for sending us a link. I don't know who runs that site, they have no contact details that I can see. Anyway. So,that's the plan - let's call this the 'original' plan. Posted below as Original.pdf This is a really good and clean plan at 300 dpi with a small filesize that has the dithering effect that I like, on it. I mean there are 3 embedded photos in it that are nicely dithered and visually pleasing. Lots of detail. But with low filesize. Did I mention the low filesize? Ok.

Original. Looks good. 718 KB

It's all downhill from here really. Next is an example of how I would have done this, before today. I have had to reverse engineer the Original plan, so I blurred those 3 photo sections (left the rest nice and clean of course) then did my usual routine of Filter/ColourHalftone at max 4 px. That results in the plan file called Halftone.pdf posted below.

Halftone. Looks less good. 622 KB

Then I try doing the Diffusion Dither on the reverse engineered plan. There are no settings to mess with (sadly), so it's just Image/Mode/Bitmap/Method/DiffusionDither. That results in the plan file called Diffusion.pdf posted below.

Diffusion. Looks almost as good. 810 KB

I think this is great, for now. The Original plan is very slightly more pleasing to look at, while also having lower filesize. Which is a bit annoying. But hey, this is 95% of the answer. The original has nice sharp edges around the outline, while my diffusion version blurs the outlines. It's a small difference, but it is noticeable.

The original, I guess, is using some kind of algorithm / filter that does edge detecting along with gradient shading. Or something. Whatever. This much is good for today.

Thanks to Dave for the answer. I can start using this as of now, and start making plans look slightly less bad when I export them
Last edited by WMD; Jun 08, 2021 at 02:19 PM.
Jun 08, 2021, 02:26 PM
WMD
WMD
Womble of Model Depiction
WMD's Avatar
Thread OP
Trying to use this in my workflow. It's a real pain that to get the dither effect I need, I have to export out to bitmap.

I spend all my life working on layers within one file. Why isnt there a filter? Why do I have to export out creating second file, then go and reopen that file, convert it to greyscale, then paste that all back onto another new layer back in the first file? That's a real pain. That's ungainly in the extreme.


Quick Reply
Message:

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Idea Nvidia Jetson Nano computer for onboard image processing WiSi-Testpilot FPV Equipment 2 Dec 13, 2019 04:13 AM
Discussion TurboCAD greyscale 3d images. slingshots CAD/CAM 4 Jan 14, 2018 10:23 AM
Discussion image processing for precision landing Anthony E Multirotor Drone Electronics 0 Aug 21, 2016 06:56 PM
Discussion On-board image processing using Raspberry pi connected to APM ahams Robotics 0 Jun 08, 2016 10:29 AM
Help! Processing X3 (FC-350) images phil222 Aerial Photography 0 Nov 12, 2015 03:58 PM