Closed Fixstars-momoko closed 4 months ago
frame count is originally designed for frame sync, and the value should be the unique number generated by device, not U3V transfer protocol.
The following log shows the test to display frame count stored in GenDC descriptor and frame id which is stored in U3V DataBlock with 2 cameras.
[2024-03-02 10:36:36.768] [ion] [debug] Comparing GenDC Descriptor Framecount vs U3V frame id = ( 5310, 0)
[2024-03-02 10:36:36.769] [ion] [debug] Comparing GenDC Descriptor Framecount vs U3V frame id = ( 5310, 0)
[2024-03-02 10:36:36.772] [ion] [debug] Comparing GenDC Descriptor Framecount vs U3V frame id = ( 5311, 1)
[2024-03-02 10:36:36.773] [ion] [debug] Comparing GenDC Descriptor Framecount vs U3V frame id = ( 5311, 1)
[2024-03-02 10:36:36.776] [ion] [debug] Comparing GenDC Descriptor Framecount vs U3V frame id = ( 5312, 2)
[2024-03-02 10:36:36.776] [ion] [debug] Comparing GenDC Descriptor Framecount vs U3V frame id = ( 5312, 2)
[2024-03-02 10:36:36.781] [ion] [debug] Comparing GenDC Descriptor Framecount vs U3V frame id = ( 5313, 3)
[2024-03-02 10:36:36.781] [ion] [debug] Comparing GenDC Descriptor Framecount vs U3V frame id = ( 5313, 3)
[2024-03-02 10:36:36.784] [ion] [debug] Comparing GenDC Descriptor Framecount vs U3V frame id = ( 5314, 4)
[2024-03-02 10:36:36.785] [ion] [debug] Comparing GenDC Descriptor Framecount vs U3V frame id = ( 5314, 4)
[2024-03-02 10:36:36.789] [ion] [debug] Comparing GenDC Descriptor Framecount vs U3V frame id = ( 5315, 5)
[2024-03-02 10:36:36.789] [ion] [debug] Comparing GenDC Descriptor Framecount vs U3V frame id = ( 5315, 5)
[2024-03-02 10:36:36.793] [ion] [debug] Comparing GenDC Descriptor Framecount vs U3V frame id = ( 5316, 6)
[2024-03-02 10:36:36.793] [ion] [debug] Comparing GenDC Descriptor Framecount vs U3V frame id = ( 5316, 6)
[2024-03-02 10:36:36.797] [ion] [debug] Comparing GenDC Descriptor Framecount vs U3V frame id = ( 5317, 7)
[2024-03-02 10:36:36.797] [ion] [debug] Comparing GenDC Descriptor Framecount vs U3V frame id = ( 5317, 7)
[2024-03-02 10:36:36.801] [ion] [debug] Comparing GenDC Descriptor Framecount vs U3V frame id = ( 5318, 8)
[2024-03-02 10:36:36.802] [ion] [debug] Comparing GenDC Descriptor Framecount vs U3V frame id = ( 5318, 8)
[2024-03-02 10:36:36.805] [ion] [debug] Comparing GenDC Descriptor Framecount vs U3V frame id = ( 5319, 9)
[2024-03-02 10:36:36.806] [ion] [debug] Comparing GenDC Descriptor Framecount vs U3V frame id = ( 5319, 9)
[2024-03-02 10:36:36.810] [ion] [debug] Comparing GenDC Descriptor Framecount vs U3V frame id = ( 5320, 10)
[2024-03-02 10:36:36.810] [ion] [debug] Comparing GenDC Descriptor Framecount vs U3V frame id = ( 5320, 10)
We do not treat them in the same API, so if device has no frame count, we will return -1 instead of frame count.
TODO @Fixstars-momoko : update the code
Now return -1 if frame count method is neither typespecific (GenDC) nor timestamp. 86b47a1
By adding the exception on user application side,
if ctypes.c_long(fc & 0xFFFFFFFF).value == -1:
raise Exception("This U3V Camera does not support Frame count.")
With Basler,
arv_buffer_get_frame_id
obtained blockid of U3V leader, which starts at 0 and increments by 1 for each frame.The log with frame number: