Average color/lightness over line/polygon/other_figure

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
MadAlex
Posts: 1
Joined: 2015-11-02T08:26:45-07:00
Authentication code: 1151

Average color/lightness over line/polygon/other_figure

Post by MadAlex »

Is it possible to calculate within imagemagick?
I haven't found nothing
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Average color/lightness over line/polygon/other_figure

Post by fmw42 »

For a simple calculator:

see http://www.imagemagick.org/Usage/transform/#fx and http://www.imagemagick.org/script/fx.php

Code: Select all

convert xc: -format "%[fx:2*5]\n" info:
10
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Average color/lightness over line/polygon/other_figure

Post by fmw42 »

To compute the average over a region, see http://www.fmwconcepts.com/imagemagick/ ... shape_mean
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Average color/lightness over line/polygon/other_figure

Post by fmw42 »

For a new user, please read viewtopic.php?f=1&t=9620
Post Reply