libvips / pyvips

python binding for libvips using cffi
MIT License
649 stars 50 forks source link

pyvips stats #473

Closed marcoaaz closed 6 months ago

marcoaaz commented 6 months ago

Dear John C.,

I am finding pyvips truly useful. I have a question regarding pyvips stats() to 'find many image stats'. Have calculated it for a series of images and append the results in a table. See below (the first column is the input name): pyvips-stats_question I figured the name of a few columns but I am still wondering about unknown 1-5 meaning.

Please, clarify them in the documentation (https://libvips.github.io/pyvips/vimage.html#pyvips.Image.stats) if required. Thanks. Cheers, Marco

jcupitt commented 6 months ago

Hello again, I'm glad it's useful.

The pyvips docs only document the python binding, they don't document the whole of libvips. You need to see the main API docs for that:

https://www.libvips.org/API/current/libvips-arithmetic.html#vips-stats

You can run it from the CLI as well, which can be handy:

$ vips stats wtc.jpg .csv
0   255 31054899090 4423894999856   117.85399474082952  53.844316673201625  657 192 8425    1455
0   255 9726942555  1372525833389   110.74185429478278  57.987368449354825  657 192 8425    1455
0   255 10625633943 1518420269437   120.9735124117225   51.504561277657849  248 33  6807    3117
0   255 10702322592 1532948897030   121.84661751598327  51.050187837323847  248 34  823 751