compute method for Feature2D

backported it to 2.4