Research Article

Automatic Foreground Extraction Based on Difference of Gaussian

Algorithm 1

Extraction Algorithm.
(1)     Input: , , ;
(2)    Loading image data: ;
(3)    Image segmentation with Ncut: ;
(4)    Boundary computing: ;
(5)    Initial the keypoints set: ;
(6)    Computing the candidate points by difference of Gaussian (DoG):
(7)    for     do
(8)     Loading single layer data: ;
(9)     Detecting the keypoints with DoG: ;
(10)   Edge detection: ;
(11)    Finding Focus: ;
(12)   Rebuilding keypoints:
           ;
(13)  end for
(14)  Combining the keypoints with the three layers:
           ;
(15)  Locating the foreground regions by the numbers of keyponts:
(16)  for     do
(17)   Initial the number of keypoints and the total pixels of the th region:
         ; ;
(18)   Calculating the total number of keypoints of each region:
(19)   for     do
(20)   for     do
(21)     if     then
(22)     if     then
(23)       ;
(24)       ;
(25)     end if
(26)    end if
(27)   end for
(28)  end for
(29)  Locating the foreground regions by the numbers of keyponts:
(30)  if     then
(31)   for     do
(32)        ;;
(33)   end for
(34)  end if
(35) end for
(36) Output: Foreground, ;