File tree Expand file tree Collapse file tree 2 files changed +1
-41
lines changed
src/python/librir/video_io Expand file tree Collapse file tree 2 files changed +1
-41
lines changed Original file line number Diff line number Diff line change 2828 enable_bad_pixels ,
2929 flip_camera_calibration ,
3030 get_attributes ,
31- get_camera_identifier ,
3231 get_emissivity ,
3332 get_filename ,
3433 get_global_attributes ,
@@ -144,10 +143,8 @@ def __init__(self, handle):
144143 if get_image_count (handle ) < 0 :
145144 raise RuntimeError ("Invalid ir_movie descriptor" )
146145
147- # consider pulse as a handle identifier
148146 self .handle = handle
149147 self .times = None
150- self ._identifier = None
151148 self ._enable_bad_pixels = False
152149 self ._last_lines = None
153150 self ._payload = None
@@ -292,27 +289,6 @@ def calibrations(self):
292289 self .handle
293290 ) # possible calibrations (usually 'Digital Level' and 'Temperature(C)')
294291
295- @property
296- def identifier (self ):
297- """
298- Stores and gives handle identifier via librir by default. If not available,
299- gives the user defined one.
300- :return: identifier (str)
301- """
302- try :
303- self ._identifier = get_camera_identifier (self .handle )
304- except RuntimeError :
305- if self .handle > 0 :
306- logger .warning (
307- "'{}' is user defined identifier" .format (self ._identifier )
308- )
309- finally :
310- return self ._identifier
311-
312- @identifier .setter
313- def identifier (self , value ):
314- self ._identifier = value
315-
316292 # def frame_attributes(self, frame_index):
317293 # return self._file_attributes.frame_attributes(frame_index)
318294
Original file line number Diff line number Diff line change @@ -57,22 +57,6 @@ def close_camera(camera):
5757 _video_io .close_camera (camera )
5858
5959
60- def get_camera_identifier (camera ):
61- """
62- Returns a camera unique identifier.
63-
64- C signature:
65- int get_camera_identifier(void * camera, char * identifier);
66- """
67-
68- unique_identifier = np .zeros (200 , dtype = "c" )
69- u_p = unique_identifier .ctypes .data_as (ct .POINTER (ct .c_char ))
70- res = _video_io .get_camera_identifier (camera , u_p )
71- if res < 0 :
72- raise RuntimeError ("cannot retrieve camera identifier" )
73- return toString (unique_identifier )
74-
75-
7660def get_filename (camera ):
7761 """Returns the camera filename (if any)"""
7862 fname = np .zeros (200 , dtype = "c" )
@@ -393,7 +377,7 @@ def get_attributes(camera):
393377 )
394378 if tmp < 0 :
395379 raise RuntimeError ("An error occured while calling 'get_attributes'" )
396- res [toString (key )] = toBytes (value )[0 : vlen [0 ]]
380+ res [toString (key )] = toString (value )[0 : vlen [0 ]]
397381
398382 return res
399383
You can’t perform that action at this time.
0 commit comments