@@ -1563,17 +1563,42 @@ class Information:
15631563 model_name : std::string
15641564 Name of the camera model
15651565
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+
15661581 """
15671582
15681583
15691584
15701585 def __init__ (
15711586 self ,
15721587 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 ):
15741594 """ Initializes the Information object """
15751595 self .vendor_name = vendor_name
15761596 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
15771602
15781603 def __equals__ (self , to_compare ):
15791604 """ Checks if two Information are the same """
@@ -1582,7 +1607,12 @@ def __equals__(self, to_compare):
15821607 # Information object
15831608 return \
15841609 (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 )
15861616
15871617 except AttributeError :
15881618 return False
@@ -1591,7 +1621,12 @@ def __str__(self):
15911621 """ Information in string representation """
15921622 struct_repr = ", " .join ([
15931623 "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 )
15951630 ])
15961631
15971632 return f"Information: [{ struct_repr } ]"
@@ -1604,7 +1639,22 @@ def translate_from_rpc(rpcInformation):
16041639 rpcInformation .vendor_name ,
16051640
16061641
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
16081658 )
16091659
16101660 def translate_to_rpc (self , rpcInformation ):
@@ -1623,6 +1673,36 @@ def translate_to_rpc(self, rpcInformation):
16231673
16241674
16251675
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+
16261706
16271707
16281708
0 commit comments