Modify bayer data before ISP demosaic

We have an argus capture pipeline that we would like to add Dark frame sutraction to, which requires access to the raw bayer data. We are able to get this data through argus using EGLStreams, however we would like to utilize the ISP for demosaicing, as this is expensive even on the GPU.

Is there a way we can modify the data before ISP?

hello russell9,

may I know what’s the actual use-case?

you may dump the Raw via Applications Using V4L2 IOCTL Directly or Argus NvRaw Tool.
however, you cannot feed Raw files into ISP manually. please see-also Camera Architecture Stack.

Right, so we reached out to our camera partner (framos) for a sensor calibration as they did not provide a non-generic one. After paying for them to do the calibration, the results were still rather poor, so we decided to go our own route with a GPU-based color pipeline.

The demosaicing is one of the most expensive parts, and ideally we could run this on the ISP.

hello russell9,

it’s not supported to modify the data before ISP.

Any chance it could be added in a future release? I’ve seen several requests on the forums for this feature.

Ideally even a ISP instruction set but demosaicing is by far the most important part to offload.

Looking at Argus release notes, it actually seems like this is possible, in some limited form:

Release 0.99.2 (01/24/2023)
* Argus supports reading Bayer raw image frames from disk or user provided
raw buffer instead of a physical camera sensor and using the read frames as
input to the Image Signal Processor for reprocessing.

* argus_syncStereoRawReprocess public sample is added to demonstrate
reading from file(s) and then reprocessing of bayer raw image frames originally
captured through live sensor modules.

I see the added IInputStream interface that was added for this purpose, excellent!

I’ll report back on if I’m able to get it to work or not

Okay, so the InputStream only supports EGLStream output, not EGL buffer output:

SCF: Error NotImplemented: Metadata-only not yet implemented in SCF (in src/components/CaptureSetupEngineImpl.cpp, function chooseGenInstFunc(), line 264)
SCF: Error NotImplemented:  (propagating from src/components/CaptureSetupEngineImpl.cpp, function doGetInstructions(), line 2162)
SCF: Error NotImplemented:  (propagating from src/components/CaptureSetupEngine.cpp, function getInstructionList(), line 359)
SCF: Error NotImplemented:  (propagating from src/components/CaptureSetupEngine.cpp, function setupCC(), line 243)
SCF: Error NotImplemented:  (propagating from src/api/Session.cpp, function capture(), line 804)
(Argus) Error NotImplemented:  (propagating from src/api/ScfCaptureThread.cpp, function run(), line 110)

Which means the highest bitdepth I could get out of it is YUV444 or Legacy RGB (8-bit data), which is not ideal for proper color processing. Too bad!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.