⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 0389-0390.html

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTML
字号:
<HTML>



<HEAD>

<TITLE>Linux Complete Command Reference:User Commands:EarthWeb Inc.-</TITLE>

</HEAD>

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!-- ISBN=0672311046 //-->

<!-- TITLE=Linux Complete Command Reference//-->

<!-- AUTHOR=Red Hat//-->

<!-- PUBLISHER=Macmillan Computer Publishing//-->

<!-- IMPRINT=Sams//-->

<!-- CHAPTER=01 //-->

<!-- PAGES=0001-0736 //-->

<!-- UNASSIGNED1 //-->

<!-- UNASSIGNED2 //-->



<P><CENTER>

<a href="0385-0388.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0391-0393.html">Next</A></CENTER></P>







<A NAME="PAGENUM-389"><P>Page 389</P></A>





<P><B>

OPTIONS

</B></P>

<TABLE>



<TR><TD>

-size

</TD><TD>

Controls how big each image becomes; the default is

100x100.

</TD></TR><TR><TD>

-across

</TD><TD>

Controls how many images are in each row; the default is six.

</TD></TR><TR><TD>

-colors

</TD><TD>

Controls how many colors the final index gets quantized to, if quantization is necessary; the default is

256.

</TD></TR><TR><TD>

-black

</TD><TD>

Controls the color of the padding between the images; normally it's white and the labels are black lettering

on white background, but the -black flag reverses this.

</TD></TR></TABLE>



<P><B>

SEE ALSO

</B>

</P>

<!-- CODE SNIP //-->

<PRE>

pnmscale(1), pnmcat(1), pbmtext(1), ppmquant(1),

pnm(5)

</PRE>

<!-- END CODE SNIP //-->



<P><B>

BUGS

</B>

</P>

<P>It's very slow.

</P>

<P>It's a csh script. csh scripts are not portable to System V. Scripts in general are not portable to non-UNIX environments.

</P>



<P><B>

AUTHOR

</B>

</P>

<P>Copyright &quot; 1991 by Jef Poskanzer.

</P>



<P>9 January 1991

</P>



<H3><A NAME="ch01_ 273">

pnminvert

</A></H3>

<P>pnminvert&#151;Invert a portable anymap

</P>



<P><B>

SYNOPSIS

</B>

</P>

<!-- CODE SNIP //-->

<PRE>

pnminvert [pnmfile]

</PRE>

<!-- END CODE SNIP //-->



<P><B>

DESCRIPTION

</B>

</P>

<P>pnminvert reads a portable anymap as input, inverts it black for white, and produces a portable anymap as output.

</P>



<P><B>

SEE ALSO

</B>

</P>

<!-- CODE SNIP //-->

<PRE>

pnm(5)

</PRE>

<!-- END CODE SNIP //-->



<P><B>

AUTHOR

</B>

</P>

<P>Copyright &quot; 1989 by Jef Poskanzer.

</P>



<P>8 August 1989

</P>



<H3><A NAME="ch01_ 274">

pnmmargin

</A></H3>

<P>pnmmargin&#151;Add a border to a portable anymap

</P>



<P><B>

SYNOPSIS

</B>

</P>

<!-- CODE SNIP //-->

<PRE>

pnmmargin [-white|-black|-color colorspec] size [pnmfile]

</PRE>

<!-- END CODE SNIP //-->



<P><B>

DESCRIPTION

</B>

</P>

<P>pnmmargin reads a portable anymap as input, adds a border of the specified number of pixels, and produces a portable

anymap as output.

</P>



<A NAME="PAGENUM-390"><P>Page 390</P></A>





<P><B>

OPTIONS

</B>

</P>

<P>You can specify the border color with the

-white, -black, and -color flags. If no color is specified, the program makes

a guess.

</P>



<P><B>

SEE ALSO

</B>

</P>

<!-- CODE SNIP //-->

<PRE>

pnm(5)

</PRE>

<!-- END CODE SNIP //-->



<P><B>

BUGS

</B>

</P>

<P>It's a script. Scripts are not portable to non-UNIX environments.

</P>



<P><B>

AUTHOR

</B>

</P>

<P>Copyright &quot; 1991 by Jef Poskanzer.

</P>



<P>9 January 1991

</P>



<H3><A NAME="ch01_ 275">

pnmnlfilt

</A></H3>

<P>pnmnlfilt--Nonlinear filters: smooth, alpha trim mean, optimal estimation smoothing, edge enhancement.

</P>



<P><B>

SYNOPSIS

</B>

</P>

<!-- CODE SNIP //-->

<PRE>

pnmnlfilt alpha radius [pnmfile]

</PRE>

<!-- END CODE SNIP //-->



<P><B>

DESCRIPTION

</B>

</P>

<P>This is something of a Swiss army knife filter. It has three distinct operating modes. In all of the modes, each pixel in

the image is examined and processed according to it and its surrounding pixels values. Rather than using the nine pixels in a

3&#165;3 block, seven hexagonal area samples are taken, the size of the hexagons being controlled by the

radius parameter. A radius value of 0.3333 means that the seven hexagons exactly fit into the center pixel (that is, there will be no filtering effect).

A radius value of 1.0 means that the seven hexagons exactly fit a

3&#165;3 pixel array.

</P>



<P><B>

Alpha-Trimmed Mean Filter (0.0 &lt; = alpha &lt; =

0.5)

</B></P>



<P>The value of the center pixel will be replaced by the mean of the seven hexagon values, but the seven values are sorted by

size and the top and bottom alpha portion of the seven are excluded from the mean. This implies that an

alpha value of 0.0 gives the same sort of output as a normal convolution (that is, averaging or smoothing filter), where

radius will determine the &quot;strength&quot; of the filter. A good value to start from for subtle filtering is

alpha = 0.0, radius = 0.55. For a more blatant

effect, try alpha = 0.0 and radius = 1.0.

</P>

<P>An alpha value of 0.5 will cause the median value of the seven hexagons to be used to replace the center pixel value. This

sort of filter is good for eliminating &quot;pop&quot; or single pixel noise from an image without spreading the noise out or

smudging features on the image. Judicious use of the

radius parameter will fine-tune the filtering. Intermediate values of

alpha give effects somewhere between smoothing and &quot;pop&quot; noise reduction. For subtle filtering, try starting with values of

alpha = 0.4, radius = 0.6. For a more blatant effect, try

alpha = 0.5, radius = 1.0.

</P>



<P><B>

Optimal Estimation Smoothing. (1.0 &lt; = alpha &lt; =

2.0)

</B></P>



<P>This type of filter applies a smoothing filter adaptively over the image. For each pixel, the variance of the

surrounding hexagon values is calculated, and the amount of smoothing is made inversely proportional to it. The idea is that if

the variance is small, then it is due to noise in the image, while if the variance is large, it is because of &quot;wanted&quot; image

features. As usual, the radius parameter controls the effective radius, but it probably advisable to leave the

radius between 0.8 and 1.0 for the variance calculation to be meaningful. The

alpha parameter sets the noise threshold, over which less smoothing

will be done. This means that small values of

alpha will give the most subtle filtering effect, while large values will tend to

smooth all parts of the image. You could start with values like

alpha = 1.2, radius = 1.0 and try increasing or decreasing the

alpha parameter to get the desired effect. This type of filter is best for filtering out dithering noise in both bitmap and color images.

</P>







<P><CENTER>

<a href="0385-0388.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0391-0393.html">Next</A></CENTER></P>







</td>
</tr>
</table>

<!-- begin footer information -->







</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -