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

Noisy camera input #101

Open
wassgha opened this issue Dec 6, 2017 · 6 comments
Open

Noisy camera input #101

wassgha opened this issue Dec 6, 2017 · 6 comments

Comments

@wassgha
Copy link

wassgha commented Dec 6, 2017

Hello,

I've noticed a lot of false positives in my data and after investigating it, it turns out the background subtraction algorithm isn't working as it's supposed to. The problem is, it's the input image that has noise (just the feed from the camera) which causes background subtraction to fail. However, when using raspistill to preview the camera, the noise (flicker of light/dark as seen on the video) does not exist at all! I am not sure if this has anything to do with the library that is used to access the camera or with footfall itself. Another thing to note is that the colors are "reversed(?)" where reds show up as blue. Although this might not affect detection, it might be related to the flicker issue.

Is there any parameter I could tweak to make this noise go away?

I have managed to eliminate the false detections by increasing the MOG threshold, but I'd still want the problem to go away from the root (since the input image).

Note: Especially on the camera to the right, it seems like the camera is "re-focusing" (blur) although I'm quite sure the raspberry pi camera doesn't have any autofocus features

ezgif com-video-to-gif 6

@wassgha
Copy link
Author

wassgha commented Dec 9, 2017

@DHaylock ?

@DHaylock
Copy link
Contributor

Hi @wassgha

I have never seen a camera behave like this before. It could be trying to white balance the image?

You could try setting white balance to manual

Try just running the raspi-vid command and change the white settings

Otherwise, in the config.json file make the history variable larger. It should smooth out the image.

David

@wassgha
Copy link
Author

wassgha commented Dec 12, 2017

Hello! Thank you very much for the reply! Unfortunately I tried both suggestions but no luck.
Here's what raspistill shows

ezgif com-video-to-gif 9

which is definitely noisy, but still different from the effect I get in the preview window of Footfall (which seems like some kind of re-focusing)

ezgif com-video-to-gif 10

It might just be the sensor...

@randomly123
Copy link

Never experienced what you have experienced man. Might just be the RaspiCam.

@wassgha
Copy link
Author

wassgha commented Feb 26, 2018

Update on this: Just bought another raspicam (v2.0 this time), still the same problem. Also, to add more details, the colors are not correct on the picture (the blue bench you see there is actually red not blue).

@prisikarm
Copy link

prisikarm commented Feb 23, 2019

I discovered that this is due to "blur" function. is blur is set to zero, everything is ok, but there will be other problems when blur is zero...

It also could be due to the automatic exposure of the camera. Just add
piCamera.setExposureMode((MMAL_PARAM_EXPOSUREMODE_T)7);
after
piCamera.setFlips(_cameraConfig.bFlipH,_cameraConfig.bFlipV);
in CameraManager.cpp file.
It will change the expouse mode to "snow', that is not using the autoexposure

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

4 participants