XieMatchHistogram(3X) — Subroutines
Digital
NAME
XieMatchHistogram − This routine creates a photomap having a specified histogram shape from a source image.
C Format
dst_photo_id = XieMatchHistogram(src_id, idc_id, h_shape, param1, param2)
C Argument Information
XiePhoto dst_photo_id;
XiePhoto src_id;
XieIdc idc_id;
unsigned long h_shape;
double param1;
double param2;
RETURN VALUES
If the source image is an unbound photomap, the routine returns the identifier of the new photomap in the dst_photo_id argument. Otherwise, the routine returns the identifier of the processing element to which a processing element is appended. You can free the photomap using the XieFreeResource routine.
PARAMETERS
src_idThe src_id argument specifies the identifier of the source image. If the source image is an unbound photomap, the operation is performed immediately. Otherwise, a processing element is appended to the specified photoflo with execution pending a call to the XieExecuteFlo routine. The photoflo is specified explicitly if the source image is a photoflo, or implicitly if the source image is a photomap or phototap.
idc_idThe idc_id argument specifies the optional CPP or ROI that defines the region of the source image that the routine remaps. If you specify a value of 0, the routine remaps the entire source image.
h_shapeThe h_shape argument specifies the histogram shape for the remapped photomap.
| Symbol | Resulting Distribution |
| XieK_Flat | Flat (uniform) distribution |
| XieK_Gaussian | Gaussian distribution |
| XieK_Hyperbolic | Hyperbolic distribution |
param1The param1 argument specifies a parameter for the specified distribution. If you specify a value of 0.0, the routine uses a default value.
| Distribution | Parameter | Default |
| XieK_Flat | Ignored | Not applicable |
| XieK_Gaussian | Mean value | Levels/2 |
| XieK_Hyperbolic | Hyperbolic constant | Levels/4 |
param2The param2 argument specifies a parameter for the specified histogram distribution. If you specify a value of 0.0, the routine uses a default value.
| Distribution | Parameter | Default |
| XieK_Flat | Ignored | NA |
| XieK_Gaussian | Variance | Levels/4 |
| XieK_Hyperbolic | Shape Factor | 0.0 |
DESCRIPTION
This routine creates a photomap having a specified histogram shape. The source image must be gray scale and be constrained. The resulting image is always gray scale and constrained.
The resulting photomap has the same spatial dimensions as the source image. The routine operates over that area of the source image defined by an IDC, if you specify 1. Otherwise, the routine operates over the entire source image area.
If the routine executes immediately and you selected computation events using the XieSelectEvents routine, the routine adds an XieK_ComputationEvent to the X11 event queue when the routine is completed.
XIE Events and Error Messages
Protocol Messages: X_ieMatchHistogram
XIE event returned: XieK_ComputationEvent if immediate execution and computation events are selected
XieLib errors: None
XieServer errors: BadIDChoice -- Invalid identifier
BadAlloc -- Insufficient server resources
BadMatch -- The source image is not constrained or the source image is multispectral
BadValue -- Invalid histogram shape or the IDC does not intersect the source image