OpenHPS/openhps-opencv

View on GitHub
src/common/data/features/ImageRectShape.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { Rect } from 'opencv4nodejs';
import { AbsolutePosition, SerializableObject } from '@openhps/core';

@SerializableObject()
export class ImageRectShape extends Rect {
    constructor(rect: Rect) {
        super(rect.x, rect.y, rect.width, rect.height);
    }

    public get center(): AbsolutePosition {
        return null;
    }

    public get squareSize(): number {
        return this.width * this.height;
    }
}