1. A method for positioning edges of a photograph, comprising: obtaining a photograph taken by a camera of an electronic device; processing RGB values of the pixels of the photograph to get corresponding RGB modification values of the pixels of the photograph; computing positions of vertexes of the photograph according to the RGB modification values; and connecting the vertexes to form edges of the photograph.