Skip to main content
. 2022 Sep 10;22(18):6861. doi: 10.3390/s22186861
Algorithm 1 TDDM
  • 1:

    Input: Infrared image c, Number of superpixels K.

  • 2:

    Output: All defect regions in the infrared image.

  • 3:

    Obtain instance cm=Segc,m=1,2,,M

  • 4:

    for m=1toMdo

  • 5:

       for n=1toN do

  • 6:

         Compute superpixels cmn

  • 7:

         Obtain temperature characteristic Tmn

  • 8:

       end for

  • 9:

       Compute temperature probability density distribution fm

  • 10:

       Compute the local maximum Omq(xmq,ymq) of fm, where q=1,2,,Q

  • 11:

       if Q3 then

  • 12:

         for n=1toN do

  • 13:

            if Tmn>xm3 then

  • 14:

              Determine cmn defective

  • 15:

            else

  • 16:

              Determine cmn normal

  • 17:

            end if

  • 18:

         end for

  • 19:

         Merge all adjacent defective superpixels to obtain Dm

  • 20:

       else

  • 21:

         Output: No defect in the instance.

  • 22:

       end if

  • 23:

    end for