Open evangstav opened 4 years ago
Of course you can grab faster ;-) GrabOne is the slowest way to grab images because you are setting up the full grab engine everytime. The projects readme shows the normal/faster way to grab.
But from what you describe your issue is somewhere else
As a first question where in your code is the 'wait for event'? Or do you refer with 'event' to a hardware trigger?
Thanks for the answer :) Using the normal way to grab from the readme I could grab on average 1.2 frames per second.
I am planning to run this on a jetson nano. What I want to do is wait for a signal on the gpIO and the grab some frames. What would a better approach ?
import time
camera = pylon.InstantCamera(pylon.TlFactory.GetInstance().CreateFirstDevice())
camera.Open()
# demonstrate some feature access
new_width = camera.Width.GetValue() - camera.Width.GetInc()
if new_width >= camera.Width.GetMin():
camera.Width.SetValue(new_width)
camera.StartGrabbing()
while camera.IsGrabbing():
tic = time.time()
grabResult = camera.RetrieveResult(3000, pylon.TimeoutHandling_ThrowException)
if grabResult.GrabSucceeded():
# Access the image data.
print(1 / (time.time() - tic))
print("SizeX: ", grabResult.Width)
print("SizeY: ", grabResult.Height)
# img = grabResult.Array
# print("Gray value of first pixel: ", img[0, 0])
grabResult.Release()
camera.Close() ```
I had problem with low FPS which I was able to resolve it. Attaching the issue reference for sample code. Hope this helps
I am using model acA2040-55um, with the pypylon SDK and I can't grab images with more than 1 FPS. Ideally I want to wait for an event and then grab an image, do some processing on it. If I set the timeout lower than 2000 miliseconds I get this timeout:
TimeoutException thrown (file 'instantcameraimpl.h', line 1389)
Is it possible to grab images faster??