-
Notifications
You must be signed in to change notification settings - Fork 19
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
High resolution image capture problem #12
Comments
Hi Stephen,
I think you have discovered a subtle bug in the detect_motion method. It is probably not the PiVideoStream frame rate, but I mentioned it because it has affected my own testing in the past. Threaded updates are always a bit tricky. Changing the detector settings is something to experiment with. Start with the settings I suggested and move them up from there. I'd try that first. I think the easiest way to try to approach (2), the possible subtle bug in the detect_motion() method, is to rewrite its append logic so that it appends frames only when state changes from still state to motion state (and NOT from motion state to still state). That is, only append frames when motion is detected (and not when "still" is detected). My water meter project needed the still frames; but it is probably the cause of your duplicate frames. In fact, re-reading the detect_motion code after not having looked at it in quite a while, I think it should have been called "detect_state_change" instead of "detect_motion". It would be simpler and more reliable to send frames when motion is detected, and NOT send any frames when "still" is detected. It was a good idea to put timestamps on your images; the timestamps in the imagehub log and in the imagehub image file names are the times of receipt at the imagehub (which are NOT the times the images are taken). I apologize, but I don't have the bandwidth to debug / re-write the Thanks for the detailed bug report & good luck with any bug chasing. I'd appreciate any updates on what you find out and/or fix. |
Hey Jeff, https://github.com/sbkirby/imagenode/blob/master/imagenode/tools/imaging.py Adding the following to the detector/motion section of your YAML file will activate the timestamp.
|
I'm thinking out loud: If the following condition has been satisfied, STOP testing and just send
I'll try some code to implement this idea. |
Thanks...I took a look at your draw_time code. It looks really good. That would be a great pull request when you have time! And your idea on just sending send_count frames before resuming testing sound like a good one! |
Apparently there may be a problem, as you mentioned, with Possible getting repeated frames from VideoStream #213 - PyImageSearch/imutils#213 |
I set the |
The Thanks for testing the settings changes and ruling that out as a possible cause. |
Thanks for the info. I appreciate you researching this problem. |
Hey @jeffbass,
I've been experimenting with high resolution image capture, and noticed a problem that is prevalent during this mode. It appears as though
imagenode
is writing over the images, and sending the same image two or three times in a row. I added some code to print a timestamp on each image for troubleshooting, and expected to get an image with the same timestamp on each of the duplicate images. Well, I'm getting the same timestamp(s), but it appears as though several timestamps are superimposed on top of one another. Not what I expected. This same code works as expected on RPi Zero's with a resolution of (640,480) @ 30 fps. I've attached a couple of example of images.I'm using a YAML like the
bird_cam_rpi.yaml
with a RPi 4B, 2GB memory and RPi HQ 12M pixel camera.Thanks
Stephen
The text was updated successfully, but these errors were encountered: