mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-05 02:18:52 +03:00
Object area debugging and improvements (#16432)
* add ability to specify min and max area as percentages * debug draw area and ratio * docs * update for best percentage
This commit is contained in:
@@ -490,12 +490,27 @@ export default function ObjectLifecycle({
|
||||
Area
|
||||
</p>
|
||||
{Array.isArray(item.data.box) &&
|
||||
item.data.box.length >= 4
|
||||
? Math.round(
|
||||
detectArea *
|
||||
(item.data.box[2] * item.data.box[3]),
|
||||
)
|
||||
: "N/A"}
|
||||
item.data.box.length >= 4 ? (
|
||||
<>
|
||||
<div className="flex flex-col text-xs">
|
||||
px:{" "}
|
||||
{Math.round(
|
||||
detectArea *
|
||||
(item.data.box[2] * item.data.box[3]),
|
||||
)}
|
||||
</div>
|
||||
<div className="flex flex-col text-xs">
|
||||
%:{" "}
|
||||
{(
|
||||
(detectArea *
|
||||
(item.data.box[2] * item.data.box[3])) /
|
||||
detectArea
|
||||
).toFixed(4)}
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
"N/A"
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user