The cameras are identical. I am using a very stripped down python script, to grab images from both cameras.
Now i have the weirdest problem: if i connect both cameras - everything is fine. If i swap cameras, same cameras, same ports - 1 camera will work like a pig - grabbing images very slow. If i swap back - they will work fine. It’s a coin toss and i’d like to understand why, because to me it doesn’t make sense. first screenshot is when it’s all working fine, second screenshot - when i swap the cameras.
Does anyone have any ideas? It’s driving me insane!
@katmai do you shutdown the device when you switch the cameras or do you just hotplug them. I would be interested to know if the same results occur if you power down the device and then switch the cameras. It could be that there is something weird going on with udev and the way it enumerates the devices or doesn’t remove others, but I’m just guessing.
Hey @katmai, sorry if I repeat the question but it could be useful to know, do you shutdown the device when you switch the cameras or do you just hotplug them. We would be interested to know if the same results occur if you power down the device and then switch the cameras. It could be that there is something weird going on with udev and the way it enumerates the devices or doesn’t remove others.
Hi @JSReds, we always do a reboot after replugging cameras in these tests.
I’ve also ran the test you suggested, with a complete shutdown before swapping cameras and the result is the same.
I’m not currently able to download an image to join your application, but I built a replica based on the opencv repo with your python script. I don’t have all your environment variables added, though. Meanwhile, swapping cameras in my set-up causes no change in retrieve times. Short answer: I’ve not been able to replicate your issue.
I did notice that you’re using Dropbox as a file/folder target. Is that correct? Could there be an issue of the Dropbox folder trying to refresh based on the newly captured images and the subsequent writes impacting the RPi4’s performance? Have you tried this with the Dropbox bits turned off?
i see 2 things we can do:
1 - can you please share your dockerfile.template? maybe you set it up different than us.
2 - if you share your id, i can add you to the application as developer and then you’d be able to access the env vars as well as be able to download the image and test that way?
I’ve successfully added my device. Unfortunately, the service won’t start properly. Perhaps there’s a missing environment variable or something that must be set at your end?
Hi there, sorry that we haven’t been able to identify what might be occurring here. Upon joining the App we still couldnt get this running. It may be worth starting with just a smaller container, as there seemed to be other non openCV issues with the App,
and simplifying the build / enabling features might be a solution path.
hi, we actually managed to give it a huge performance boost by removing some dependencies and using ubuntu 18 aarm64 as container as well as disabling the dropbox uploads. we’re on our way to getting things nicely on track now. thanks for all your help!