smart IR issue explained

wopi82

IPCT Contributor
Joined
Feb 9, 2017
Messages
117
Reaction score
798
Location
Poland
I decided to write this thread, as there is more and more rumor about Smart IR function on the forum, and it seems to me that most users have a false vision of how it should work and what’s its main porpoise. Unfortunately even such services as IPVM suggest in some of its reviews, that smartIR is supposed to react, as a person or any other object appears in the frame and lower its IR radiance, to a level where an object is properly lit and not overexposed. In reality there is a totally different mechanism responsible for it, not smartIR.

To demonstrate it, I used 2 camera models. The 5442TM-AS with updated firmware and HDW5831R-ZE. The first camera has an AUTO option in IR Light section. The second one has a Smart IR option. Both options work exactly the same.

interface.jpg

There are two factors that make SmartIR/Auto function useless for a situation, when a person appears in camera. First is its adaptation speed and second is its brightness span. The IR light brightness in Web Interface is available as a scale from 1%-100%. When converted to exposition values (EV) the lowest brightness (1%) is approximately 2EV lower than brightest level (100%). In other words, at 1% value the IR LED shines 4 times weaker than at 100% value.

And now comes the Inverse-Square Law of Light. Let’s assume a person looks at your camera from an X distance. The IR light (at 100%) lights his/her face. If the person comes 2x closer to the camera, so the distance will be 0.5X, the amount of light on his/her face will quadruplet so the face will be 4x brighter. So to equalize the increase of face brightness, the IR LED has to be dimmed 4 times. Again, if the person halves this distance to 0.25X, its face will be 8x brighter than in first position.

lightfalloffsquare.jpg
Overview-Light-Fall-Off-to-the-Square.jpg
Inverse-Square-Law-Light-Fall-Off-to-the-Square.jpg

In other words, if a person appears in frame, in a distance of 2m (IR at 100%) and will come as close as 1m (IR at 1%), the IR LED will cope with it. Any further or closer to the camera, the IR LED won’t be able to adjust its brightness level. The same goes for distances between 2m-4m, 3m-6m, 4m-8m and so on.

At this point you might think it’s ok. Sounds good. But it’s not, because in most cases the camera will not react to a person appearing in a frame at further distances. This is because of light metering system, which is averaging the whole frame. It means that it meters the entire scene and adjusts exposition/IR light of the camera to the whole image (I’m not sure Dahua uses exactly this method, as there is no technical specs on this, but it seems it’s actually averaging the whole image rather than certain area). I don’t want to get deeper into the metering methods and how it exactly works, but if there is mostly darkness in frame, and a person appears in a distance, the camera will not adjust its exposure or IR light. Only after person’s face/body fills most of the frame, the camera will start to react. Look at the examples below.


The second factor limiting SmartIR usage is the rate of adaptation to a scene. Look again at the examples above and notice how slow it is. In real life, when a person appears in the image, it lasts from a fraction of a second to a few seconds. Here, both AUTO and SmartIR needs 5 to 10 seconds to adopt.

So what’s the solution? Simply use camera exposure system to do the job. DO NOT LOCK EXPOSURE for night time at 1/30s or so. Also, do not lock gain. If you lock both or any of these, the camera will not be able to adopt to existing conditions. If you want your cam to work at 1/25s exposure, set the range between 0-40ms. If something extremely bright appears in frame the cam will shorten the exposure. It will adopt in a fraction of a second and the available brightness span will range from 1/25s to 1/100000s, which is almost 12EV. If you want to keep GAIN at lower levels, do not lock it at one value. Set a range between 0 and your desired value.

The metering problem also can be solved. Use HLC function. The camera will be more “sensitive” to overexposured areas (even small/distant ones) and will instantly adopt exposure to this area. The higher HLC value you set, the more sensitive the camera will be.


SmartIR function is only usefull to adopt IR light to a static scene the camera is viewing. It is there, so that you don’t have to do it manually. It will not work with fast moving objects like cars, people or animals.
 
Last edited:

DavidR1

Getting the hang of it
Joined
Aug 14, 2019
Messages
75
Reaction score
63
Location
US
I decided to write this thread, as there is more and more rumor about Smart IR function on the forum, and it seems to me that most users have a false vision of how it should work and what’s its main porpoise. Unfortunately even such services as IPVM suggest in some of its reviews, that smartIR is supposed to react, as a person or any other object appears in the frame and lower its IR radiance, to a level where an object is properly lit and not overexposed. In reality there is a totally different mechanism responsible for it, not smartIR.
8<

So what’s the solution? Simply use camera exposure system to do the job. DO NOT LOCK EXPOSURE for night time at 1/30s or so. Also, do not lock gain. If you lock both or any of these, the camera will not be able to adopt to existing conditions. If you want your cam to work at 1/25s exposure, set the range between 0-40ms. If something extremely bright appears in frame the cam will shorten the exposure. It will adopt in a fraction of a second and the available brightness span will range from 1/25s to 1/100000s, which is almost 12EV. If you want to keep GAIN at lower levels, do not lock it at one value. Set a range between 0 and your desired value.
8<

The metering problem also can be solved. Use HLC function. The camera will be more “sensitive” to overexposured areas (even small/distant ones) and will instantly adopt exposure to this area. The higher HLC value you set, the more sensitive the camera will be.
I just wanted to say, "Thank you!" for taking time to put together this information, the concise video explanations and demonstrations, and for offering some advice for how to pursue the results people might be expecting. I for one know that I'll be tinkering with my cameras some more tonight after absorbing what you've provided here.

Thanks again for sharing your expertise with all of us!
 

J Sigmo

Known around here
Joined
Feb 5, 2018
Messages
997
Reaction score
1,333
Excellent weiteup

Most security camera users come into this with no background in photography. Unfortunately, a basic understanding of exposure and photo lighting is required to get the best use from their security cameras just as it is for any photography.

And sadly, our security cameras are not yet equipped with as flexible of auto exposure systems as most rudimentary point-and-shoot cameras, and certainly not as good as the amazing processing seen in newer cell phones.

Further, security cameras are asked to shoot good video not only in good light, but also at night, in conditions where even your new cell phone would struggle.

So people are disappointed with the nighttime video they get.

In my opinion, the security camera manufacturers could do a much better job of explaining the limitations of their cameras and managing people's expectations. But no manufacturer wants to downplay their equipment's capabilities.

I think they (manufacturers) could do a lot with their auto-exposure systems to give users more control and adjustability for different situations.

And they could acknowledge the importance of lighting by offering better IR (and even white light) illuminator systems for their cameras.

Nighttime video is often more important than daytime. Users need to learn more about photo exposure and put more effort into good lighting if they need good video in dark conditions.

In photography, proper lighting is vital. But this is largely ignored or not understood.
 

bigredfish

Known around here
Joined
Sep 5, 2016
Messages
17,011
Reaction score
47,456
Location
Floriduh
Appreciate the insights. On my slow to non-existant reacting new IP cameras I will try the Exposure method and report back.

My CVI cameras handle "Smart IR" pretty well. Typically set on 1/30th Exposure.

(set youtube to 1080p)

 
Last edited:

Arjun

Known around here
Joined
Feb 26, 2017
Messages
9,015
Reaction score
11,032
Location
USA
Adjusting exposure setttings is absolutely worth a try even on the newer 4mp starlight cameras, thanks!
 

wopi82

IPCT Contributor
Joined
Feb 9, 2017
Messages
117
Reaction score
798
Location
Poland
My CVI cameras handle "Smart IR" pretty well. Typically set on 1/30th Exposure.
From your examples it looks like it's actually the exposure reaction, not smartIR. If you have locked these cameras at 1/30s it might be the gain changing. Notice how background lights dim when somebody appears. If it was just smartIR, the lights wouldn't change its brightness.
 

bigredfish

Known around here
Joined
Sep 5, 2016
Messages
17,011
Reaction score
47,456
Location
Floriduh
You could be right, but there is a sensitivity setting for Smart IR on CVI cams that is missing on most IP cams. Usually 1-10.
If I set it at say 1, there is no change when a subject walks up to the camera and you get washout. If I set to 7-10 I get the effect you see in the above videos, the higher the sensitivity setting, the more pronounced and faster reaction of the "dimming" effect.
It appears that the IR LED's are "dimming" which accounts for the background light intensity changing. It appears to work regardless of Exposure setting as one of the videos above has an exposure of "Auto" and the other has exposure set to 1/30. Seems logical and similar to the effect you get by manually adjusting the IR on most cameras.

Regardless of "how" it works, it works!

So if its really exposure or Gain making the change, one has to wonder why the intensity adjustment is present at all?

From the Dahua spec sheet on the HAC-HFW3231-Z:
Smart IR
The camera is designed with array LED IR illumination for best lowlight
performance at maximum distance. Smart IR is a technology to ensure
brightness uniformity in B/W image under low illumination. Dahua’s unique
Smart IR adjusts to the intensity of camera's infrared LEDs to compensate for
the distance of an object, and prevents IR LEDs from overexposing images as
the object comes closer to the camera.
 

wopi82

IPCT Contributor
Joined
Feb 9, 2017
Messages
117
Reaction score
798
Location
Poland
@bigredfish
I was looking for such description before posting the thread. So Dahua is claiming it should work.
Can you please set one of your analog cameras to 1/30s, lock gain to one value, turn off any backlight functions, set SmartIR sensitivity to 10 and than provide a video example? I'm really curious how it will react in such case.
 

bigredfish

Known around here
Joined
Sep 5, 2016
Messages
17,011
Reaction score
47,456
Location
Floriduh
Note that two of the previous clips I posted above (Moms driveway) the camera is a 3231 CVI set at 1/30th and fixed Gain, No backlight. This is how I run many of my cameras.

I do think the camera may be playing with Gain when using 'Smart IR" even though it is set as fixed. Its hard to tell, but the end result is similar. I dont believe SmartIR is adjusting Exposure, obviously Exposure is fixed in these examples.


Here's a few more examples:
All set at 1/30, Fixed Gain (usually a scale of 1-10 on CVI cams), Smart IR set to 11 (12 is usually max)

(*Remember to switch Youtube player to 1080p)



 

wopi82

IPCT Contributor
Joined
Feb 9, 2017
Messages
117
Reaction score
798
Location
Poland
Ok, so it works. But in my opinion, it's still exposure modification, even when everything is locked. In the last example from the backyard, notice illuminated bushes in far background. When you appear in the image these bushes also get darker. If it was just IR reaction, these bushes would stay the same, only you and the yard would get darker.
 

rra

n3wb
Joined
Jul 2, 2015
Messages
28
Reaction score
4
Location
Belgium
je hebt een screenshot van de instellingen van de dahua-browser
 

bigredfish

Known around here
Joined
Sep 5, 2016
Messages
17,011
Reaction score
47,456
Location
Floriduh
I think he wants a screenshot of the settings.

I’ll post two more videos tonight that I think will help us see what’s going on.
 

rra

n3wb
Joined
Jul 2, 2015
Messages
28
Reaction score
4
Location
Belgium
Yes , please post a screenshot from de settings from the web interface . Thanks
 

bigredfish

Known around here
Joined
Sep 5, 2016
Messages
17,011
Reaction score
47,456
Location
Floriduh
So here's two samples with Smart IR on my IP Mini PTZ as it was closest and easiest to demonstrate with.
If anything, it appears that Gain is what is being controlled, at least partially, with SmartIR.

First clip Exposure 1/60, Gain 0-50 as I normally have it. (Smart IR isnt all that smart but it tries)
View attachment Gain0-50-EX1-60.mp4
















The next clip is with Exposure set as before 1/60 but Gain locked at 35 (which gave approx the same brightness as the first clip)
View attachment Gain35locked-EX1-60.mp4


















Exp1-60-GainFixed35.jpg
 

wopi82

IPCT Contributor
Joined
Feb 9, 2017
Messages
117
Reaction score
798
Location
Poland
Smart IR is not controlling gain in this case. It's the gain itself. In first example your face got washed out, because gain went down from 50 to 0 and the camera didn't have chance to go any lower. Try this: turn off smart IR - set a fixed value like 100% for IR, set exposure to 0-16ms (the maximum will be still 1/60s), set gain to 0-50 and see what happens. If you still get overexposed add a little bit of HLC to this. Should work :)
 
Top