When using Camera objects relying on the V4L2Helper class (either CameraGstreamer or CameraOpencv), it was possible with some hardware that a same image format was listed several times in the Camera Configuration window. This was likely caused by duplicates in the output of the call to v4l2-ctl --list-formats-ext. This behavior was user-unfriendly, as it was unnecessarily spamming the configuration window, and a possible source of confusion for users.
With this PR, duplicate formats are first removed before being exposed to the user. Moreover, the formats are also sorted according to their name, associated FPS, and image width, so that the formats are listed in a user-friendly order in the configuration window.
When using Camera objects relying on the
V4L2Helper
class (eitherCameraGstreamer
orCameraOpencv
), it was possible with some hardware that a same image format was listed several times in the Camera Configuration window. This was likely caused by duplicates in the output of the call tov4l2-ctl --list-formats-ext
. This behavior was user-unfriendly, as it was unnecessarily spamming the configuration window, and a possible source of confusion for users.With this PR, duplicate formats are first removed before being exposed to the user. Moreover, the formats are also sorted according to their name, associated FPS, and image width, so that the formats are listed in a user-friendly order in the configuration window.