Research Article

Detection of Image Seam Carving Using a Novel Pattern

Algorithm 2

The algorithm of feature selection.
(1)Input: Grayscale image (I)
(2)Output: Histogramfinal(LNMOP)
(3)Initial: n > r, m ⟵ 5 : 10
(4)Begin
(5)sub {c1, c2,…, cn} ⟵ block(I, n)
(6)          //The image I is divided into n subblocks with equal size and no overlap.
(7)for each block c ∈ sub, do
(8)  histogram {HOG1, HOG2, …, HOGn} ⟵ extract (c, HOG)//extract HOG features
(9)    for r ⟵ 1 : m, do
(10)     histogram {LNMOP|11, LNMOP|21, …, LNMOP|r1, LNMOP|12, LNMOP|22, …, LNMOP|r2,
(11)   …, …, LNMOP|1n, LNMOP|2n, …, LNMOP|rn} ⟵ extract (c, LNMOP)
(12)                            //extract LNMOP features
(13)    end
(14)end
(15)for each block c ∈ sub, do
(16)  l ⟵ rank(HOG, histogram|HOG) //Determination the rank of HOG features
(17)  histogram {LNMOP|1, LNMOP|2, …, LNMOP|n} ⟵ LNMOP|l
(18)                   //Screening LMOP features matching HOG levels
(19)end
(20)  histogramfinal(LNMOP) ⟵ concatenate (histogram {LNMOP|1, LNMOP|2, …, LNMOP|n})
(21)                   //Concatenation into the final features