color_area

NAME

color_area - measures the area of the part of an image matching a given color criterion.

SYNOPSIS

color_area [-?|-h|--help] [-Ri SHORT] [-Rs SHORT] [-Gi SHORT] [-Gs SHORT] [-Bi SHORT] [-Bs SHORT] [-Hi DOUBLE] [-Hs DOUBLE] [-Si DOUBLE] [-Ss DOUBLE] [-Vi DOUBLE] [-Vs DOUBLE] FILE_IN

DESCRIPTION

color_area counts in an image FILE_IN the number of pixels matching a (possibly complex) color criterion (red, green or blue content and/or hue, saturation, value). If no scale is specified, the number of pixels (=area in pixel^2) is returned to the standard output. If a scale is specified (option --scale), the area returned is scaled. FILE_IN can be jpg, tiff or png (recognized by its extension).

OPTIONS

-h,--help,-?

Returns the manual page.

-R SHORT

exact value for red (0-255).

-Ri SHORT

minimum value for red (0-255).

-Rs SHORT

maximum value for red (0-255).

-G SHORT

exact value for green (0-255).

-Gi SHORT

minimum value for green (0-255).

-Gs SHORT

maximum value for green (0-255).

-B SHORT

exact value for blue (0-255).

-Bi SHORT

minimum value for blue (0-255).

-Bs SHORT

maximum value for blue (0-255).

-Hi DOUBLE

minimum value for hue (0-1) [0 is red, 0.33 is green, 0.66 is blue].

-Hs DOUBLE

maximum value for hue (0-1).

-Si DOUBLE

minimum value for saturation (0-1).

-Ss DOUBLE

maximum value for saturation (0-1).

-Vi DOUBLE

minimum value for value (0-1) [0 is black].

-Vs DOUBLE

maximum value for value (0-1).

-s DOUBLE, --scale DOUBLE

scale of the image in 'length unit'/pixel (example 10cm/pixel). The area is returned in 'length unit'^2 (example: cm^2).

AUTHORS

Written by Pierre Smars (first version: 2014)

BUGS

Reports of bugs or problems should be submitted via electronic mail to <smars@yuntech.edu.tw>.

COPYRIGHT

Copyright (C) 2014 Pierre Smars. License GPLv2 <http://www.gnu.org/licenses/gpl-2.0.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Pierre SMARS (tools, home page)