1. A method for electronically computing a parallax, the method comprising: obtaining a plurality of views of a pixel point, wherein the plurality of views comprises a current view where the pixel point is located and a reference view of a reference pixel point corresponding to the pixel point; computing gradients in a plurality of directions of the pixel point in the plurality of views; computing a matching error of the pixel point in the plurality of views; modifying the matching error according to an average value of absolute differences between gradients of the pixel point and gradients in a plurality of directions of a matching pixel in the reference view; and computing a parallax of the pixel point according to the modified matching error.