A system comprising: at least one image-capture device onboard an aerial vehicle (102, 202); and at least one processor (106, 214) onboard the aerial vehicle (102, 202) and operatively coupled to the at least one image-capture device, wherein the at least one processor (106, 214) is operative to execute instructions to perform a method that comprises: receive, from the image-capture device, two or more overlapping images of a landscape underneath the aerial vehicle (102, 202); generate, based on the overlapping images, a landing quality heatmap of the landscape; processing the landing quality heatmap to generate a binary mask (318, 524) based on a threshold value, wherein the binary mask (318, 524) contains pixels with good landing quality and pixels with bad landing quality, and the pixels with bad landing quality are clustered using a connected component labelling strategy to produce a binary mask with connected component labelling; identify, based on the binary mask with connected component labelling, one or more regions of the landscape having one or more potential landing zones and obstacles; determine a location of a safe landing zone using a distance transform of the one or more regions of the landscape, wherein the location of the safe landing zone is in an area within one of the potential landing zones that is farthest from the obstacles; and storing the location of the safe landing zone in a database. at least one image-capture device onboard an aerial vehicle (102, 202); and at least one processor (106, 214) onboard the aerial vehicle (102, 202) and operatively coupled to the at least one image-capture device, wherein the at least one processor (106, 214) is operative to execute instructions to perform a method that comprises: receive, from the image-capture device, two or more overlapping images of a landscape underneath the aerial vehicle (102, 202); generate, based on the overlapping images, a landing quality heatmap of the landscape; processing the landing quality heatmap to generate a binary mask (318, 524) based on a threshold value, wherein the binary mask (318, 524) contains pixels with good landing quality and pixels with bad landing quality, and the pixels with bad landing quality are clustered using a connected component labelling strategy to produce a binary mask with connected component labelling; identify, based on the binary mask with connected component labelling, one or more regions of the landscape having one or more potential landing zones and obstacles; determine a location of a safe landing zone using a distance transform of the one or more regions of the landscape, wherein the location of the safe landing zone is in an area within one of the potential landing zones that is farthest from the obstacles; and storing the location of the safe landing zone in a database. receive, from the image-capture device, two or more overlapping images of a landscape underneath the aerial vehicle (102, 202); generate, based on the overlapping images, a landing quality heatmap of the landscape; processing the landing quality heatmap to generate a binary mask (318, 524) based on a threshold value, wherein the binary mask (318, 524) contains pixels with good landing quality and pixels with bad landing quality, and the pixels with bad landing quality are clustered using a connected component labelling strategy to produce a binary mask with connected component labelling; identify, based on the binary mask with connected component labelling, one or more regions of the landscape having one or more potential landing zones and obstacles; determine a location of a safe landing zone using a distance transform of the one or more regions of the landscape, wherein the location of the safe landing zone is in an area within one of the potential landing zones that is farthest from the obstacles; and storing the location of the safe landing zone in a database.