with a coffee
This commit is contained in:
1 parent
31b9e85912
commit
0f0fe0f518
7 files changed
+74
-41
No files matched your search
@@ -1,5 +1,3 @@
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel
|
||||
import numpy as np
|
||||
import cv2
|
||||
@@ -31,8 +29,8 @@ class KnownPoint(BaseModel):
|
||||
class VideoMetadata(BaseModel):
|
||||
knownPoints: list[KnownPoint]
|
||||
|
||||
def get_view_perspective_matrix(self) -> Optional[np.array]:
|
||||
if len(self.knownPoints) < 4:
|
||||
def get_view_perspective_matrix(self) -> np.ndarray | None:
|
||||
if len(self.knownPoints) != 4:
|
||||
return None
|
||||
|
||||
empirical_source = np.float32(
|
||||
|
||||
Reference in new issue
Block a user