Skip to content

Commit df134fd

Browse files
committed
camera: Add documentation to the zoom sketch.
1 parent 5eda61d commit df134fd

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

libraries/Camera/examples/CameraCaptureZoomPan/CameraCaptureZoomPan.ino

+18-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* This example shows how to use the Nicla Vision to capture images from the camera
3+
* with a zoom window and send them over the serial port.
4+
* The zoom window will move from left to right and top to bottom
5+
* in the predefined steps of pixels (ZOOM_X_STEPS and ZOOM_Y_STEPS).
6+
*
7+
* Whenever the board sends a frame over the serial port, the blue LED will blink.
8+
*
9+
* Instructions:
10+
* 1. Upload this sketch to Nicla Vision.
11+
* 2. Open the CameraRawBytesVisualizer.pde Processing sketch and change `useGrayScale` to `false`.
12+
* 3. Adjust the serial port in the Processing sketch to match the one used by Nicla Vision.
13+
* 4. Run the Processing sketch.
14+
*
15+
* Initial author: Sebastian Romero @sebromero
16+
*/
17+
118
#include "camera.h"
219

320
#ifndef ARDUINO_NICLA_VISION
@@ -10,7 +27,7 @@ Camera cam(galaxyCore);
1027
#define IMAGE_MODE CAMERA_RGB565
1128

1229
#define CHUNK_SIZE 512 // Size of chunks in bytes
13-
#define RESOLUTION CAMERA_R1600x1200
30+
#define RESOLUTION CAMERA_R1600x1200 // Zoom in from the highest supported resolution
1431
#define ZOOM_WINDOW_RESOLUTION CAMERA_R320x240
1532

1633
constexpr uint16_t ZOOM_WINDOW_WIDTH = 320;

0 commit comments

Comments
 (0)