Optimize IPCam Video Perf
T
F
A
R
D
Basler Components
Optimizing Basler IP Camera Video
Performance
APPLICATION NOTES
Document Number: AW000844
Version: 02 Language: 000 (English)
Release Date: 3 Aug 2010
Contacting Basler Support Worldwide
Europe and the Middle East:
Basler AG
An der Strusbek 60 - 62
22926 Ahrensburg
Germany
Phone: +49-4102-463-303
Fax: +49-4102-463-599
Email: [email protected]
The Americas:
Basler, Inc.
855 Springdale Drive, Suite 203
Exton, PA 19341
U.S.A.
Phone: +1-610-280-0171
Fax: +1-610-280-7608
Email: [email protected]
Asia:
Basler Asia Pte. Ltd
8 Boon Lay Way
# 03 - 03 Tradehub 21
Singapore 609964
Phone: +65-6425-0472
Fax: +65-6425-0473
Email: [email protected]
www.basler-ipcam.com
All material in this publication is subject to change without notice and is copyright
Basler Vision Technologies.
Optimizing IP Camera Video Performance
1 Introduction
How can I configure my Basler IP camera to:
„
get the best image quality?
„
avoid motion blur?
„
achieve the highest frame rate?
If you want to optimize a Basler IP Camera’s (BIP) ability to capture video streams, you must first
think about how you will be using the camera. You should analyze the most important video
characteristic for your use case, for example:
„
You want to have images that do not show any motion blur.
„
You want to have images that do not show any noise.
„
You need to have a high frame rate.
„
Etc.
You will find that it is not always possible to achieve all of the goals listed above at the same time.
For example, to get images that have very low noise, you must typically use longer exposure times.
However, long exposure times may cause motion blur and low frame rates.
To avoid motion blur, you will need short exposure times. If you use short exposure times in a dark
environment, you will need to amplify the brightness of the images by increasing the gain.
Increasing the gain will also increase the noise.
The most important parameters regarding image quality are gain, exposure time, and the iris setting
on the lens. Assuming that you have a lens with a DC auto iris, the camera can control each of these
parameters automatically to provide images with a good average brightness. Other parameters that
can influence image quality include sharpness and the bit rate or quality settings for the encoder.
Application Notes
1
Optimizing IP Camera Video Performance
2 Use Cases
When a camera is working with its default settings, it automatically tries to find the best values for
gain, exposure time, and lens aperture for a "standard" scenario. "Standard" could be regarded as
the best compromise for different situations (in terms of brightness, speed of moving objects, etc.).
But this compromise would definitely not be the best fit for all situations.
In the following text we describe the best settings for several different use cases.
2.1
The "Minimize Noise" Use Case
To keep the noise level in the images low, even under low light
conditions, you should start by setting the camera’s exposure
mode to "prioritize quality". To do this, open the Basler
Surveillance Web Client, open the Configuration menu, go to the
Image Controls section, and select the Exposure Tab as shown to
the right. From the Exposure Mode drop down box, select
Prioritize Quality.
The Prioritize Quality setting will cause the camera’s autobrightness controls (auto-exposure, auto-gain, and auto-iris) to
keep the gain low, which in turn would lead to low noise images.
With Prioritize Quality selected, the controls will maintain the
image brightness mainly by adjusting the aperture of the DC iris
and the exposure time. Under low light conditions, this setup
would lead to a wide opened iris (and thus to images with low depth of focus) and to long exposure
times (which could cause blurred images and which could decrease the frame rate).
When the exposure time limit (see below) is reached, the camera will also begin to increase the
gain in order to maintain image brightness.
2
Application Notes
Optimizing IP Camera Video Performance
Limiting the Maximum Exposure Time
When the Exposure Mode is set to Prioritize Quality, the camera’s
auto-brightness controls will maintain image brightness mainly by
controlling the iris opening and the exposure time. Under low light
conditions, this will result in long exposure times and may lead to
motion blur or a decrease in the frame capture rate. So you may
decide that you want to limit the maximum exposure time that the
auto-brightness controls can use. The Exposure Time Limit
parameter lets you specify the maximum exposure that can be
used by the auto-brightness controls.
To set the maximum allowed exposure time, go to the Image
Controls section, select the Exposure Tab, and set the Exposure
Time Limit parameter as shown to the right.
Limiting the Maximum Gain
You can also set a limit on the maximum gain setting that the
auto-brightness controls will be allowed to use. This could, of
course, lead to dark images under low light conditions because
as the lighting conditions become darker, the allowed amount of
gain may not be sufficient to yield a bright image.
To set the maximum allowed gain, go to the Image Controls
section, select the Exposure Tab, and set the Gain Limit
parameter as shown to the right.
Application Notes
3
Optimizing IP Camera Video Performance
Sharpness
In addition to the exposure mode and the limit settings, image
quality can also be influenced by the "Sharpness" parameter. If
the sharpness is set to a value greater then zero, the image is
post-processed in a way such that the edges of the image are
enhanced. For the human eye, this leads to the impression that
the image is sharper. However, this edge enhancement also adds
noise to the image. Reducing the sharpness will reduce the noise,
but the image will look softer to the human eye.
To set the sharpness, go to the Image Controls section, select the
Appearance Tab, and set the Sharpness parameter as shown to
the right.
Compression
Finally, the image quality is highly dependent on the image
compression level. The higher the level of compression, the
smaller the resulting image will be (which in turn would need less
bandwidth for Ethernet transmission), BUT the more
compression artefacts will appear in the image, thus reducing the
image quality.
To set the compression level for an image stream, go to the
Streaming section, select the tab for the stream you want to work
with (e.g., Stream 0), and set the Quality parameter as shown to
the right. The higher the quality setting, the lower the
compression level will be.
Please note that the quality setting will only be applied to the
image stream if you have also set the Encoder Mode parameter
to VBR (Variable Bit Rate).
Image quality could also be set indirectly by using the Bitrate
parameter to specify the camera's network load. The Bitrate
parameter will only be applied to the image stream if you have
also set the Encoder Mode parameter to CBR (Constant Bit Rate).
In this case, the camera tries to maintain a constant network load
by outputting images that always the same size (in terms of bits).
Because the size of a compressed image (no matter if it is JPEG, MPEG4, or H.264) is highly
dependent not only on the compression level but also on the content of the image itself, a camera
set for CBR must vary the compression level for each image in order to make all of the images have
the same size. But in general, the lower the Bitrate setting, the higher the compression level.
If you want to control the image quality, we recommend using VBR. If you prefer controlling the
network load, you should use CBR.
4
Application Notes
Optimizing IP Camera Video Performance
2.2 The "Minimize Motion Blur" Use Case
To avoid motion blur in your images, you must configure your
camera to use short exposure times. Start by setting the camera’s
exposure mode to "prioritize framerate". To do this, open the
Basler Surveillance Web Client, open the Configuration menu, go
to the Image Controls section, and select the Exposure Tab as
shown to the right. From the Exposure Mode drop down box select
Prioritize Framerate.
The Prioritize Framerate setting will cause the camera’s autobrightness controls (auto-exposure, auto-gain, and auto-iris) to
keep the exposure time short. With Prioritize Framerate selected,
the controls will maintain the image brightness mainly by
adjusting the aperture of the DC iris and the gain. Under low light
conditions, this setup would lead to a wide opened iris (and thus
to images with low depth of focus) and to high gain levels (which could result in noisier images).
When the gain limit (see below) is reached, the camera will also begin to increase the exposure
time in order to maintain image brightness.
Limiting the Maximum Gain
When the Exposure Mode is set to Prioritize Framerate, the
camera’s auto-brightness controls will maintain image brightness
mainly by controlling the iris opening and the gain. Under low light
conditions, this will result in high gain settings and may lead to
very noisy images. So you may decide that you want to limit the
maximum gain that the auto-brightness controls can use. The
Gain Limit parameter lets you specify the maximum gain that can
be used by the auto-brightness controls.
To set the maximum allowed gain, go to the Image Controls
section, select the Exposure Tab, and set the Gain Limit
parameter as shown to the right.
Application Notes
5
Optimizing IP Camera Video Performance
Limiting the Maximum Exposure Time
When the Exposure Mode is set to Prioritize Framerate, the
camera’s auto-brightness controls will maintain image brightness
mainly by controlling the iris opening and the gain. But under low
light conditions, the auto-controls may reach the limit to which
they can increase the gain and in this case, the controls will begin
to increase the exposure time.
If you do not want the exposure time to ever be increased above
a certain threshold (e.g., 1/60 second), you can set a maximum
allowed exposure time. To set the maximum allowed exposure
time, go to the Image Controls section, select the Exposure Tab,
and set the Exposure Time Limit parameter as shown to the right.
This could, of course, lead to dark images under low light
conditions because as the lighting conditions become darker, the
allowed amount of exposure time may not be sufficient to yield a
bright image.
6
Application Notes
Optimizing IP Camera Video Performance
2.3 The "High Frame Rate" Use Case
The effective frame rate (the number of images per second that the camera is outputting to the
network) depends on the two major links in the camera’s image acquisition and processing chain:
„
The number of frames per second that are read out from the camera's sensor and transferred
to the camera's internal "CPU" (Digital Signal Processor = DSP).
„
The encoding speed of the DSP.
The weakest link in the chain determines the total speed. If the sensor is feeding the DSP with more
images per second than the DSP can compress, the DSP will simply drop the frames that it cannot
encode. This will lead to a lower effective frame rate compared to the sensor's frame rate.
The frame rate of the sensor mainly depends on where you have
set it to operate. To set the sensor frame rate, open the Basler
Surveillance Web Client, open the Configuration menu, go to the
Streaming section, and select the Global Tab as shown to the
right. From the Frame Rate Mode drop down box set the desired
frame rate.
You should keep in mind that the sensor’s frame rate can also
depend on the exposure time. For example, if the exposure time
is set for 1/2 second, the sensor will only be able to acquire two
frames per second regardless of where the Frame Rate Mode is
set. In all cases, If the exposure time gets longer than the
reciprocal value of the configured frame rate, the sensor will no
longer provide the configured frame rate. So you may eventually
need to reduce the exposure time to achieve a higher frame rate (see the "Minimize Motion Blur"
use case for more information about how to reduce the exposure time).
The encoding speed of the DSP depends on the DSP's work load. The greater the load, the fewer
frames per second that can be encoded.
The work load is the result of a number of different factors:
„
The codec. The different codecs (also known as encoders) will put different workloads on the
DSP. MJPEG requires the least processing power, thus allowing the highest frame rate.
MPEG4 needs significantly more processing power. And H.264 requires the most power, thus
yielding the lowest frame rate.
„
Image size. The bigger the image fed into the DSP, the higher the workload for the DSP.
Reducing the image size (by setting an AOI or by applying output scaling) would lead to higher
frame rates.
„
Number of simultaneous streams. The more video streams the DSP must encode
simultaneously, the higher the workload. The highest frame rate can be achieved with a single
active stream.
Application Notes
7
Optimizing IP Camera Video Performance
„
Motion Detection. The camera’s motion detection function puts a significant extra load on the
DSP. To achieve the highest frame rates, motion detection should be disabled.
„
Quality. The lower the quality (and the smaller the images, see above), the more images per
second the DSP can process and fit into the bit stream. This leads to a higher frame rate.
„
Frame Rate Mode. If the DSP is fed with many more frames from the sensor than it can
actually process, this will decrease the effective frame rate. You should configure the sensor
for a Frame Rate Mode that is just slightly greater than what the DSP can realistically process.
Here’s the steps you should take to do this:
1. Determine the number of frames currently being output in the stream you are working with:
a. Open the Basler Surveillance Web Client, open the Configuration menu, go to the
Streaming section, and select the tab for the video stream you want to work with, for
example, Stream 0 as shown below.
b. Click the Text Overlay button, and the Configure Text Overlay Contents window will
open. Add the $fps$ expression to the overlay text as shown below, and click the OK
button.
8
Application Notes
Optimizing IP Camera Video Performance
c. Close the Streaming section.
If you look at the live stream tab now (in our case the Live Stream 0 tab because we are
working with stream 0), you will see that the text overlay shows the current number of
frames per second being transmitted by the camera. In the example below, the frame
rate in the text overlay is circled in red.
2. Adjust the sensor frame rate accordingly.
If you found, for example, that your camera was only outputting around 15.5 fps as shown
in this example, it would make no sense to set the sensor to acquire 30 fps. A setting of 20
would be more appropriate. So you would go to the Streaming section, select the Global
tab, and set the Frame Rate Mode to 20 fps.
Application Notes
9
Optimizing IP Camera Video Performance
10
Application Notes
Revision History
Revision History
Doc. ID Number
Date
Changes
AW00084401000
24 Jul 2009
Initial release of this document.
AW00084402000
3 Aug 2010
Updated contact information inside of the front cover and updated screen
shots.
Application Notes
11
Revision History
12
Application Notes
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement