Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork213
Description
Problem
😞 This is what happens whenuseGreyScale
is set totrue
for the Nicla Vision:
😄 This is what is observed, whenuserGreyScale
is set tofalse
for the Nicla Vision
This creates three problems:
- The header comment and code in CameraRawBytesVisualizer conflict in what the default colour mode is
- From a UX perspective (cc@sebromero ) the User can face additional hurdles in testing out a basic function (e.gthis forum post)
- There is no clear pathway for users to realise the problem, upon seeing the corrupt image.
Details
TheCameraCaptureRawBytes sketch is used to send a video stream over Serial to the computer. Which can then be displayed with theCameraRawBytesVisualizer Processing sketch.
A series of pre-directives, configures theIMAGE_MODE
to be eitherCAMERA_RGB
(Nicla Vision and GIGA boards) orCAMERA-GREYSCALE
(Portenta H7 family).
ArduinoCore-mbed/libraries/Camera/examples/CameraCaptureRawBytes/CameraCaptureRawBytes.ino
Lines 3 to 19 in0504d34
#ifdef ARDUINO_NICLA_VISION | |
#include"gc2145.h" | |
GC2145 galaxyCore; | |
Cameracam(galaxyCore); | |
#defineIMAGE_MODE CAMERA_RGB565 | |
#elif defined(ARDUINO_PORTENTA_H7_M7) | |
#include"hm0360.h" | |
HM0360 himax; | |
Cameracam(himax); | |
#defineIMAGE_MODE CAMERA_GRAYSCALE | |
#elif defined(ARDUINO_GIGA) | |
#include"ov767x.h" | |
// uncomment the correct camera in use | |
OV7670 ov767x; | |
// OV7675 ov767x; | |
Cameracam(ov767x); | |
#defineIMAGE_MODE CAMERA_RGB565 |
In the default configuration, the accompanying CameraRawBytesVisualizer sketch is configured to be compatible withCAMERA_GREYSCLE
, even though the header comment states that the Processing sketch is for RGB.
ArduinoCore-mbed/libraries/Camera/extras/CameraRawBytesVisualizer/CameraRawBytesVisualizer.pde
Lines 1 to 7 in0504d34
/* | |
This sketch reads a raw Stream of RGB565 pixels | |
from the Serial port and displays the frame on | |
the window. | |
Use with the Examples -> CameraCaptureRawBytes Arduino sketch. | |
This example code is in the public domain. | |
*/ |
ArduinoCore-mbed/libraries/Camera/extras/CameraRawBytesVisualizer/CameraRawBytesVisualizer.pde
Lines 19 to 20 in0504d34
// Must match the image mode in the Arduino sketch | |
finalboolean useGrayScale=true; |
Thanks@marqdevx ,@Hannes7eicher and@jacobhylen for letting me pick your brains 🧠