Struct adder_codec_rs::transcoder::source::davis::Davis
source · pub struct Davis<W: Write> {
pub start_of_frame_timestamp: Option<i64>,
pub end_of_frame_timestamp: Option<i64>,
pub rt: Runtime,
pub dvs_last_timestamps: Array3<i64>,
pub dvs_last_ln_val: Array3<f64>,
pub mode: TranscoderMode,
pub time_mode: TimeMode,
/* private fields */
}
Expand description
Attributes of a framed video -> ADΔER transcode
Fields§
§start_of_frame_timestamp: Option<i64>
The timestamp for the start of the APS frame exposure
end_of_frame_timestamp: Option<i64>
The timestamp for the end of the APS frame exposure
rt: Runtime
The tokio runtime
dvs_last_timestamps: Array3<i64>
The timestamp of the last DVS event integrated for each pixel
dvs_last_ln_val: Array3<f64>
The log-space last intensity value for each pixel
mode: TranscoderMode
The EDI reconstruction mode, determining how intensities are integrated for the ADΔER model
time_mode: TimeMode
The time mode of the transcoded ADΔER video
Implementations§
source§impl<W: Write + 'static> Davis<W>
impl<W: Write + 'static> Davis<W>
sourcepub fn new(
reconstructor: Reconstructor,
rt: Runtime
) -> Result<Self, Box<dyn Error>>
pub fn new( reconstructor: Reconstructor, rt: Runtime ) -> Result<Self, Box<dyn Error>>
Create a new Davis
transcoder
sourcepub fn optimize_adder_controller(self, optimize: bool) -> Self
pub fn optimize_adder_controller(self, optimize: bool) -> Self
Set whether to optimize the EDI controller (default: false
) during EDI reconstruction.
If true, then the program will regularly re-calculate the optimal DVS contrast threshold.
sourcepub fn mode(self, mode: TranscoderMode) -> Self
pub fn mode(self, mode: TranscoderMode) -> Self
Set the TranscoderMode
(default: TranscoderMode::Framed
)
sourcepub fn integrate_dvs_events<F: Fn(i64, i64) -> bool + Send + 'static + Sync>(
&mut self,
dvs_events: &Vec<DvsEvent>,
frame_timestamp: &i64,
event_check: F
) -> Result<(), CodecError>
pub fn integrate_dvs_events<F: Fn(i64, i64) -> bool + Send + 'static + Sync>( &mut self, dvs_events: &Vec<DvsEvent>, frame_timestamp: &i64, event_check: F ) -> Result<(), CodecError>
Integrate a sequence of DVS events into the ADΔER video model
sourcepub fn get_reconstructor(&self) -> &Reconstructor
pub fn get_reconstructor(&self) -> &Reconstructor
Get an immutable reference to the Reconstructor
sourcepub fn get_reconstructor_mut(&mut self) -> &mut Reconstructor
pub fn get_reconstructor_mut(&mut self) -> &mut Reconstructor
Get a mutable reference to the Reconstructor
Trait Implementations§
source§impl<W: Write + 'static> Source<W> for Davis<W>
impl<W: Write + 'static> Source<W> for Davis<W>
source§fn consume(
&mut self,
view_interval: u32,
thread_pool: &ThreadPool
) -> Result<Vec<Vec<Event>>, SourceError>
fn consume( &mut self, view_interval: u32, thread_pool: &ThreadPool ) -> Result<Vec<Vec<Event>>, SourceError>
source§fn get_video_mut(&mut self) -> &mut Video<W>
fn get_video_mut(&mut self) -> &mut Video<W>
source§fn get_video_ref(&self) -> &Video<W>
fn get_video_ref(&self) -> &Video<W>
source§impl<W: Write + 'static> VideoBuilder<W> for Davis<W>
impl<W: Write + 'static> VideoBuilder<W> for Davis<W>
source§fn contrast_thresholds(self, c_thresh_pos: u8, c_thresh_neg: u8) -> Self
fn contrast_thresholds(self, c_thresh_pos: u8, c_thresh_neg: u8) -> Self
source§fn c_thresh_pos(self, c_thresh_pos: u8) -> Self
fn c_thresh_pos(self, c_thresh_pos: u8) -> Self
source§fn c_thresh_neg(self, c_thresh_neg: u8) -> Self
fn c_thresh_neg(self, c_thresh_neg: u8) -> Self
source§fn chunk_rows(self, chunk_rows: usize) -> Self
fn chunk_rows(self, chunk_rows: usize) -> Self
source§fn time_parameters(
self,
tps: DeltaT,
ref_time: DeltaT,
delta_t_max: DeltaT
) -> Result<Self, SourceError>
fn time_parameters( self, tps: DeltaT, ref_time: DeltaT, delta_t_max: DeltaT ) -> Result<Self, SourceError>
source§fn write_out(
self,
source_camera: SourceCamera,
time_mode: TimeMode,
write: W
) -> Result<Box<Self>, SourceError>
fn write_out( self, source_camera: SourceCamera, time_mode: TimeMode, write: W ) -> Result<Box<Self>, SourceError>
Encoder
source§fn show_display(self, show_display: bool) -> Self
fn show_display(self, show_display: bool) -> Self
impl<W: Write> Sync for Davis<W>
Auto Trait Implementations§
impl<W> !RefUnwindSafe for Davis<W>
impl<W> Send for Davis<W>
impl<W> Unpin for Davis<W>
impl<W> !UnwindSafe for Davis<W>
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.