A method comprising: - receiving a video stream; - capturing a frame of the received video stream; - determining a background of the captured frame; - performing an image differencing between the captured frame and the determined background, wherein the captured frame and the determined background have been filtered by an edge operator; - binarizing the result D of the image differencing to obtain a binarized foreground F by F = { 1, D > th contr 0, D ≤ th contr, where th contr = a 1 + exp − c * contr − δ + k, wherein the parameters of the sigmoid are learned by determining best binarization thresholds for different image contrasts and fitting sigmoid functions to the determined threshold-contrast points - estimating a hand region position from the binarized foreground F; - extracting image patches in an area around the estimated hand region position; - performing a refinement process for binarization of the extracted image patches as follows: • initializing a second threshold th using th(bright), wherein th bright = a 1 + exp − c * bright − δ + k wherein the parameters of the sigmoid are learned by determining best binarization thresholds for different image brightness values and fitting sigmoid functions to the determined threshold-brightness points • determining a target ratio r 0; • extracting a foreground F from the at least one captured frame as F = { 1, D > th 0, D ≤ th wherein D of this formula is defined as D = abs ( G(I 1) - G ( I n)), wherein G(I 1) is the Gaussian smoothed background patch and G(I n) is the Gaussian smoothed image patch; and • determining a current ratio r as the ratio of the extracted foreground area to that of the background patch; • if r ≤ r 0 stopping the refinement process, otherwise incrementing the threshold th and repeating the refinement; - verifying the hand region from the refined output binarization based on shape moments; and - determining a fingertip location from the verified hand region by using an image skeletonization. - receiving a video stream; - capturing a frame of the received video stream; - determining a background of the captured frame; - performing an image differencing between the captured frame and the determined background, wherein the captured frame and the determined background have been filtered by an edge operator; - binarizing the result D of the image differencing to obtain a binarized foreground F by F = { 1, D > th contr 0, D ≤ th contr, where th contr = a 1 + exp − c * contr − δ + k, wherein the parameters of the sigmoid are learned by determining best binarization thresholds for different image contrasts and fitting sigmoid functions to the determined threshold-contrast points - estimating a hand region position from the binarized foreground F; - extracting image patches in an area around the estimated hand region position; - performing a refinement process for binarization of the extracted image patches as follows: • initializing a second threshold th using th(bright), wherein th bright = a 1 + exp − c * bright − δ + k wherein the parameters of the sigmoid are learned by determining best binarization thresholds for different image brightness values and fitting sigmoid functions to the determined threshold-brightness points • determining a target ratio r 0; • extracting a foreground F from the at least one captured frame as F = { 1, D > th 0, D ≤ th wherein D of this formula is defined as D = abs ( G(I 1) - G ( I n)), wherein G(I 1) is the Gaussian smoothed background patch and G(I n) is the Gaussian smoothed image patch; and • determining a current ratio r as the ratio of the extracted foreground area to that of the background patch; • if r ≤ r 0 stopping the refinement process, otherwise incrementing the threshold th and repeating the refinement; • initializing a second threshold th using th(bright), wherein th bright = a 1 + exp − c * bright − δ + k wherein the parameters of the sigmoid are learned by determining best binarization thresholds for different image brightness values and fitting sigmoid functions to the determined threshold-brightness points • determining a target ratio r 0; • extracting a foreground F from the at least one captured frame as F = { 1, D > th 0, D ≤ th wherein D of this formula is defined as D = abs ( G(I 1) - G ( I n)), wherein G(I 1) is the Gaussian smoothed background patch and G(I n) is the Gaussian smoothed image patch; and • determining a current ratio r as the ratio of the extracted foreground area to that of the background patch; • if r ≤ r 0 stopping the refinement process, otherwise incrementing the threshold th and repeating the refinement; - verifying the hand region from the refined output binarization based on shape moments; and - determining a fingertip location from the verified hand region by using an image skeletonization.