{
    "content": [
        {
            "type": "text",
            "text": "# pgmkernel (man)\n\n## NAME\n\npgmkernel - generate a convolution kernel\n\n## SYNOPSIS\n\npgmkernel [ -weight w ] width [ height ]\n\n## DESCRIPTION\n\nGenerates  a portable graymap array of size width x height (or width x width if height is not\nspecified) to be used as a convolution file by pnmconvol.  The data in the convolution  array\nK are computed according to the formula:\n\n## TLDR\n\n> Generate a convolution kernel to be used with `pnmconvol`.\n\n- Generate a convolution kernel:\n  `pgmkernel {{width}} {{height}} > {{path/to/output.pgm}}`\n- Generate a quadratic convolution kernel:\n  `pgmkernel {{size}} > {{path/to/output.pgm}}`\n- Specify the weight of the center in the generated kernel:\n  `pgmkernel {{-w|-weight}} {{value}} {{width}} {{height}} > {{path/to/output.pgm}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS**\n- **BUGS**\n- **SEE ALSO**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "pgmkernel",
        "section": "",
        "mode": "man",
        "summary": "pgmkernel - generate a convolution kernel",
        "synopsis": "pgmkernel [ -weight w ] width [ height ]",
        "tldr_summary": "Generate a convolution kernel to be used with `pnmconvol`.",
        "tldr_examples": [
            {
                "description": "Generate a convolution kernel",
                "command": "pgmkernel {{width}} {{height}} > {{path/to/output.pgm}}"
            },
            {
                "description": "Generate a quadratic convolution kernel",
                "command": "pgmkernel {{size}} > {{path/to/output.pgm}}"
            },
            {
                "description": "Specify the weight of the center in the generated kernel",
                "command": "pgmkernel {{-w|-weight}} {{value}} {{width}} {{height}} > {{path/to/output.pgm}}"
            }
        ],
        "tldr_source": "official",
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "pnmconvol",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pnmconvol/1/json"
            },
            {
                "name": "pnmsmooth",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pnmsmooth/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "pgmkernel - generate a convolution kernel\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "pgmkernel [ -weight w ] width [ height ]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Generates  a portable graymap array of size width x height (or width x width if height is not\nspecified) to be used as a convolution file by pnmconvol.  The data in the convolution  array\nK are computed according to the formula:\n\nK(i,j) = 1 / ( 1 + w * sqrt((i-width/2)^2 + (j-height/2)^2))\n\nwhere w is a coefficient specified via the -weight flag, and width and height are the X and Y\nfilter sizes.\n\nThe output PGM file is always written out in ASCII format.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "The optional -weight flag should be a real number greater than -1.  The default value is 6.0.\n",
                "subsections": []
            },
            "BUGS": {
                "content": "The computation time is proportional to width * height.  This increases rapidly with the  in‐\ncrease of the kernel size.  A better approach could be using a FFT in these cases.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "pnmconvol(1), pnmsmooth(1)\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Alberto Accomazzi (alberto@cfa.harvard.edu).\n\n\n\n\n10 December 1992                              pgmkernel(1)",
                "subsections": []
            }
        }
    }
}