Skip to main content

FireDetection

Detects and returns a bounding rectangle around the fire.

This module provides a pipeline element to detect fire in a given frame using OpenCV library.

Examples:

REST API:

WIP

Configuration File:

```yaml
source:
- address: videos/fire-detection.mp4
- type: file
elements:
- name: fire-detection
args:
regions: 1
width: 640
height: 480
```

FireDetection Objects

class FireDetection(Element)

Detects and returns a bounding rectangle around the fire.

Attributes:

  • name str - The name of the element.
  • maxROF int - The number of fire regions to be detected per frame.
  • dim1 int - The width to which the input frame is reduced to.
  • dim2 int - The height to which the input frame is reduced to.

Examples:

```python
ele = FireDetection("1", "640", "480")
```

process

def process(meta: PipelineMetadata)

Process the bounding boxes.

This is the main function for this element. It will detect fire in the given frame and draw a bounding box around the detected fire.

Arguments:

  • meta PipelineMetadata - The metadata to process.

Returns:

  • meta PipelineMetadata - The processed metadata.

Examples:

```python
ele = FireDetection("1", "640", "480")
meta = ele.process(meta)
```