camera-client 0.2.2__tar.gz → 0.2.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: camera-client
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary: Python SDK for camera calibration and projection transformations - handle lens distortion, coordinate transformations, and 3D ray casting with symbolic expressions.
5
5
  Author-email: Alexander Abramov <extremal.ru@gmail.com>
6
6
  License: MIT
@@ -335,6 +335,7 @@ The calibration file is a NumPy `.npz` archive containing:
335
335
 
336
336
  ### Metadata
337
337
  - `format_version`: Version string of the data format
338
+ - `camera_id`: Integer identifier for the camera
338
339
  - `plan_url`: URL or path to the ground plan image
339
340
  - `plan_scale`: Scale factor for ground plane coordinates (pixels per meter)
340
341
  - `plan_width`: Width of the ground plan in pixels
@@ -343,6 +344,7 @@ The calibration file is a NumPy `.npz` archive containing:
343
344
  - `im_ctd_url`: URL or path to the corrected (undistorted) camera image
344
345
  - `im_width`: Width of the camera image in pixels
345
346
  - `im_height`: Height of the camera image in pixels
347
+ - `ctd_geometry`: JSON object with geometry data in CTD coordinates (efov_polygon, counting_lines)
346
348
 
347
349
  ## Requirements
348
350
 
@@ -305,6 +305,7 @@ The calibration file is a NumPy `.npz` archive containing:
305
305
 
306
306
  ### Metadata
307
307
  - `format_version`: Version string of the data format
308
+ - `camera_id`: Integer identifier for the camera
308
309
  - `plan_url`: URL or path to the ground plan image
309
310
  - `plan_scale`: Scale factor for ground plane coordinates (pixels per meter)
310
311
  - `plan_width`: Width of the ground plan in pixels
@@ -313,6 +314,7 @@ The calibration file is a NumPy `.npz` archive containing:
313
314
  - `im_ctd_url`: URL or path to the corrected (undistorted) camera image
314
315
  - `im_width`: Width of the camera image in pixels
315
316
  - `im_height`: Height of the camera image in pixels
317
+ - `ctd_geometry`: JSON object with geometry data in CTD coordinates (efov_polygon, counting_lines)
316
318
 
317
319
  ## Requirements
318
320
 
@@ -29,6 +29,9 @@ class CameraProjection:
29
29
  """
30
30
  data = cam_archive_data
31
31
 
32
+ self.camera_id = data["camera_id"]
33
+ self.ctd_geometry = data["ctd_geometry"]
34
+
32
35
  self.plan_scale = float(data["plan_scale"])
33
36
  self.plan_url = str(data["plan_url"])
34
37
  self.plan_width = int(data["plan_width"])
@@ -1,3 +1,4 @@
1
+ import json
1
2
  import numpy as np
2
3
  import sympy as sp
3
4
 
@@ -12,6 +13,7 @@ def read_npz_file(filename):
12
13
  Returns:
13
14
  dict: Dictionary containing the following keys:
14
15
  - format_version (str): Version string of the data format
16
+ - camera_id (int): Integer identifier for the camera
15
17
  - plan_url (str): URL or path to the ground plan image
16
18
  - plan_scale (float): Scale factor for ground plane coordinates (pixels per meter)
17
19
  - plan_width (int): Width of the ground plan in pixels
@@ -31,10 +33,14 @@ def read_npz_file(filename):
31
33
  - exp_gnd2im (sp.Expr): Sympy expression for ground to image coordinate transformation
32
34
  - exp_key_point (sp.Expr): Sympy expression for keypoint coordinates
33
35
  - exp_im2ray (sp.Expr): Sympy expression for image to ray direction transformation
36
+ - ctd_geometry (dict): JSON object containing geometry data in CTD coordinate system:
37
+ - efov_polygon: Polygon defining effective field of view in CTD coordinates
38
+ - counting_lines: Polylines for counting forward/backward track intersections
34
39
  """
35
40
  data = np.load(filename)
36
41
 
37
42
  format_version = str(data["format_version"])
43
+ camera_id = int(data["camera_id"])
38
44
 
39
45
  # Plan options
40
46
  plan_url = str(data["plan_url"])
@@ -62,10 +68,14 @@ def read_npz_file(filename):
62
68
  exp_key_point = sp.sympify(str(data["exp_key_point"]))
63
69
  exp_im2ray = sp.sympify(str(data["exp_im2ray"]))
64
70
 
71
+ # Ctd image geometry
72
+ ctd_geometry = json.loads(str(data["ctd_geometry"]))
73
+
65
74
  # Don't forget to close the file
66
75
  data.close()
67
76
 
68
77
  return {
78
+ "camera_id": camera_id,
69
79
  # Plan options
70
80
  "plan_url": plan_url,
71
81
  "plan_scale": plan_scale,
@@ -88,4 +98,6 @@ def read_npz_file(filename):
88
98
  "map_scale_h": map_scale_h,
89
99
  "map_scale_w": map_scale_w,
90
100
  "map_scale_vang": map_scale_vang,
101
+ # Ctd image geometry
102
+ "ctd_geometry": ctd_geometry,
91
103
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: camera-client
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary: Python SDK for camera calibration and projection transformations - handle lens distortion, coordinate transformations, and 3D ray casting with symbolic expressions.
5
5
  Author-email: Alexander Abramov <extremal.ru@gmail.com>
6
6
  License: MIT
@@ -335,6 +335,7 @@ The calibration file is a NumPy `.npz` archive containing:
335
335
 
336
336
  ### Metadata
337
337
  - `format_version`: Version string of the data format
338
+ - `camera_id`: Integer identifier for the camera
338
339
  - `plan_url`: URL or path to the ground plan image
339
340
  - `plan_scale`: Scale factor for ground plane coordinates (pixels per meter)
340
341
  - `plan_width`: Width of the ground plan in pixels
@@ -343,6 +344,7 @@ The calibration file is a NumPy `.npz` archive containing:
343
344
  - `im_ctd_url`: URL or path to the corrected (undistorted) camera image
344
345
  - `im_width`: Width of the camera image in pixels
345
346
  - `im_height`: Height of the camera image in pixels
347
+ - `ctd_geometry`: JSON object with geometry data in CTD coordinates (efov_polygon, counting_lines)
346
348
 
347
349
  ## Requirements
348
350
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "camera-client"
7
- version = "0.2.2"
7
+ version = "0.2.4"
8
8
  description = "Python SDK for camera calibration and projection transformations - handle lens distortion, coordinate transformations, and 3D ray casting with symbolic expressions."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.7"
File without changes
File without changes
File without changes
File without changes