Skip to main content
. 2026 Mar 30;12(4):149. doi: 10.3390/jimaging12040149
Algorithm 1 SVGM Texture Feature Extraction
  •   1:

    Input: Set of labeled images {I1,I2,,IN}, patch size p, threshold levels t

  •   2:

    Output: Feature matrix F for classification

  •   3:

    for each image Ii in dataset do

  •   4:

          Divide Ii into non-overlapping patches of size p×p

  •   5:

          Store all patches in set P

  •   6:

    end for

  •   7:

    Shuffle P randomly

  •   8:

    Construct collage image C by arranging patches from P in grid layout

  •   9:

    Apply Otsu thresholding to C to obtain Ct with t levels

  • 10:

    Initialize feature matrix F

  • 11:

    for each patch Pj in Ct do

  • 12:

          Compute GLCM matrices G0, G45, G90, G135 for directions 0°, 45°, 90°, 135° and d=1

  • 13:

          Aggregate GLCMs: G14(G0+G45+G90+G135)

  • 14:

          Perform SVD: SVD(G)=UΣVT

  • 15:

          Extract top-t singular values from Σ as feature vector fj

  • 16:

          Append fj to feature matrix F

  • 17:

    end for

  • 18:

    Return F