Skip to content

CSI camera - snapshot issue #12

@thomas-ginestet

Description

@thomas-ginestet

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions