P2DingoCV.HotspotLogic.HotSpotDetectorSubclasses.VerboseDetector
Classes
|
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:
exitPath (str)
config (str | None)
- execute()[source]
Run verbose hotspot detection on all frames from the camera.
For each frame:
Reads the frame from the camera.
Resets frame-specific data.
Performs per-frame hotspot detection and calculates metrics per component.
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
Appends frame results to the overall results list.
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()