1. A method comprising: determining, using a processor, at least one candidate shifting vector and matching score value for a local building in an aerial image; determining at least one dominant shifting vector for at least one random group of neighboring buildings of the local building; calculating at least one optimized matching score using the at least one candidate shifting vector for the local building and the at least one dominant shifting vector for the at least one random group of the neighboring buildings; and finding a final shifting vector for the local building using the at least one optimized matching score.