⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ipl.pas

📁 Delphi版本的OpenCV头文件库(以及诸多实例)
💻 PAS
📖 第 1 页 / 共 4 页
字号:
                            Dib               : PBitmapInfoHeader;
                            DibData           : PByte;
                            Dither            : Integer;
                            PaletteConversion : TIplPalConversion) : IPLStatus; stdcall;
{
Purpose:    Same as iplConvertToDIB, but uses separate
            parameters for DIB header and data.
Returns:    IPLStatus
Parameters:
  Image     - The input IPL image.
  Dib       - 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.
}

{==========================================================================
      Section: Conversion and Data Exchange Functions
 ==========================================================================}

procedure iplCopy(SrcImage, DstImage : PIplImage); stdcall;
{
Purpose:    Copies image data from one image to another.
Parameters:
     SrcImage - The source image.
     DstImage - The resultant image.
}

procedure iplExchange(Image1, Image2 : PIplImage); stdcall;
{
Purpose:    Exchanges image data between two images.
Parameters:
     Image1 - The first image.
     Image2 - The second image.
}

procedure iplSet(  Image : PIplImage; Value : Integer); stdcall;
procedure iplSetFP(Image : PIplImage; Value : Float);   stdcall;
{
Purpose:    Sets a value for an image抯 pixel data.
Parameters:
     Image     - An image header with allocated image data.
     Value     - The value to set the pixel data.
}

procedure iplPutPixel(Img : PIplImage; X, Y : Integer; var Pixel); stdcall;
{
Purpose:     Sets a value of an image's pixel.
Parameters:
  Img        - rezult image in IPL-format.
  X,Y        - indexis of pixel.
  Pixel      - pointer for values of pixel
Notes:
  ignored:
               img->colorModel
               img->channelSeq
               img->roi
               img->maskROI
}

procedure iplGetPixel(Img : PIplImage; X, Y : Integer; var Pixel); stdcall;
{
Purpose:     Retrieves a value of an image's pixel.
Parameters:
  Img        - source 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
}

procedure iplConvert(SrcImage, DstImage : PIplImage); stdcall;
{
Purpose:    Converts source image data to resultant image according to
            the image headers.
Parameters:
     SrcImage - The source image.
     DstImage - The resultant image.
}

function iplScale(SrcImage, DstImage : PIplImage) : IPLStatus; stdcall;
{
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.
Parameters:
       srcImage        The source image.
       dstImage        The resultant image.
}

function iplScaleFP(SrcImage, DstImage : PIplImage;
                    MinVal, MaxVal     : Float) : IPLStatus; stdcall;
{
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.
Parameters:
        srcImage                The source image.
        dstImage                The resultant image.
        [minVal...maxVal]       Range for depth 32f.
}

{==========================================================================
      Section: Arithmetic Functions
 ==========================================================================}

{-------------------------  Monadic Operations  ---------------------------}

procedure iplAddS(SrcImage, DstImage : PIplImage; Value : Integer); stdcall;
{
Purpose:    Adds a constant to pixel values of the source image.
Parameters:
  SrcImage       The source image.
  DstImage       The resultant image.
  Value          The value to increase the pixel values by.
}

procedure iplAddSFP(SrcImage, DstImage : PIplImage; Value : Float); stdcall;
{
Purpose:    Adds a constant to pixel values of the source image.
Parameters:
  SrcImage       The source image.
  DstImage       The resultant image.
  Value          The value to increase the pixel values by.
}

procedure iplSubtractS(SrcImage, DstImage : PIplImage;
                       Value : Integer; Flip : BOOL); stdcall;
{
Purpose:    Subtracts a constant from pixel values, or pixel values
            from a constant.
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, where pixel_value is the input
                                                  pixel value.
                 If true, the result pixel value is computed as
                    result = value - pixel_value.
}

procedure iplSubtractSFP(SrcImage, DstImage : PIplImage;
                         Value : Float; Flip : BOOL); stdcall;
{
Purpose:    Subtracts a constant from pixel values, or pixel values
            from a constant.
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, where pixel_value is the input
                                                  pixel value.
                 If true, the result pixel value is computed as
                    result = value - pixel_value.
}

procedure iplMultiplyS(SrcImage, DstImage : PIplImage; Value : Integer); stdcall;
{
Purpose:    Multiplies pixel values by a constant.
Parameters:
  SrcImage       The source image.
  DstImage       The resultant image.
  Value          An integer value by which to multiply the pixel values with.
}

procedure iplMultiplySFP(SrcImage, DstImage : PIplImage;
                         Value : Float); stdcall;
{
Purpose:    Multiplies pixel values by a constant.
Parameters:
  SrcImage       The source image.
  DstImage       The resultant image.
  Value          A float value by which to multiply the pixel values with.
}

procedure iplMultiplySScale(SrcImage, DstImage : PIplImage; Value : Integer); stdcall;
{
Purpose:    Multiplies pixel values by a constant and scales the products.
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
}

procedure iplAbs(SrcImage, DstImage : PIplImage); stdcall;
{
Purpose:    Computes absolute pixel values of the image.
Parameters:
  SrcImage        The source image.
  DstImage        The resultant image.
}

procedure iplSquare(SrcImage, DstImage : PIplImage); stdcall;
{
Purpose:    Squares the pixel values of the image.
Parameters:
  SrcImage       The source image.
  DstImage       The resultant image.
}

{--------------------------  Dyadic Operations  ---------------------------}

procedure iplAdd(SrcImageA, SrcImageB, DstImage : PIplImage); stdcall;
{
Purpose:    Combines corresponding pixels of two images by addition.
Parameters:
  SrcImageA       The first source image.
  SrcImageB       The second source image.
  DstImage        The resultant image obtained as
                  DstImage  = SrcImageA  + SrcImageB.
}

procedure iplSubtract(SrcImageA, SrcImageB, DstImage : PIplImage); stdcall;
{
Purpose:    Combines corresponding pixels of two images by subtraction.
Parameters:
  SrcImageA       The first source image.
  SrcImageB       The second source image.
  DstImage        The resultant image obtained as:
                  DstImage  = SrcImageA  - SrcImageB
}

procedure iplMultiply(SrcImageA, SrcImageB, DstImage : PIplImage); stdcall;
{
Purpose:    Combines corresponding pixels of two images by multiplication.
Parameters:
  SrcImageA       The first source image.
  SrcImageB       The second source image.
  DstImage        The resultant image obtained as
                  DstImage  = SrcImageA  * SrcImageB.
}

procedure iplMultiplyScale(SrcImageA, SrcImageB, DstImage : PIplImage); stdcall;
{
Purpose:    Multiplies pixel values of two images and scales the products.
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.
}

{==========================================================================
      Section: Logical Functions
 ==========================================================================}

{-------------------------  Monadic Operations  ---------------------------}

procedure iplNot(SrcImage, DstImage : PIplImage); stdcall;
{
Purpose:    Performs a bitwise NOT operation on each pixel.
Parameters:
  SrcImage       The source image.
  DstImage       The resultant image.
}

procedure iplLShiftS(SrcImage, DstImage : PIplImage; nShift : UINT); stdcall;
{
Purpose:    Shifts pixel values

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -