Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ov2640 photos with green/blue dark tint #383

Closed
achao1104 opened this issue Apr 19, 2022 · 10 comments
Closed

Ov2640 photos with green/blue dark tint #383

achao1104 opened this issue Apr 19, 2022 · 10 comments

Comments

@achao1104
Copy link

Hello,

I am using idf4.3.2, esp32s2-wrover and ov2640, and when I take a pic of sun, the photo looks green in background
863949041165790-2022-04-19-12-02-07-0244216
.

@WangYuxin-esp
Copy link
Contributor

Please confirm whether the abnormal photos are the first two photos after the camera is initialized.
According to my test, this problem often occurs in the first few photos after the camera is initialized.

@achao1104
Copy link
Author

Yes, it is first, and I have changed to use second or third, it is not green but looks like purple now.

@WangYuxin-esp
Copy link
Contributor

The camera sensor is fully responsible for capturing and processing images, and esp32 device only passively receives data for now. In other words, esp32 is only responsible for initializing the sensor and then receiving data from the sensor. Therefore, I suggest checking the relevant configuration of the sensor:
1)Check whether the power supply voltage of the sensor is consistent with the requirements of the technical manual.
2)Check whether the lens used by the camera matches the sensor.
3)The AWB(Auto White Balance) is enabled by default in the driver. Maybe you can try using the ISP function of the sensor to get normal photos.

@me-no-dev
Copy link
Member

I would suggest to just skip the first 10-ish frames so that AWB and all get's calibrated. As @WangYuxin-esp said. This is coming from the sensor itself. More than AWB, you also have AGC, Lens Correction and more enabled in the sensor.

@achao1104
Copy link
Author

The camera sensor is fully responsible for capturing and processing images, and esp32 device only passively receives data for now. In other words, esp32 is only responsible for initializing the sensor and then receiving data from the sensor. Therefore, I suggest checking the relevant configuration of the sensor: 1)Check whether the power supply voltage of the sensor is consistent with the requirements of the technical manual. 2)Check whether the lens used by the camera matches the sensor. 3)The AWB(Auto White Balance) is enabled by default in the driver. Maybe you can try using the ISP function of the sensor to get normal photos.

thanks, what can I do for "Maybe you can try using the ISP function of the sensor to get normal photos."

@achao1104
Copy link
Author

I would suggest to just skip the first 10-ish frames so that AWB and all get's calibrated. As @WangYuxin-esp said. This is coming from the sensor itself. More than AWB, you also have AGC, Lens Correction and more enabled in the sensor.

I have skipped 11 frames and between each frames, it waits for 100ms, but the pic is still purple.
a

@Wolfleader101
Copy link

I have a similar issue,

When I follow this tutorial my images turn out with a green tint:
https://randomnerdtutorials.com/esp32-cam-take-photo-save-microsd-card/

When I use the esp32 cam web server example, my images look perfect

@github-actions
Copy link

This issue appears to be stale. Please close it if its no longer valid.

@MartinK7
Copy link

I think this is caused by bad auto color correction in the camera chip. You can post process these images manully.

1
2

@ymich9963
Copy link

ymich9963 commented Feb 29, 2024

If anyone is still struggling with this, if you disable all of the auto functions except lenc, and set the sensor settings after initialisation to white balance mode 3 or 4, it should get rid of the green tint. The sensor initialises with AGC and AWB enabled so you need to disable them and fix the white balance before taking a picture. Refreshing the image right after initialisation also helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants