コード例 #1
0
  /**
   * Performs a horizontal 1D convolution across the image. Borders are handled as specified by the
   * 'border' parameter.
   *
   * @param image The original image. Not modified.
   * @param dest Where the resulting image is written to. Modified.
   * @param kernel The kernel that is being convolved. Not modified.
   * @param border How the image borders are handled.
   */
  public static void horizontal(
      Kernel1D_I32 kernel, GrayU8 image, GrayI16 dest, ImageBorder_S32 border) {
    InputSanityCheck.checkSameShape(image, dest);

    border.setImage(image);
    ConvolveImageNoBorder.horizontal(kernel, image, dest);
    ConvolveJustBorder_General.horizontal(kernel, border, dest);
  }
コード例 #2
0
  /**
   * Performs a 2D convolution across the image. Borders are handled as specified by the 'border'
   * parameter.
   *
   * @param image The original image. Not modified.
   * @param dest Where the resulting image is written to. Modified.
   * @param kernel The kernel that is being convolved. Not modified.
   * @param border How the image borders are handled.
   */
  public static void convolve(
      Kernel2D_F32 kernel, GrayF32 image, GrayF32 dest, ImageBorder_F32 border) {
    InputSanityCheck.checkSameShape(image, dest);

    border.setImage(image);
    ConvolveImageNoBorder.convolve(kernel, image, dest);
    ConvolveJustBorder_General.convolve(kernel, border, dest);
  }