pub struct ChipoutConfig {
pub format: i32,
pub jpeg_quality: u32,
pub max_dimension: u32,
pub padding_percent: f32,
pub include_full_frame: bool,
pub full_frame_jpeg_quality: u32,
pub full_frame_max_dimension: u32,
}Expand description
Chipout (image extraction) configuration
Fields§
§format: i32Image format for chipouts
jpeg_quality: u32JPEG quality (1-100, only applies to JPEG format)
max_dimension: u32Maximum dimension (width or height) for chipout images Image will be scaled down if larger
padding_percent: f32Padding around detection bbox (percentage, e.g., 0.1 = 10%)
include_full_frame: boolInclude full frame with chipout? (for context)
full_frame_jpeg_quality: u32Full frame JPEG quality (typically lower than chipout)
full_frame_max_dimension: u32Maximum full frame dimension
Implementations§
Source§impl ChipoutConfig
impl ChipoutConfig
Sourcepub fn format(&self) -> ImageFormat
pub fn format(&self) -> ImageFormat
Returns the enum value of format, or the default if the field is set to an invalid enum value.
Sourcepub fn set_format(&mut self, value: ImageFormat)
pub fn set_format(&mut self, value: ImageFormat)
Sets format to the provided enum value.
Trait Implementations§
Source§impl Clone for ChipoutConfig
impl Clone for ChipoutConfig
Source§fn clone(&self) -> ChipoutConfig
fn clone(&self) -> ChipoutConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChipoutConfig
impl Debug for ChipoutConfig
Source§impl Default for ChipoutConfig
impl Default for ChipoutConfig
Source§impl<'de> Deserialize<'de> for ChipoutConfig
impl<'de> Deserialize<'de> for ChipoutConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Message for ChipoutConfig
impl Message for ChipoutConfig
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl PartialEq for ChipoutConfig
impl PartialEq for ChipoutConfig
Source§fn eq(&self, other: &ChipoutConfig) -> bool
fn eq(&self, other: &ChipoutConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ChipoutConfig
impl Serialize for ChipoutConfig
impl Copy for ChipoutConfig
impl StructuralPartialEq for ChipoutConfig
Auto Trait Implementations§
impl Freeze for ChipoutConfig
impl RefUnwindSafe for ChipoutConfig
impl Send for ChipoutConfig
impl Sync for ChipoutConfig
impl Unpin for ChipoutConfig
impl UnsafeUnpin for ChipoutConfig
impl UnwindSafe for ChipoutConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more