Notifications
Clear all

[Solved] ESP32CAM Issues with taking individual Pictures

9 Posts
3 Users
2 Likes
556 Views
ChrisPal323
(@chrispal323)
Eminent Member
Joined: 6 months ago
Posts: 31
Topic starter  

Hello all, I have been using the code given by the DroneBotWorkShop to take pictures on the ESP32CAM then save them to the SD card. However these pictures have given my very poor results. I understand all of the parameters that can be tweaked including the JPEG quality and resolution, however, this is seemingly not the problem.

If I use the WIFI to view the camera through the stream, the camera gives me the quality I am looking for. But when I take single pictures, I assume the camera does not have time to adjust the exposure of the camera. So all the pictures I have been getting are all very dark and greenish photos.

Any help would be great! Thanks!

This topic was modified 6 months ago 2 times by ChrisPal323

   
Quote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3403
 

@chrispal323 Keep in mind this is a 2MP camera that costs about $9, not a DSLR. I am not sure what you mean by 

But when I take single pictures, I assume the camera does not have time to adjust the exposure of the camera.

All the camera adjustments as you call them happen in milliseconds.

Perhaps if you told us the video stream setting you are happy with that might help. There are significant differences between video and still processing. There are huge differences between still jpeg resolutions and video resolutions. Screens are generally 72dpi (Apple being capable of 144 IIRC) while jpegs meant to be printed are optimal at about 320dpi IIRC. Perhaps you are a young person who has never used anything but a screen and have never experienced a high quality print. I have about 20 of the boards and many extra cameras of various kinds so maybe I will experiment and see if it's possible to save a raw image, that way you can process it in Lightroom and produce the image you want.

Which sketch are you using (link).

 

I found this link that gives the basic info for getting a raw image instead of compressed jpeg. With the raw you can then process in Lightroom or equivalent to produce the image you want.

https://www.esp32.com/viewtopic.php?t=10405

 

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon


   
ReplyQuote
ChrisPal323
(@chrispal323)
Eminent Member
Joined: 6 months ago
Posts: 31
Topic starter  

@zander So i have been doing a bit of research. To clarify the problem I have used the code from the dronebotworkshop but have been getting results like the one bellow. However when I use the websitewifi camera example from the esp32 library I get much better results for a picture. Do you know where I should look to replicate the results I'm getting on the website application? Such as the artifacts and stray lines. Thanks!

image140

   
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3403
 

@chrispal323 You need to post links to the two different sketches so we can look at them.

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon


   
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3403
 

@chrispal323 The ESP32 actually has nothing to do with the photography, that is all handled in the camera module. Can you confirm that is the std OV2640? There is an issue #383 reported on Apr 18, still open and no one assigned as yet.

I am a photographer so have a little relevant knowledge so if you post the link of the sketch not working to your satisfaction I will have a look at it. 

However, be aware that I can not locate the camera code, it is buried under several layers under several libraries and names.

My suspicion is the config parameters need to be adjusted and I have seen a thread that mentions the first dozen or so pictures will look funny until the camnera learns what to set the AWB to and one other parameter I don't recall. Since this is a very primitive camera, adequate lighting is important as well as various settings. These boards and cameras are mostly used as streaming security type cameras so are optimized for that use case.

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon


   
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3403
 

@chrispal323 Here is a comparison. An OVR2640 camera mounted on an ESP32-CAM board versus a Sep 2014 iPhone. One costs less than $5 the other well over a $1,000.

The line across is probably a cable or bad pixel, the green cast has been reported as issue 383 in Apr but nobody assigned to look into. 

capture
IMG 6964

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon


   
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3403
 

@chrispal323 I just got the new esp32cam software installed and here is a sample picture. This is a huge improvement. It now uses auto flash.

capture2

 

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon


   
Duce robot reacted
ReplyQuote
Duce robot
(@duce-robot)
Prominent Member
Joined: 3 years ago
Posts: 679
 

@zander awesome! Have been searching for something like this thanks for sharing 👍


   
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3403
 

@duce-robot Here is the link to the V4 software. This is current, but has dropped the facial recognition as it was tooooooo slow.

https://github.com/easytarget/esp32-cam-webserver

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon


   
Duce robot reacted
ReplyQuote