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

Camera image red after upgrading OctoPi image from Jessie to Buster #666

Closed
wookie73 opened this issue Jul 9, 2020 · 5 comments
Closed

Comments

@wookie73
Copy link

wookie73 commented Jul 9, 2020

Pi 3
Pi V2 camera

I upgraded from Jessie to Buster version of OctoPi Now my camera image is red.

Have tried changing the -awb to -awb tungsten, fluorescent:and and off in octopi.txt. None of which seem to make any difference.
Also just tried changing the awb colour gain, --awbgainB & --awbgainY but they didn't seem to do anything either.

Have tried a different ribbon cable.

Seems to be a problem with the AWB.

Any help / ideas much appreciated.
Dave

Screenshot_2020-07-09 0% -

@tedder
Copy link
Contributor

tedder commented Jul 9, 2020

Assuming you don't live in a world where that's the normal color, please post in the community forums. They're really good at helping debug things like this.

@guysoft
Copy link
Owner

guysoft commented Jul 9, 2020

What version of OctoPi?
Also indeed the community forms is the right place

@wookie73
Copy link
Author

wookie73 commented Jul 9, 2020

Have already posted in the community forums.
https://community.octoprint.org/t/camera-image-red-after-upgrading-octoprint-image-from-jessie-to-buster-pi-v2-cam/21891
Have also searched the forum for other posts with the same issue. Two other posts but no answer.
Have looked around a fair bit for an answer but cannot find one.

Seems that the -awb switches do not work in the octopi.txt file. That and the fact that everything worked fine with Jessie would indicate to me an issue with the Buster version on OctoPi.

Sorry missed version info out on original post.
OctoPrint version : 1.4.0
OctoPi version : 0.17.0

Thanks for the replies Dave

@jantman
Copy link

jantman commented Oct 2, 2020

I just happened by this, as I'm having the same issue. Do you happen to have a NoIR camera? Because this looks exactly like what a NoIR camera does with the wrong white balance. Here's an example of mine:

before_sm

You should be able to confirm this by doing the following:

  1. On the Pi, stop webcamd with sudo systemctl stop webcamd
  2. Take a snapshot of the camera with raspistill -o test.png - that should show the red/pink cast (view the image on the Pi if you can, or else scp it somewhere that you can see it)
  3. Take a snapshot again with raspistill -awb greyworld -o greyworld.png and look at it. If I'm right, that should look normal.

Mine using "greyworld" settings":
after_sm

If the second snapshot looks right, it's because your camera - like mine - needs the greyworld white balance mode. Unfortunately, the version of mjpg-streamer (webcamd) that's currently bundled with OctoPi doesn't support this mode. There's been a pull request ( jacksonliam/mjpg-streamer#235 ) open for almost a year to fix that, but it hasn't been merged.

I've cut a branch in my OctoPi fork that pulls in the mjpg-streamer fork with these PR changes that enable the "greyworld" white balance mode, and enabled builds of it on GitHub. If you want to give it a try, a tarball of the /home/pi/mjpg-streamer directory with the patch applied, along with installation instructions, are at https://github.com/jantman/OctoPi/releases/tag/greyworld-v1

@wookie73
Copy link
Author

wookie73 commented Feb 2, 2021

Amazing thanks.
Took 4 months for me to get around to looking at it but your solution did the trick.

Once again many thanks @jantman

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