1. A method for generating masking image using general polygonal mask, comprising: receiving a pixel of a raw image and a polygon vertices array corresponding to a polygonal mask; determining whether the pixel is inside the polygonal mask; labeling the pixel to be a masked pixel if the pixel is inside the polygonal mask, or labeling the pixel to be a visible pixel if the pixel is outside the polygonal mask; and outputting the masked pixel or the visible pixel to generate the masking image.