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

📄 iplprocessing.cpp

📁 数字滤波函数
💻 CPP
字号:
//-----------------------------------------------------------------------------
//  (c) 2002 by Basler Vision Technologies
//  Section:  Vision Components
//  Project:  BCAM
//  $Header: IPLProcessing.cpp, 3, 9/16/02 10:28:22 AM, Nebelung, H.$
//-----------------------------------------------------------------------------
/**
  \file     IPLProcessing.cpp
  \brief    Implementation of the CIplProcessing class.
*/


#include "stdafx.h"

#include "IPLProcessing.h"


/*! Creates an image which is filtered by a 5x5 Laplacian.

  If ptrDest is NULL or if the size of the referenced image does not fit ptrSource the 
  old image pointed to by ptrDest will be destroyed and a new fitting one created. 
  If ptrSource is NULL ptrDestinateion is destroyed and the function returns immediately.
  
*/
void CIplProcessing::ProcessImage(
                                  CDibIplPtr &ptrDest,                    //!< Smart pointer to the destinat韔n image. 
                                  CDibIplPtr &ptrSource1                   //!< Smart pointer to the source image
								  //,CDibIplPtr &ptrSource2
                                  )
{
  // No source no destination...
  if(!ptrSource1 )//|| (!ptrSource2) )
  {
    ptrDest.Release();
    return;
  }


  
  // If necessary create a matching targe bitmap
  if( !ptrDest || !ptrDest->IsEqualType(*ptrSource1))
  {
    ptrDest = ptrSource1->Clone();
  }
  
  /**************************************/
  
  
  iplFixedFilter( ptrSource1->GetIplImage(),
    ptrDest->GetIplImage(),
    IPL_LAPLACIAN_5x5);
 
  //iplSubtract(IplImage* srcImageA, IplImage* srcImageB, IplImage* dstImage))
  // iplSubtract(ptrSource1->GetIplImage(), ptrSource2->GetIplImage(), ptrDest->GetIplImage());

  //  srcImage - The source image.
//  dstImage - The resultant image.
//  nCols    - Number of columns in the neighbourhood to use.
//  nRows    - Number of rows in the neighbourhood to use.
//  anchorX,
//  anchorY  - The [x,y] coordinates of the anchor cell in the neighbourhood.
    //IPLAPI(void, iplColorMedianFilter,(IplImage* srcImage, IplImage* dstImage,
    //                 int nCols, int nRows, int anchorX, int anchorY))
   // iplMedianFilter(ptrSource1->GetIplImage(), ptrDest->GetIplImage(),
   //                  3, 3, 1, 1);

}

⌨️ 快捷键说明

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