P2DingoCV.HotspotLogic.HotSpotDetectorSubclasses.VerboseDetector

Classes

VerboseDetector(cam, exitPath[, config])

Hotspot detector that outputs verbose component-level information per frame.

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

Bases: P2DingoCV.HotspotLogic.HotspotDetector.HotspotDetector

Hotspot detector that outputs verbose component-level information per frame.

Processes each frame from the camera, detects hotspots, computes detailed metrics for each detected component, and saves JSON results. Visual outputs are not generated (unlike MaximumDetector).

Inherits from HotspotDetector and overrides the execute method.

Example usage:

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

Parameters:
execute()[source]

Run verbose 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 and calculates metrics per component.

  4. Stores a dictionary for each component with the following metrics:

  • lbl: Component label/index

  • hotspotScore: Overall hotspot score

  • componentTemp: Component temperature

  • centroid: Centroid coordinates of the component

  • deltaPScore: Delta P score

  • deltaPRobust: Robust delta P score

  • zScore: Z-score

  • zScoreNorm: Normalized Z-score

  • compactness: Shape compactness

  • aspectRatioNorm: Normalized aspect ratio

  • eccentricity: Component eccentricity

  • area: Component area

  1. Appends frame results to the overall results list.

  2. Continues until no frames remain or the user presses ‘q’.

Output:

  • JSON file ‘hotspotOutput.json’ in the specified outputPath.

  • Each frame contains detection flag and detailed component metrics.

Example:

```python detector = VerboseDetector(camera, outputPath=”output_dir”, config=”config.json”) detector.execute()