Skip to main content

MultiscaleConfig

Enum MultiscaleConfig 

Source
#[non_exhaustive]
pub enum MultiscaleConfig { SingleScale, Pyramid { levels: u8, min_size: usize, refinement_radius: u32, }, }
Expand description

Coarse-to-fine multiscale configuration.

JSON shape mirrors crate::UpscaleConfig:

  • { "single_scale": null } — run the detector once on the full image.
  • { "pyramid": { "levels": 3, "min_size": 128, "refinement_radius": 3 } } — build an image pyramid, detect seeds on the coarsest level, and refine each seed into the base image. Honoured by both ChESS and Radon strategies.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

SingleScale

Single-scale detection (no pyramid).

§

Pyramid

Coarse-to-fine pyramid detection.

Fields

§levels: u8

Number of pyramid levels (≥ 1). Level 0 is the base image; each subsequent level is a 2× box-filter downsample.

§min_size: usize

Minimum short-edge length in pixels. The pyramid stops once the next level would fall below this size.

§refinement_radius: u32

ROI half-radius at the coarse level used to refine each seed into the base image, in coarse-level pixels.

Implementations§

Source§

impl MultiscaleConfig

Source

pub const fn pyramid_default() -> Self

Three-level pyramid with library defaults (min_size = 128, refinement_radius = 3). Equivalent to the multiscale preset used by crate::DetectorConfig::chess_multiscale and crate::DetectorConfig::radon_multiscale.

Source

pub const fn pyramid( levels: u8, min_size: usize, refinement_radius: u32, ) -> Self

Pyramid with caller-supplied parameters.

Trait Implementations§

Source§

impl Clone for MultiscaleConfig

Source§

fn clone(&self) -> MultiscaleConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for MultiscaleConfig

Source§

impl Debug for MultiscaleConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MultiscaleConfig

Source§

fn default() -> MultiscaleConfig

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for MultiscaleConfig

Source§

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 Eq for MultiscaleConfig

Source§

impl PartialEq for MultiscaleConfig

Source§

fn eq(&self, other: &MultiscaleConfig) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for MultiscaleConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for MultiscaleConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.