PANDORE Version 6 GREYC-IMAGE

parraymedian



Calculates the median value of array items.



Synopsis

parraymedian name_in name_out [col_in|-] [col_out|-]

Description

parraymedian calculates the median of the items of the name_in array in the input collection col_in. The result is stored in the output collection col_out as the value named name_out.

Parameters

Inputs

Outputs

Result

Returns SUCCESS or FAILURE

Examples

Compute the median height of the tangram pieces:

pbinarization 100 255 ~/pantheon/software/pandore/examples/tangram.pan a.pan
plabeling 8 a.pan b.pan 
pregionheight height b.pan c.pan
parraymedian height median c.pan d.pan
pcolgetvalue median d.pan
pstatus

See also

Array

C++ prototype

Errc PArrayMedian( const Collection &col_in, Collection &col_out
                 const std::string &name_in, const std::string &name_out );

Author: Régis Clouard