← 返回命令列表

Linux command

pamshadedrelief 命令

文本

涉及管道、覆盖或删除,执行前请先确认路径和参数。

常用示例

Create shaded relief

pamshadedrelief [heightmap.pam] > [relief.pam]

Apply gamma correction

pamshadedrelief -gamma [2.0] [heightmap.pam] > [relief.pam]

Pipe to pamtopnm

pamshadedrelief [heightmap.pam] | pamtopnm > [relief.ppm]

Render and encode

pamshadedrelief [heightmap.pam] | pnmtopng > [relief.png]

说明

pamshadedrelief reads a Netpbm PAM file containing a grayscale height map and produces a PAM image rendered as a shaded relief, simulating illumination of a 3D terrain by a virtual light source. Each output pixel encodes the brightness derived from the local slope of the height field, giving a hill-shading effect similar to topographic maps. The input must be a one-channel (grayscale) PAM image; sample values are interpreted as elevations. The illumination angle is fixed by the program. Output samples are gamma-corrected with -gamma so the contrast of the relief can be tuned without re-rendering the source data.

参数

-gamma _VALUE_
Apply gamma correction to the output. Values greater than 1 increase contrast in dark areas; values less than 1 reduce it. Default is 1.0.

FAQ

What is the pamshadedrelief command used for?

pamshadedrelief reads a Netpbm PAM file containing a grayscale height map and produces a PAM image rendered as a shaded relief, simulating illumination of a 3D terrain by a virtual light source. Each output pixel encodes the brightness derived from the local slope of the height field, giving a hill-shading effect similar to topographic maps. The input must be a one-channel (grayscale) PAM image; sample values are interpreted as elevations. The illumination angle is fixed by the program. Output samples are gamma-corrected with -gamma so the contrast of the relief can be tuned without re-rendering the source data.

How do I run a basic pamshadedrelief example?

Run `pamshadedrelief [heightmap.pam] > [relief.pam]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -gamma _VALUE_ do in pamshadedrelief?

Apply gamma correction to the output. Values greater than 1 increase contrast in dark areas; values less than 1 reduce it. Default is 1.0.