Comments (11)
You should be able to use the standard ov5647.json - all you need is the correct black level and reasonable exposure, which you should get. All the other stuff (to do with colours, lens shading etc.) has no effect on the DNG file.
from libcamera.
@davidplowman I seem to recall this may be due to an older version of OpenCV install. Do you remember any details about this?
from libcamera.
Hmm, I have to say I don't think I've seen that before.
@twarid I thought maybe it was falling over because there appears to be only a single non-ALSC file, but that seemed to work OK for me.
Can I assume you've downloaded the latest version of all the software? It seems to be that call to np.polyfit
that's going wrong, would you be able to print out the input arguments just beforehand (rbs_hat[0]
and rbs_hat[1]
)? Maybe also double-check your numpy version - mine claims to be 1.24.2.
from libcamera.
I think I've got the latest version of most packages - I did the following and don't see anything significant to update
$ sudo apt update
...
$ apt list --upgradable
Listing... Done
linux-libc-dev/stable 1:1.20230317-1 arm64 [upgradable from: 1:1.20230306-1]
raspberrypi-bootloader/stable 1:1.20230317-1 arm64 [upgradable from: 1:1.20230306-1]
raspberrypi-kernel-headers/stable 1:1.20230317-1 arm64 [upgradable from: 1:1.20230306-1]
raspberrypi-kernel/stable 1:1.20230317-1 arm64 [upgradable from: 1:1.20230306-1]
vcdbg/stable 1:1.20230317-1 armhf [upgradable from: 1:1.20230306-1]
xserver-common/stable,stable 2:1.20.11-1+rpt2+deb11u5 all [upgradable from: 2:1.20.11-1+rpt1+deb11u5]
xserver-xorg-core/stable 2:1.20.11-1+rpt2+deb11u5 arm64 [upgradable from: 2:1.20.11-1+rpt1+deb11u5]
xwayland/stable 2:1.20.11-1+rpt2+deb11u5 arm64 [upgradable from: 2:1.20.11-1+rpt1+deb11u5]
Curiously, numpy version listed here is 1.19.5
$ apt info python3-numpy
Package: python3-numpy
Version: 1:1.19.5-1
Maybe I should try to getting numpy using pip3 instead?
from libcamera.
Got numpy 1.24.2 using pip3 and got further along.
Now, I get the following error - which can perhaps be explained by not having sufficient input images? Printed out rbs_hat[0] and rbs_hat[1] and they're NaN.
Starting AWB calibration
(nan,)
(nan,)
** On entry to DLASCL parameter number 4 had an illegal value
Traceback (most recent call last):
File "/home/dkt/ctt/../libcamera/utils/raspberrypi/ctt/ctt.py", line 837, in <module>
run_ctt(json_output, directory, config, log_output)
File "/home/dkt/ctt/../libcamera/utils/raspberrypi/ctt/ctt.py", line 801, in run_ctt
Cam.awb_cal(greyworld, do_alsc_colour)
File "/home/dkt/ctt/../libcamera/utils/raspberrypi/ctt/ctt.py", line 309, in awb_cal
awb_out = awb(self, cal_cr_list, cal_cb_list, plot)
File "/home/dkt/libcamera/utils/raspberrypi/ctt/ctt_awb.py", line 97, in awb
a, b, c = np.polyfit(rbs_hat[0], rbs_hat[1], 2)
File "<__array_function__ internals>", line 200, in polyfit
File "/home/dkt/.local/lib/python3.9/site-packages/numpy/lib/polynomial.py", line 668, in polyfit
c, resids, rank, s = lstsq(lhs, rhs, rcond)
File "<__array_function__ internals>", line 200, in lstsq
File "/home/dkt/.local/lib/python3.9/site-packages/numpy/linalg/linalg.py", line 2285, in lstsq
x, resids, rank, s = gufunc(a, b, rcond, signature=signature, extobj=extobj)
File "/home/dkt/.local/lib/python3.9/site-packages/numpy/linalg/linalg.py", line 101, in _raise_linalgerror_lstsq
raise LinAlgError("SVD did not converge in Linear Least Squares")
numpy.linalg.LinAlgError: SVD did not converge in Linear Least Squares
from libcamera.
Those NaNs are definitely still wrong. When I run it (even with a single non-ALSC file), I have proper numbers there. Though note that ultimately you probably will need more than one image (even though it doesn't seem like the actual problem).
So I guess we need to find out why that 6150K_130l.dng file is causing trouble. Would you be able to post a link so that I can download it and try it? Thanks.
from libcamera.
Sure 6150K_130l.zip. Thanks!
from libcamera.
Can you say anything about how you got that DNG file? It's claiming a black level of 64 which is incorrect for the ov5647. It should have a black level of 16 (out of the full 10-bit range). Let's start by trying to fix that and see if things improve. Thanks!
from libcamera.
I used uncalibrated.json config to capture the dng e.g. libcamera-still --verbose --tuning-file /usr/share/libcamera/ipa/raspberrypi/uncalibrated.json --mode 2592:1944:10 --raw -o 6150K_130l.dng
.
That config specifies a black level of 4096. Which I think is correct for a value of 16 for a 10-bit value scaled up to 16-bit?
from libcamera.
My bad - I should be using 1024. I will try with that.
from libcamera.
That did it! Thanks!
from libcamera.
Related Issues (20)
- Libcamera problems on RPi4 Ubuntu HOT 1
- Bugged Lines HOT 2
- Missleading Build Instructions HOT 2
- Unable to build libcamera with Python bindings HOT 4
- IMX519 on bookworm
- RPI4B OV5647 Camera black screen! HOT 7
- libcamerasrc doesn't work with CM4 RPI Cam V2 and V3 HOT 5
- Can't start gstreamer pipeline after update HOT 4
- Raspberry Pi Camera Module 3 not available on RPi 5/bookworm HOT 2
- False colours from global shutter camera on RPi5 HOT 3
- Enabling sensor HDR for Camera Module v3 HOT 2
- RPI5 - Omnivision 9281 8 Bit Mode HOT 6
- No json for imx290 HOT 1
- libcamerify causes motion daemon to create zombie processes HOT 26
- "libqt5widgets" doesn't exist did you mean "libqt5widgets5" in your readme? HOT 2
- libcamerify causes motion daemon to create zombie processes
- `
- libcamerify not working rpi5 bookworm. Not enough buffers HOT 7
- Range format is ambiguous / libcamera is not installed HOT 8
- Installation issue HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libcamera.