File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 9
9
# card and change the path to point to the SD card
10
10
#
11
11
# Note - only BMP and PNG formats are currently supported in MicroPython OpenCV
12
+ print ("Loading image, this may take a few seconds..." )
12
13
img = cv2 .imread ("test_images/sparkfun_logo.png" )
13
14
14
15
# Show the image for 1 second
24
25
25
26
# Let's modify the image! Here we use `cv2.Canny()` to perform edge detection
26
27
# on the image, which is a common operation in computer vision
28
+ print ("Performing edge detection..." )
27
29
edges = cv2 .Canny (img , 100 , 200 )
28
30
29
31
# Display the modified image
35
37
# Again, SD cards are supported, just change the path to point to the SD card
36
38
#
37
39
# Note - only BMP and PNG formats are currently supported in MicroPython OpenCV
40
+ print ("Saving modified image..." )
38
41
success = cv2 .imwrite ("test_images/sparkfun_logo_edges.png" , edges )
39
42
40
43
# Check if the image was saved successfully
You can’t perform that action at this time.
0 commit comments