Skip to main content
. 2023 Mar 15;23(6):3129. doi: 10.3390/s23063129
Algorithm 1: Square image generator.
  • 1:

    top, bottom, left, right = 0, 0, 0, 0

  • 2:

    fill = round(abs(L − W) /2)

  • 3:

    if The length of the original image is greater than or fixed to the width then

  • 4:

       top, bottom = fill, fill

  • 5:

    else

  • 6:

       left, right = fill, fill

  • 7:

    end if