QVideo 4.7.1__tar.gz → 4.9.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. {qvideo-4.7.1 → qvideo-4.9.0}/PKG-INFO +15 -4
  2. {qvideo-4.7.1 → qvideo-4.9.0}/QVideo.egg-info/PKG-INFO +15 -4
  3. {qvideo-4.7.1 → qvideo-4.9.0}/QVideo.egg-info/SOURCES.txt +8 -2
  4. {qvideo-4.7.1 → qvideo-4.9.0}/QVideo.egg-info/requires.txt +8 -1
  5. {qvideo-4.7.1 → qvideo-4.9.0}/README.md +8 -2
  6. {qvideo-4.7.1 → qvideo-4.9.0}/__init__.py +1 -1
  7. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/Basler/_camera.py +1 -0
  8. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/Basler/_tree.py +1 -0
  9. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/Flir/QListFlirCameras.py +1 -0
  10. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/Flir/_camera.py +3 -1
  11. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/Flir/_tree.py +1 -0
  12. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/Genicam/_camera.py +71 -56
  13. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/Genicam/_tree.py +33 -27
  14. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/IDS/_camera.py +1 -0
  15. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/IDS/_tree.py +1 -0
  16. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/MV/_camera.py +1 -0
  17. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/MV/_tree.py +1 -0
  18. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/Noise/_camera.py +1 -0
  19. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/Noise/_tree.py +1 -0
  20. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/OpenCV/QListCVCameras.py +1 -0
  21. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/OpenCV/_camera.py +2 -1
  22. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/OpenCV/_tree.py +1 -0
  23. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/Picamera/__init__.py +2 -1
  24. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/Picamera/_camera.py +45 -61
  25. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/Picamera/_imx500.py +1 -0
  26. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/Picamera/_tree.py +1 -0
  27. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/Vimbax/_camera.py +1 -0
  28. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/Vimbax/_tree.py +1 -0
  29. {qvideo-4.7.1 → qvideo-4.9.0}/demos/ROIdemo.py +29 -19
  30. {qvideo-4.7.1 → qvideo-4.9.0}/demos/__init__.py +1 -1
  31. qvideo-4.9.0/dvr/QBacklogMonitor.py +114 -0
  32. qvideo-4.9.0/dvr/QCircularBuffer.py +148 -0
  33. {qvideo-4.7.1 → qvideo-4.9.0}/dvr/QCircularDVRWidget.py +77 -16
  34. qvideo-4.9.0/dvr/QDVRWidget.py +695 -0
  35. {qvideo-4.7.1 → qvideo-4.9.0}/dvr/QHDF5Reader.py +16 -2
  36. {qvideo-4.7.1 → qvideo-4.9.0}/dvr/QHDF5Writer.py +44 -2
  37. {qvideo-4.7.1 → qvideo-4.9.0}/dvr/QOpenCVWriter.py +20 -12
  38. qvideo-4.9.0/dvr/QPyAVReader.py +131 -0
  39. qvideo-4.9.0/dvr/QPyAVWriter.py +149 -0
  40. {qvideo-4.7.1 → qvideo-4.9.0}/dvr/__init__.py +17 -2
  41. qvideo-4.9.0/dvr/icons/record.svg +337 -0
  42. {qvideo-4.7.1 → qvideo-4.9.0}/filters/_MedianBase.py +2 -1
  43. {qvideo-4.7.1 → qvideo-4.9.0}/filters/artistic.py +3 -1
  44. {qvideo-4.7.1 → qvideo-4.9.0}/filters/circletransform.py +8 -8
  45. {qvideo-4.7.1 → qvideo-4.9.0}/filters/darkframe.py +1 -0
  46. {qvideo-4.7.1 → qvideo-4.9.0}/filters/dejitter.py +1 -1
  47. {qvideo-4.7.1 → qvideo-4.9.0}/filters/dog.py +4 -4
  48. {qvideo-4.7.1 → qvideo-4.9.0}/filters/edge.py +2 -3
  49. {qvideo-4.7.1 → qvideo-4.9.0}/filters/exposure.py +11 -10
  50. {qvideo-4.7.1 → qvideo-4.9.0}/filters/flatfield.py +1 -0
  51. {qvideo-4.7.1 → qvideo-4.9.0}/filters/foreground.py +1 -1
  52. {qvideo-4.7.1 → qvideo-4.9.0}/filters/gamma.py +2 -3
  53. {qvideo-4.7.1 → qvideo-4.9.0}/filters/invert.py +2 -3
  54. {qvideo-4.7.1 → qvideo-4.9.0}/filters/laplacian.py +7 -6
  55. {qvideo-4.7.1 → qvideo-4.9.0}/filters/median.py +3 -2
  56. {qvideo-4.7.1 → qvideo-4.9.0}/filters/momean.py +3 -2
  57. {qvideo-4.7.1 → qvideo-4.9.0}/filters/momedian.py +2 -1
  58. {qvideo-4.7.1 → qvideo-4.9.0}/filters/rgb.py +4 -4
  59. {qvideo-4.7.1 → qvideo-4.9.0}/filters/roi.py +2 -3
  60. {qvideo-4.7.1 → qvideo-4.9.0}/filters/smoothing.py +3 -4
  61. {qvideo-4.7.1 → qvideo-4.9.0}/filters/sobel.py +6 -5
  62. {qvideo-4.7.1 → qvideo-4.9.0}/filters/threshold.py +22 -17
  63. {qvideo-4.7.1 → qvideo-4.9.0}/filters/unsharp.py +3 -4
  64. {qvideo-4.7.1 → qvideo-4.9.0}/lib/QCamera.py +1 -1
  65. {qvideo-4.7.1 → qvideo-4.9.0}/lib/QFilterPipeline.py +4 -0
  66. {qvideo-4.7.1 → qvideo-4.9.0}/lib/QFilterRackWidget.py +35 -63
  67. {qvideo-4.7.1 → qvideo-4.9.0}/lib/QFrameRelay.py +1 -0
  68. {qvideo-4.7.1 → qvideo-4.9.0}/lib/QSnapshot.py +3 -3
  69. {qvideo-4.7.1 → qvideo-4.9.0}/lib/QUniformityWidget.py +2 -2
  70. {qvideo-4.7.1 → qvideo-4.9.0}/lib/QVideoFilter.py +38 -2
  71. {qvideo-4.7.1 → qvideo-4.9.0}/lib/QVideoReader.py +1 -1
  72. {qvideo-4.7.1 → qvideo-4.9.0}/lib/QVideoScreen.py +8 -6
  73. {qvideo-4.7.1 → qvideo-4.9.0}/lib/QVideoSource.py +26 -2
  74. {qvideo-4.7.1 → qvideo-4.9.0}/lib/QVideoWriter.py +8 -0
  75. {qvideo-4.7.1 → qvideo-4.9.0}/lib/_camera.py +72 -126
  76. {qvideo-4.7.1 → qvideo-4.9.0}/lib/_jupyter.py +119 -9
  77. {qvideo-4.7.1 → qvideo-4.9.0}/lib/_launch.py +2 -1
  78. {qvideo-4.7.1 → qvideo-4.9.0}/lib/chooser.py +2 -1
  79. {qvideo-4.7.1 → qvideo-4.9.0}/lib/clickable.py +1 -1
  80. {qvideo-4.7.1 → qvideo-4.9.0}/lib/gentl.py +62 -39
  81. {qvideo-4.7.1 → qvideo-4.9.0}/overlays/trackpy.py +18 -7
  82. {qvideo-4.7.1 → qvideo-4.9.0}/overlays/yolo.py +22 -8
  83. {qvideo-4.7.1 → qvideo-4.9.0}/pyproject.toml +8 -5
  84. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_camera.py +180 -30
  85. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_circularbuffer.py +45 -97
  86. qvideo-4.9.0/tests/test_circulardvrwidget.py +402 -0
  87. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_darkframe.py +7 -5
  88. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_dejitter.py +1 -1
  89. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_filter_export.py +41 -1
  90. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_flatfield.py +7 -5
  91. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_jupyter.py +15 -0
  92. qvideo-4.9.0/tests/test_qbacklogmonitor.py +150 -0
  93. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qcamera.py +6 -5
  94. qvideo-4.9.0/tests/test_qdvrwidget.py +1052 -0
  95. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qfilterrackwidget.py +184 -7
  96. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qgenicamcamera.py +46 -14
  97. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qgenicamtree.py +1 -1
  98. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qhdf5reader.py +12 -0
  99. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qhdf5writer.py +86 -2
  100. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qimxcamera.py +6 -5
  101. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qnoisecamera.py +4 -3
  102. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qopencvcamera.py +4 -3
  103. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qopencvwriter.py +82 -9
  104. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qpicamera.py +49 -3
  105. qvideo-4.9.0/tests/test_qpyavreader.py +150 -0
  106. qvideo-4.9.0/tests/test_qpyavwriter.py +167 -0
  107. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qvideoreader.py +4 -3
  108. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qvideoscreen.py +15 -2
  109. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qvideosource.py +53 -9
  110. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qvideowriter.py +7 -6
  111. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_roidemo.py +39 -13
  112. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_samplehold.py +2 -1
  113. qvideo-4.9.0/tests/test_teardown.py +131 -0
  114. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_trackpy_overlay.py +38 -12
  115. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_yolo_overlay.py +41 -15
  116. qvideo-4.7.1/dvr/QCircularBuffer.py +0 -200
  117. qvideo-4.7.1/dvr/QDVRWidget.py +0 -569
  118. qvideo-4.7.1/dvr/icons_rc.py +0 -1087
  119. qvideo-4.7.1/tests/test_circulardvrwidget.py +0 -150
  120. qvideo-4.7.1/tests/test_icons_rc.py +0 -24
  121. qvideo-4.7.1/tests/test_qdvrwidget.py +0 -756
  122. {qvideo-4.7.1 → qvideo-4.9.0}/LICENSE.md +0 -0
  123. {qvideo-4.7.1 → qvideo-4.9.0}/QCamcorder.py +0 -0
  124. {qvideo-4.7.1 → qvideo-4.9.0}/QVideo.egg-info/dependency_links.txt +0 -0
  125. {qvideo-4.7.1 → qvideo-4.9.0}/QVideo.egg-info/top_level.txt +0 -0
  126. {qvideo-4.7.1 → qvideo-4.9.0}/__main__.py +0 -0
  127. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/Basler/__init__.py +0 -0
  128. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/Flir/__init__.py +0 -0
  129. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/Genicam/__init__.py +0 -0
  130. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/IDS/__init__.py +0 -0
  131. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/MV/__init__.py +0 -0
  132. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/Noise/__init__.py +0 -0
  133. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/OpenCV/__init__.py +0 -0
  134. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/OpenCV/_devices.py +0 -0
  135. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/Vimbax/__init__.py +0 -0
  136. {qvideo-4.7.1 → qvideo-4.9.0}/cameras/__init__.py +0 -0
  137. {qvideo-4.7.1 → qvideo-4.9.0}/demos/circulardemo.py +0 -0
  138. {qvideo-4.7.1 → qvideo-4.9.0}/demos/combineddemo.py +0 -0
  139. {qvideo-4.7.1 → qvideo-4.9.0}/demos/compositedemo.py +0 -0
  140. {qvideo-4.7.1 → qvideo-4.9.0}/demos/demo.py +0 -0
  141. {qvideo-4.7.1 → qvideo-4.9.0}/demos/filterdemo.py +0 -0
  142. {qvideo-4.7.1 → qvideo-4.9.0}/demos/filterrackdemo.py +0 -0
  143. {qvideo-4.7.1 → qvideo-4.9.0}/demos/histogramdemo.py +0 -0
  144. {qvideo-4.7.1 → qvideo-4.9.0}/demos/trackpydemo.py +0 -0
  145. {qvideo-4.7.1 → qvideo-4.9.0}/demos/uniformitydemo.py +0 -0
  146. {qvideo-4.7.1 → qvideo-4.9.0}/demos/yolodemo.py +0 -0
  147. {qvideo-4.7.1 → qvideo-4.9.0}/dvr/QOpenCVReader.py +0 -0
  148. {qvideo-4.7.1 → qvideo-4.9.0}/filters/__init__.py +0 -0
  149. {qvideo-4.7.1 → qvideo-4.9.0}/filters/blob.py +0 -0
  150. {qvideo-4.7.1 → qvideo-4.9.0}/filters/normalize.py +0 -0
  151. {qvideo-4.7.1 → qvideo-4.9.0}/filters/samplehold.py +0 -0
  152. {qvideo-4.7.1 → qvideo-4.9.0}/lib/QCameraTree.py +0 -0
  153. {qvideo-4.7.1 → qvideo-4.9.0}/lib/QFilterRack.py +0 -0
  154. {qvideo-4.7.1 → qvideo-4.9.0}/lib/QHistogramWidget.py +0 -0
  155. {qvideo-4.7.1 → qvideo-4.9.0}/lib/QListCameras.py +0 -0
  156. {qvideo-4.7.1 → qvideo-4.9.0}/lib/__init__.py +0 -0
  157. {qvideo-4.7.1 → qvideo-4.9.0}/lib/_qabc.py +0 -0
  158. {qvideo-4.7.1 → qvideo-4.9.0}/lib/errors.py +0 -0
  159. {qvideo-4.7.1 → qvideo-4.9.0}/lib/imageops.py +0 -0
  160. {qvideo-4.7.1 → qvideo-4.9.0}/lib/videotypes.py +0 -0
  161. {qvideo-4.7.1 → qvideo-4.9.0}/overlays/__init__.py +0 -0
  162. {qvideo-4.7.1 → qvideo-4.9.0}/setup.cfg +0 -0
  163. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_artistic.py +0 -0
  164. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_blob.py +0 -0
  165. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_chooser.py +0 -0
  166. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_circletransform.py +0 -0
  167. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_circulardemo.py +0 -0
  168. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_clickable.py +0 -0
  169. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_combineddemo.py +0 -0
  170. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_compositedemo.py +0 -0
  171. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_demo.py +0 -0
  172. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_demo_recipes.py +0 -0
  173. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_docs_quickstart.py +0 -0
  174. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_dog.py +0 -0
  175. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_edge.py +0 -0
  176. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_exposure.py +0 -0
  177. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_filterdemo.py +0 -0
  178. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_filterrackdemo.py +0 -0
  179. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_filters_gray.py +0 -0
  180. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_foreground.py +0 -0
  181. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_gamma.py +0 -0
  182. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_gentl.py +0 -0
  183. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_histogramdemo.py +0 -0
  184. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_histogramwidget.py +0 -0
  185. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_imageops.py +0 -0
  186. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_invert.py +0 -0
  187. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_laplacian.py +0 -0
  188. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_launch.py +0 -0
  189. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_mainwindow.py +0 -0
  190. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_median.py +0 -0
  191. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_momean.py +0 -0
  192. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_momedian.py +0 -0
  193. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_normalize.py +0 -0
  194. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_overlays_package.py +0 -0
  195. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qabc.py +0 -0
  196. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qbaslercamera.py +0 -0
  197. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qcamcorder.py +0 -0
  198. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qcameratree.py +0 -0
  199. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qfilterpipeline.py +0 -0
  200. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qfilterrack.py +0 -0
  201. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qflircamera.py +0 -0
  202. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qframerelay.py +0 -0
  203. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qidscamera.py +0 -0
  204. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qlistcameras.py +0 -0
  205. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qlistcvcameras.py +0 -0
  206. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qlistflircameras.py +0 -0
  207. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qmvcamera.py +0 -0
  208. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qnoisetree.py +0 -0
  209. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qopencvdevices.py +0 -0
  210. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qopencvreader.py +0 -0
  211. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qopencvtree.py +0 -0
  212. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qpicameratree.py +0 -0
  213. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qsnapshot.py +0 -0
  214. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qt_binding.py +0 -0
  215. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_qvimbaxcamera.py +0 -0
  216. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_resolutions.py +0 -0
  217. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_rgb.py +0 -0
  218. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_roi.py +0 -0
  219. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_smoothing.py +0 -0
  220. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_sobel.py +0 -0
  221. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_threshold.py +0 -0
  222. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_trackpydemo.py +0 -0
  223. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_uniformitydemo.py +0 -0
  224. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_uniformitywidget.py +0 -0
  225. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_unsharp.py +0 -0
  226. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_vendor_trees.py +0 -0
  227. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_videofilter.py +0 -0
  228. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_videotypes.py +0 -0
  229. {qvideo-4.7.1 → qvideo-4.9.0}/tests/test_yolodemo.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: QVideo
3
- Version: 4.7.1
3
+ Version: 4.9.0
4
4
  Summary: PyQt-based framework for integrating video cameras into research applications
5
5
  Author-email: "David G. Grier" <david.grier@nyu.edu>
6
6
  License: GPL-3.0-or-later
@@ -36,8 +36,13 @@ Provides-Extra: pyside6
36
36
  Requires-Dist: PySide6>=6.7; extra == "pyside6"
37
37
  Provides-Extra: jupyter
38
38
  Requires-Dist: ipywidgets; extra == "jupyter"
39
+ Provides-Extra: opencv
40
+ Requires-Dist: cv2-enumerate-cameras; extra == "opencv"
39
41
  Provides-Extra: dvr
40
42
  Requires-Dist: h5py; extra == "dvr"
43
+ Requires-Dist: hdf5plugin; extra == "dvr"
44
+ Provides-Extra: av
45
+ Requires-Dist: av; extra == "av"
41
46
  Provides-Extra: circletransform
42
47
  Requires-Dist: scipy; extra == "circletransform"
43
48
  Provides-Extra: trackpy
@@ -54,7 +59,7 @@ Requires-Dist: genicam; extra == "genicam"
54
59
  Provides-Extra: picamera
55
60
  Requires-Dist: picamera2; extra == "picamera"
56
61
  Provides-Extra: test
57
- Requires-Dist: QVideo[circletransform,dvr,jupyter,trackpy]; extra == "test"
62
+ Requires-Dist: QVideo[av,circletransform,dvr,jupyter,trackpy]; extra == "test"
58
63
  Requires-Dist: pytest; extra == "test"
59
64
  Requires-Dist: pytest-cov; extra == "test"
60
65
  Provides-Extra: dev-pyqt5
@@ -135,8 +140,10 @@ pip install "QVideo[pyqt5]" # PyQt5
135
140
  pip install QVideo # use a binding that is already installed
136
141
  ```
137
142
 
138
- PySide6 is experimental (`pip install "QVideo[pyside6]"`): it runs in
139
- continuous integration, but not all of QVideo's tests have been adapted to it.
143
+ PySide6 is experimental (`pip install "QVideo[pyside6]"`): the whole test
144
+ suite passes under it in continuous integration, but the interpreter
145
+ occasionally crashes while pyqtgraph builds a plot, so it is not yet
146
+ recommended.
140
147
 
141
148
  ### Raspberry Pi
142
149
 
@@ -159,6 +166,9 @@ Replace `python3-pyqt6` with `python3-pyqt5` if you prefer PyQt5.
159
166
  |---------|-------|-------|
160
167
  | GenICam cameras (Vimba, etc.) | `pip install QVideo[genicam]` | Requires a vendor-supplied `.cti` producer file |
161
168
  | Raspberry Pi camera | `pip install QVideo[picamera]` | Requires `picamera2` |
169
+ | Camera names for USB cameras | `pip install QVideo[opencv]` | Uses `cv2-enumerate-cameras`; without it the cameras are listed as "Camera 0" and so on |
170
+ | HDF5 recording (compressed without loss) | `pip install QVideo[dvr]` | Requires `h5py` and `hdf5plugin` |
171
+ | Faster lossless AVI/MKV, 16-bit gray | `pip install QVideo[av]` | Uses PyAV instead of OpenCV when installed |
162
172
 
163
173
  ## Quick start
164
174
 
@@ -203,6 +213,7 @@ Verified on real hardware (the unit tests mock all hardware):
203
213
  |---------|-------|--------|-----------------|---------|
204
214
  | OpenCV | 14 – 26 | 24.04 | tested | not tested |
205
215
  | FLIR (GenICam) | 14 – 26 | 24.04 | — | not tested |
216
+ | Raspberry Pi camera | — | — | tested (Pi 5) | — |
206
217
 
207
218
  On macOS 26.7.1 (Tahoe), the OpenCV backend was tested with OpenCV
208
219
  5.0.0_11 and the FLIR backend with Spinnaker SDK 4.4.0.246. Other combinations are expected to work but have not been
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: QVideo
3
- Version: 4.7.1
3
+ Version: 4.9.0
4
4
  Summary: PyQt-based framework for integrating video cameras into research applications
5
5
  Author-email: "David G. Grier" <david.grier@nyu.edu>
6
6
  License: GPL-3.0-or-later
@@ -36,8 +36,13 @@ Provides-Extra: pyside6
36
36
  Requires-Dist: PySide6>=6.7; extra == "pyside6"
37
37
  Provides-Extra: jupyter
38
38
  Requires-Dist: ipywidgets; extra == "jupyter"
39
+ Provides-Extra: opencv
40
+ Requires-Dist: cv2-enumerate-cameras; extra == "opencv"
39
41
  Provides-Extra: dvr
40
42
  Requires-Dist: h5py; extra == "dvr"
43
+ Requires-Dist: hdf5plugin; extra == "dvr"
44
+ Provides-Extra: av
45
+ Requires-Dist: av; extra == "av"
41
46
  Provides-Extra: circletransform
42
47
  Requires-Dist: scipy; extra == "circletransform"
43
48
  Provides-Extra: trackpy
@@ -54,7 +59,7 @@ Requires-Dist: genicam; extra == "genicam"
54
59
  Provides-Extra: picamera
55
60
  Requires-Dist: picamera2; extra == "picamera"
56
61
  Provides-Extra: test
57
- Requires-Dist: QVideo[circletransform,dvr,jupyter,trackpy]; extra == "test"
62
+ Requires-Dist: QVideo[av,circletransform,dvr,jupyter,trackpy]; extra == "test"
58
63
  Requires-Dist: pytest; extra == "test"
59
64
  Requires-Dist: pytest-cov; extra == "test"
60
65
  Provides-Extra: dev-pyqt5
@@ -135,8 +140,10 @@ pip install "QVideo[pyqt5]" # PyQt5
135
140
  pip install QVideo # use a binding that is already installed
136
141
  ```
137
142
 
138
- PySide6 is experimental (`pip install "QVideo[pyside6]"`): it runs in
139
- continuous integration, but not all of QVideo's tests have been adapted to it.
143
+ PySide6 is experimental (`pip install "QVideo[pyside6]"`): the whole test
144
+ suite passes under it in continuous integration, but the interpreter
145
+ occasionally crashes while pyqtgraph builds a plot, so it is not yet
146
+ recommended.
140
147
 
141
148
  ### Raspberry Pi
142
149
 
@@ -159,6 +166,9 @@ Replace `python3-pyqt6` with `python3-pyqt5` if you prefer PyQt5.
159
166
  |---------|-------|-------|
160
167
  | GenICam cameras (Vimba, etc.) | `pip install QVideo[genicam]` | Requires a vendor-supplied `.cti` producer file |
161
168
  | Raspberry Pi camera | `pip install QVideo[picamera]` | Requires `picamera2` |
169
+ | Camera names for USB cameras | `pip install QVideo[opencv]` | Uses `cv2-enumerate-cameras`; without it the cameras are listed as "Camera 0" and so on |
170
+ | HDF5 recording (compressed without loss) | `pip install QVideo[dvr]` | Requires `h5py` and `hdf5plugin` |
171
+ | Faster lossless AVI/MKV, 16-bit gray | `pip install QVideo[av]` | Uses PyAV instead of OpenCV when installed |
162
172
 
163
173
  ## Quick start
164
174
 
@@ -203,6 +213,7 @@ Verified on real hardware (the unit tests mock all hardware):
203
213
  |---------|-------|--------|-----------------|---------|
204
214
  | OpenCV | 14 – 26 | 24.04 | tested | not tested |
205
215
  | FLIR (GenICam) | 14 – 26 | 24.04 | — | not tested |
216
+ | Raspberry Pi camera | — | — | tested (Pi 5) | — |
206
217
 
207
218
  On macOS 26.7.1 (Tahoe), the OpenCV backend was tested with OpenCV
208
219
  5.0.0_11 and the FLIR backend with Spinnaker SDK 4.4.0.246. Other combinations are expected to work but have not been
@@ -56,6 +56,7 @@ demos/histogramdemo.py
56
56
  demos/trackpydemo.py
57
57
  demos/uniformitydemo.py
58
58
  demos/yolodemo.py
59
+ dvr/QBacklogMonitor.py
59
60
  dvr/QCircularBuffer.py
60
61
  dvr/QCircularDVRWidget.py
61
62
  dvr/QDVRWidget.py
@@ -63,8 +64,10 @@ dvr/QHDF5Reader.py
63
64
  dvr/QHDF5Writer.py
64
65
  dvr/QOpenCVReader.py
65
66
  dvr/QOpenCVWriter.py
67
+ dvr/QPyAVReader.py
68
+ dvr/QPyAVWriter.py
66
69
  dvr/__init__.py
67
- dvr/icons_rc.py
70
+ dvr/icons/record.svg
68
71
  filters/_MedianBase.py
69
72
  filters/__init__.py
70
73
  filters/artistic.py
@@ -149,7 +152,6 @@ tests/test_gamma.py
149
152
  tests/test_gentl.py
150
153
  tests/test_histogramdemo.py
151
154
  tests/test_histogramwidget.py
152
- tests/test_icons_rc.py
153
155
  tests/test_imageops.py
154
156
  tests/test_invert.py
155
157
  tests/test_jupyter.py
@@ -162,6 +164,7 @@ tests/test_momedian.py
162
164
  tests/test_normalize.py
163
165
  tests/test_overlays_package.py
164
166
  tests/test_qabc.py
167
+ tests/test_qbacklogmonitor.py
165
168
  tests/test_qbaslercamera.py
166
169
  tests/test_qcamcorder.py
167
170
  tests/test_qcamera.py
@@ -191,6 +194,8 @@ tests/test_qopencvtree.py
191
194
  tests/test_qopencvwriter.py
192
195
  tests/test_qpicamera.py
193
196
  tests/test_qpicameratree.py
197
+ tests/test_qpyavreader.py
198
+ tests/test_qpyavwriter.py
194
199
  tests/test_qsnapshot.py
195
200
  tests/test_qt_binding.py
196
201
  tests/test_qvideoreader.py
@@ -205,6 +210,7 @@ tests/test_roidemo.py
205
210
  tests/test_samplehold.py
206
211
  tests/test_smoothing.py
207
212
  tests/test_sobel.py
213
+ tests/test_teardown.py
208
214
  tests/test_threshold.py
209
215
  tests/test_trackpy_overlay.py
210
216
  tests/test_trackpydemo.py
@@ -4,6 +4,9 @@ qtpy
4
4
  pyqtgraph
5
5
  psutil
6
6
 
7
+ [av]
8
+ av
9
+
7
10
  [circletransform]
8
11
  scipy
9
12
 
@@ -33,6 +36,7 @@ PyQt5
33
36
 
34
37
  [dvr]
35
38
  h5py
39
+ hdf5plugin
36
40
 
37
41
  [genicam]
38
42
  harvesters
@@ -41,6 +45,9 @@ genicam
41
45
  [jupyter]
42
46
  ipywidgets
43
47
 
48
+ [opencv]
49
+ cv2-enumerate-cameras
50
+
44
51
  [overlays]
45
52
  QVideo[trackpy,yolo]
46
53
 
@@ -58,7 +65,7 @@ PyQt6
58
65
  PySide6>=6.7
59
66
 
60
67
  [test]
61
- QVideo[circletransform,dvr,jupyter,trackpy]
68
+ QVideo[av,circletransform,dvr,jupyter,trackpy]
62
69
  pytest
63
70
  pytest-cov
64
71
 
@@ -55,8 +55,10 @@ pip install "QVideo[pyqt5]" # PyQt5
55
55
  pip install QVideo # use a binding that is already installed
56
56
  ```
57
57
 
58
- PySide6 is experimental (`pip install "QVideo[pyside6]"`): it runs in
59
- continuous integration, but not all of QVideo's tests have been adapted to it.
58
+ PySide6 is experimental (`pip install "QVideo[pyside6]"`): the whole test
59
+ suite passes under it in continuous integration, but the interpreter
60
+ occasionally crashes while pyqtgraph builds a plot, so it is not yet
61
+ recommended.
60
62
 
61
63
  ### Raspberry Pi
62
64
 
@@ -79,6 +81,9 @@ Replace `python3-pyqt6` with `python3-pyqt5` if you prefer PyQt5.
79
81
  |---------|-------|-------|
80
82
  | GenICam cameras (Vimba, etc.) | `pip install QVideo[genicam]` | Requires a vendor-supplied `.cti` producer file |
81
83
  | Raspberry Pi camera | `pip install QVideo[picamera]` | Requires `picamera2` |
84
+ | Camera names for USB cameras | `pip install QVideo[opencv]` | Uses `cv2-enumerate-cameras`; without it the cameras are listed as "Camera 0" and so on |
85
+ | HDF5 recording (compressed without loss) | `pip install QVideo[dvr]` | Requires `h5py` and `hdf5plugin` |
86
+ | Faster lossless AVI/MKV, 16-bit gray | `pip install QVideo[av]` | Uses PyAV instead of OpenCV when installed |
82
87
 
83
88
  ## Quick start
84
89
 
@@ -123,6 +128,7 @@ Verified on real hardware (the unit tests mock all hardware):
123
128
  |---------|-------|--------|-----------------|---------|
124
129
  | OpenCV | 14 – 26 | 24.04 | tested | not tested |
125
130
  | FLIR (GenICam) | 14 – 26 | 24.04 | — | not tested |
131
+ | Raspberry Pi camera | — | — | tested (Pi 5) | — |
126
132
 
127
133
  On macOS 26.7.1 (Tahoe), the OpenCV backend was tested with OpenCV
128
134
  5.0.0_11 and the FLIR backend with Spinnaker SDK 4.4.0.246. Other combinations are expected to work but have not been
@@ -10,7 +10,7 @@ from QVideo.lib._camera import Camera
10
10
 
11
11
  try:
12
12
  __version__ = version('QVideo')
13
- except PackageNotFoundError: # package not installed (e.g. bare source checkout)
13
+ except PackageNotFoundError: # not installed (e.g. bare source checkout)
14
14
  __version__ = 'unknown'
15
15
 
16
16
  __all__ = ['Camera', '__version__']
@@ -1,3 +1,4 @@
1
+ '''Basler camera and threaded video source (pylon GenTL producer).'''
1
2
  from QVideo.cameras.Genicam import QGenicamCamera, QGenicamSource
2
3
 
3
4
 
@@ -1,3 +1,4 @@
1
+ '''Camera property tree for Basler cameras.'''
1
2
  from QVideo.cameras.Genicam import QGenicamTree
2
3
  from QVideo.cameras.Basler import QBaslerCamera
3
4
  from QVideo.lib.QCameraTree import Source
@@ -1,3 +1,4 @@
1
+ '''Combo box that lists the FLIR cameras that are connected.'''
1
2
  import logging
2
3
  from QVideo.lib import QListCameras, QCameraError
3
4
  from harvesters.core import Harvester
@@ -1,3 +1,4 @@
1
+ '''FLIR camera and threaded video source (Spinnaker GenTL producer).'''
1
2
  from QVideo.cameras.Genicam import QGenicamCamera, QGenicamSource
2
3
 
3
4
 
@@ -34,7 +35,8 @@ class QFlirCamera(QGenicamCamera):
34
35
  _producer_filenames = ('Spinnaker_GenTL.cti',)
35
36
  _producerHint = ('Install the Spinnaker SDK and set GENICAM_GENTL64_PATH '
36
37
  'to the directory containing Spinnaker_GenTL.cti '
37
- '(on Linux, typically /opt/spinnaker/lib/spinnaker-gentl).')
38
+ '(on Linux, typically '
39
+ '/opt/spinnaker/lib/spinnaker-gentl).')
38
40
 
39
41
 
40
42
  class QFlirSource(QGenicamSource):
@@ -1,3 +1,4 @@
1
+ '''Camera property tree for FLIR cameras.'''
1
2
  from QVideo.cameras.Genicam import QGenicamTree
2
3
  from QVideo.cameras.Flir import QFlirCamera
3
4
  from QVideo.lib.QCameraTree import Source
@@ -1,4 +1,6 @@
1
+ '''GenICam cameras and sources, driven through Harvesters.'''
1
2
  from collections.abc import Callable
3
+ from contextlib import suppress
2
4
  from typing import TYPE_CHECKING
3
5
  from QVideo.lib import QCamera, QVideoSource
4
6
  from QVideo.lib import gentl
@@ -70,7 +72,13 @@ class QGenicamCamera(QCamera):
70
72
  producer: str | Path | None = None
71
73
  _producer_filenames: tuple[str, ...] = ()
72
74
  _producerHint: str = ''
73
- _ALIASES = frozenset(('width', 'height', 'fps'))
75
+ #: SFNC nodes behind the lowercase names that every camera shares, in
76
+ #: order of preference.
77
+ _ALIAS_NODES = {'width': ('Width',),
78
+ 'height': ('Height',),
79
+ 'fps': ('AcquisitionFrameRate',
80
+ 'AcquisitionFrameRateAbs')}
81
+ _ALIASES = frozenset(_ALIAS_NODES)
74
82
 
75
83
  #: Nodes that report the frame rate that the camera delivers, in order
76
84
  #: of preference: the standard name, then names of older firmware.
@@ -95,7 +103,18 @@ class QGenicamCamera(QCamera):
95
103
  bool
96
104
  ``True`` if a valid camera device was opened successfully.
97
105
  '''
98
- producer = self._locateProducer()
106
+ self._openDevice(self._locateProducer())
107
+ self._connectNodeMap()
108
+ root = self.node()
109
+ self._protected = self._startAcquisition(root)
110
+ self._register_features(root)
111
+ with suppress(Exception):
112
+ self._modelName = str(self._nodeMap.DeviceModelName.value)
113
+ self._registerAliases()
114
+ return True
115
+
116
+ def _openDevice(self, producer: str) -> None:
117
+ '''Load the GenTL *producer* and open the camera that it finds.'''
99
118
  self._harvester = Harvester()
100
119
  self._device = None
101
120
  try:
@@ -117,33 +136,40 @@ class QGenicamCamera(QCamera):
117
136
  f'): {ex}\n'
118
137
  'Check that the camera is connected and powered, and that '
119
138
  'you have permission to access it.') from ex
139
+
140
+ def _connectNodeMap(self) -> None:
141
+ '''Take the node map from the device, loading it by hand if
142
+ harvesters did not connect it.'''
120
143
  self._nodeMap = self._device.remote_device.node_map
121
- if not self._isConnected(self._nodeMap):
122
- logger.warning('harvesters node map unconnected; '
123
- 'loading manually from device port')
124
- self._nodeMap = self._load_node_map(self._device)
125
- if self._nodeMap is None:
126
- self._cleanup()
127
- raise QDeviceError(
128
- f'{type(self).__name__}: cannot read the GenICam '
129
- 'node map from the camera')
130
- root = self.node()
131
- ma = self._scan_modes(root)
144
+ if self._isConnected(self._nodeMap):
145
+ return
146
+ logger.debug('harvesters node map unconnected; '
147
+ 'loading manually from device port')
148
+ self._nodeMap = self._load_node_map(self._device)
149
+ if self._nodeMap is None:
150
+ self._cleanup()
151
+ raise QDeviceError(
152
+ f'{type(self).__name__}: cannot read the GenICam '
153
+ 'node map from the camera')
154
+
155
+ def _startAcquisition(self, root: IValue) -> set[str]:
156
+ '''Start acquisition and return the features that it makes read-only.
157
+
158
+ These are the features whose access mode differs before and after
159
+ the start, so that writing them requires stopping acquisition.
160
+ '''
161
+ before = self._scan_modes(root)
132
162
  self._device.start()
133
- mb = self._scan_modes(root)
134
- self._protected = {k for k, v in ma.items()
135
- if k in mb and mb[k] != v}
136
- self._register_features(root)
137
- try:
138
- self._modelName = str(self._nodeMap.DeviceModelName.value)
139
- except Exception:
140
- pass
141
- for src, dst in (('Width', 'width'), ('Height', 'height'),
142
- ('AcquisitionFrameRate', 'fps'),
143
- ('AcquisitionFrameRateAbs', 'fps')):
144
- if src in self._properties and dst not in self._properties:
145
- self._properties[dst] = self._properties[src]
146
- return True
163
+ after = self._scan_modes(root)
164
+ return {name for name, mode in before.items()
165
+ if name in after and after[name] != mode}
166
+
167
+ def _registerAliases(self) -> None:
168
+ '''Register the lowercase names for the standard nodes that exist.'''
169
+ for alias, nodes in self._ALIAS_NODES.items():
170
+ for node in nodes:
171
+ if node in self._properties and alias not in self._properties:
172
+ self._properties[alias] = self._properties[node]
147
173
 
148
174
  @classmethod
149
175
  def _locateProducer(cls) -> str:
@@ -182,20 +208,14 @@ class QGenicamCamera(QCamera):
182
208
  original exception.
183
209
  '''
184
210
  if self._device is not None:
185
- try:
211
+ with suppress(Exception):
186
212
  self._device.stop()
187
- except Exception:
188
- pass
189
- try:
213
+ with suppress(Exception):
190
214
  self._device.destroy()
191
- except Exception:
192
- pass
193
215
  self._device = None
194
216
  if self._harvester is not None:
195
- try:
217
+ with suppress(Exception):
196
218
  self._harvester.reset()
197
- except Exception:
198
- pass
199
219
  self._nodeMap = None
200
220
 
201
221
  def _deinitialize(self) -> None:
@@ -459,11 +479,11 @@ class QGenicamCamera(QCamera):
459
479
  ptype=ptype,
460
480
  **meta)
461
481
 
462
- def has_node(self, name: str) -> bool:
482
+ def hasNode(self, name: str) -> bool:
463
483
  '''Return ``True`` if the named node exists in the node map.
464
484
 
465
485
  Unlike :meth:`node`, this never logs a warning for missing names.
466
- Use it to guard calls to :meth:`node` or :meth:`is_readwrite` in
486
+ Use it to guard calls to :meth:`node` or :meth:`isReadWrite` in
467
487
  reactive code paths (e.g. UI update loops) where absent names are
468
488
  expected and not an error.
469
489
 
@@ -499,7 +519,7 @@ class QGenicamCamera(QCamera):
499
519
  logger.warning(f'node {name} is unknown')
500
520
  return None
501
521
 
502
- def is_readwrite(self, feature: str) -> bool:
522
+ def isReadWrite(self, feature: str) -> bool:
503
523
  '''Return ``True`` if the named feature is currently writable.
504
524
 
505
525
  Parameters
@@ -530,7 +550,7 @@ class QGenicamCamera(QCamera):
530
550
  Parameters
531
551
  ----------
532
552
  name : str
533
- GenICam node name. It must exist (see :meth:`has_node`).
553
+ GenICam node name. It must exist (see :meth:`hasNode`).
534
554
 
535
555
  Returns
536
556
  -------
@@ -543,22 +563,17 @@ class QGenicamCamera(QCamera):
543
563
  '''
544
564
  node = self.node(name)
545
565
  with self._mutex:
546
- access = node.node.get_access_mode()
547
- state = {'access': access, 'kind': 'other'}
548
- if isinstance(node, IInteger):
549
- state.update(kind='int', min=node.min, max=node.max,
550
- inc=node.inc)
551
- elif isinstance(node, IFloat):
552
- state.update(kind='float', min=node.min, max=node.max,
553
- inc=node.inc if node.has_inc() else None)
554
- elif isinstance(node, IEnumeration):
555
- state.update(kind='enum',
556
- entries=[v.symbolic for v in node.entries])
557
- if access in (EAccessMode.RO, EAccessMode.RW):
558
- if isinstance(node, IEnumeration):
559
- state['value'] = node.to_string()
560
- elif isinstance(node, IProperty):
561
- state['value'] = node.value
566
+ state = {'access': node.node.get_access_mode(), 'kind': 'other'}
567
+ ptype, meta = self._feature_spec(node)
568
+ if 'limits' in meta:
569
+ state.update(kind='enum', entries=meta['limits'])
570
+ elif ptype in (int, float):
571
+ state.update(kind=ptype.__name__, min=meta['minimum'],
572
+ max=meta['maximum'], inc=meta.get('step'))
573
+ if isinstance(node, IProperty):
574
+ value = self._make_getter(node)()
575
+ if value is not None:
576
+ state['value'] = value
562
577
  return state
563
578
 
564
579
 
@@ -1,3 +1,4 @@
1
+ '''Camera property tree for GenICam cameras.'''
1
2
  from typing import Any
2
3
  import math
3
4
  from qtpy import QtCore
@@ -118,36 +119,41 @@ class QGenicamTree(QCameraTree):
118
119
  this['step'] = feature.inc
119
120
  elif isinstance(feature, IFloat):
120
121
  this['type'] = 'float'
121
- unit = feature.unit
122
- if unit in _MICROSECOND_UNITS:
123
- scale = 1e-6
124
- self._scaleFactors[feature.node.name] = scale
125
- this['siPrefix'] = True
126
- unit = 's'
127
- else:
128
- scale = 1.0
129
- this['value'] = this['default'] = feature.value * scale
130
- lo = feature.min * scale
131
- hi = feature.max * scale
132
- this['min'] = lo
133
- this['max'] = hi
134
- this['units'] = unit
135
- if feature.has_inc():
136
- this['step'] = feature.inc * scale
137
- if lo > 0 and hi / lo > 100:
138
- self._decParams.add(feature.node.name)
139
- v = feature.value * scale
140
- if v > 0:
141
- this['step'] = 10 ** (math.floor(math.log10(v)) - 1)
122
+ self._describeFloat(feature, this)
142
123
  elif isinstance(feature, IString):
143
124
  this['type'] = 'str'
144
125
  this['value'] = this['default'] = feature.value
145
126
  else:
146
- # FIXME: Support for IRegister nodes
127
+ # Register nodes (IRegister) give raw access to bytes of the
128
+ # camera's memory; there is nothing to show in a control tree.
147
129
  logger.debug(
148
130
  f'Unsupported node type: {feature.node.name}: {type(feature)}')
149
131
  return this
150
132
 
133
+ def _describeFloat(self, feature: IFloat, this: dict[str, Any]) -> None:
134
+ '''Add the value, limits, units and step of a float *feature*.'''
135
+ unit = feature.unit
136
+ if unit in _MICROSECOND_UNITS:
137
+ scale = 1e-6
138
+ self._scaleFactors[feature.node.name] = scale
139
+ this['siPrefix'] = True
140
+ unit = 's'
141
+ else:
142
+ scale = 1.0
143
+ this['value'] = this['default'] = feature.value * scale
144
+ lo = feature.min * scale
145
+ hi = feature.max * scale
146
+ this['min'] = lo
147
+ this['max'] = hi
148
+ this['units'] = unit
149
+ if feature.has_inc():
150
+ this['step'] = feature.inc * scale
151
+ if lo > 0 and hi / lo > 100:
152
+ self._decParams.add(feature.node.name)
153
+ v = feature.value * scale
154
+ if v > 0:
155
+ this['step'] = 10 ** (math.floor(math.log10(v)) - 1)
156
+
151
157
  def _connectSignals(self) -> None:
152
158
  super()._connectSignals()
153
159
  for item in self.listAllItems():
@@ -226,8 +232,8 @@ class QGenicamTree(QCameraTree):
226
232
  p = item.param
227
233
  if p.opts.get('visible', False):
228
234
  name = p.opts['name']
229
- if self.camera.has_node(name):
230
- p.setOpts(enabled=self.camera.is_readwrite(name))
235
+ if self.camera.hasNode(name):
236
+ p.setOpts(enabled=self.camera.isReadWrite(name))
231
237
 
232
238
  def _updateLimits(self) -> None:
233
239
  '''Refresh Parameter constraints from the live GenICam node values.
@@ -241,7 +247,7 @@ class QGenicamTree(QCameraTree):
241
247
  if not p.opts.get('visible', False):
242
248
  continue
243
249
  name = p.opts.get('name')
244
- if not self.camera.has_node(name):
250
+ if not self.camera.hasNode(name):
245
251
  continue
246
252
  state = self.camera.state(name)
247
253
  kind, inc = state['kind'], state.get('inc')
@@ -284,7 +290,7 @@ class QGenicamTree(QCameraTree):
284
290
  if not p.opts.get('visible', False):
285
291
  continue
286
292
  name = p.opts.get('name')
287
- if not self.camera.has_node(name):
293
+ if not self.camera.hasNode(name):
288
294
  continue
289
295
  state = self.camera.state(name)
290
296
  if state['access'] != EAccessMode.RO:
@@ -328,7 +334,7 @@ class QGenicamTree(QCameraTree):
328
334
  if not p.opts.get('visible', False):
329
335
  continue
330
336
  name = p.opts.get('name')
331
- if not self.camera.has_node(name):
337
+ if not self.camera.hasNode(name):
332
338
  continue
333
339
  state = self.camera.state(name)
334
340
  if state['access'] not in (EAccessMode.RO, EAccessMode.RW):
@@ -1,3 +1,4 @@
1
+ '''IDS Imaging camera and threaded video source (IDS peak producer).'''
1
2
  from QVideo.cameras.Genicam import QGenicamCamera, QGenicamSource
2
3
 
3
4
 
@@ -1,3 +1,4 @@
1
+ '''Camera property tree for IDS Imaging cameras.'''
1
2
  from QVideo.cameras.Genicam import QGenicamTree
2
3
  from QVideo.cameras.IDS import QIDSCamera
3
4
  from QVideo.lib.QCameraTree import Source
@@ -1,3 +1,4 @@
1
+ '''MATRIX VISION camera and threaded video source (mvGenTLProducer).'''
1
2
  from QVideo.cameras.Genicam import QGenicamCamera, QGenicamSource
2
3
 
3
4
 
@@ -1,3 +1,4 @@
1
+ '''Camera property tree for MATRIX VISION (mvGenTLProducer) cameras.'''
1
2
  from QVideo.cameras.Genicam import QGenicamTree
2
3
  from QVideo.cameras.MV import QMVCamera
3
4
  from QVideo.lib.QCameraTree import Source
@@ -1,3 +1,4 @@
1
+ '''Synthetic noise camera and threaded video source (no hardware).'''
1
2
  from QVideo.lib import QCamera, QVideoSource
2
3
  import numpy as np
3
4
  import time
@@ -1,3 +1,4 @@
1
+ '''Camera tree for the synthetic noise camera.'''
1
2
  from QVideo.lib import QCameraTree
2
3
  from QVideo.cameras.Noise import QNoiseCamera, QNoiseSource
3
4
 
@@ -1,3 +1,4 @@
1
+ '''Combo box that lists the cameras that OpenCV can open.'''
1
2
  import warnings
2
3
  import cv2
3
4
  from QVideo.lib import QListCameras
@@ -1,3 +1,4 @@
1
+ '''OpenCV camera and threaded video source (USB and built-in).'''
1
2
  from QVideo.lib import QCamera, QVideoSource
2
3
  from QVideo.cameras.OpenCV._devices import (
3
4
  capture_backend, configure, probe_formats)
@@ -63,7 +64,7 @@ class QOpenCVCamera(QCamera):
63
64
  ``width`` and ``height`` are registered as writable properties.
64
65
  Changes are applied to the open device via OpenCV's V4L2 backend, which
65
66
  handles the required ``VIDIOC_STREAMOFF`` / ``VIDIOC_S_FMT`` /
66
- ``VIDIOC_STREAMON`` cycle internally. The camera mutex serialises these
67
+ ``VIDIOC_STREAMON`` cycle internally. The camera mutex serializes these
67
68
  writes against concurrent reads, so no source stop/restart is needed.
68
69
  :class:`~QVideo.cameras.OpenCV.QOpenCVTree.QOpenCVTree` exposes them as
69
70
  read-only display fields; the ``resolution`` enum in that tree changes
@@ -1,3 +1,4 @@
1
+ '''Camera control tree for OpenCV cameras.'''
1
2
  from QVideo.lib import QCameraTree
2
3
  from QVideo.cameras.OpenCV import QOpenCVCamera
3
4