Skip to main content
. 2024 Mar 13;10(3):70. doi: 10.3390/jimaging10030070
Algorithm 1 Pseudocode for Padding Accelerator
  • 1:

    Procedure ApplyPaddingAndStream

  • 2:

    Apply padding with the average channel value and stream the pixel data.

  • 3:

    Procedure PaddingSingleChannel

  • 4:

    Apply padding to the top of the image.

  • 5:

    For each row in the image, apply left padding, stream actual image row data, and then

    apply right padding.

  • 6:

    Apply padding to the bottom of the image.

  • 7:

    Procedure PaddingIP

  • 8:

    Initialize input and output streams for each channel.

  • 9:

    For each channel, call PaddingSingleChannel.

  • 10:

    Stream out the final padded data for each channel.