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

Support tuning files for NoIR/greyworld #101

Open
chris-y opened this issue Oct 15, 2024 · 9 comments
Open

Support tuning files for NoIR/greyworld #101

chris-y opened this issue Oct 15, 2024 · 9 comments
Labels
enhancement New feature or request
Milestone

Comments

@chris-y
Copy link

chris-y commented Oct 15, 2024

Is your feature request related to a problem? Please describe.
NoIR cameras show slightly purple. This used to be resolved with a white balance mode called "greyworld", but now appears to need the use of tuning files.

Describe the solution you'd like
An option in the GUI to specify a tuning file.
The tuning files are at:
/usr/share/libcamera/ipa/rpi/

My camera is detected as Detected camera 0: imx219, so I need to use the imx219_noir.json tuning file.

I'm not sure if it is possible to autodetect the correct tuning file to use. Maybe a "NoIR" checkbox could help here.

Describe alternatives you've considered
I tried adding awb_auto_is_greyworld=1 to config.txt but it looks like that no longer works.

Additional context
This might provide some useful information: raspberrypi/picamera2#735

@monkeymademe
Copy link
Owner

I am going to look into that but in the next version v1.0.16

@monkeymademe monkeymademe added the enhancement New feature or request label Oct 18, 2024
@monkeymademe monkeymademe added this to the v1.0.16 milestone Oct 18, 2024
@TimPGamer
Copy link
Contributor

I just figured out how to use Libcamera with the Tuning files if that Helps. In /usr/share/libcamera/ipa/rpi/vc4/sensor(_noir).json. The command to use is for me libcamera-still -o test.jpg —tuning-file /usr/share/libcamera/ipa/rpi/vc4/ov5647_noir.json to take still images. The tuning files in libcamera make it so that the photos take Look better. For more Infos Look at the following link. The topic is on how to make it better, but u can See a Great Exempel There.
https://forums.raspberrypi.com/viewtopic.php?t=347194#p2079789

@Nama
Copy link

Nama commented Jan 4, 2025

Autodetecting would be fine, we need to be able to choose a tuning file ourselfs, since there are more files than just for NoIR.

You can read camera model with picam2.camera_properties['Model']

@TimPGamer
Copy link
Contributor

this says autodetecting doesnt work for V1 and V2. also maybe some others. https://forums.raspberrypi.com/viewtopic.php?t=347194#p2079838
But maybe thats wrong imma test that rq, cause i have a V1

@TimPGamer
Copy link
Contributor

weird
image

@TimPGamer
Copy link
Contributor

TimPGamer commented Jan 4, 2025

so i imported picamera2 and just in case there is a module named picam2 i tried that too, but u see failed. so i tried the command. Doesnt exist. @Nama Why is that am i doing something wrong?

@TimPGamer
Copy link
Contributor

TimPGamer commented Jan 4, 2025

holdup. Just looked in the code, cause i thought that iu might find ansers there and voila i think i need to import Picamera2 from picamera2 with the P being capital for a command to work that was used in the web app. so lets see if it works that way.

Edit after 20 mins of researching in the guide i came up with this:
image
at the bottom u can see it prints out the sensor type, but it doesnt recognise, that its the noir version, which is exactly what is being talked about in the link in one of my earlier messages.

this says autodetecting doesnt work for V1 and V2. also maybe some others. https://forums.raspberrypi.com/viewtopic.php?t=347194#p2079838 But maybe thats wrong imma test that rq, cause i have a V1

so if this is being implemented, it would need a selection box for those cams, which the code has no way to know if its noir or not.

@monkeymademe
Copy link
Owner

At the risk of stating what you aready discovered yes v1 and v2 cams can't tell the difference between the non and noir versions. V3 has a postfix on the sensor model 'imx708_noir' for example but v1 and v2 don't... So yeah when implementing this feature I would assume that you could try to 'upload' the file and point to this but then either picamera is ok with it and carries on or throws an error... I am not sure. I have the cameras to test it will slot it into the roadmap

@Nama
Copy link

Nama commented Jan 4, 2025

@TimPGamer hf ;)
https://github.com/raspberrypi/picamera2/tree/main/examples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants