initial structure implemented

docs -> _docs
This commit is contained in:
Oleksandr Bezdieniezhnykh
2025-12-01 14:20:56 +02:00
parent 9134c5db06
commit abc26d5c20
360 changed files with 3881 additions and 101 deletions
+18
View File
@@ -0,0 +1,18 @@
from typing import Optional
from pydantic import BaseModel
class CameraParameters(BaseModel):
focal_length: float
sensor_width: float
sensor_height: float
resolution_width: int
resolution_height: int
principal_point: tuple[float, float] | None = None
distortion_coefficients: list[float] | None = None
def get_principal_point(self) -> tuple[float, float]:
if self.principal_point:
return self.principal_point
return (self.resolution_width / 2.0, self.resolution_height / 2.0)