Skip to main content
. 2023 Jun 16;23(12):5640. doi: 10.3390/s23125640
Algorithm 1 Welding noise generation method (WNGM)
  • 1:

    procedure WNGM(src_image)

  • 2:

        process_imgzerosofthesamesizeassrc_image

  • 3:

        process_imgArcLightSpatter(process_img)

  • 4:

        Add smoke noise

  • 5:

        Apply Gaussian blur to the image

  • 6:

        src_imagesrc_image+process_img

  • 7:

        return src_image

  • 8:

    end procedure

  • 9:

    function ArcLightSpatter(image)

  • 10:

        Generate random linear light streaks

  • 11:

        Rotate and truncate the light streaks

  • 12:

        Apply Gaussian blur to the streaks

  • 13:

        return image

  • 14:

    end function