P2DingoCV.HotspotLogic.HotSpotDetectorSubclasses.MinimalDetector

Classes

MinimalDetector(cam, exitPath[, config])

Hotspot detector that outputs minimal information per frame.

class P2DingoCV.HotspotLogic.HotSpotDetectorSubclasses.MinimalDetector.MinimalDetector(cam, exitPath, config=None)[source]

Bases: P2DingoCV.HotspotLogic.HotspotDetector.HotspotDetector

Hotspot detector that outputs minimal information per frame.

Processes each frame from the camera, detects whether any hotspot exists, and saves only the minimal JSON results (frame number and detection flag).

Inherits from HotspotDetector and overrides the execute method.

Example usage:

detector = MinimalDetector(camera, outputPath=”output_dir”, config=”config.json”) detector.execute()

Parameters:
execute()[source]

Run minimal hotspot detection on all frames from the camera.

For each frame: 1. Reads the frame from the camera. 2. Resets frame-specific data. 3. Performs per-frame hotspot detection (no component metrics calculated). 4. Stores a minimal entry containing only the frame number and detection flag. 5. Continues until no frames remain or user presses ‘q’.

Output:
  • JSON file ‘hotspotOutput.json’ in the specified outputPath, containing:
    • frame: Frame index

    • detection: Boolean indicating whether a hotspot was detected

Example

detector = MinimalDetector(camera, outputPath=”output_dir”, config=”config.json”) detector.execute()