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 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..." )
1213img = cv2 .imread ("test_images/sparkfun_logo.png" )
1314
1415# Show the image for 1 second
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..." )
2729edges = cv2 .Canny (img , 100 , 200 )
2830
2931# Display the modified image
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..." )
3841success = cv2 .imwrite ("test_images/sparkfun_logo_edges.png" , edges )
3942
4043# Check if the image was saved successfully
You can’t perform that action at this time.
0 commit comments