raduprv / esp32-cam_ov2640-timelapse

A timelapse program for esp32 cam with ov2640 sensor. The exposure is done manually based on the light level, and the image quality is far better than the default settings.
Apache License 2.0
38 stars 5 forks source link

address for image quality #4

Open jensdk3 opened 3 years ago

jensdk3 commented 3 years ago

@raduprv, you set image quality through these two lines (492-493)

    s->set_reg(s,0x42,0xff,0x2f);//image quality (lower is bad)
    s->set_reg(s,0x44,0xff,3);//quality

However in this post https://github.com/espressif/esp32-camera/issues/203#issuecomment-726236422 you control image quality by

s->set_reg(s,0x42,0xff,0x4f);//image quality (lower is bad)
s->set_reg(s,0x44,0xff,1);//quality

I assume that 0x2f or 0x4f are addresses where the value for image quality is stored. I'm surprised that image quality value can be assigned to different addresses. But maybe I misunderstand how the set_reg works?

raduprv commented 3 years ago

It's not just one register that affects the image quality. There are quite a few, and I am pretty sure there are others that I haven't discovered. Again, try to experiment with the values and see what happens :)