File tree Expand file tree Collapse file tree 17 files changed +212
-23
lines changed Expand file tree Collapse file tree 17 files changed +212
-23
lines changed Original file line number Diff line number Diff line change 1+ #-------------------------------------------------------------------------------
2+ # SPDX-License-Identifier: MIT
3+ #
4+ # Copyright (c) 2025 SparkFun Electronics
5+ #-------------------------------------------------------------------------------
6+ # cv2_drivers/touch_screens/__init__.py
7+ #
8+ # Imports all available drivers for MicroPython OpenCV.
9+ #-------------------------------------------------------------------------------
10+
111from . import displays
212from . import cameras
3- from . import touch_screens
13+ from . import touch_screens
Original file line number Diff line number Diff line change 1+ #-------------------------------------------------------------------------------
2+ # SPDX-License-Identifier: MIT
3+ #
4+ # Copyright (c) 2025 SparkFun Electronics
5+ #-------------------------------------------------------------------------------
6+ # cv2_drivers/cameras/__init__.py
7+ #
8+ # Imports all available camera drivers for MicroPython OpenCV.
9+ #-------------------------------------------------------------------------------
10+
111# Import sys module to check platform
212import sys
313
Original file line number Diff line number Diff line change 1+ #-------------------------------------------------------------------------------
2+ # SPDX-License-Identifier: MIT
3+ #
4+ # Copyright (c) 2025 SparkFun Electronics
5+ #-------------------------------------------------------------------------------
6+ # cv2_camera.py
7+ #
8+ # Base class for OpenCV camera drivers.
9+ #-------------------------------------------------------------------------------
10+
111class CV2_Camera ():
212 """
313 Base class for OpenCV camera drivers.
Original file line number Diff line number Diff line change 1+ #-------------------------------------------------------------------------------
2+ # SPDX-License-Identifier: MIT
3+ #
4+ # Copyright (c) 2025 SparkFun Electronics
5+ #-------------------------------------------------------------------------------
6+ # dvp_camera.py
7+ #
8+ # Base class for OpenCV DVP (Digital Video Port) camera drivers.
9+ #-------------------------------------------------------------------------------
10+
111from .cv2_camera import CV2_Camera
212
313class DVP_Camera (CV2_Camera ):
Original file line number Diff line number Diff line change 1- import rp2
2- from machine import Pin , PWM
3-
1+ #-------------------------------------------------------------------------------
2+ # SPDX-License-Identifier: MIT
3+ #
4+ # Copyright (c) 2025 SparkFun Electronics
5+ #-------------------------------------------------------------------------------
6+ # dvp_rp2_pio.py
7+ #
8+ # This class implements a DVP (Digital Video Port) interface using the RP2 PIO
9+ # (Programmable Input/Output) interface. This is only available on Raspberry Pi
10+ # RP2 processors.
11+ #
412# This class is derived from:
513# https://github.com/adafruit/Adafruit_ImageCapture/blob/main/src/arch/rp2040.cpp
614# Released under the MIT license.
715# Copyright (c) 2021 Adafruit Industries
16+ #-------------------------------------------------------------------------------
17+
18+ import rp2
19+ from machine import Pin , PWM
20+
821class DVP_RP2_PIO ():
922 """
1023 This class implements a DVP (Digital Video Port) interface using the RP2 PIO
Original file line number Diff line number Diff line change 1- from .dvp_camera import DVP_Camera
2- from time import sleep_us
3- import cv2
4-
1+ #-------------------------------------------------------------------------------
2+ # SPDX-License-Identifier: MIT
3+ #
4+ # Copyright (c) 2025 SparkFun Electronics
5+ #-------------------------------------------------------------------------------
6+ # hm01b0.py
7+ #
8+ # Base class for OpenCV HM01B0 camera drivers.
9+ #
510# This class is derived from:
611# https://github.com/openmv/openmv/blob/5acf5baf92b4314a549bdd068138e5df6cc0bac7/drivers/sensors/hm01b0.c
712# Released under the MIT license.
813# Copyright (C) 2013-2024 OpenMV, LLC.
14+ #-------------------------------------------------------------------------------
15+
16+ from .dvp_camera import DVP_Camera
17+ from time import sleep_us
18+ import cv2
19+
920class HM01B0 (DVP_Camera ):
1021 """
1122 Base class for OpenCV HM01B0 camera drivers.
Original file line number Diff line number Diff line change 1+ #-------------------------------------------------------------------------------
2+ # SPDX-License-Identifier: MIT
3+ #
4+ # Copyright (c) 2025 SparkFun Electronics
5+ #-------------------------------------------------------------------------------
6+ # hm01b0_pio.py
7+ #
8+ # OpenCV HM01B0 camera driver using a PIO interface. Only available on
9+ # Raspberry Pi RP2 processors.
10+ #-------------------------------------------------------------------------------
11+
112from .hm01b0 import HM01B0
213from .dvp_rp2_pio import DVP_RP2_PIO
314from ulab import numpy as np
Original file line number Diff line number Diff line change 1- from .dvp_camera import DVP_Camera
2- from time import sleep_us
3- import cv2
4-
1+ #-------------------------------------------------------------------------------
2+ # SPDX-License-Identifier: MIT
3+ #
4+ # Copyright (c) 2025 SparkFun Electronics
5+ #-------------------------------------------------------------------------------
6+ # ov5640.py
7+ #
8+ # Base class for OpenCV OV5640 camera drivers.
9+ #
510# This class is derived from:
611# https://github.com/adafruit/Adafruit_CircuitPython_OV5640
712# Released under the MIT license.
813# Copyright (c) 2021 Jeff Epler for Adafruit Industries
14+ #-------------------------------------------------------------------------------
15+
16+ from .dvp_camera import DVP_Camera
17+ from time import sleep_us
18+ import cv2
19+
920class OV5640 (DVP_Camera ):
1021 """
1122 Base class for OpenCV OV5640 camera drivers.
Original file line number Diff line number Diff line change 1+ #-------------------------------------------------------------------------------
2+ # SPDX-License-Identifier: MIT
3+ #
4+ # Copyright (c) 2025 SparkFun Electronics
5+ #-------------------------------------------------------------------------------
6+ # ov5640_pio.py
7+ #
8+ # OpenCV OV5640 camera driver using a PIO interface. Only available on
9+ # Raspberry Pi RP2 processors.
10+ #-------------------------------------------------------------------------------
11+
112from .ov5640 import OV5640
213from .dvp_rp2_pio import DVP_RP2_PIO
314from ulab import numpy as np
Original file line number Diff line number Diff line change 1+ #-------------------------------------------------------------------------------
2+ # SPDX-License-Identifier: MIT
3+ #
4+ # Copyright (c) 2025 SparkFun Electronics
5+ #-------------------------------------------------------------------------------
6+ # cv2_drivers/displays/__init__.py
7+ #
8+ # Imports all available display drivers for MicroPython OpenCV.
9+ #-------------------------------------------------------------------------------
10+
111# Import platform agnostic drivers
212from . import st7789_spi
313
You can’t perform that action at this time.
0 commit comments