Skip to content

Commit 68584d7

Browse files
committed
Add splash image and update image paths
Rename "test_image" to "images" since they're already in the examples folder Updated paths in imread imwrite example Fixed cv2_hardware_init/__init__.py to use full path to new example splash image
1 parent ae33125 commit 68584d7

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

examples/cv2_hardware_init/__init__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99
except:
1010
print("Display initialization failed, skipping...")
1111

12-
# Optional - show a splash image on the display if one is available, or clear
13-
# the display of any previous content
14-
display.splash()
12+
# Optional - Show a splash screen on the display with an optional filename (if
13+
# not provided, it defaults to `splash.png` in the root directory of the
14+
# MicroPython filesystem). If the file is not present, the driver will simply
15+
# clear the display of any previous content
16+
display.splash("opencv-examples/images/splash.png")
1517

1618
# Import the camera driver
1719
try:

examples/ex04_imread_imwrite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#
2525
# Note - only BMP and PNG formats are currently supported in MicroPython OpenCV
2626
print("Loading image...")
27-
img = cv.imread("test_images/sparkfun_logo.png")
27+
img = cv.imread("opencv-examples/images/splash.png")
2828

2929
# Show the image
3030
#
@@ -52,7 +52,7 @@
5252
#
5353
# Note - only BMP and PNG formats are currently supported in MicroPython OpenCV
5454
print("Saving modified image...")
55-
success = cv.imwrite("test_images/sparkfun_logo_edges.png", edges)
55+
success = cv.imwrite("opencv-examples/images/splash_edges.png", edges)
5656

5757
# Check if the image was saved successfully
5858
if success:

examples/images/splash.png

18 KB
Loading

0 commit comments

Comments
 (0)