isapi_smart_lineDetection.go 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. package isapi
  2. //能力
  3. //http://192.168.1.64/ISAPI/Smart/LineDetection/1/capabilities
  4. //http://192.168.1.64/ISAPI/Smart/channels/1/calibrations/capabilities
  5. // LineDetection 越界侦测
  6. type LineDetection struct {
  7. ID string `xml:"id"`
  8. Enabled string `xml:"enabled"`
  9. NormalizedScreenSize struct {
  10. NormalizedScreenWidth string `xml:"normalizedScreenWidth"`
  11. NormalizedScreenHeight string `xml:"normalizedScreenHeight"`
  12. } `xml:"normalizedScreenSize"`
  13. LineItemList struct {
  14. Size string `xml:"size,attr"`
  15. LineItem []struct {
  16. ID string `xml:"id"`
  17. Enabled string `xml:"enabled"`
  18. SensitivityLevel string `xml:"sensitivityLevel"`
  19. DirectionSensitivity string `xml:"directionSensitivity"`
  20. DetectionTarget string `xml:"detectionTarget"`
  21. AlarmConfidence struct {
  22. Text string `xml:",chardata"`
  23. Opt string `xml:"opt,attr"`
  24. } `xml:"alarmConfidence"`
  25. CoordinatesList struct {
  26. Coordinates []struct {
  27. PositionX string `xml:"positionX"`
  28. PositionY string `xml:"positionY"`
  29. } `xml:"Coordinates"`
  30. } `xml:"CoordinatesList"`
  31. } `xml:"LineItem"`
  32. } `xml:"LineItemList"`
  33. IsSupportMultiScene string `xml:"isSupportMultiScene"`
  34. RecogRuleType string `xml:"recogRuleType"`
  35. }
  36. func (c *Client) GetLineDetectionCap() ([]byte, error) {
  37. return c.CommonGet("/ISAPI/Smart/LineDetection/1/capabilities")
  38. }
  39. func (c *Client) GetSizeLd() ([]byte, error) {
  40. return c.CommonGet("/ISAPI/Smart/channels/1/calibrations/linedetection")
  41. }
  42. func (c *Client) PutSizeLd(data []byte) ([]byte, error) {
  43. return c.CommonPut(data, "/ISAPI/Smart/channels/1/calibrations/linedetection")
  44. }
  45. // GetLineDetection 获取单个通道越界侦测规则
  46. func (c *Client) GetLineDetection() ([]byte, error) {
  47. return c.CommonGet("/ISAPI/Smart/LineDetection/1")
  48. }
  49. // PutLineDetection 配置单个通道越界侦测规则
  50. func (c *Client) PutLineDetection(data []byte) ([]byte, error) {
  51. return c.CommonPut(data, "/ISAPI/Smart/LineDetection/1")
  52. }