0
0
Drone Programmingprogramming~10 mins

Image stitching for mapping in Drone Programming - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to load images for stitching.

Drone Programming
images = [cv2.imread([1]) for file in image_files]
Drag options to blanks, or click blank then click option'
Acv2
Bimages
Cimage_files
Dfile
Attempts:
3 left
💡 Hint
Common Mistakes
Using the list name instead of the loop variable.
Using the wrong variable name that does not hold filenames.
2fill in blank
medium

Complete the code to initialize the stitcher object.

Drone Programming
stitcher = cv2.Stitcher_create([1])
Drag options to blanks, or click blank then click option'
Acv2.STITCHER_PANORAMA
Bcv2.IMREAD_COLOR
Ccv2.INTER_LINEAR
Dcv2.COLOR_BGR2GRAY
Attempts:
3 left
💡 Hint
Common Mistakes
Using image reading or color conversion constants instead of stitcher mode.
Passing no argument or wrong argument type.
3fill in blank
hard

Fix the error in the code to stitch images correctly.

Drone Programming
status, stitched = stitcher.[1](images)
Drag options to blanks, or click blank then click option'
Amerge
Bstitch
Ccombine
Dblend
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect method names like 'combine' or 'merge'.
Trying to call a non-existent method.
4fill in blank
hard

Fill both blanks to check if stitching was successful and save the result.

Drone Programming
if status == [1]:
    cv2.[2]('stitched_output.jpg', stitched)
Drag options to blanks, or click blank then click option'
Acv2.imwrite
B0
C1
Dcv2.imwriteAsync
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing status codes for success.
Using asynchronous save function which is not standard.
5fill in blank
hard

Fill all three blanks to create a dictionary of image sizes for mapping.

Drone Programming
image_sizes = [1]((file, (img.shape[[2]], img.shape[[3]])) for file, img in zip(image_files, images))
Drag options to blanks, or click blank then click option'
Adict
B0
C1
Dlen
Attempts:
3 left
💡 Hint
Common Mistakes
Using list or set instead of dict.
Mixing up height and width indices.