You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For full example, see our [Red Vision repo](https://github.com/sparkfun/red_vision).
48
+
For full examples, see our [Red Vision repo](https://github.com/sparkfun/red_vision).
49
49
50
50
# Performance
51
51
@@ -248,9 +248,12 @@ Below are instructions to build the MicroPython-OpenCV firmware from scratch. In
248
248
249
249
# Adding New Boards
250
250
251
+
> [!NOTE]
252
+
> This section assumes this board's platform is supported (eg. RP2350). If not, see [#Adding New Platforms](#Adding-New-Platforms).
253
+
251
254
Because OpenCV dramatically increases the firmware size, it may be necessary to define board variants that reduce the storage size to avoid it overlapping with the firmware. It is also beneficial to adjust the board name to include `OpenCV` or similar to help people identify that the MicroPython-OpenCV firmware is flashed to the board instead of standard MicroPython.
252
255
253
-
Below is the variant for the XRP Controller as an example. The variant is defined by creating a file called [`micropython/ports/rp2/boards/SPARKFUN_XRP_CONTROLLER/mpconfigvariant_RED_VISION.cmake`](https://github.com/sparkfun/micropython/blob/7e728e8c6aad74ca244183f3e0705db6f332abd9/ports/rp2/boards/SPARKFUN_XRP_CONTROLLER/mpconfigvariant_LARGE_BINARY.cmake) with contents:
256
+
Below is the variant for the XRP Controller as an example. The variant is defined by creating a file called [`micropython/ports/rp2/boards/SPARKFUN_XRP_CONTROLLER/mpconfigvariant_RED_VISION.cmake`](https://github.com/sparkfun/micropython/blob/e23e46ad423352b3f2362a51889bda25cb17b6cb/ports/rp2/boards/SPARKFUN_XRP_CONTROLLER/mpconfigvariant_RED_VISION.cmake) with contents:
254
257
255
258
```
256
259
list(APPEND MICROPY_DEF_BOARD
@@ -270,23 +273,29 @@ Then, the firmware can be built by adding `BOARD_VARIANT=<variant-name>` to the
270
273
Only support for the Raspberry Pi RP2350 has been figured out, so the all requirements for adding new platforms is not fully known yet. However, it should be along the lines of:
271
274
272
275
1. Create a valid toolchain file for the platform
273
-
* See [rp2350.toolchain.cmake](src/opencv/platforms/rp2350.toolchain.cmake) for reference
276
+
* See [rp2350.toolchain.cmake](platforms/rp2350.toolchain.cmake) for reference
274
277
* This loosely follow's [OpenCV's platform definitions](https://github.com/opencv/opencv/tree/4.x/platforms)
275
-
2. Ensure OpenCV builds correctly
278
+
2. Build OpenCV with the new platform
276
279
* ```
277
-
make -C micropython-opencv/src/opencv PLATFORM=<new-platform> --no-print-directory -j4
280
+
make -C micropython-opencv/opencv PLATFORM=<new-platform> --no-print-directory -j4
278
281
```
279
-
3. Create new board(s) for that platform
282
+
3. Create a new board for the new platform
280
283
* See [#Adding New Boards](#Adding-New-Boards)
281
-
4. Build MicroPython-OpenCV firmware for that board
284
+
4. Build MicroPython-OpenCV firmware for the new board
282
285
* ```
283
-
make -C micropython/ports/rp2 BOARD=<board-name> USER_C_MODULES=micropython-opencv/src/micropython_opencv.cmake -j4
286
+
make -C micropython/ports/rp2 BOARD=<board-name> USER_C_MODULES=micropython-opencv/micropython_opencv.cmake -j4
284
287
```
285
288
286
289
# Contributing
287
290
291
+
> [!NOTE]
292
+
> We at SparkFun are not OpenCV developers. For things related to OpenCV, please head to https://github.com/opencv/opencv
293
+
288
294
Found a bug? Is there a discrepancy between standard OpenCV and MicroPython-OpenCV? Have a feature request?
289
295
290
296
First, please see if there is an [existing issue](https://github.com/sparkfun/micropython-opencv/issues). If not, then please [open a new issue](https://github.com/sparkfun/micropython-opencv/issues/new) so we can discuss the topic!
291
297
292
298
Pull requests are welcome! Please keep the scope of your pull request focused (make separate ones if needed), and keep file changes limited to the scope of your pull request.
299
+
300
+
> [!NOTE]
301
+
> Because of limitations of microcontrollers, MicroPython, and OpenCV, it may not be possible to add some features of OpenCV.
0 commit comments