# TYCamport3: TYImageProc.h File Reference

TYImageProc.h File Reference
`#include "TYApi.h"`
`#include "TYCoordinateMapper.h"`
`#include "TyIsp.h"`
Include dependency graph for TYImageProc.h:

Go to the source code of this file.

## Classes

struct | DepthSpeckleFilterParameters
| default parameter value definition More...
struct | DepthEnhenceParameters
| default parameter value definition More...

## Macros

#define | DepthSpeckleFilterParameters_Initializer {150, 64}
#define | DepthEnhenceParameters_Initializer {10, 20, 10, 0.1f}

## Functions

TY_CAPI | TYImageProcesAcceEnable (bool en)
| Image processing acceleration switch. More...
TY_CAPI | TYUndistortImage (const TY_CAMERA_CALIB_INFO *srcCalibInfo, const TY_IMAGE_DATA *srcImage, const TY_CAMERA_INTRINSIC *cameraNewIntrinsic, TY_IMAGE_DATA *dstImage)
| Do image undistortion, only support TY_PIXEL_FORMAT_MONO ,TY_PIXEL_FORMAT_RGB,TY_PIXEL_FORMAT_BGR. More...
TY_CAPI | TYDepthSpeckleFilter (TY_IMAGE_DATA *depthImage, const DepthSpeckleFilterParameters *param)
| Remove speckles on depth image. More...
TY_CAPI | TYDepthEnhenceFilter (const TY_IMAGE_DATA *depthImages, int imageNum, TY_IMAGE_DATA *guide, TY_IMAGE_DATA *output, const DepthEnhenceParameters *param)
| Remove speckles on depth image. More...

## Detailed Description

Image post-process API

Copyright
  Copyright(C)2016-2018 Percipio All Rights Reserved

Definition in file TYImageProc.h.

## Function Documentation

## TYDepthEnhenceFilter()

TY_CAPI TYDepthEnhenceFilter | ( | const TY_IMAGE_DATA * | depthImages,
|  | int | imageNum,
|  | TY_IMAGE_DATA * | guide,
|  | TY_IMAGE_DATA * | output,
|  | const DepthEnhenceParameters * | param
| ) |  |

Remove speckles on depth image.

Parameters

  [in] | depthImage | Pointer to depth image array.
  [in] | imageNum | Depth image array size.
  [in,out] | guide | Guide image.
  [out] | output | Output depth image.
  [in] | param | Algorithm parameters.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_NULL_POINTER | Any depthImage, param, output or output->buffer is NULL.
  TY_STATUS_INVALID_PARAMETER | imageNum >= 5 or imageNum <= 0, or any image invalid
  TY_STATUS_OUT_OF_MEMORY | Output image not suitable.

## TYDepthSpeckleFilter()

TY_CAPI TYDepthSpeckleFilter | ( | TY_IMAGE_DATA * | depthImage,
|  | const DepthSpeckleFilterParameters * | param
| ) |  |

Remove speckles on depth image.

Parameters

  [in,out] | depthImage | Depth image to be processed.
  [in] | param | Algorithm parameters.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_NULL_POINTER | Any depth, param or depth->buffer is NULL.
  TY_STATUS_INVALID_PARAMETER | param->max_speckle_size <= 0 or param->max_speckle_diff <= 0

## TYImageProcesAcceEnable()

TY_CAPI TYImageProcesAcceEnable | ( | bool | en | ) |

Image processing acceleration switch.

Parameters

  [in] | en | Enable image process acceleration switch

## TYUndistortImage()

TY_CAPI TYUndistortImage | ( | const TY_CAMERA_CALIB_INFO * | srcCalibInfo,
|  | const TY_IMAGE_DATA * | srcImage,
|  | const TY_CAMERA_INTRINSIC * | cameraNewIntrinsic,
|  | TY_IMAGE_DATA * | dstImage
| ) |  |

Do image undistortion, only support TY_PIXEL_FORMAT_MONO ,TY_PIXEL_FORMAT_RGB,TY_PIXEL_FORMAT_BGR.

Parameters

  [in] | srcCalibInfo | Image calibration data.
  [in] | srcImage | Source image.
  [in] | cameraNewIntrinsic | Expected new image intrinsic, will use srcCalibInfo for new image intrinsic if set to NULL.
  [out] | dstImage | Output image.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_NULL_POINTER | Any srcCalibInfo, srcImage, dstImage, srcImage->buffer, dstImage->buffer is NULL.
  TY_STATUS_INVALID_PARAMETER | Invalid srcImage->width, srcImage->height, dstImage->width, dstImage->height or unsupported pixel format.