@@ -1563,17 +1563,42 @@ class Information:
1563
1563
model_name : std::string
1564
1564
Name of the camera model
1565
1565
1566
+ focal_length_mm : float
1567
+ Focal length
1568
+
1569
+ horizontal_sensor_size_mm : float
1570
+ Horizontal sensor size
1571
+
1572
+ vertical_sensor_size_mm : float
1573
+ Vertical sensor size
1574
+
1575
+ horizontal_resolution_px : uint32_t
1576
+ Horizontal image resolution in pixels
1577
+
1578
+ vertical_resolution_px : uint32_t
1579
+ Vertical image resolution in pixels
1580
+
1566
1581
"""
1567
1582
1568
1583
1569
1584
1570
1585
def __init__ (
1571
1586
self ,
1572
1587
vendor_name ,
1573
- model_name ):
1588
+ model_name ,
1589
+ focal_length_mm ,
1590
+ horizontal_sensor_size_mm ,
1591
+ vertical_sensor_size_mm ,
1592
+ horizontal_resolution_px ,
1593
+ vertical_resolution_px ):
1574
1594
""" Initializes the Information object """
1575
1595
self .vendor_name = vendor_name
1576
1596
self .model_name = model_name
1597
+ self .focal_length_mm = focal_length_mm
1598
+ self .horizontal_sensor_size_mm = horizontal_sensor_size_mm
1599
+ self .vertical_sensor_size_mm = vertical_sensor_size_mm
1600
+ self .horizontal_resolution_px = horizontal_resolution_px
1601
+ self .vertical_resolution_px = vertical_resolution_px
1577
1602
1578
1603
def __equals__ (self , to_compare ):
1579
1604
""" Checks if two Information are the same """
@@ -1582,7 +1607,12 @@ def __equals__(self, to_compare):
1582
1607
# Information object
1583
1608
return \
1584
1609
(self .vendor_name == to_compare .vendor_name ) and \
1585
- (self .model_name == to_compare .model_name )
1610
+ (self .model_name == to_compare .model_name ) and \
1611
+ (self .focal_length_mm == to_compare .focal_length_mm ) and \
1612
+ (self .horizontal_sensor_size_mm == to_compare .horizontal_sensor_size_mm ) and \
1613
+ (self .vertical_sensor_size_mm == to_compare .vertical_sensor_size_mm ) and \
1614
+ (self .horizontal_resolution_px == to_compare .horizontal_resolution_px ) and \
1615
+ (self .vertical_resolution_px == to_compare .vertical_resolution_px )
1586
1616
1587
1617
except AttributeError :
1588
1618
return False
@@ -1591,7 +1621,12 @@ def __str__(self):
1591
1621
""" Information in string representation """
1592
1622
struct_repr = ", " .join ([
1593
1623
"vendor_name: " + str (self .vendor_name ),
1594
- "model_name: " + str (self .model_name )
1624
+ "model_name: " + str (self .model_name ),
1625
+ "focal_length_mm: " + str (self .focal_length_mm ),
1626
+ "horizontal_sensor_size_mm: " + str (self .horizontal_sensor_size_mm ),
1627
+ "vertical_sensor_size_mm: " + str (self .vertical_sensor_size_mm ),
1628
+ "horizontal_resolution_px: " + str (self .horizontal_resolution_px ),
1629
+ "vertical_resolution_px: " + str (self .vertical_resolution_px )
1595
1630
])
1596
1631
1597
1632
return f"Information: [{ struct_repr } ]"
@@ -1604,7 +1639,22 @@ def translate_from_rpc(rpcInformation):
1604
1639
rpcInformation .vendor_name ,
1605
1640
1606
1641
1607
- rpcInformation .model_name
1642
+ rpcInformation .model_name ,
1643
+
1644
+
1645
+ rpcInformation .focal_length_mm ,
1646
+
1647
+
1648
+ rpcInformation .horizontal_sensor_size_mm ,
1649
+
1650
+
1651
+ rpcInformation .vertical_sensor_size_mm ,
1652
+
1653
+
1654
+ rpcInformation .horizontal_resolution_px ,
1655
+
1656
+
1657
+ rpcInformation .vertical_resolution_px
1608
1658
)
1609
1659
1610
1660
def translate_to_rpc (self , rpcInformation ):
@@ -1623,6 +1673,36 @@ def translate_to_rpc(self, rpcInformation):
1623
1673
1624
1674
1625
1675
1676
+
1677
+
1678
+ rpcInformation .focal_length_mm = self .focal_length_mm
1679
+
1680
+
1681
+
1682
+
1683
+
1684
+ rpcInformation .horizontal_sensor_size_mm = self .horizontal_sensor_size_mm
1685
+
1686
+
1687
+
1688
+
1689
+
1690
+ rpcInformation .vertical_sensor_size_mm = self .vertical_sensor_size_mm
1691
+
1692
+
1693
+
1694
+
1695
+
1696
+ rpcInformation .horizontal_resolution_px = self .horizontal_resolution_px
1697
+
1698
+
1699
+
1700
+
1701
+
1702
+ rpcInformation .vertical_resolution_px = self .vertical_resolution_px
1703
+
1704
+
1705
+
1626
1706
1627
1707
1628
1708
0 commit comments