Skip to content

Commit 09aa23c

Browse files
committed
Add helpful prints to example 2
1 parent 8144fe8 commit 09aa23c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/ex02_imread_imwrite.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
# card and change the path to point to the SD card
1010
#
1111
# Note - only BMP and PNG formats are currently supported in MicroPython OpenCV
12+
print("Loading image, this may take a few seconds...")
1213
img = cv2.imread("test_images/sparkfun_logo.png")
1314

1415
# Show the image for 1 second
@@ -24,6 +25,7 @@
2425

2526
# Let's modify the image! Here we use `cv2.Canny()` to perform edge detection
2627
# on the image, which is a common operation in computer vision
28+
print("Performing edge detection...")
2729
edges = cv2.Canny(img, 100, 200)
2830

2931
# Display the modified image
@@ -35,6 +37,7 @@
3537
# Again, SD cards are supported, just change the path to point to the SD card
3638
#
3739
# Note - only BMP and PNG formats are currently supported in MicroPython OpenCV
40+
print("Saving modified image...")
3841
success = cv2.imwrite("test_images/sparkfun_logo_edges.png", edges)
3942

4043
# Check if the image was saved successfully

0 commit comments

Comments
 (0)