An improved snake model for automatic extraction of buildings from urban aerial images and LiDAR data