0
0
Drone Programmingprogramming~20 mins

Image stitching for mapping in Drone Programming - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Master of Image Stitching for Mapping
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Predict Output
intermediate
2:00remaining
Output of image overlap calculation
What is the output of this code that calculates the overlap percentage between two drone images given their GPS coordinates and image width in meters?
Drone Programming
def calculate_overlap(coord1, coord2, image_width):
    distance = abs(coord2 - coord1)
    overlap = max(0, (image_width - distance) / image_width) * 100
    return round(overlap, 2)

print(calculate_overlap(100.0, 105.0, 10.0))
A100.0
B25.0
C0.0
D50.0
Attempts:
2 left
💡 Hint
Think about how much the images overlap if the distance between centers is less than the image width.
🧠 Conceptual
intermediate
1:30remaining
Key step in image stitching
Which step is essential for stitching multiple drone images into a single map?
AAligning images based on common features
BIncreasing drone flight altitude
CReducing image resolution
DChanging camera shutter speed
Attempts:
2 left
💡 Hint
Think about how images fit together like puzzle pieces.
🔧 Debug
advanced
2:30remaining
Identify the error in image stitching code
What error does this code raise when trying to stitch images using OpenCV's stitcher?
Drone Programming
import cv2
images = [cv2.imread('img1.jpg'), cv2.imread('img2.jpg')]
stitcher = cv2.Stitcher_create()
status, pano = stitcher.stitch(images)
print(status)
AAttributeError: module 'cv2' has no attribute 'Stitcher_create'
BTypeError: stitch() missing 1 required positional argument
CFileNotFoundError: img1.jpg not found
DNo error, prints 0
Attempts:
2 left
💡 Hint
Check if the OpenCV version supports the Stitcher_create method.
📝 Syntax
advanced
2:00remaining
Correct syntax for blending images
Which option correctly blends two images img1 and img2 with equal weights using OpenCV?
Drone Programming
import cv2
blended = ???
print(type(blended))
Acv2.add(img1 * 0.5, img2 * 0.5)
Bcv2.addWeighted(img1, 0.5, img2, 0.5, 0)
Ccv2.blend(img1, img2, 0.5)
Dcv2.mixImages(img1, img2, 0.5)
Attempts:
2 left
💡 Hint
Look for the OpenCV function that mixes images with weights.
🚀 Application
expert
3:00remaining
Number of images needed for full map coverage
A drone camera covers 20 meters width per image. To map a 100m by 100m field with 30% overlap between images, how many images are needed along one side?
A8
B6
C7
D5
Attempts:
2 left
💡 Hint
Calculate effective coverage per image after overlap, then divide field length by that.