RPi HQ: expose defective pixel correction (DPC)? #3411
Replies: 6 comments 13 replies
-
|
same for me: Someone added an interseting thing: _"sudo vcdbg set imx477_dpc 0" is only applicable to the legacy camera stack, not libcamera. If you wish to set it with libcamera, then either follow naush's instructions to set it dynamically (actually his command reads the current status), or put "imx477.dpc_enable=0" in /boot/cmdline.txt (All on one line - no carriage returns permitted) to set it at boot time._ |
Beta Was this translation helpful? Give feedback.
-
|
I think most users will be best off with a good set of darks, once we support them on RPi. I suspect they won't need DPC and many will simply be confused by it. @astrobrothers you are likely not "most users", and for you we offer the "Extra Parameters" option and the ability to take .png files (be aware that they typically take several seconds to save due to no hardware support, versus fraction of a section for .jpg files). |
Beta Was this translation helpful? Give feedback.
-
|
@EricClaeys - I'm definitely not like "most users" haha. Anyway you're totally right, most users should not worry about DPC. I did take some darks indoors today, despite being a different temp (same nighttime exposure), it seems to be correcting for the hot pixels with DPC=0. Yes, PNG's work fine with Pi4 8GB and 64-bit os, I forget but I think it's like 10 seconds extra for saving. I'm just using JPG while I tweak some of the final settings. |
Beta Was this translation helpful? Give feedback.
-
|
Yea, I think when I tried it on my Pi 4 it also took around 10 seconds, and I put something about that in the documentation. |
Beta Was this translation helpful? Give feedback.
-
|
As far as I can tell, the setting in libcamera dynamically manages the DPC from the tuning file. I had success disabling DPC using the tuning file for the camera. Something like this: ### backup original file
sudo cp /usr/share/libcamera/ipa/rpi/vc4/imx477.json /usr/share/libcamera/ipa/rpi/vc4/imx477.json_original
sudo cp /usr/share/libcamera/ipa/rpi/pisp/imx477.json /usr/share/libcamera/ipa/rpi/pisp/imx477.json_original
DPC_JSON_VC4=$(mktemp --suffix=.json)
DPC_JSON_PISP=$(mktemp --suffix=.json)
### Pi4 and older uses VC4
jq --argjson rpidpc_strength "0" '."rpi.dpc".strength = $rpidpc_strength' /usr/share/libcamera/ipa/rpi/vc4/imx477.json > "$DPC_JSON_VC4"
### Pi5 uses PISP
jq --argjson rpidpc_strength "0" '."rpi.dpc".strength = $rpidpc_strength' /usr/share/libcamera/ipa/rpi/pisp/imx477.json > "$DPC_JSON_PISP"
sudo cp -f "$DPC_JSON_VC4" /usr/share/libcamera/ipa/rpi/vc4/imx477.json
sudo chown root:root /usr/share/libcamera/ipa/rpi/vc4/imx477.json
sudo chmod 644 /usr/share/libcamera/ipa/rpi/vc4/imx477.json
sudo cp -f "$DPC_JSON_PISP" /usr/share/libcamera/ipa/rpi/pisp/imx477.json
sudo chown root:root /usr/share/libcamera/ipa/rpi/pisp/imx477.json
sudo chmod 644 /usr/share/libcamera/ipa/rpi/pisp/imx477.json
rm -f "$DPC_JSON_VC4"
rm -f "$DPC_JSON_PISP"From my notes: |
Beta Was this translation helpful? Give feedback.
-
|
@aaronwmorris, is a tuning file needed for DPC since it can be specified on the command line? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The IMX477 camera has a DPC algorithm that might "delete" weak stars being detected as pixel errors.
The setting is in
/sys/module/imx477/parameters/dpc_enableAccording to this link these are the available options:
My camera has
1as default after reboot. Might be worth to consider for some, I don't see a huge difference if set to0.Beta Was this translation helpful? Give feedback.
All reactions