📄 ipl.h
字号:
// Purpose: Same as iplConvertFromDIB, but uses separate// parameters for DIB header and data. // Returns: IPLStatus// Parameters: // dibHeader - The input DIB image header.// dibData - The input DIB image data.// image - The IPL image header with specified attributes.// If the data pointer is NULL, image data memory// will be allocated and the pointer set to it.//// Notes: */IPLAPI ( IPLStatus, iplConvertFromDIBSep, (BITMAPINFOHEADER* dibHeader, const char* dibData, IplImage* image) )/* /////////////////////////////////////////////////////////////////////////// Name: iplConvertToDIBSep// Purpose: Same as iplConvertToDIB, but uses separate// parameters for DIB header and data.// Returns: // Parameters: // image - The input IPL image.// dibHeader - The output DIB image header.// dibData - The output DIB image data.// dither - // The dithering algorithm to use if applicable.// Dithering will be done if the bit depth in the DIB// is less than that of the IPL image.// The following algorithms are supported for all dither // type (see iplReduceBits).// paletteConversion -// Applicable when the DIB is a palette image.// Specifies the palette algorithm to use when converting// the IPL absolute color image.// The following options are supported:// IPL_PALCONV_NONE -// The existing palette in the DIB is used.// IPL_PALCONV_POPULATE -// The popularity palette conversion algorithm is used.// IPL_PALCONV_MEDCUT -// The median cut algorithm palette conversion// algorithm is used.//// Notes: */IPLAPI ( IPLStatus, iplConvertToDIBSep, (IplImage* image, BITMAPINFOHEADER* dibHeader, char* dibData, int dither, int paletteConversion) )/*========================================================================== Section: Conversion and Data Exchange Functions ==========================================================================*//* /////////////////////////////////////////////////////////////////////////// Name: iplCopy// Purpose: Copies image data from one image to another.// Returns: // Parameters: // srcImage - The source image.// dstImage - The resultant image.//// Notes: */ IPLAPI(void, iplCopy, (IplImage* srcImage, IplImage* dstImage))/* /////////////////////////////////////////////////////////////////////////// Name: iplExchange// Purpose: Exchanges image data between two images.// Returns: // Parameters: // ImageA - The first image.// ImageB - The second image.//// Notes: */IPLAPI(void, iplExchange, (IplImage* ImageA, IplImage* ImageB))/* /////////////////////////////////////////////////////////////////////////// Name: iplSet, iplSetFP// Purpose: Sets a value for an image抯 pixel data.// Returns: // Parameters: // image - An image header with allocated image data.// fillValue - The value to set the pixel data.//// Notes: */IPLAPI(void, iplSet, (IplImage* image, int fillValue))IPLAPI(void, iplSetFP, (IplImage* image, float fillValue))/* /////////////////////////////////////////////////////////////////////////// Name: iplPutPixel, iplGetPixel// Purpose: Sets/retrieves a value of an image抯 pixel.// Returns: // Parameters: // img - image in IPL-format.// x,y - indexis of the requested pixel.// pixel - pointer for values of pixel//// Notes: // ignored:// img->colorModel // img->channelSeq// img->roi// img->maskROI*/IPLAPI(void, iplPutPixel,(IplImage* img, int x, int y, void* pixel))IPLAPI(void, iplGetPixel,(IplImage* img, int x, int y, void* pixel))/* /////////////////////////////////////////////////////////////////////////// Name: iplConvert// Purpose: Converts source image data to resultant image according to// the image headers.// Returns: // Parameters: // srcImage - The source image.// dstImage - The resultant image.//// Notes: */IPLAPI(void, iplConvert, (IplImage *srcImage, IplImage *dstImage))/* /////////////////////////////////////////////////////////////////////////// Name: iplScale// Purpose: // 1) dst = a + b * src; // a = type_min_dst - b * type_min_src; // b = (type_max_dst - type_min_dst) / (type_max_src - type_min_src).//// 2) src(8s,8u,16s,16u,32s) ==> dst(8s,8u,16s,16u,32s); // [type_src_min...type_src_max] ==> [type_dst_min...type_dst_max];// src_depth != dst_depth.// Returns: // Parameters: // srcImage The source image.// dstImage The resultant image.//// Notes: */IPLAPI(IPLStatus, iplScale, (const IplImage* srcImage, IplImage* dstImage ))/* /////////////////////////////////////////////////////////////////////////// Name: iplScaleFP// Purpose: // 1) dst = a + b*src; // a = min_dst - b*min_src; // b = (max_dst - min_dst) / (max_src - min_src). //// 2) src(32f) ==> dst(8s,8u,16s,16u,32s) + saturation; // [minVal...maxVal] ==> [type_dst_min...type_dst_max].//// 3) src(8s,8u,16s,16u,32s) ==> dst(32f); // [type_src_min...type_src_max] ==> [minVal...maxVal].//// 4) src_depth != dst_depth.// Returns: // Parameters: // srcImage The source image.// dstImage The resultant image.// [minVal...maxVal] Range for depth 32f.//// Notes: */IPLAPI(IPLStatus, iplScaleFP, (const IplImage * srcImage,IplImage * dstImage, float minVal, float maxVal))/*========================================================================== Section: Arithmetic Functions ==========================================================================*//*------------------------- Monadic Operations --------------------------*//* /////////////////////////////////////////////////////////////////////////// Name: iplAddS, iplAddSFP// Purpose: Adds a constant to pixel values of the source image.// Returns: // Parameters: // srcImage - The source image.// dstImage - The resultant image.// value - The value to increase the pixel values by.//// Notes: */IPLAPI(void, iplAddS,(IplImage* srcImage, IplImage* dstImage, int value))IPLAPI(void, iplAddSFP,(IplImage* srcImage, IplImage* dstImage, float value))/* /////////////////////////////////////////////////////////////////////////// Name: iplSubtractS, iplSubtractSFP// Purpose: Subtracts a constant from pixel values, or pixel values // from a constant.// Returns: // Parameters: // srcImage - The source image.// dstImage - The resultant image.// value - The value to decrease the pixel values by.// flip - A boolean that is used to change the order of subtraction.// If false the result pixel value is computed as:// result = pixel_value - value;// If true, the result pixel value is computed as// result = value - pixel_value,// where pixel_value is the input pixel value.//// Notes: */IPLAPI(void, iplSubtractS,(IplImage* srcImage, IplImage* dstImage, int value, BOOL flip))IPLAPI(void,iplSubtractSFP,(IplImage* srcImage,IplImage* dstImage,float value, BOOL flip))/* /////////////////////////////////////////////////////////////////////////// Name: iplMultiplyS, iplMultiplySFP// Purpose: Multiplies pixel values by a constant.// Returns: // Parameters: // srcImage - The source image.// dstImage - The resultant image.// value - An integer value by which to multiply the pixel values.//// Notes: */IPLAPI(void, iplMultiplyS,(IplImage* srcImage, IplImage* dstImage, int value))IPLAPI(void, iplMultiplySFP,(IplImage* srcImage, IplImage* dstImage, float value))/* /////////////////////////////////////////////////////////////////////////// Name: iplMultiplySScale// Purpose: Multiplies pixel values by a constant and scales the products.// Returns: // Parameters: // srcImage - The source image.// dstImage - The resultant image.// value - A positive value to multiply the pixel values with// dstImage = (srcImage * value) / VAL_MAX//// Notes: value becomes 0 <= value <= VAL_MAX*/IPLAPI(void, iplMultiplySScale,(IplImage* srcImage, IplImage* dstImage, int value))/* /////////////////////////////////////////////////////////////////////////// Name: iplAbs// Purpose: Computes absolute pixel values of the image.// Returns: // Parameters: // srcImage - The source image.// dstImage - The resultant image.//// Notes: */IPLAPI(void, iplAbs,(IplImage* srcImage, IplImage* dstImage))/* /////////////////////////////////////////////////////////////////////////// Name: iplSquare// Purpose: Squares the pixel values of the image.// Returns: // Parameters: // srcImage - The source image.// dstImage - The resultant image.//// Notes: */IPLAPI(void, iplSquare,(IplImage* srcImage, IplImage* dstImage))/*-------------------------- Dyadic Operations --------------------------*/ /* /////////////////////////////////////////////////////////////////////////// Name: iplAdd// Purpose: Combines corresponding pixels of two images by addition.// Returns: // Parameters: // srcImageA - The first source image.// srcImageB - The second source image.// dstImage - The resultant image obtained as:// dstImage = srcImageA + srcImageB.//// Notes: */IPLAPI(void, iplAdd,(IplImage* srcImageA, IplImage* srcImageB, IplImage* dstImage))/* /////////////////////////////////////////////////////////////////////////// Name: iplSubtract// Purpose: Combines corresponding pixels of two images by subtraction.// Returns: // Parameters: // srcImageA - The first source image.// srcImageB - The second source image.// dstImage - The resultant image obtained as:// dstImage = srcImageA - srcImageB.//// Notes: */IPLAPI(void, iplSubtract,(IplImage* srcImageA, IplImage* srcImageB, IplImage* dstImage))/* /////////////////////////////////////////////////////////////////////////// Name: iplMultiply// Purpose: Combines corresponding pixels of two images by multiplication.// Returns: // Parameters: // srcImageA - The first source image.// srcImageB - The second source image.// dstImage - The resultant image obtained as:// dstImage = srcImageA * srcImageB.//// Notes: */IPLAPI(void, iplMultiply,(IplImage* srcImageA, IplImage* srcImageB, IplImage* dstImage))/* /////////////////////////////////////////////////////////////////////////// Name: iplMultiplyScale// Purpose: Multiplies pixel values of two images and scales the products.// Returns: // Parameters: // srcImageA - The first source image.// srcImageB - The second source image.// dstImage - The resultant image obtained as:// dstImage = (srcImageA * srcImageB) / VAL_MAX//// Notes: The function is implemented only for 8-bit and 16-bit // unsigned data types.*/IPLAPI(void, iplMultiplyScale,(IplImage* srcImageA, IplImage* srcImageB, IplImage* dstImage))/*========================================================================== Section: Logical Functions ==========================================================================*//*------------------------- Monadic Operations --------------------------*//* /////////////////////////////////////////////////////////////////////////// Name: iplNot// Purpose: Performs a bitwise NOT operation on each pixel.// Returns: // Parameters: // srcImage - The source image.// dstImage - The resultant image.//// Notes: */IPLAPI(void, iplNot,(IplImage* srcImage, IplImage* dstImage))/* /////////////////////////////////////////////////////////////////////////// Name: iplLShiftS// Purpose: Shifts pixel values
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -