{
    "content": [
        {
            "type": "text",
            "text": "# pamsumm (man)\n\n## NAME\n\npamsumm - Summarize the samples in a Netpbm image arithmetically\n\n## SYNOPSIS\n\npamsumm { -sum | -mean | -min | -max } [-normalize] [-brief] [imagefile]\nAll  options can be abbreviated to their shortest unique prefix.  You may use two hyphens in‐\nstead of one.  You may separate an option name and its value with white space instead  of  an\nequals sign.\n\n## DESCRIPTION\n\nThis program is part of Netpbm(1).\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (6 subsections)\n- **SEE ALSO**\n- **HISTORY**\n- **DOCUMENT SOURCE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "pamsumm",
        "section": "",
        "mode": "man",
        "summary": "pamsumm - Summarize the samples in a Netpbm image arithmetically",
        "synopsis": "pamsumm { -sum | -mean | -min | -max } [-normalize] [-brief] [imagefile]\nAll  options can be abbreviated to their shortest unique prefix.  You may use two hyphens in‐\nstead of one.  You may separate an option name and its value with white space instead  of  an\nequals sign.",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "This option makes the summary function addition."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "This option makes the summary function arithmetic mean."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "This option makes the summary function arithmetic minimum."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "This option makes the summary function arithmetic maximum."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "This option causes each sample to be normalized to a fraction (in the range 0..1) so the result is independent of the image's maxval. E.g. if you request the mean of an image which has maxval 200 and all the samples have value 50, pamsumm will give you 50 as an answer. But pamsumm -normalize will give you .25. If instead you want a result that is independent of maxval but still in integers, you can use pamdepth to convert the input to some standard maxval and not use -normalize. For example, if you want the mean brightness of a PPM image, on a scale of 0 to 99, do pamdepth 99 myimage.ppm | pamsumm -mean This option was new in Netpbm 10.22 (April 2004)"
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "This option causes pamsumm to display the answer as a bare number, rather than in a complete sentence. This option was new in Netpbm 10.22 (April 2004)"
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "pamsummcol",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pamsummcol/1/json"
            },
            {
                "name": "pam",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pam/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 18,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 7,
                "subsections": [
                    {
                        "name": "-sum",
                        "lines": 3
                    },
                    {
                        "name": "-mean",
                        "lines": 3
                    },
                    {
                        "name": "-min",
                        "lines": 3
                    },
                    {
                        "name": "-max",
                        "lines": 3
                    },
                    {
                        "name": "-normalize",
                        "lines": 17
                    },
                    {
                        "name": "-brief",
                        "lines": 8
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "HISTORY",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DOCUMENT SOURCE",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "pamsumm - Summarize the samples in a Netpbm image arithmetically\n\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "pamsumm { -sum | -mean | -min | -max } [-normalize] [-brief] [imagefile]\n\nAll  options can be abbreviated to their shortest unique prefix.  You may use two hyphens in‐\nstead of one.  You may separate an option name and its value with white space instead  of  an\nequals sign.\n\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This program is part of Netpbm(1).\n\npamsumm  reads  a Netpbm image (PNM or PAM) and performs a summary function over all the sam‐\nples in all the rows, columns, and planes and prints the result to Standard Output.\n\npamsumm performs the operation on the actual sample values.  In the case of a PGM or  PPM  or\nPAM  equivalent  (i.e.  a visual image), this is not the same as the light intensities repre‐\nsented by those samples.  See the format specifications of PGM(1), PPM(1),  and  PAM(1),  for\nthe  precise meanings of samples in these formats.  If you want to do arithmetic on light in‐\ntensities of such a visual image, you can use pnmgamma to convert it to one with samples pro‐\nportional to light intensity, and then use pamsumm on the result.\n\nIf you want to summarize by column (e.g. add up the columns separately), use pamsummcol.   If\nyou  want  to  summarize by row, use a combination of pamsummcol and pamflip.  If you want to\nsummarize a particular plane, use pamchannel to extract it and then pamsumm.\n\n\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "In addition to the options common to all programs based on libnetpbm  (most  notably  -quiet,\nsee \u001b]8;;index.html#commonoptions\u001b\\ Common Options\u001b]8;;\u001b\\ ), pamsumm recognizes the following command line options:\n\nYou must specify exactly one of -sum, -mean, -min, or -max.\n\n\n",
                "subsections": [
                    {
                        "name": "-sum",
                        "content": "This option makes the summary function addition.\n\n"
                    },
                    {
                        "name": "-mean",
                        "content": "This option makes the summary function arithmetic mean.\n\n"
                    },
                    {
                        "name": "-min",
                        "content": "This option makes the summary function arithmetic minimum.\n\n"
                    },
                    {
                        "name": "-max",
                        "content": "This option makes the summary function arithmetic maximum.\n\n"
                    },
                    {
                        "name": "-normalize",
                        "content": "This option causes each sample to be normalized to a fraction\n(in the range 0..1) so the result is independent of the image's\nmaxval.  E.g. if you request the mean of an image which has maxval\n200 and all the samples have value 50, pamsumm will give you\n50 as an answer.  But pamsumm -normalize will give you .25.\n\nIf instead you want a result that is independent of maxval but still\nin integers, you can use pamdepth to convert the input to some\nstandard maxval and not use -normalize.  For example, if you want\nthe mean brightness of a PPM image, on a scale of 0 to 99, do\n\npamdepth 99 myimage.ppm | pamsumm -mean\n\n\nThis option was new in Netpbm 10.22 (April 2004)\n\n"
                    },
                    {
                        "name": "-brief",
                        "content": "This option causes pamsumm to display the answer as a bare\nnumber, rather than in a complete sentence.\n\nThis option was new in Netpbm 10.22 (April 2004)\n\n\n\n"
                    }
                ]
            },
            "SEE ALSO": {
                "content": "pamsummcol(1), pam(1),\n\n",
                "subsections": []
            },
            "HISTORY": {
                "content": "pamsumm was added to Netpbm in Release 10.21 (March 2004).\n",
                "subsections": []
            },
            "DOCUMENT SOURCE": {
                "content": "This  manual  page  was  generated by the Netpbm tool 'makeman' from HTML source.  The master\ndocumentation is at\n\nhttp://netpbm.sourceforge.net/doc/pamsumm.html\n\nnetpbm documentation                       26 October 2012                    Pamsumm User Manual(1)",
                "subsections": []
            }
        }
    }
}