Skip to content
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

CSI camera - snapshot issue #12

Open
thomas-ginestet opened this issue Sep 24, 2021 · 0 comments
Open

CSI camera - snapshot issue #12

thomas-ginestet opened this issue Sep 24, 2021 · 0 comments

Comments

@thomas-ginestet
Copy link

thomas-ginestet commented Sep 24, 2021

Hello,

I have a project which is the following:
On a jeston Nano, I have a CSI camera. I want to take one picture every 5s from this cam , and then evaluate this picture in a tensorflow model.
The tensorflow part is working without problem if I use pictures on the disk.
The problem is to get one picture every 5 seconds.

I just create this simple piece of code:

cam=nano.Camera(flip=0, width=640, height=480, fps=30)

while True:	
	image = cam.read()
	cv2.imshow("image",image)
	cv2.waitKey(5000)

	if cv2.waitKey(1) & 0xFF == ord(' '):
		break
cap.release()
cv2.destroyAllWindows()

The problem is that, the delay between 2 pictures is really longer than 5s, it seems that the system is laging.
And when I'm sending the picture to the model, it seems that the evaluation is done correctly. Only the display in cv2.imshow seems to have a problem.
Any idea on this issue?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant