Fix black photo issue on intel MIPI cameras (Bugfix)#1643
Conversation
|
Validated that |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1643 +/- ##
==========================================
+ Coverage 48.85% 48.88% +0.03%
==========================================
Files 370 370
Lines 40231 40265 +34
Branches 6793 6801 +8
==========================================
+ Hits 19654 19685 +31
- Misses 19857 19858 +1
- Partials 720 722 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Just a quick note on multifilesink: I used it because with the way we are terminating the pipeline (time/num-buffers based EOS), filesink will write extra buffers after the initial valid buffer. Basically it made a file like this: where frame F1 is the actual photo we want, F2-F4 are the extra stuff that It is doing extra file writes than necessary though, albeit I haven't found any negative side effects. There are ways to do exactly 1 file write, for example EDIT: Another way to do 1 file write is to listen for an element message on the bus from GstMultiFileSink, and check that the message contains a file path. This doesn't apply to gst-launuch commands. |
fernando79513
left a comment
There was a problem hiding this comment.
Good job here!
I think this implementation improves the current approach of ignoring the first frames and should be more robust in general.
I've left just some small comments here and there.
fernando79513
left a comment
There was a problem hiding this comment.
Good job!
LGTM +1
Description
The gstreamer pipeline in the current
camera_test.pywas having trouble with cameras that require a "boot up time" because it was taking the 1st buffer, which is blank for these cameras, that reaches filesink. This PR adds a valve element that dynamically opens while the pipeline is running to allow the source to stay open for a few seconds before the photo is taken.There was also an issue where$\Rightarrow$
<CameraTest>._widthand<CameraTest>._heightwere never updated from 640x480 after we query the supported formats. This breaks on intel MIPI cameras because it only supports 1280x720 and it will complain about not-negotiated capsError: Internal data stream errorwhen<Pipeline>.set_state(Gst.State.PLAYING)is called. This is fixed as well but I'm not too sure if this was intentional. Do later tests depend on the image being 640x480?Resolved issues
#1537
Documentation
The number of seconds to delay can be set by
--wait-seconds <num_seconds>. Default is 3.Tests