void VideoFrameTransform::filterSegment()

in Transform360/Library/VideoFrameTransform.cpp [189:220]


void VideoFrameTransform::filterSegment(
  const Mat& inputMat,
  Mat& outputMat,
  const Mat& kernelX,
  const Mat& kernelY,
  int left,
  int top,
  int width,
  int height,
  int imagePlaneIndex) {
  try {
    Rect segmentRect(left, top, width, height);
    Mat inputSegment(inputMat(segmentRect));
    Mat outputSegment(outputMat(segmentRect));

    // Filtering using two 1D kernels
    sepFilter2D(
      inputSegment,
      outputSegment,
      -1,
      kernelX,
      kernelY,
      Point(-1,-1)  /* anchor */,
      0  /* delta */,
      BORDER_REPLICATE);
  } catch (const exception& ex) {
    printf(
      "Could not filter segment for the plane %d. Error: %s\n",
      imagePlaneIndex,
      ex.what());
  }
}