Camera
Fantastic to hear the camera is working. Here are AI-generated notes on color tuning, prompted by my experience building a homebuilt webcam a few years ago using a sensor and M12 lens. Hopefully they are partially accurate!
TL/DR if you are able to display a ColorChecker (e.g. https://upload.wikimedia.org/wikipedia/commons/4/4f/Color_Checker.pdf) on an already-calibrated device (phone/computer) and point the Slim 7x at that device you can avoid a full studio setup. Alternatively, the metadata might already have the needed color correction if you can capture a raw .DNG on Windows.
Color Tuning for Slim 7x Camera
- The “Poor Man’s” Tuning (No Color Card)
If you don’t have a Macbeth chart, you can achieve 90% of the quality by manually tweaking the CCM (Color Correction Matrix) in your tuning file.
The raw output of the OV02C10 is likely very green because image sensors are naturally more sensitive to green (the Bayer pattern has 2 green pixels for every 1 red or blue). The CCM’s job is to mix these channels to look like human vision.
Step 1: Locate your Tuning File
In libcamera , this is typically a .json file. If you are using SoftISP, it might be loading a default file like simple_greyscale.json or uncalibrated.json .
- Location:
/usr/share/libcamera/ipa/ (or similar).
- Look for a section named
rpi.ccm or just ccm .
Step 2: Borrow a “Safe” Matrix
Instead of calculating one from scratch, inject a standard sRGB matrix. This won’t be perfect for the OV02C10’s specific silicon, but it will be better than raw data.
Find the ccms array in the JSON and replace the matrix with a generic one (identity-like but boosted for saturation):
“ccms”: [
{
“ct”: 6500,
“ccm”: [
1.6, -0.5, -0.1,
-0.3, 1.4, -0.1,
-0.1, -0.5, 1.6
]
}
]
- How to Tweak by Eye:
- Green Tint? Lower the middle value (
1.4 ) slightly or increase the Red (1.6 top left) and Blue (1.6 bottom right) diagonals.
- Washed out? Increase the diagonal numbers (e.g.,
1.6 → 1.8 ) and decrease the off-diagonals (e.g., -0.5 → -0.7 ) to maintain the row sum near 1.0.
2. Visual Tuning with a “Digital” Color Card
If you don’t have a physical card, you likely own a high-quality smartphone (iPhone/Pixel) or a calibrated monitor. You can use this as your reference.
- The Setup: specific “Color Checker” image on your calibrated screen.
- The Capture: Point your webcam (OV02C10) at the screen. Ensure the screen brightness is high and the room is dark to avoid reflections.
- The Cheat: Take a RAW capture. Open it in a tool like RawTherapee .
- The Fix: Use the “Color Management” or “Input Profile” tools in RawTherapee to manually adjust the sliders until the screen capture looks like the image on the screen.
- Export: RawTherapee can often display the resulting matrix values. Copy these 9 numbers into your libcamera JSON file.
3. Using the Raspberry Pi Tuning Tool (CTT)
The “Homebuilt Webcam” community relies heavily on the Raspberry Pi Camera Tuning Tool (CTT) . This is a Python script that automates the math. You can use this for the OV02C10 if you have a color card (even a printed one is better than nothing).
- Repository:
utils/raspberrypi/ctt/ in the libcamera source.
- Process:
- Take a RAW image (DNG) of a color chart with the OV02C10.
- Run the CTT script pointing at that image.
- It will generate a
macbeth.json (or similar) containing the mathematically perfect 3x3 matrices for your sensor.
- Copy the
ccm section into your OV02C10 tuning file.
Summary Checklist for OV02C10
- Black Level (BLC): Ensure this is set correctly first (usually
64 or 256 depending on 10-bit/8-bit readout). If black looks purple or green, your color tuning will never work.
- Lens Shading (LSC): The OV02C10 is tiny and often has terrible vignetting (dark corners). Before tuning color, fix this by taking a photo of a white wall/paper and generating an LSC table.
- AWB vs CCM: AWB (Auto White Balance) fixes the temperature (making gray look gray). CCM fixes the hues (making red look red, not orange). Fix AWB first (gray card), then CCM.
1. Can we steal the Tuning Parameters from Windows?
The Qualcomm ISP driver on Windows uses highly complex, encrypted, or binary-compiled tuning blobs (often embedded in .sys files or proprietary .bin formats). Decrypting these to finding a simple “3x3 Color Matrix” is a massive reverse engineering project (months of work).
The Shortcut: The “DNG” Extraction Method Instead of hacking the driver files, you can force the Windows driver to tell you its tuning secrets by capturing a Raw image.
- Boot into Windows.
- Find a “Pro” Camera App: You need a camera application that supports capturing in RAW or DNG format. (The default Windows Camera app usually doesn’t do this for webcams, but third-party tools like ProShot or open-source tools like OBS with specific plugins might allow raw stream dumping).
-
- Alternative: If you can’t capture DNG, capture a high-quality Lossless PNG of a color target (even a colorful cereal box) under good lighting.
- Analyze the Metadata: If you manage to get a DNG, the Windows driver will have stamped the file with the ColorMatrix2 and AnalogBalance tags. These are the exact tuning values Qualcomm uses.
- Extract with ExifTool: Run this command on your captured image:
Bash
exiftool -ColorMatrix2 -ForwardMatrix1 -AnalogBalance -AsShotNeutral your_image.dng
-
- The Result: You will get a series of numbers (e.g.,
1.45 -0.3 0.0 ... ). These can be directly transposed into your libcamera JSON tuning file, giving you “Windows-like” color accuracy instantly.
Wi-Fi
No problems on my Slim 7x with 5G. I did make a few config changes but they might not even be necessary
Wi-Fi Notes
sudo iw reg get
/etc/modprobe.d/wireless.conf
options cfg80211 ieee80211_regdom=GB
download https://git.codelinaro.org/clo/ath-firmware/ath12k-firmware/-/tree/main?ref_type=heads as zip
wget https://github.com/qca/qca-swiss-army-knife/raw/master/tools/scripts/ath12k/ath12k-fw-repo
move script into firmware folder
chmod 755 ath12k-fw-repo
sudo ./ath12k-fw-repo --install /lib/firmware
Sound
I watch Netflix every day, works great. I always have the volume set to around 15%. It would only be dangerous if you accidently went to 100% which I never do. Se my post 11 days ago for how to activate sound.