shariltumin / esp32-cam-micropython-2022

MicroPython esp32-cam firmware with camera support compiled with esp-idf-4.4.0. Python script files for live streaming
MIT License
174 stars 33 forks source link

Camera settings #11

Closed davefes closed 1 year ago

davefes commented 1 year ago

Spent time using the latest image and playing with camera settings. The following seems to work most of the time:

camera.init()
#  pixformat 0, framesize 14, and speffect 2 seems OK

#  camera settings
camera.pixformat(0) #  0:JPEG, 1:Grayscale (2bytes/pixel), 2:RGB565
camera.framesize(14) #  1:96x96, 2:160x120, 3:176x144, 4:240x176, 5:240x240
                    #  6:320x240, 7:400x296, 8:480x320, 9:640x480, 10:800x600
                    #  11:1024x768, 12:1280x720, 13:1280x1024, 14:1600x1200
                    #  15:1920x1080, 16:720x1280, 17:864x1536, 18:2048x1536
#camera.quality(10) #  [0,63] lower number means higher quality
#camera.contrast(0) #  [-2,2] higher number higher contrast
#camera.saturation(0) #  [-2,2] higher number higher saturation. -2 grayscale
#camera.brightness(0) #  [-2,2] higher number higher brightness. 2 brightest
camera.speffect(2) #  0:,no effect 1:negative, 2:black and white, 3:reddish,
                   #  4:greenish, 5:blue, 6:retro
#camera.whitebalance(0) #  0:default, 1:sunny, 2:cloudy, 3:office, 4:home
#camera.aelevels(0) #  [-2,2] AE Level: Automatic exposure
#camera.aecvalue(0) #  [0,1200] AEC Value: Automatic exposure control
#camera.agcgain(0)  #  [0,30] AGC Gain: Automatic Gain Control

but if you try to change camera.quality one gets a small band with the correct contrast at the top with the rest of the picture being over-exposed.

If you just comment-out camera.speffect then you get a coloured band at the top.

davefes commented 1 year ago

Possibly not relevant with latest images.