-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slow FPS and no effect by transcode on Raspberry Pi #347
Comments
I took the liberty to test this with all the available
Here's the code that generated this table: import Pkg
using DataFrames
df = DataFrame(version = String[], min = Int[], median = Int[], max = Int[])
allowmissing!(df, [:min, :median, :max])
function available_versions(pkgname::AbstractString)
registry = only(filter(r -> r.name == "General", Pkg.Registry.reachable_registries()))
pkg = only(filter(pkg -> pkg.name == pkgname, collect(values(registry.pkgs))))
return keys(Pkg.Registry.registry_info(pkg).version_info)
end
for version in string.(available_versions("VideoIO"))
try
txt = read(`julia -e """
import Pkg
Pkg.activate(temp = true)
Pkg.add(name = \"VideoIO\", version = \"$version\")
using VideoIO, Statistics
cam = opencamera()
img = read(cam)
t = zeros(100)
for i in eachindex(t)
read!(cam, img)
t[i] = Base.time()
end
fps = round.(Int, 1 ./ diff(t))
filter!(<(50), fps)
m, M = extrema(fps)
μ = round(Int, median(fps))
print(m, \",\", μ, \",\", M)
"""`, String)
min, median, max = Base.parse.(Int, split(txt, ','))
push!(df, (; version, min, median, max))
catch ex
min = median = max = missing
push!(df, (; version, min, median, max))
end
end
sort!(df, :version) I should add that I tried the same thing on my own PC (not an RPI) and the result was that all the versions had a median of 10 FPS -- surprisingly low rates as well. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm measuring FPS of Raspberry Pi Camera Module 2 NoIR on a Raspberry Pi 4. Due to issue #346 I'm using
VideoIO.jl v0.9.5
. This isJulia v1.7.2
.I'm seeing surprisingly low FPS (~7 FPS) as well as no effect by setting
transcode = false
.Since the frame pipeline has a buffer which can return a buffered frame much faster than retrieving a new one from the CCD, it is necessary to either "flush" the buffer before timing (any ideas on how to do that?), or simply filter out the unrealistically high FPS (which is what I did here).
I think I managed to achieve this with:
The results are:
The text was updated successfully, but these errors were encountered: