Skip to main content

GetPrivacyMaskConfig

Retrieves privacy mask configuration for defining obscured regions in the camera view.

Endpoint

FieldValue
MethodPOST or GET
URLhttp://<host>[:port]/GetPrivacyMaskConfig[/channelId]
ProductsIPC
Channel IDOptional (default 1)
v1.9 Only

This command is available on v1.9 firmware only.

Response Fields

FieldTypeDescription
switchbooleanEnable/disable this privacy mask zone
rectangle.Xuint32Zone X position (0--640)
rectangle.Yuint32Zone Y position (0--480)
rectangle.widthuint32Zone width (0--640)
rectangle.heightuint32Zone height (0--480)
colorcolorMask fill color

Color Values

ColorDescription
blackBlack mask overlay
whiteWhite mask overlay
grayGray mask overlay

Response

<?xml version="1.0" encoding="UTF-8"?>
<config version="1.0" xmlns="http://www.ipc.com/ver10">
<types>
<color>
<enum>black</enum>
<enum>white</enum>
<enum>gray</enum>
</color>
</types>
<privacyMask type="list" count="4">
<itemType>
<switch type="boolean"/>
<rectangle>
<X type="uint32"/>
<Y type="uint32"/>
<width type="uint32"/>
<height type="uint32"/>
</rectangle>
<color type="color"/>
</itemType>
<item>
<switch>false</switch>
<rectangle>
<X>0</X>
<Y>0</Y>
<width>0</width>
<height>0</height>
</rectangle>
<color>black</color>
</item>
</privacyMask>
</config>

Notes

  • X and Y coordinates use a 640x480 grid (not the 10000x10000 grid used by OSD positioning).
  • Up to 4 privacy mask zones can be configured (see count="4" in the response).
  • Each zone can be independently enabled/disabled with the switch field.
  • Privacy masks are applied to both the live view and recorded video -- they cannot be removed after recording.
  • Check supportPrivateMask in GetDeviceDetail to confirm the device supports this feature.