1 Adjusting SAFR Camera Focus

This article describes the best practice for adjusting SAFR Camera focus.

SAFR Camera does not have an auto focus capability. Further, the embedded preview is too small to perform accurate focus. This procedure describes how to use VLC to view a zoomed region of the screen while performing fine tune focus adjustment on SAFR Camera.

1.1 Change VLC Auto Resize Behavior

Before you get started, we recommend you configure VLC to not resize window upon playback. Because the SAFR Camera stream is 4k resolution, it can cause VLC to resize to larger than the current screen size and make it very hard to access the VLC window controls.

  1. Open VLC
  2. Go to Tools > Preferences
  3. On the Interface tab, uncheck “Resize Interface to video size”.

Focus Target

To get optimal focus, you should find a target in view of the camera that has crisp strait lines. This will make it easy to clearly see when focus is optimal. If there is a sign in view of the camera, this works well. If needed, you can print a camera focus charge (See below) and plate it in view of the camera. Test target should be the same distance as the optimal range where subject faces will be recognized.

Following table provides a couple of good examples of camera focus charts

URL

Example

Page: https://www.studiobinder.com/blog/camera-focus-chart/

Direct Image URL:
https://s.studiobinder.com/wp-content/uploads/2020/10/What-is-Focus-Chart-Focus-Chart.jpg

Page: https://www.bhphotovideo.com/explora/photography/tips-and-solutions/how-to-test-your-lens

Direct Image URL:

https://static.bhphotovideo.com/explora/sites/default/files/bandh-test-target.jpg

1.2 Rough Zoom and Focus

Begin by performing a rough zoom and focus. After adjusting the direction camera lens is pointed, use the zoom and focus control to zoom into the area where faces are to be matched. As you zoom, adjust focus. Don’t worry about getting focus exact – you just want to be able to see

  1. Go to SAFR Desktop > Tools menu > Video Feeds and click on Operation Settings from the “…” menu for the Camera you wish to focus
  1. Go to the Camera Page
  2. Click Zoom and Focus buttons as needed. The buttons furthest out make the largest change. The buttons with the labels make the largest change.
  3. Perform zoom until the width of view is same as desired range for subjects of interest (usually covering width of choke point and no more).
  4. Perform focus just enough to have some clarity. Fine tuning will be performed in next step.

A screenshot of a computer

Description automatically generated

1.3 Open SAFR Camera Stream with VLC

  1. Open VLC
  2. Go to Media menu > Open Network Stream… or press Ctrl-N
  3. Type the RTSP URL of SAFR Camera. (E.g. rtsp://10.124.14.5/video)
    1. Before doing so, enable RTSP on SAFR Camera by setting the RTSP Password in the Security tab
  4. You should see live video playback from SAFR Camera

1.4 Enable and Zoom SAFR Camera Stream in VLC

  1. Open VLC
  1. Go to Tools > Effects and Filters
  2. Go to the Video Effects tab
  3. Go to the Geometry tab
  4. Check “Interactive Zoom” as shown below
    A screenshot of a computer

Description automatically generated
  5. The VLC window will now have a zoom region in the upper left as shown below:
    A screenshot of a computer

Description automatically generated
  6. The zoom position and zoom scale controls are identified by the yellow callouts. The zoom scale control can be very hard to see as it is very small. Here is a zoomed in screenshot of it:

    The zoom scale control (yellow arrow) looks like a triangle just below the left side of the zoom position box (red arrow). The zoom position box can be moved around with the mouse by clicking and dragging.
  7. Change the zoom scale by clicking inside the triangle or dragging the top of the white portion.
  8. Change the zoom position by clicking and dragging the zoom position box.
  9. End result should look like this:
    A screenshot of a computer

Description automatically generated

1.5 Fine Focus SAFR Camera

Now you are ready to fine tune SAFR Camera’s focus as follows:

  1. Move VLC to the largest monitor you have and make the window as large as you can.
    1. If you have multiple monitors, place the VIC playback window on the largest monitor and use the smaller monitor to adjust SAFR Camera settings from SAFR Desktop (this example) or SAFR Camera Web Console
  1. Go to SAFR Desktop > Tools menu > Video Feeds and click on Operation Settings from the “…” menu for the Camera you wish to focus
  1. Go to the Camera Page
  2. Click Focus buttons on the Camera settings page to adjust focus
    1. Start with either the Near or Far medium buttons (<< or >>)
    2. Wait 1-2 seconds between each click to make sure adjustment is completed
    3. Keep clicking in the same direction until the image becomes less focused (typically only 1 click is needed)
    4. Now proceed to the small adjustment (< or >). Perform the same procedure.
    5. Change focus until the lines in the charge are as strait/sharp as you can make them
    6. If you find that the image appear sharp though a number of clicks in a single direction, count that number and then back off by ½ that number.

Note: If you are zoomed significantly in VLC, the image may never appear sharp due to digital effects introduced by VLC. If that is occurring, try zooming out on the image using the VLC zoom scale control.

Note: When reversing focus direction, you may need to click the fine tune focus buttons in the reverse direction up to 5 times to begin to see a change in focus. This is a behavior of the hardware when direction is reversed. To avoid overshooting focus, wait for 1 second between each click until you begin again to see change.

Below is an example of what appears to be the optimal focus for the test conditions above (distance=30ft, width of view=10ft, lighting=indoor florescent)

A white square with black letters and symbols

Description automatically generated

1.5.1 Using variable resolution lines

Focus charts often have lines that get wider and closer spaced. These are helpful in determining when you have reached the best focus. See two examples below showing camera at different focus adjustments.

Less focused

Optimal focus

Notice that the optimal focus can show more of the rays emanating from the center.

This can also be seen in other line patterns such as below.

Less focused

Optimal focus