Skip Navigation Links | |
Exit Print View | |
man pages section 3: Multimedia Library Functions Oracle Solaris 11.1 Information Library |
Multimedia Library Functions - Part 1
Multimedia Library Functions - Part 2
Multimedia Library Functions - Part 3
mlib_ImageDivShift2_Inp(3MLIB)
mlib_ImageExtremaLocations(3MLIB)
mlib_ImageExtremaLocations_Fp(3MLIB)
mlib_ImageFilteredSubsample_Fp(3MLIB)
mlib_ImageFlipAntiDiag_Fp(3MLIB)
mlib_ImageFlipMainDiag_Fp(3MLIB)
mlib_ImageFourierTransform(3MLIB)
mlib_ImageGradient3x3_Fp(3MLIB)
mlib_ImageGradientMxN_Fp(3MLIB)
mlib_ImageGridWarpTable(3MLIB)
mlib_ImageGridWarpTable_Fp(3MLIB)
mlib_ImageInterpTableCreate(3MLIB)
mlib_ImageInterpTableDelete(3MLIB)
mlib_ImageInvert_Fp_Inp(3MLIB)
mlib_ImageIsNotAligned2(3MLIB)
mlib_ImageIsNotAligned4(3MLIB)
mlib_ImageIsNotAligned64(3MLIB)
mlib_ImageIsNotAligned8(3MLIB)
mlib_ImageIsNotHeight2X(3MLIB)
mlib_ImageIsNotHeight4X(3MLIB)
mlib_ImageIsNotHeight8X(3MLIB)
mlib_ImageIsNotOneDvector(3MLIB)
mlib_ImageIsNotStride8X(3MLIB)
mlib_ImageIsUserAllocated(3MLIB)
mlib_ImageMaxFilter3x3_Fp(3MLIB)
mlib_ImageMaxFilter5x5_Fp(3MLIB)
mlib_ImageMaxFilter7x7_Fp(3MLIB)
mlib_ImageMedianFilter3x3(3MLIB)
mlib_ImageMedianFilter3x3_Fp(3MLIB)
mlib_ImageMedianFilter3x3_US(3MLIB)
mlib_ImageMedianFilter5x5(3MLIB)
mlib_ImageMedianFilter5x5_Fp(3MLIB)
mlib_ImageMedianFilter5x5_US(3MLIB)
mlib_ImageMedianFilter7x7(3MLIB)
mlib_ImageMedianFilter7x7_Fp(3MLIB)
mlib_ImageMedianFilter7x7_US(3MLIB)
mlib_ImageMedianFilterMxN(3MLIB)
mlib_ImageMedianFilterMxN_Fp(3MLIB)
mlib_ImageMedianFilterMxN_US(3MLIB)
mlib_ImageMinFilter3x3_Fp(3MLIB)
mlib_ImageMinFilter5x5_Fp(3MLIB)
mlib_ImageMinFilter7x7_Fp(3MLIB)
mlib_ImageMulAlpha_Fp_Inp(3MLIB)
mlib_ImageNormCrossCorrel(3MLIB)
mlib_ImageNormCrossCorrel_Fp(3MLIB)
mlib_ImagePolynomialWarp(3MLIB)
mlib_ImagePolynomialWarp_Fp(3MLIB)
mlib_ImagePolynomialWarpTable(3MLIB)
mlib_ImagePolynomialWarpTable_Fp(3MLIB)
mlib_ImageRankFilter3x3(3MLIB)
mlib_ImageRankFilter3x3_Fp(3MLIB)
mlib_ImageRankFilter3x3_US(3MLIB)
mlib_ImageRankFilter5x5(3MLIB)
mlib_ImageRankFilter5x5_Fp(3MLIB)
mlib_ImageRankFilter5x5_US(3MLIB)
mlib_ImageRankFilter7x7(3MLIB)
mlib_ImageRankFilter7x7_Fp(3MLIB)
mlib_ImageRankFilter7x7_US(3MLIB)
mlib_ImageRankFilterMxN(3MLIB)
mlib_ImageRankFilterMxN_Fp(3MLIB)
mlib_ImageRankFilterMxN_US(3MLIB)
mlib_ImageReplaceColor_Fp(3MLIB)
mlib_ImageReplaceColor_Fp_Inp(3MLIB)
mlib_ImageReplaceColor_Inp(3MLIB)
mlib_ImageResetSubimageStruct(3MLIB)
mlib_ImageScalarBlend_Fp(3MLIB)
mlib_ImageScalarBlend_Fp_Inp(3MLIB)
mlib_ImageScalarBlend_Inp(3MLIB)
mlib_ImageSConvKernelConvert(3MLIB)
mlib_ImageSetSubimageStruct(3MLIB)
mlib_ImageSubsampleAverage(3MLIB)
mlib_ImageSubsampleAverage_Fp(3MLIB)
mlib_ImageSubsampleBinaryToGray(3MLIB)
mlib_ImageThresh1_Fp_Inp(3MLIB)
mlib_ImageThresh2_Fp_Inp(3MLIB)
mlib_ImageThresh3_Fp_Inp(3MLIB)
mlib_ImageThresh4_Fp_Inp(3MLIB)
mlib_ImageThresh5_Fp_Inp(3MLIB)
mlib_ImageZoomIn2XIndex(3MLIB)
mlib_ImageZoomOut2XIndex(3MLIB)
mlib_ImageZoomTranslate(3MLIB)
mlib_ImageZoomTranslateBlend(3MLIB)
mlib_ImageZoomTranslate_Fp(3MLIB)
mlib_ImageZoomTranslateTable(3MLIB)
mlib_ImageZoomTranslateTableBlend(3MLIB)
mlib_ImageZoomTranslateTable_Fp(3MLIB)
mlib_ImageZoomTranslateToGray(3MLIB)
mlib_MatrixAdd_S16C_Mod(3MLIB)
mlib_MatrixAdd_S16C_S16C_Mod(3MLIB)
mlib_MatrixAdd_S16C_S16C_Sat(3MLIB)
mlib_MatrixAdd_S16C_S8C_Mod(3MLIB)
mlib_MatrixAdd_S16C_S8C_Sat(3MLIB)
mlib_MatrixAdd_S16C_Sat(3MLIB)
mlib_MatrixAdd_S16C_U8C_Mod(3MLIB)
mlib_MatrixAdd_S16C_U8C_Sat(3MLIB)
mlib_MatrixAdd_S16_S16_Mod(3MLIB)
mlib_MatrixAdd_S16_S16_Sat(3MLIB)
mlib_MatrixAdd_S16_S8_Mod(3MLIB)
mlib_MatrixAdd_S16_S8_Sat(3MLIB)
mlib_MatrixAdd_S16_U8_Mod(3MLIB)
mlib_MatrixAdd_S16_U8_Sat(3MLIB)
mlib_MatrixAdd_S32C_Mod(3MLIB)
mlib_MatrixAdd_S32C_S16C_Mod(3MLIB)
mlib_MatrixAdd_S32C_S16C_Sat(3MLIB)
mlib_MatrixAdd_S32C_S32C_Mod(3MLIB)
mlib_MatrixAdd_S32C_S32C_Sat(3MLIB)
mlib_MatrixAdd_S32C_Sat(3MLIB)
mlib_MatrixAdd_S32_S16_Mod(3MLIB)
mlib_MatrixAdd_S32_S16_Sat(3MLIB)
mlib_MatrixAdd_S32_S32_Mod(3MLIB)
mlib_MatrixAdd_S32_S32_Sat(3MLIB)
mlib_MatrixAdd_S8C_S8C_Mod(3MLIB)
mlib_MatrixAdd_S8C_S8C_Sat(3MLIB)
mlib_MatrixAdd_S8_S8_Mod(3MLIB)
mlib_MatrixAdd_S8_S8_Sat(3MLIB)
mlib_MatrixAddS_S16C_Mod(3MLIB)
mlib_MatrixAddS_S16C_S16C_Mod(3MLIB)
mlib_MatrixAddS_S16C_S16C_Sat(3MLIB)
mlib_MatrixAddS_S16C_S8C_Mod(3MLIB)
mlib_MatrixAddS_S16C_S8C_Sat(3MLIB)
mlib_MatrixAddS_S16C_Sat(3MLIB)
mlib_MatrixAddS_S16C_U8C_Mod(3MLIB)
mlib_MatrixAddS_S16C_U8C_Sat(3MLIB)
mlib_MatrixAddS_S16_Mod(3MLIB)
mlib_MatrixAddS_S16_S16_Mod(3MLIB)
mlib_MatrixAddS_S16_S16_Sat(3MLIB)
mlib_MatrixAddS_S16_S8_Mod(3MLIB)
mlib_MatrixAddS_S16_S8_Sat(3MLIB)
mlib_MatrixAddS_S16_Sat(3MLIB)
mlib_MatrixAddS_S16_U8_Mod(3MLIB)
mlib_MatrixAddS_S16_U8_Sat(3MLIB)
mlib_MatrixAddS_S32C_Mod(3MLIB)
mlib_MatrixAddS_S32C_S16C_Mod(3MLIB)
mlib_MatrixAddS_S32C_S16C_Sat(3MLIB)
mlib_MatrixAddS_S32C_S32C_Mod(3MLIB)
mlib_MatrixAddS_S32C_S32C_Sat(3MLIB)
mlib_MatrixAddS_S32C_Sat(3MLIB)
mlib_MatrixAddS_S32_Mod(3MLIB)
mlib_MatrixAddS_S32_S16_Mod(3MLIB)
mlib_MatrixAddS_S32_S16_Sat(3MLIB)
mlib_MatrixAddS_S32_S32_Mod(3MLIB)
mlib_MatrixAddS_S32_S32_Sat(3MLIB)
mlib_MatrixAddS_S32_Sat(3MLIB)
mlib_MatrixAddS_S8C_Mod(3MLIB)
mlib_MatrixAddS_S8C_S8C_Mod(3MLIB)
mlib_MatrixAddS_S8C_S8C_Sat(3MLIB)
mlib_MatrixAddS_S8C_Sat(3MLIB)
mlib_MatrixAddS_S8_S8_Mod(3MLIB)
mlib_MatrixAddS_S8_S8_Sat(3MLIB)
mlib_MatrixAddS_U8C_Mod(3MLIB)
mlib_MatrixAddS_U8C_Sat(3MLIB)
mlib_MatrixAddS_U8C_U8C_Mod(3MLIB)
mlib_MatrixAddS_U8C_U8C_Sat(3MLIB)
mlib_MatrixAddS_U8_U8_Mod(3MLIB)
mlib_MatrixAddS_U8_U8_Sat(3MLIB)
mlib_MatrixAdd_U8C_U8C_Mod(3MLIB)
mlib_MatrixAdd_U8C_U8C_Sat(3MLIB)
mlib_MatrixAdd_U8_U8_Mod(3MLIB)
mlib_MatrixAdd_U8_U8_Sat(3MLIB)
mlib_MatrixAve_S16C_S16C(3MLIB)
mlib_MatrixAve_S16C_S8C(3MLIB)
mlib_MatrixAve_S16C_U8C(3MLIB)
mlib_MatrixAve_S32C_S16C(3MLIB)
mlib_MatrixAve_S32C_S32C(3MLIB)
mlib_MatrixMaximumMag_D64C(3MLIB)
mlib_MatrixMaximumMag_F32C(3MLIB)
mlib_MatrixMaximumMag_S16C(3MLIB)
mlib_MatrixMaximumMag_S32C(3MLIB)
mlib_MatrixMaximumMag_S8C(3MLIB)
mlib_MatrixMaximumMag_U8C(3MLIB)
mlib_MatrixMinimumMag_D64C(3MLIB)
mlib_MatrixMinimumMag_F32C(3MLIB)
mlib_MatrixMinimumMag_S16C(3MLIB)
mlib_MatrixMinimumMag_S32C(3MLIB)
mlib_MatrixMinimumMag_S8C(3MLIB)
mlib_MatrixMinimumMag_U8C(3MLIB)
mlib_MatrixMul_S16C_S16C_Mod(3MLIB)
mlib_MatrixMul_S16C_S16C_Sat(3MLIB)
mlib_MatrixMul_S16C_S8C_Mod(3MLIB)
mlib_MatrixMul_S16C_S8C_Sat(3MLIB)
mlib_MatrixMul_S16C_U8C_Mod(3MLIB)
mlib_MatrixMul_S16C_U8C_Sat(3MLIB)
mlib_MatrixMul_S16_S16_Mod(3MLIB)
mlib_MatrixMul_S16_S16_Sat(3MLIB)
mlib_MatrixMul_S16_S8_Mod(3MLIB)
mlib_MatrixMul_S16_S8_Sat(3MLIB)
mlib_MatrixMul_S16_U8_Mod(3MLIB)
mlib_MatrixMul_S16_U8_Sat(3MLIB)
mlib_MatrixMul_S32C_S16C_Mod(3MLIB)
mlib_MatrixMul_S32C_S16C_Sat(3MLIB)
mlib_MatrixMul_S32C_S32C_Mod(3MLIB)
mlib_MatrixMul_S32C_S32C_Sat(3MLIB)
mlib_MatrixMul_S32_S16_Mod(3MLIB)
mlib_MatrixMul_S32_S16_Sat(3MLIB)
mlib_MatrixMul_S32_S32_Mod(3MLIB)
mlib_MatrixMul_S32_S32_Sat(3MLIB)
mlib_MatrixMul_S8C_S8C_Mod(3MLIB)
mlib_MatrixMul_S8C_S8C_Sat(3MLIB)
mlib_MatrixMul_S8_S8_Mod(3MLIB)
mlib_MatrixMul_S8_S8_Sat(3MLIB)
mlib_MatrixMulShift_S16C_S16C_Mod(3MLIB)
mlib_MatrixMulShift_S16C_S16C_Sat(3MLIB)
mlib_MatrixMulShift_S16_S16_Mod(3MLIB)
mlib_MatrixMulShift_S16_S16_Sat(3MLIB)
mlib_MatrixMulS_S16C_Mod(3MLIB)
mlib_MatrixMulS_S16C_S16C_Mod(3MLIB)
mlib_MatrixMulS_S16C_S16C_Sat(3MLIB)
mlib_MatrixMulS_S16C_S8C_Mod(3MLIB)
mlib_MatrixMulS_S16C_S8C_Sat(3MLIB)
mlib_MatrixMulS_S16C_Sat(3MLIB)
mlib_MatrixMulS_S16C_U8C_Mod(3MLIB)
mlib_MatrixMulS_S16C_U8C_Sat(3MLIB)
mlib_MatrixMulS_S16_Mod(3MLIB)
mlib_MatrixMulS_S16_S16_Mod(3MLIB)
mlib_MatrixMulS_S16_S16_Sat(3MLIB)
mlib_MatrixMulS_S16_S8_Mod(3MLIB)
mlib_MatrixMulS_S16_S8_Sat(3MLIB)
mlib_MatrixMulS_S16_Sat(3MLIB)
mlib_MatrixMulS_S16_U8_Mod(3MLIB)
mlib_MatrixMulS_S16_U8_Sat(3MLIB)
mlib_MatrixMulS_S32C_Mod(3MLIB)
mlib_MatrixMulS_S32C_S16C_Mod(3MLIB)
mlib_MatrixMulS_S32C_S16C_Sat(3MLIB)
mlib_MatrixMulS_S32C_S32C_Mod(3MLIB)
mlib_MatrixMulS_S32C_S32C_Sat(3MLIB)
mlib_MatrixMulS_S32C_Sat(3MLIB)
mlib_MatrixMulS_S32_Mod(3MLIB)
mlib_MatrixMulS_S32_S16_Mod(3MLIB)
mlib_MatrixMulS_S32_S16_Sat(3MLIB)
mlib_MatrixMulS_S32_S32_Mod(3MLIB)
mlib_MatrixMulS_S32_S32_Sat(3MLIB)
mlib_MatrixMulS_S32_Sat(3MLIB)
mlib_MatrixMulS_S8C_Mod(3MLIB)
mlib_MatrixMulS_S8C_S8C_Mod(3MLIB)
mlib_MatrixMulS_S8C_S8C_Sat(3MLIB)
mlib_MatrixMulS_S8C_Sat(3MLIB)
mlib_MatrixMulS_S8_S8_Mod(3MLIB)
mlib_MatrixMulS_S8_S8_Sat(3MLIB)
mlib_MatrixMulSShift_S16C_Mod(3MLIB)
mlib_MatrixMulSShift_S16C_S16C_Mod(3MLIB)
mlib_MatrixMulSShift_S16C_S16C_Sat(3MLIB)
mlib_MatrixMulSShift_S16C_Sat(3MLIB)
mlib_MatrixMulSShift_S16_Mod(3MLIB)
mlib_MatrixMulSShift_S16_S16_Mod(3MLIB)
mlib_MatrixMulSShift_S16_S16_Sat(3MLIB)
mlib_MatrixMulSShift_S16_Sat(3MLIB)
mlib_MatrixMulSShift_S32C_Mod(3MLIB)
mlib_MatrixMulSShift_S32C_S32C_Mod(3MLIB)
mlib_MatrixMulSShift_S32C_S32C_Sat(3MLIB)
mlib_MatrixMulSShift_S32C_Sat(3MLIB)
mlib_MatrixMulSShift_S32_Mod(3MLIB)
mlib_MatrixMulSShift_S32_S32_Mod(3MLIB)
mlib_MatrixMulSShift_S32_S32_Sat(3MLIB)
mlib_MatrixMulSShift_S32_Sat(3MLIB)
mlib_MatrixMulSShift_S8C_Mod(3MLIB)
mlib_MatrixMulSShift_S8C_S8C_Mod(3MLIB)
mlib_MatrixMulSShift_S8C_S8C_Sat(3MLIB)
mlib_MatrixMulSShift_S8C_Sat(3MLIB)
mlib_MatrixMulSShift_S8_Mod(3MLIB)
mlib_MatrixMulSShift_S8_S8_Mod(3MLIB)
mlib_MatrixMulSShift_S8_S8_Sat(3MLIB)
mlib_MatrixMulSShift_S8_Sat(3MLIB)
Multimedia Library Functions - Part 4
Multimedia Library Functions - Part 5
- antialias filters and subsamples an image
cc [ flag... ] file... -lmlib [ library... ] #include <mlib.h> mlib_status mlib_ImageFilteredSubsample(mlib_image *dst, const mlib_image *src, mlib_s32 scaleX, mlib_s32 scaleY, mlib_s32 transX, mlib_s32 transY, const mlib_d64 *hKernel, const mlib_d64 *vKernel, mlib_s32 hSize, mlib_s32 vSize, mlib_s32 hParity, mlib_s32 vParity, mlib_edge edge);
mlib_status mlib_ImageFilteredSubsample_Fp(mlib_image *dst, const mlib_image *src, mlib_s32 scaleX, mlib_s32 scaleY, mlib_s32 transX, mlib_s32 transY, const mlib_d64 *hKernel, const mlib_d64 *vKernel, mlib_s32 hSize, mlib_s32 vSize, mlib_s32 hParity, mlib_s32 vParity, mlib_edge edge);
Each of the functions antialias filters and subsamples an image.
The effect of one of the functions on an image is equivalent to performing convolution (filter) followed by subsampling (zoom out).
The functions are similar to the mlib_ImageZoomTranslate() and mlib_ImageZoomTranslate_Fp() functions. But they have different definitions on scale factors and translations, hence use different coordinate mapping equations. The scaleX and scaleY used by mlib_ImageFilteredSubsample() and mlib_ImageFilteredSubsample_Fp() are the reciprocals of the zoomx and zoomy, respectively, used by mlib_ImageZoomTranslate() and mlib_ImageZoomTranslate_Fp().
The functions use the following equations for coordinate mapping:
xS = xD*scaleX + transX yS = yD*scaleY + transY
where, a point (xD, yD) in the destination image is backward mapped to a point (xS, yS) in the source image. The arguments transX and transY are provided to support tiling.
The subsample terms, i.e., the scale factors scaleX and scaleY, are restricted to positive integral values. Geometrically, one destination pixel maps to scaleX by scaleY source pixels. With odd scale factors, destination pixel centers map directly onto source pixel centers. With even scale factors, destination pixel centers map squarely between source pixel centers. Below are examples of even, odd, and combination cases.
s s s s s s s s s s s s d d d s s s s s s s d s s d s s s s s s s s s s s s s d d d s s s s s s s s s s s s s s s s s s s d s s d s d d d s s s s s s s s s s s s Even scaleX/Y factors Odd scaleX/Y factors s s s s s s s s s s s s d d s s s s s s s d s s d s s d s s s s s s s s s s s s s d d s s s s s s s s s s s s s s s s s s s d s s d s s d s d d s s s s s s s s s s s s Odd/even scaleX/Y factors Even/odd scaleX/Y factors
where
s = source pixel centers d = destination pixel centers mapped to source
The applied filter is quadrant symmetric (typically antialias + resample). The filter is product-separable, quadrant symmetric, and is defined by half of its span. Parity is used to signify whether the symmetric kernel has a double center (even parity) or a single center value (odd parity). For example, if hParity == 0 (even), the horizontal kernel is defined as:
hKernel[hSize-1], ..., hKernel[0], hKernel[0], ..., hKernel[hSize-1]
Otherwise, if hParity == 1 (odd), the horizontal kernel is defined as:
hKernel[hSize-1], ..., hKernel[0], ..., hKernel[hSize-1]
Horizontal and vertical kernels representing convolved resample (i.e., the combined separable kernels) can be computed from a convolution filter (with odd parity), a resample filter, and because the subsample factors affect resample weights, the subsample scale factors. It is the user's responsibility to provide meaningful combined kernels.
To compute the value of a pixel centered at point (xD, yD) in the destination image, apply the combined kernel to the source image by aligning the kernel's geometric center to the backward mapped point (xS, yS) in the source image. In the cases that it can not be exactly on top of point (xS, yS), the kernel's center should be half-pixel right and/or below that point. When this is done in a separable manner, the centers of horizontal and vertical kernels should align with xS and yS, respectively.
The combination of subsampling and filtering has performance benefits over sequential fucntion usage in part due to the symmetry constraints imposed by only allowing integer parameters for scaling and only allowing separable symmetric filters.
The function takes the following arguments:
Pointer to destination image.
Pointer to source image.
The x scale factor of subsampling.
The y scale factor of subsampling.
The x translation.
The y translation.
Pointer to the compact form of horizontal kernel.
Pointer to the compact form of vertical kernel.
Size of array hKernel.
Size of array vKernel.
Parity of horizontal kernel (0: even, 1: odd).
Parity of vertical kernel (0: even, 1: odd).
Type of edge condition. It can be one of the following:
MLIB_EDGE_DST_NO_WRITE
The function returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE.
See attributes(5) for descriptions of the following attributes:
|
mlib_ImageSubsampleAverage(3MLIB), mlib_ImageZoomTranslate(3MLIB), mlib_ImageZoomTranslate_Fp(3MLIB), attributes(5)