From beb412012d7040bd7681d79de8854972e98cfb55 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sat, 12 Apr 2008 22:23:13 +0000 Subject: "miscellaneous update" git-svn-id: http://svn.code.sf.net/p/netpbm/code/userguide@617 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- pnmnorm.html | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) (limited to 'pnmnorm.html') diff --git a/pnmnorm.html b/pnmnorm.html index ac66ad7c..38074769 100644 --- a/pnmnorm.html +++ b/pnmnorm.html @@ -94,7 +94,7 @@ darken the image, set wvalue to maxval and play with

If you specify both -bvalue and -bpercent, pnmnorm uses the one that produces the least change. The same goes for --wvalue and -wpercent. (In Neptbm 10.26 (January 2005), +-wvalue and -wpercent. (In Netpbm 10.26 (January 2005), the -bvalue/-wvalue takes precedence, and before that, it's a syntax error to specify both). @@ -102,9 +102,30 @@ it's a syntax error to specify both). cascade two runs of pnmnorm, specifying values for the first and percentages for the second. -

This is further constrained by the -maxexpand option. -Sometimes, too much contrast is a bad thing. If your intensities are -all concentrated in the middle, -bpercent=2 and +

It is possible for your -bpercent or -wpercent +to overlap your -wvalue or -bvalue, respectively. For +example, you say -bpercent=20 and -wvalue=100 for an +image in which only 10 per cent of the pixels are darker than 100. +In that case, pnmnorm adjusts the per centile value as +required. In the example, it uses 99 as the black value (like +-bvalue=99). + +

It is also possible for your -bpercent and -wpercent +options to select the same brightness value for the stretch-to-white +and stretch-to-black value because of the fact that pnmnorm +can't subdivide a histogram cell. E.g. if an image is all brightness +100, then no matter what -bpercent and -wpercent +values you choose, it's the same as saying -bvalue=100 -wvalue=100. +In that case, pnmnorm changes one of the values by 1 to make it +legal. In the example, pnmnorm would either make the black +value 99 or the white value 101. + +

Before Netpbm 10.43 (June 2008), pnmnorm fails if the +-wpercent and/or -bpercent values specify an overlap. + +

The stretch points are further constrained by the -maxexpand +option. Sometimes, too much contrast is a bad thing. If your +intensities are all concentrated in the middle, -bpercent=2 and -wpercent=1 might mean that an intensity of 60 gets stretched up to 100 and and intensity of 40 gets stretched down to zero, for a range expansion of 150% (from a range of 40 to a range of 100). That -- cgit 1.4.1