← 返回命令列表

Linux command

pamarith 命令

安全

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

常用示例

Add two images

pamarith -add [image1.pam] [image2.pam] > [result.pam]

Subtract images

pamarith -subtract [image1.pam] [image2.pam] > [result.pam]

Multiply images

pamarith -multiply [image1.pam] [image2.pam] > [result.pam]

Find difference

pamarith -difference [image1.pam] [image2.pam] > [result.pam]

Minimum of images

pamarith -minimum [image1.pam] [image2.pam] > [result.pam]

说明

pamarith performs arithmetic operations on two PAM/PNM images. Images must have the same dimensions. Used for compositing, masking, and image comparison.

参数

-add
Add pixel values.
-subtract
Subtract pixel values.
-multiply
Multiply pixel values.
-divide
Divide pixel values.
-difference
Absolute difference.
-minimum
Minimum of each pixel.
-maximum
Maximum of each pixel.
-mean
Average of pixels.
-and, -or, -xor
Bitwise operations.

FAQ

What is the pamarith command used for?

pamarith performs arithmetic operations on two PAM/PNM images. Images must have the same dimensions. Used for compositing, masking, and image comparison.

How do I run a basic pamarith example?

Run `pamarith -add [image1.pam] [image2.pam] > [result.pam]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -add do in pamarith?

Add pixel values.