ronb127
Posts: 9
Joined: Fri Jun 23, 2017 10:23 pm

White stripe artifact in firmware >= 4.14.58

Sun Nov 25, 2018 7:25 pm

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
Attachments
white_strip.jpg
white_strip.jpg (144.71 KiB) Viewed 3693 times
Last edited by ronb127 on Tue Nov 27, 2018 5:43 am, edited 1 time in total.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8128
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: White strip artifact in firmware >= 4.14.58

Mon Nov 26, 2018 2:17 pm

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.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8128
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: White strip artifact in firmware >= 4.14.58

Mon Nov 26, 2018 3:09 pm

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.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

ronb127
Posts: 9
Joined: Fri Jun 23, 2017 10:23 pm

Re: White strip artifact in firmware >= 4.14.58

Mon Nov 26, 2018 8:30 pm

Glad to assist, I'll wait patiently for the fix.
In the meanwhile we can just use one version below.
Thanks!

ronb127
Posts: 9
Joined: Fri Jun 23, 2017 10:23 pm

Re: White stripe artifact in firmware >= 4.14.58

Wed Mar 13, 2019 10:38 pm

Any update on this issue?

ronb127
Posts: 9
Joined: Fri Jun 23, 2017 10:23 pm

Re: White stripe artifact in firmware >= 4.14.58

Sun May 19, 2019 8:23 am

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.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 25466
Joined: Sat Jul 30, 2011 7:41 pm

Re: White stripe artifact in firmware >= 4.14.58

Sun May 19, 2019 10:11 am

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.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

phtrnz
Posts: 2
Joined: Thu Jul 25, 2019 6:43 am

Re: White stripe artifact in firmware >= 4.14.58

Thu Jul 25, 2019 6:45 am

Hey there, I stumbled upon this issue, is there any progress on this?

uberl
Posts: 18
Joined: Mon Aug 03, 2015 12:17 pm

Re: White stripe artifact in firmware >= 4.14.58

Sun Sep 01, 2019 5:06 pm

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

uberl
Posts: 18
Joined: Mon Aug 03, 2015 12:17 pm

Re: White stripe artifact in firmware >= 4.14.58

Wed Sep 04, 2019 8:45 am

Tested with rpi-update to version 4.19.69 too - same effect.
Capture.JPG
Capture.JPG (25.79 KiB) Viewed 1535 times

uberl
Posts: 18
Joined: Mon Aug 03, 2015 12:17 pm

Re: White stripe artifact in firmware >= 4.14.58

Mon Sep 23, 2019 12:37 pm

Any update / new insights on this issue ?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8128
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: White stripe artifact in firmware >= 4.14.58

Mon Sep 23, 2019 1:13 pm

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.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

uberl
Posts: 18
Joined: Mon Aug 03, 2015 12:17 pm

Re: White stripe artifact in firmware >= 4.14.58

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 ?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8128
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: White stripe artifact in firmware >= 4.14.58

Tue Sep 24, 2019 8:14 am

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.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

uberl
Posts: 18
Joined: Mon Aug 03, 2015 12:17 pm

Re: White stripe artifact in firmware >= 4.14.58

Tue Sep 24, 2019 8:28 am

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 ?

ronb127
Posts: 9
Joined: Fri Jun 23, 2017 10:23 pm

Re: White stripe artifact in firmware >= 4.14.58

Wed Jan 15, 2020 8:12 am

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. :)

phtrnz
Posts: 2
Joined: Thu Jul 25, 2019 6:43 am

Re: White stripe artifact in firmware >= 4.14.58

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

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 25466
Joined: Sat Jul 30, 2011 7:41 pm

Re: White stripe artifact in firmware >= 4.14.58

Wed Jan 15, 2020 10:12 am

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.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

ronb127
Posts: 9
Joined: Fri Jun 23, 2017 10:23 pm

Re: White stripe artifact in firmware >= 4.14.58

Thu Jan 16, 2020 9:30 am

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!

uberl
Posts: 18
Joined: Mon Aug 03, 2015 12:17 pm

Re: White stripe artifact in firmware >= 4.14.58

Sat Feb 29, 2020 3:44 pm

workaround for ffmpeg: use crop filter:

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

Return to “Camera board”