Skip to content

Commit

Permalink
Merge pull request #258 from canammex-tech/v0.05.alpha
Browse files Browse the repository at this point in the history
V0.05.alpha
  • Loading branch information
rjhowell44 authored Jun 29, 2020
2 parents 337257e + e6f56f8 commit cddf333
Show file tree
Hide file tree
Showing 89 changed files with 20,493 additions and 2,922 deletions.
Binary file modified Images/dsl-components.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/ode-services.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ CXX = g++

TARGET_DEVICE = $(shell gcc -dumpmachine | cut -f1 -d -)

DSL_VERSION:='L"v0.04.alpha"'
DSL_VERSION:='L"v0.05.alpha"'
NVDS_VERSION:=4.0
GS_VERSION:=1.0
GLIB_VERSION:=2.0
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ DSL is released under the [MIT License](LICENSE). Contributions are welcome and
* [Video Dewarper](/docs/api-dewarper.md)
* [Inference Engine](/docs/api-gie.md)
* [Multi-Object Tracker](/docs/api-tracker.md)
* [ODE Handler](/docs/api-ode-handler.md)
* [ODE Trigger](/docs/api-ode-trigger.md)
* [ODE Acton](/docs/api-ode-action.md)
* [ODE Area](/docs/api-ode-area.md)
* [Tiler](/docs/api-tiler.md)
* [Demuxer and Splitter](/docs/api-tee.md)
* [On-Screen Display](/docs/api-osd.md)
Expand Down
5 changes: 5 additions & 0 deletions docs/api-branch.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,12 @@ retval = dsl_branch_component_remove_all('my-branch')
* [Dewarper](/docs/api-dewarper.md)
* [Primary and Secondary GIE](/docs/api-gie.md)
* [Tracker](/docs/api-tracker.md)
* [ODE Handler](/docs/api-ode-handler.md)
* [ODE Trigger](/docs/api-ode-trigger.md)
* [ODE Acton](/docs/api-ode-action.md)
* [ODE Area](/docs/api-ode-area.md)
* [On-Screen Display](/docs/api-osd.md)
* [Tiler](/docs/api-tiler.md))
* [Demuxer and Splitter](/docs/api-tee.md)
* [Sink](/docs/api-sink.md)
* **Branch**
Expand Down
5 changes: 5 additions & 0 deletions docs/api-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,13 @@ retval = dsl_component_gpuid_set_many(['my-uri-source', 'my-primary-gie', 'my-os
* [Dewarper](/docs/api-dewarper.md)
* [Primary and Secondary GIE](/docs/api-gie.md)
* [Tracker](/docs/api-tracker.md)
* [ODE Handler](/docs/api-ode-handler.md)
* [ODE Trigger](/docs/api-ode-trigger.md)
* [ODE Acton](/docs/api-ode-action.md)
* [ODE Area](/docs/api-ode-area.md)
* [On-Screen Display](/docs/api-osd.md)
* [Tiler](/docs/api-tiler.md)
* [Demuxer and Splitter](/docs/api-tee.md)
* [Sink](/docs/api-sink.md)
* **Component**

4 changes: 4 additions & 0 deletions docs/api-gie.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,10 @@ retval = dsl_gie_num_in_use_max_set(36)
* [Source](/docs/api-source.md)
* [Dewarper](/docs/api-dewarper.md)
* **Primary and Seconday GIE**
* [ODE Handler](/docs/api-ode-handler.md)
* [ODE Trigger](/docs/api-ode-trigger.md)
* [ODE Acton](/docs/api-ode-action.md)
* [ODE Area](/docs/api-ode-area.md)
* [Tracker](/docs/api-tracker.md)
* [On-Screen Display](/docs/api-osd.md)
* [Tiler](/docs/api-tiler.md)
Expand Down
808 changes: 808 additions & 0 deletions docs/api-ode-action.md

Large diffs are not rendered by default.

267 changes: 267 additions & 0 deletions docs/api-ode-area.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,267 @@
# ODE Area Services API
Object Detection Event (ODE) Areas define rectangles with coordinates, `left` and `top`, and dimensions, `width` and `height`, that can be used as additional [ODE Trigger](/docs/api-ode-trigger.md) criteria for an ODE occurrence. The relationship between Triggers and Areas is many-to-many as multiple Areas can be added to an Trigger and the same Area can be added to multiple Triggers. If a New Ares's `display` is enabled, Areas owned by Triggers will be added as display metadata for an On-Screen-Component to display.

ODE Areas can be used strictly for the purpose of adding a rectange to the display metadata using an ODE Action to Fill it [dsl_ode_action_fill_area_new](/docs/api-ode-actions.md#dsl_ode_action_fill_area_new).

ODE Actions can be used to update a Trigger's contaner of ODE Areas on ODE occurrence. See [dsl_ode_action_area_add_new](/docs/api-ode-action.md#dsl_ode_action_area_add_new) and [dsl_ode_action_area_remove_new](/docs/api-ode-action.md#dsl_ode_action_area_remove_new).

#### ODE Area Construction and Destruction
Areas are created by calling [dsl_ode_area_new](#dsl_ode_area_new)

#### Adding/Removing ODE Areas
ODE Areas are added to to ODE Triggers by calling [dsl_ode_trigger_area_add](/docs/api-ode-trigger.md#dsl_ode_trigger_area_add), [dsl_ode_trigger_area_add_many](/docs/api-ode-trigger.md#dsl_ode_trigger_area_add_many) and deleted with [dsl_ode_trigger_area_remove](/docs/api-ode-trigger.md#dsl_ode_trigger_area_add)

## ODE Area Services API

**Constructors:**
* [dsl_ode_area_new](#dsl_ode_area_new)

**Destructors:**
* [dsl_ode_area_delete](#dsl_ode_area_delete)
* [dsl_ode_area_delete_many](#dsl_ode_area_delete_many)
* [dsl_ode_area_delete_all](#dsl_ode_area_delete_all)

We can’t connect to the server at www.cnn.com.

If that address is correct, here are three other things you can try:

**Methods:**
* [dsl_ode_area_get](#dsl_ode_area_get)
* [dsl_ode_area_set](#dsl_ode_area_get)
* [dsl_ode_area_color_get](#dsl_ode_area_color_get)
* [dsl_ode_area_color_set](#dsl_ode_area_color_set)
* [dsl_ode_area_list_size](#dsl_ode_area_list_size)

---

## Return Values
The following return codes are used by the OSD Area API
```C++
#define DSL_RESULT_ODE_AREA_RESULT                                  0x00100000
#define DSL_RESULT_ODE_AREA_NAME_NOT_UNIQUE                         0x00100001
#define DSL_RESULT_ODE_AREA_NAME_NOT_FOUND                          0x00100002
#define DSL_RESULT_ODE_AREA_THREW_EXCEPTION                         0x00100003
#define DSL_RESULT_ODE_AREA_IN_USE                                  0x00100004
#define DSL_RESULT_ODE_AREA_SET_FAILED                              0x00100005
```
<br>
---
We can’t connect to the server at www.cnn.com.
If that address is correct, here are three other things you can try:
## Constructors
### *dsl_ode_area_new*
```C++
DslReturnType dsl_ode_area_new(const wchar_t* name,
    uint left, uint top, uint width, uint height, boolean display);
```
The constructor creates a uniquely named ODE Area with coordinates and dimensions. The Area can be displayed (requires an On-Screen Display) or left hidden. Areas are created with a default background color of white, with an alpha level of 0.25. The background color can be changed by calling [dsl_ode_area_color_set](#dsl_ode_area_color_set)

**Parameters**
* `name` - [in] unique name for the ODE Area to create.
* `left` - [in] left coordinate for Area rectangle in pixels.
* `top` - [in] top coordinate for Area rectangle in pixels.
* `wdith` - [in] width for the Area rectangle in pixels.
* `height` - [in] height for the Area rectangle in pixels.
* `display` - [in] if true, rectangle display-metadata will be added to each structure of frame metadata.

**Returns**
* `DSL_RESULT_SUCCESS` on successful creation. One of the [Return Values](#return-values) defined above on failure.

**Python Example**
```Python
retval = dsl_ode_area_new('my-area', 120, 30, 700, 400, True)
```

<br>

---

## Destructors
### *dsl_ode_area_delete*
```C++
DslReturnType dsl_ode_area_delete(const wchar_t* area);
```
This destructor deletes a single, uniquely named ODE Area. The destructor will fail if the Area is currently `in-use` by one or more ODE Triggers
**Parameters**
* `area` - [in] unique name for the ODE Area to delete
**Returns**
* `DSL_RESULT_SUCCESS` on successful deletion. One of the [Return Values](#return-values) defined above on failure
**Python Example**
```Python
retval = dsl_ode_area_delete('my-area')
```

<br>

### *dsl_ode_area_delete_many*
```C++
DslReturnType dsl_area_delete_many(const wchar_t** area);
```
This destructor deletes multiple uniquely named ODE Areas. Each name is checked for existence, with the function returning `DSL_RESULT_AREA_NAME_NOT_FOUND` on first occurrence of failure. The destructor will fail if one of the Areas is currently `in-use` by one or more ODE Triggers
**Parameters**
* `areas` - [in] a NULL terminated array of uniquely named ODE Areas to delete.
**Returns**
* `DSL_RESULT_SUCCESS` on successful deletion. One of the [Return Values](#return-values) defined above on failure
**Python Example**
```Python
retval = dsl_ode_area_delete_many(['my-area-a', 'my-area-b', 'my-area-c', None])
```

<br>

### *dsl_ode_area_delete_all*
```C++
DslReturnType dsl_ode_area_delete_all();
```
This destructor deletes all ODE Areas currently in memory. The destructor will fail if any one of the Areas is currently `in-use` by one or more ODE Triggers.

**Returns**
* `DSL_RESULT_SUCCESS` on successful deletion. One of the [Return Values](#return-values) defined above on failure

**Python Example**
```Python
retval = dsl_ode_area_delete_all()
```

<br>

## Methods
### *dsl_ode_area_get*
```c++
DslReturnType dsl_ode_area_get(const wchar_t* name,
    uint* left, uint* top, uint* width, uint* height, boolean *display);
```
This service returns a named ODE Area's current rectangle coordinates, dimensions, and display setting.
**Parameters**
* `name` - [in] unique name of the ODE Area to query.
* `left` - [out] left coordinate for Area rectangle in pixels.
* `top` - [out] top coordinate for Area rectangle in pixels.
* `wdith` - [out] width for the Area rectangle in pixels.
* `height` - [out] height for the Area rectangle in pixels.
* `display` - [out] if true, rectangle display-metadata will be added to each structure of frame metadata.
**Returns**
* `DSL_RESULT_SUCCESS` on successful query. One of the [Return Values](#return-values) defined above on failure
**Python Example**
```Python
retval, left, top, width, height, display = dsl_ode_area_get('my-area')
```

<br>

### *dsl_ode_area_set*
```c++
DslReturnType dsl_ode_area_set(const wchar_t* name,
    uint left, uint top, uint width, uint height, boolean display);
```
This service returns a named ODE Area's current rectangle coordinates, dimensions, and display setting.
**Parameters**
* `name` - [in] unique name of the ODE Area to update.
* `left` - [in] left coordinate param for Area rectangle in pixels.
* `top` - [in] top coordinate param for Area rectangle in pixels.
* `wdith` - [in] width param for the Area rectangle in pixels.
* `height` - [in] height param for the Area rectangle in pixels.
* `display` - [in] if true, rectangle display-metadata will be added to each structure of frame metadata.
**Returns**
* `DSL_RESULT_SUCCESS` on successful query. One of the [Return Values](#return-values) defined above on failure
**Python Example**
```Python
retval = dsl_ode_area_set('my-area', 0, 0. 128, 1028, False)
```

### *dsl_ode_area_color_get*
```c++
DslReturnType dsl_ode_area_color_get(const wchar_t* name,
    double* red, double* green, double* blue, double* alpha);
```
This service returns a named ODE Area's current RGBA background color.
**Parameters**
* `name` - [in] unique name of the ODE Area to query.
* `red` - [out] red color value for the Area's RGBA background color [0.0..1.0].
* `green` - [out] green color value for the Area's RGBA background color [0.0..1.0].
* `blue` - [out] blue color value for the Area's RGBA background color [0.0..1.0].
* `alpha` - [out] alpha color value for the Area's RGBA background color [0.0..1.0].
**Returns**
* `DSL_RESULT_SUCCESS` on successful query. One of the [Return Values](#return-values) defined above on failure
**Python Example**
```Python
retval, left, top, width, height, display = dsl_ode_area_get('my-area')
```

<br>

### *dsl_ode_area_color_set*
```c++
DslReturnType dsl_ode_area_set(const wchar_t* name,
    uint left, uint top, uint width, uint height, boolean display);
```
This service returns a named ODE Area's current rectangle coordinates, dimensions, and display setting.
**Parameters**
* `name` - [in] unique name of the ODE Area to update.
* `red` - [in] red color value for the Area's RGBA background color [0.0..1.0].
* `green` - [in] green color value for the Area's RGBA background color [0.0..1.0].
* `blue` - [in] blue color value for the Area's RGBA background color [0.0..1.0].
* `alpha` - [in] alpha color value for the Area's RGBA background color [0.0..1.0].
**Returns**
* `DSL_RESULT_SUCCESS` on successful query. One of the [Return Values](#return-values) defined above on failure
**Python Example**
```Python
retval = dsl_ode_area_set('my-area', 0, 0. 128, 1028, False)
```

<br>
### *dsl_ode_area_list_size*
```c++
uint dsl_ode_area_list_size();
```
This service returns the size of the ODE Area container, i.e. the number of Areas currently in memory.

**Returns**
* The size of the ODE Area container

**Python Example**
```Python
size = dsl_ode_area_list_size()
```

<br>
---

## API Reference
* [List of all Services](/docs/api-reference-list.md)
* [Pipeline](/docs/api-pipeline.md)
* [Source](/docs/api-source.md)
* [Dewarper](/docs/api-dewarper.md)
* [Primary and Secondary GIE](/docs/api-gie.md)
* [Tracker](/docs/api-tracker.md)
* [Tiler](/docs/api-tiler.md)
* [ODE Handler](/docs/api-ode-handler.md)
* [ODE Trigger](/docs/api-ode-trigger.md)
* [ODE Action](/docs/api-ode-action.md)
* **ODE-Area**
* [On-Screen Display](/docs/api-osd.md)
* [Demuxer and Splitter](/docs/api-tee.md)
* [Sink](/docs/api-sink.md)
* [Branch](/docs/api-branch.md)
* [Component](/docs/api-component.md)
Loading

0 comments on commit cddf333

Please sign in to comment.