Linux command
pnmnorm 命令
文本
涉及管道、覆盖或删除,执行前请先确认路径和参数。
常用示例
Normalize image contrast
pnmnorm [input.pnm] > [output.pnm]
Specify brightness range
pnmnorm -bpercent [5] -wpercent [5] [input.pnm] > [output.pnm]
Preserve midpoint
pnmnorm -midvalue [127] [input.pnm] > [output.pnm]
说明
pnmnorm normalizes the contrast of PNM images by stretching the histogram to use the full dynamic range. It finds the darkest and brightest pixel values and linearly maps them to the minimum and maximum possible values. The -bpercent and -wpercent options control how aggressively the black and white points are clipped, ignoring a percentage of outlier pixels at each end. The -midvalue option preserves a specific middle gray value during the normalization. Part of the Netpbm toolkit.
参数
- -bpercent _N_
- Black point percentage.
- -wpercent _N_
- White point percentage.
- -bvalue _N_
- Black cutoff value.
- -wvalue _N_
- White cutoff value.
- -midvalue _N_
- Middle gray value to preserve.
FAQ
What is the pnmnorm command used for?
pnmnorm normalizes the contrast of PNM images by stretching the histogram to use the full dynamic range. It finds the darkest and brightest pixel values and linearly maps them to the minimum and maximum possible values. The -bpercent and -wpercent options control how aggressively the black and white points are clipped, ignoring a percentage of outlier pixels at each end. The -midvalue option preserves a specific middle gray value during the normalization. Part of the Netpbm toolkit.
How do I run a basic pnmnorm example?
Run `pnmnorm [input.pnm] > [output.pnm]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -bpercent _N_ do in pnmnorm?
Black point percentage.