samuelpowell / Spinnaker.jl

A Julia interface to the FLIR/PointGrey Spinnaker SDK
MIT License
15 stars 7 forks source link

add `isinitialized(cam)` and optional wait reinit for `reset!` #74

Closed IanButterworth closed 2 years ago

IanButterworth commented 3 years ago
julia> using Spinnaker

julia> camlist = CameraList()
CameraList with 1 enumerated devices:
ID  Serial No.  Description
0   xxx         FLIR Blackfly S BFS-U3-31S4M-BD

julia> cam = camlist[0]
FLIR Blackfly S BFS-U3-31S4M-BD (xxx)

julia> @time reset!(cam, wait_reinit = true)
  3.813247 seconds (219 allocations: 12.359 KiB)
FLIR Blackfly S BFS-U3-31S4M-BD (xxx)

julia> @time reset!(cam, wait_reinit = true)
  3.722899 seconds (219 allocations: 12.359 KiB)
FLIR Blackfly S BFS-U3-31S4M-BD (xxx)

julia> 
IanButterworth commented 2 years ago

@Octogonapus would you mind reviewing this. I can't formally request a review as you're not a collaborator here

IanButterworth commented 2 years ago
julia> using Spinnaker

julia> camlist = CameraList()
CameraList with 1 enumerated devices:
ID  Serial No.  Description
0   xxx         FLIR Blackfly S BFS-U3-31S4M-BD

julia> cam = camlist[0]
FLIR Blackfly S BFS-U3-31S4M-BD (xxx)

julia> @time reset!(cam, wait = true)
  3.818389 seconds (2.36 k allocations: 135.983 KiB, 0.20% compilation time)
FLIR Blackfly S BFS-U3-31S4M-BD (xxx)