Skip to content

camera module

doomke edited this page Mar 27, 2024 · 7 revisions

Description

Only available with ESP32-cam board with OV2640 camera. Manages the camera settings and initialization, sends images to the server via socket.io.

Settings

No permanent settings, camera settings can be adjusted during operation.

Command Keys

key type range description
getStatus boolean send current status if true
gray boolean convert image to RGB grayscale if true
brightness integer (-2, 2) adjust brightness of the image
exposure integer (0, 1200) set exposure to adjust image brightness manually
contrast integer (-2, 2) adjust contrast
stream boolean continuously send images to server if true, stop sending if false
virtualPan integer increase virtual pan stage if > 0 and decrease if < 0
virtualTilt integer increase virtual tilt stage if > 0 and decrease if < 0
virtualZoom integer increase virtual zoom stage if > 0 and decrease if < 0
frame rate float (0, 30) set the frame rate to the specified number of frames per second
frameSize integer (5, 13) set the frame size to the specified value

details of the available options for the frame size -- note that 7 and 11 are not permitted and will throw an error

value name frame size
5 QVGA 320 x 140
6 CIF 400 x 296
8 VGA 640 x 480
9 SVGA 800 x 600
10 XGA 1024 x 768
12 SXGA 1280 x 1024
13 UXGA 1600 x 1200

The following keys expose the native settings of the camera driver, use with caution:

key type range description
contrast integer (-2,2)
brightness integer (-2,2)
saturation integer (-2,2)
sharpness integer (-2,2)
denoise integer (0,255?) actual range unknown, uint8
gainceiling integer (0,6) 0=2x, 1=4x, 2=8x, 3=16x, 4=32x, 5=64x, 6=128x
quality integer (0,63)
colorbar boolean
whitebal boolean
gain_ctrl boolean
exposure_ctrl boolean
hmirror boolean
vlip boolean
aec2 boolean
awb_gain boolean
agc_gain integer (0,30)
aec_value integer (0,1200)
wb_mode integer (0,4)
ae_level integer (-2,2)
dcw boolean
bpc boolean
wpc boolean
raw_gamma boolean
lenc boolean
special_effect integer (0,6)

Status

"controlId":"screen",
"status":
{
    "stream":true,
    "frameSize":10,
    "gray":false,
    "exposure":500,
    "contrast":0
}

Meaning of status fields identical to Command Keys, see there for description

General

Guides

Principle of Operation

Modules

Software Hardware
camera camera
infoLED infoLED
input input
macro macro
output output
servo servo
socket socket
stepper stepper
WiFi wifi

Clone this wiki locally