Xnap Box Data Grabber SDK

Developers would ask: how can I integrate Xnap Box with my existing application? How can I grab the cropped photos of faces/objects being detected by Xnap Box? Besides of image file, how can I get the meta of these images, such as timestamp, the dominant color of objects, Tracker ID (upcoming) and so forth?

Xnap Box Data Grabber SDK is now available on GitHub.


Currently, Xnap Box Data Grabber SDK comes with 2 different favors:

Java SDK




Python SDK (upcoming)



Xnap Box Data-sheet (0.9.7)

Xnap Box datasheet can be downloaded here:

Xnap Box datasheet en 20170308

Key Features:

  • Each Xnap™ Box processes one RTSP H.264 / MJPEG video stream over IP network, or MJPEG AVI USB File sources on FAT32 thumb drive
  • Support up to 1920×1080 resolution with precise resolution auto-detection
  • Near real-time face detection algorithm using deep learning technology
  • Export MJPEG face/object streams, alongside with meta-data, through HTTP protocol by default
  • Optional: face/object image output to USB thumb drive
  • Detect multiple faces and objects with size range from 72 to 1200 pixels in 1080p (2 mega pixel) frame
  • 20º yaw/pitch/roll pose variation
  • Face detection missing rate* < 0.01%
  • Compact-size enclosure
  • Powered by 5V 2.5A Certified MicroUSB cable
  • Bonjour Support for the latest web browser
  • Built-in object color detection to provide dominant color image of pedestrian/vehicle (meta-data to be sent via HTTP)
  • NTP support for time synchronization to ensure precise (up to microsecond level) timestamp with all captured images
  • Filename of face image shall be derived from camera system time (via ONVIF) & timestamp information of the concerned frame of the input RTSP source (only in local storage mode)
  • Simple web-based guided operation to export face images to USB thumb drive
  • Built-in web-based utilities to fix/format USB thumb drive into FAT32 / EXT4 format
  • 802.11n Soft-AP mode support to allow web-based administration from any PC / smartphone/tablet with a standard web browser.

As a prelude, we are planning to add these 2 features in next release

  • Administration web with password authentication
  • Built-in ONVIF discovery tool
  • Built-in face blur filter to reduce undesirable blurry face images

HTTP Headers from XB Object/Face Streams Spec

From version >= r.0.9.8


YYYYMMDD=Year,Month,Day (system wide)

HHMMSS=Hour,Minutes,Seconds (system wide)

SSSSSSSSSSS=stream time in seconds (per session)

FFFFFFFF=frame no/count (per session)


(Object/Face Centroid X in the whole frame, integer: 0-1200)

X-objectXpos: 9999

(Object/Face Centroid X in the whole frame, integer: 0-2000)


X-objectWidth: 9999

(Face Width in XB Face, integer: 72-1200)

X-objectHeight: 9999 (Face Height in XB Face)

(Image width & height in Object, Face Width & Height in XB Face, integer: 72-1200)


X-TrackerID: 99999

(Integer from 0-65535, back to 0 after 65535)

X-TrackDir: (obsoleted)

X-ObjectColor1HSV: #999#999#999

(Dominant Color, H, integer: 0-360, S, integer: 0-100%, V, integer: 0-100%)

X-ObjectColor2HSV: #999#999#999

(2nd Dominant Color, H, integer: 0-360, S, integer: 0-100%, V, integer: 0-100%)

Already exists since version 0.4:

Server: (XnapBOX machine name)