mailto: blog -at- heyrick -dot- eu

Navi: Previous entry Display calendar Next entry
Switch to desktop version

FYI! Last read at 18:52 on 2024/11/21.

A pleasant day

I stayed in bed late, partly because it was Sunday and partly because it went down to -1°C in the early hours which meant it took a while to warm up. About noonish (I was up way before that, was doing some stuff indoors), I went out. It had reached two digits, so was warming up. I wasn't too sure about the weather, quite a lot of cloud around.

My arm hurts from all the sawing that was required to fell and chop all those trees. I decided that I was going to have an easy weekend and not do anything stressful like that.

 

Yeah.
About that...

A "before" and an "after":

An unwanted willow is felled, for the second time.
An unwanted willow is felled, for the second time.

It took forever to saw through that tree, and it was holding on by a piece of wood about the size of your thumb. But, eventually, it was taken down. With no help whatsoever from the cats. Thanks guys!
The gage can grow in peace now, without the fast-growing willow crowding it out.
Bad news? There's a big trunk that I still have to deal with.
Worse news? There are a few more unwanted willows that have sprung up.

Plus, I noticed, a lot of cleavers to deal with.

 

Through the afternoon I wrote the information below about the many options of the ESP32-CAM. The clouds had all gone away and it was really quite hot. It actually touched 16°C at half three, so I'm glad I opened the windows.
Because it felt hot in the sun, I put a hat on, like an Aussie kid. Case in point...

Screenshot from The InBESTigators
Screenshot from The InBESTigators, on Netflix.
Okay, okay, these kids (in a Netflix programme called The InBESTigators) are probably dealing with 30°C as it's set in a suburb to the south east of Melbourne, and I'm dealing with half that, but they're Aussies so they're naturally badass (even ten year old girls) and I'm just a whingin' pom. ☺

 

At about half five, I finished writing the ESP32-CAM stuff, so time to give Caoimhe a wash.

Car wash
Car wash, the way that doesn't eat euro coins.

Following that, I swapped out the speakers supplied for the ones Alison gave me, which fit this car perfectly. No need for half-ass wedging the speakers in. I was even able to fit the speaker covers, though I needed to dig up some longer screws as the original ones were too short for all the layers of plastic.
Much improved bass response, too.

Better speakers
Better speakers.

 

And, finally, I ought to go and make something to eat, but even as the temperature is slowly dropping, I am enjoying sitting in the evening sunshine to write this. But, alas, cats to feed and clothes to get off the line and windows to close and Rick to feed and..... I'd better upload this and get a move on!

 

ESP32-CAM examples and settings

The standard ESP32-CAM interface offers a pile of options and settings. I'll describe what they mean with some examples.

First of all, one has to note that internally, the camera offers three modes of operation:

What happens is that the camera reads the image in one of those default sizes (1600×1200, 800×600, or 400×296) and scales it if necessary to one of the other sizes, if chosen.

Unfortunately, the act of reading different pixels like that does have a noticable effect on the image. Not just the quality, that is to be expected given the reduced number of pixels used, but also on the way colours appear.

Here is a resized (to fit the blog) image built from every pixel.

UXGA, using every pixel
UXGA, using every pixel.

Here is a resized (to fit the blog) image built from every other pixel. This was taken moments before the UXGA image above.

SVGA, using every other pixel
SVGA, using every other pixel.

And, finally, here is an image built from every fourth pixel. As before, this was taken just before the previous image.

CIF, using every fourth pixel
CIF, using every fourth pixel.

As you can see, the colour rendition of the lower size images is rather poor. Every other pixel gives an image that is less green and vibrant, while every fourth pixel looks like a winter's day.

 

When you go to use the camera with its browser interface, there is a huge variety of controls, namely this:

ESP32-CAM controls
ESP32-CAM controls.
It appears as if the "Toggle settings" that appears at the very top (not in the screenshot) is slightly broken. It switches the entire control panel between visible and invisible. You'd perhaps have thought that it might have made more sense to leave the "Get Still" and "Start Stream" buttons?

 

Okay then. Let's go!

 

 

I would like to point out that all of the examples shown below were taken with temporal proximity. They were all UXGA format, saved on my Samsung S9, and turned into a "collage" using the built in collage maker, to allow direct comparisons.

 

That image is the front at ten to eight in the evening.

 

There. I hope this helps to clear up some of the many bewildering options offered by the ESP32-CAM's default firmware.

Strangely, there doesn't seem to be any option to turn the flash LED on and off...

 

 

Your comments:

Zerosquare, 18th April 2021, 23:46
Skipping pixels can introduce aliasing artifacts, but shouldn't change the colour balance like that. Something else must be going on, probably different encoding parameters depending on the picture size. 
 
On the other hand, even on the full-size, full-quality picture, it's pretty evident that it's using a 16-year old technology.
Rick, 18th April 2021, 23:48
Hmm, it looks like I might have my Gain pictures back to front. Not a surprise, mind you, it is hard to edit mostly dark pictures in sunlight! 😉
David Pilling, 19th April 2021, 23:16
Duuno. You could do things like look at the histograms for the image for different (RGB) colours for different resolutions. Or look at the R, G and B versions of the image to see if you can work out what they're doing (wrong). 
The general theme this chimes with for me, is how grim results are from many low cost cameras. I even did not like the RasPi one. Presumably at some point phone camera technology will escape into other products and things will improve. Many are still using the first generation technology from way back, all the improvements come from telling bigger fibs in the specifications.
David Pilling, 23rd April 2021, 18:40
Cameras have more green than other colour pixels - don't suppose they are using a scaling algorithm for RGB on RGGB data.
Jaggz, 2nd August 2021, 09:56
Lens Correction: I noticed in low light conditions, when the brightness fades out towards the edges, it seems it does a radial gain increase, evening out the brightness across the whole image.
Jaggz, 2nd August 2021, 10:15
About the Exposure slider not offering enough control -- Users can use the http API to set values directly. (I'm not sure which setting though; never done it). Docs here (if you're using his fork of Expressif's sketch): https://github.com/easytarget/esp32-cam-webserver/blob/master/AP I.md
Leonardo, 9th May 2022, 17:31
RAW GMA enable the gamma correction in the RAW image domain, you can read more about this in the OV5640 datasheet. 
 
Lens correction is to compensate for uneven brightness of the lens, so will reduce vigneting. 
 
Exposure is the exposure time. If the subject is still is always better to increase the exposure time than the Gain. 
 
You can improve A LOT colors by applying a CCM with a software like Color Corrector (available on the MS Store)
corz, 14th April 2023, 21:15
Thank you. I'll be linking to this. 
 
It feels incomplete though. Lots of "this happens when in daylight" but no mention of the same setting after dark. 
 
At any rate, still the best online explanation of those mysterious ESP32-CAM settings. 
 
btw, if you want to mess with the sliders and what-not, start with a better sketch, like this one (nothing to do with me, but provides plain HTML pages to work with): https://github.com/easytarget/esp32-cam-webserver
Rick, 15th April 2023, 10:35
To be honest, it's a camera sensor from 2005, so not a lot happens in the dark. You can make some use of gain and exposure to enhance things in low light, but both add noticeable (exposure) or massive (gain) amounts of noise. In this case you'd likely need to take multiple pictures and stack them, but the hassle of doing that might make it not worthwhile when you consider that any mid-range 202x smartphone can do so much better. 
 
Two years later (2023/03/26) I finally got around to revising the camera firmware, and had the thing allocate a much bigger buffer so photos up to around 720K are possible (that's quality level 4 or 5). 
 
More recently, I've been creating firmware to do time lapse photography.
corz, 29th July 2023, 10:12
Hah! I was doing the exact same thing myself. See here: https://corz.org/ESP32/time-lapse-camera-server/
Rick, 29th July 2023, 11:31
From Corz's site: they just don't make them like they used to 
 
Halle-freaking-lujah. D'you think I would have taken out an additional warranty *and* an insurance policy on an expensive (to me) washing machine bought in 1982? Our one (a Zanussi) saw me through school, came over here, and finally gave up the ghost (controller short circuit) a quarter century later. 
The little machine I found in a cow barn was easily fixed up (two caps and minor rewiring) and it served me for a year and a half despite being prehistoric when I got it (circa 1995 I think). 
 
Will I get a quarter century out of my new Whirlpool? I can but hope. And given its all computer controlled gubbinses inside, hope is aided with a monthly subscription... 
corz, 29th January 2024, 00:07
Hell yes! 
 
Reminds me of "Philip", our washing machine for over two decades and the first time I ever completely disassembled a motor (about 15 years in to his faithful service).  
 
These cheap little devices really are perfect for slamming in-situ-without-worry. But yeah, ten years from now they will be useless clutter in the bottom a drawer somewhere as we gobble up the next generation of disposable tech. Ahhh... 
 
But while we are *here*, this page is indispensable (as I forget stuff easily); thanks again!

Add a comment (v0.11) [help?]
Your name:

 
Your email (optional):

 
Validation:
Please type 13422 backwards.

 
Your comment:

 

Navi: Previous entry Display calendar Next entry
Switch to desktop version

Search:

See the rest of HeyRick :-)