Page 1 of 1

White stripe artifact in firmware >= 4.14.58

Posted: Sun Nov 25, 2018 7:25 pm
by ronb127
Hi everybody,

Starting at firmware 4.14.58 (f1eab5a34dda932ca1ad447bdb35edb0cb55263c) there appears to be a white stripe of 2-3 pixels at the right side of the output image (see attached).
I'm using Pi Zero with v1 camera, capturing video using raspivid (for example: raspivid -w 1280 -h 960 -o test.h264).
The problem occurs in video mode with all resolutions, still images taken with raspistill are just fine.

Anyone knows what's going on?

Thanks,
Ron

Re: White strip artifact in firmware >= 4.14.58

Posted: Mon Nov 26, 2018 2:17 pm
by 6by9
Curious. I can reproduce it.
It appears to be something to do with the 1296x972 mode, selected automatically with that output resolution/aspect ratio, or can be forced by setting "-md 4" on the command line. All the other modes don't show that stripe.
I can't find any firmware commits in your identified time frame that are likely to have affected that, but I'll have a bit more of a dig.

Checking the raw image data, it looks like the sensor isn't actually providing the specified number of pixels, leaving some uninitialised stuff in memory that is being interpreted as image data.

Re: White strip artifact in firmware >= 4.14.58

Posted: Mon Nov 26, 2018 3:09 pm
by 6by9
So I've found the cause - thanks for the accurate report.
Part of the image stabilisation code was previously incorrectly enabled at all times, and that release included a fix to disabled it. Barring rounding errors, it should have done nothing, though I'd need to study the code some more to confirm that.

Capturing a raw in mode 5 (1296x730) also shows the weird effect on the right hand edge, so there is something off in the register settings or other configuration. Getting these numbers right is a real faff though, so finding the correct answer is unlikely to be a 5 minute job.

Re: White strip artifact in firmware >= 4.14.58

Posted: Mon Nov 26, 2018 8:30 pm
by ronb127
Glad to assist, I'll wait patiently for the fix.
In the meanwhile we can just use one version below.
Thanks!

Re: White stripe artifact in firmware >= 4.14.58

Posted: Wed Mar 13, 2019 10:38 pm
by ronb127
Any update on this issue?

Re: White stripe artifact in firmware >= 4.14.58

Posted: Sun May 19, 2019 8:23 am
by ronb127
I've checked with the recent firmware and this problem is still present.
Is there any expected date for a fix?
This problem forces us to use an older version firmware without many other good fixes.
Would appreciate any update on this issue. Thanks.

Re: White stripe artifact in firmware >= 4.14.58

Posted: Sun May 19, 2019 10:11 am
by jamesh
We cannot really say when specific fixes are likely to be released, aswehave a long list of stuff that needs to be done so itdepends on priority. I'll flag it up to 6by9 tomorrow to see if he has a gap in his schedule, which is busy at the moment.

Re: White stripe artifact in firmware >= 4.14.58

Posted: Thu Jul 25, 2019 6:45 am
by phtrnz
Hey there, I stumbled upon this issue, is there any progress on this?

Re: White stripe artifact in firmware >= 4.14.58

Posted: Sun Sep 01, 2019 5:06 pm
by uberl
Hi !

Same issue here with latest firmware 4.19.66
(rpi 3b plus)

Could it be a broken hardware component (rpi/camera/chip) - or can that be ruled out ?

br, uberl

Re: White stripe artifact in firmware >= 4.14.58

Posted: Wed Sep 04, 2019 8:45 am
by uberl
Tested with rpi-update to version 4.19.69 too - same effect.
Capture.JPG
Capture.JPG (25.79 KiB) Viewed 1506 times

Re: White stripe artifact in firmware >= 4.14.58

Posted: Mon Sep 23, 2019 12:37 pm
by uberl
Any update / new insights on this issue ?

Re: White stripe artifact in firmware >= 4.14.58

Posted: Mon Sep 23, 2019 1:13 pm
by 6by9
Sorry, this just isn't a priority.
Messing with register sets is incredibly time consuming, and can ultimately not produce a solution as the sensors don't always behave in sensible ways. We have to broadly treat them as black boxes, even though we generally have datasheets for how they are supposed to work.

Re: White stripe artifact in firmware >= 4.14.58

Posted: Tue Sep 24, 2019 6:08 am
by uberl
Ok i understand.

So basically it is an issue with raspivid tool as with for e.g. raspimjpeg from RPi_Cam_Web_Interface the stripes are not present ?

Re: White stripe artifact in firmware >= 4.14.58

Posted: Tue Sep 24, 2019 8:14 am
by 6by9
uberl wrote:
Tue Sep 24, 2019 6:08 am
Ok i understand.

So basically it is an issue with raspivid tool as with for e.g. raspimjpeg from RPi_Cam_Web_Interface the stripes are not present ?
Based on my previous comment, it's an issue in the register configuration for one particular mode.
We have register sets to produce a fixed set of output resolutions (see https://picamera.readthedocs.io/en/late ... nsor-modes), from which the SoC will resize the image to the requested resolution. The 1292x972 and 1292x730 modes appear to have the issue with the white stripe under some conditions.
This will affect all applications that use either of those modes.

Re: White stripe artifact in firmware >= 4.14.58

Posted: Tue Sep 24, 2019 8:28 am
by uberl
Currently i stream from camera via ffmpeg (-re -f video4linux2 -video_size hd720 -i /dev/video0) - white stripes present.
Do you know if it is possible to specify the sensor mode for ffmpeg ?

Re: White stripe artifact in firmware >= 4.14.58

Posted: Wed Jan 15, 2020 8:12 am
by ronb127
Since the driver code is closed source, there is no option to correct this on our own.
Is there any workaround that can bring the situation to what it was before 4.14.58?
Maybe to replace some binary file in the firmware?
We do not expect you guys to solve all bugs, but at least provide us with an option to fix them on our own. :)

Re: White stripe artifact in firmware >= 4.14.58

Posted: Wed Jan 15, 2020 9:21 am
by phtrnz
ronb127 wrote:
Wed Jan 15, 2020 8:12 am
We do not expect you guys to solve all bugs, but at least provide us with an option to fix them on our own. :)
+1

Re: White stripe artifact in firmware >= 4.14.58

Posted: Wed Jan 15, 2020 10:12 am
by jamesh
phtrnz wrote:
Wed Jan 15, 2020 9:21 am
ronb127 wrote:
Wed Jan 15, 2020 8:12 am
We do not expect you guys to solve all bugs, but at least provide us with an option to fix them on our own. :)
+1
It is simply not possible to release the camera firmware source code. This is non-negotiable. Sorry, nothing can be done.

Re: White stripe artifact in firmware >= 4.14.58

Posted: Thu Jan 16, 2020 9:30 am
by ronb127
The simplest workaround is to shrink the camera ROI by just a bit.
The output resolution will be kept 1280x960 but the input will be taken as a slightly smaller frame without the problematic white stripe (resulting in the tiniest zoom).

In raspivid:
raspivid -w 1280 -h 960 -roi 0,0,0.998,1 -o test.h264

In MMAL:

RASPICAM_CAMERA_PARAMETERS params;
raspicamcontrol_set_defaults(&params);
params.roi.w = 0.998f; // ADD THIS!
raspicamcontrol_set_all_parameters(camera, &params);

This solution is good enough for me.
Thanks!

Re: White stripe artifact in firmware >= 4.14.58

Posted: Sat Feb 29, 2020 3:44 pm
by uberl
workaround for ffmpeg: use crop filter:

e.g. for input size 1280x720
crop=in_w-1:in_h,scale=1280:720,setsar=1