Article View: alt.graphics.pixutils
Article #627Re: color -> monochrome *without* dithering
From: Brian Smith
Date: Tue, 05 Jan 1993 07:07
Date: Tue, 05 Jan 1993 07:07
37 lines
1996 bytes
1996 bytes
|> Hi, |> |> I'm trying to convert a colour (AutoCAD "slide" format) file into |> a *monochrome* sun rasterfile. I can use PBMplus to do the job thus: |> |> bash$ sldtoppm -adjust file.sld | |> ppmtopgm | |> pgmtopbm | |> pbmtorast > file.ras |> |> The above works, but it appears that the process involves *dithering* |> the colour image (I suppose "pgmtopbm" does this). I really don't want |> dithering, since the final image comes out looking too grainy. My |> original colour images contain only *six* colours (they are simple plan |> diagrams of buildings and campuses). What I would like to do is |> translate anything that is not black from the original into white. |> Something like: |> |> INPUT OUTPUT |> black (0) -> black (0) |> non-black (1-?) -> white (1) |> |> This way, the output should sharper. All I want is for the walls |> of buildings and roads to show up clearly. Is there some alternative way of |> performing the conversion, so that no dithering is involved? |> Pgmtopbm uses floyd-steinberg dithering by default. You want thresholding. Change the call from "pgmtopbm" to "pgmtopbm -threshold -value 0.1", and try it out. The "-value" flag sets the level of the threshold: 0.1 means values above 0.1 get set to white. ------- Brian C. Smith arpa: bsmith@cs.Berkeley.EDU University of California, Berkeley uucp: uunet!ucbvax!postgres!bsmith Computer Sciences Department phone: (510)642-9585
Technical Details
Message-ID:
<1ibc4dINNpb1@agate.berkeley.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!agate!mickey!bsmithReferences:
<1ib5tqINNd2e@rastaban.cc.deakin.OZ.AU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!agate!mickey!bsmith From: bsmith@mickey.NoSubdomain.NoDomain (Brian Smith) Newsgroups: alt.graphics.pixutils Subject: Re: color -> monochrome *without* dithering Date: 5 Jan 1993 07:07:57 GMT Organization: University of California, Berkeley Lines: 37 Sender: bsmith@mickey (Brian Smith) Distribution: world Message-ID: <1ibc4dINNpb1@agate.berkeley.edu> References: <1ib5tqINNd2e@rastaban.cc.deakin.OZ.AU> NNTP-Posting-Host: mickey.cs.berkeley.edu