Skip to main content
. 2020 May 1;22(5):517. doi: 10.3390/e22050517
Algorithm 1: Pseudo-code for CT lung scans preprocessing.
 Input: Input image I(n,m)
 Output: Output image K(n,m)
 begin
 Adjust image intensity values
 Convert the image into a binary image(B)
  For all I pixels:
     IF the grayscale value < the image Mean,
     THEN, the pixel value = 0
     ELSE the pixel grayscale value = 255
     End IF
  End For
 Remove small objects from binary image, and Fill image regions and holes
 Produce the output image(K)
 For each Input image I do
     For i = 1 to n do
      For j = 1 to m do
        Multiply each element in I(i,j) by the corresponding element
        in B(i,j) and return the output image(K)
      End For
     End For
 End For