mirror of
https://github.com/azaion/gps-denied-desktop.git
synced 2026-04-22 22:06:36 +00:00
initial structure implemented
docs -> _docs
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user