NvDsTargetMiscDataFrame¶
- class pyds.NvDsTargetMiscDataFrame¶
- Variables:
frameNum – int, frameNum
tBbox –
NvOSD_RectParams
, tBboxconfidence – float, confidence
age – int, age
Example usage:
l_user=batch_meta.batch_user_meta_list #Retrieve glist of NvDsUserMeta objects from given NvDsBatchMeta object while l_user is not None: try: # Note that l_user.data needs a cast to pyds.NvDsUserMeta # The casting is done by pyds.NvDsUserMeta.cast() # The casting also keeps ownership of the underlying memory # in the C code, so the Python garbage collector will leave # it alone user_meta=pyds.NvDsUserMeta.cast(l_user.data) except StopIteration: break if(user_meta and user_meta.base_meta.meta_type==pyds.NvDsMetaType.NVDS_TRACKER_PAST_FRAME_META): #Make sure metatype is correct try: # Note that user_meta.user_meta_data needs a cast to pyds.NvDsTargetMiscDataBatch # The casting is done by pyds.NvDsTargetMiscDataBatch.cast() # The casting also keeps ownership of the underlying memory # in the C code, so the Python garbage collector will leave # it alone pPastFrameObjBatch = pyds.NvDsTargetMiscDataBatch.cast(user_meta.user_meta_data) #See NvDsTargetMiscDataBatch for details except StopIteration: break for trackobj in pyds.NvDsTargetMiscDataBatch.list(pPastFrameObjBatch): #Iterate through list of NvDsTargetMiscDataStream objects #Access NvDsTargetMiscDataStream attributes print("streamId=",trackobj.streamID) print("surfaceStreamID=",trackobj.surfaceStreamID) for pastframeobj in pyds.NvDsTargetMiscDataStream.list(trackobj): #Iterate through list of NvDsFrameObjList objects #Access NvDsTargetMiscDataObject attributes print("numobj=",pastframeobj.numObj) print("uniqueId=",pastframeobj.uniqueId) print("classId=",pastframeobj.classId) print("objLabel=",pastframeobj.objLabel) for objlist in pyds.NvDsTargetMiscDataObject.list(pastframeobj): #Iterate through list of NvDsFrameObj objects #Access NvDsTargetMiscDataFrame attributes print('frameNum:', objlist.frameNum) print('tBbox.left:', objlist.tBbox.left) print('tBbox.width:', objlist.tBbox.width) print('tBbox.top:', objlist.tBbox.top) print('tBbox.right:', objlist.tBbox.height) print('confidence:', objlist.confidence) print('age:', objlist.age) try: l_user=l_user.next except StopIteration: break
- cast(self: capsule) pyds.NvDsTargetMiscDataFrame ¶
cast given object/data to
NvDsTargetMiscDataFrame
, call pyds.NvDsTargetMiscDataFrame.cast(data)