1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//! Convenience re-exports for common workflows.
//!
//! ```rust
//! use radsym::prelude::*;
//! ```
//!
//! This imports the types and functions needed for the standard
//! propose-score-refine pipeline without requiring individual imports.
//!
//! ## Smoke test: detect-score-refine via prelude
//!
//! ```rust
//! use radsym::prelude::*;
//!
//! // Create a 64x64 synthetic bright disk image.
//! let size = 64usize;
//! let mut data = vec![0u8; size * size];
//! for y in 0..size {
//! for x in 0..size {
//! let dx = x as f32 - 32.0;
//! let dy = y as f32 - 32.0;
//! if (dx * dx + dy * dy).sqrt() <= 10.0 {
//! data[y * size + x] = 255;
//! }
//! }
//! }
//! let image = ImageView::from_slice(&data, size, size).unwrap();
//!
//! // Propose
//! let gradient = sobel_gradient(&image).unwrap();
//! let frst_cfg = FrstConfig { radii: vec![9, 10, 11], ..FrstConfig::default() };
//! let response = frst_response(&gradient, &frst_cfg).unwrap();
//! let nms = NmsConfig { radius: 5, threshold: 0.0, max_detections: 5 };
//! let proposals = extract_proposals(&response, &nms, Polarity::Bright);
//! assert!(!proposals.is_empty(), "should find at least one proposal");
//!
//! // Score
//! let best = &proposals[0];
//! let circle = Circle::new(best.seed.position, 10.0);
//! let score = score_circle_support(&gradient, &circle, &ScoringConfig::default());
//! assert!(score.total > 0.0, "support score should be positive");
//!
//! // Refine
//! let result = refine_circle(&gradient, &circle, &CircleRefineConfig::default()).unwrap();
//! let c = result.hypothesis.center;
//! let err = ((c.x - 32.0).powi(2) + (c.y - 32.0).powi(2)).sqrt();
//! assert!(err < 5.0, "refined center should be near (32, 32)");
//! ```
// Core types
pub use cratePixelCoord;
pub use crate;
pub use crate;
pub use crate;
pub use crate;
pub use crateNmsConfig;
pub use cratePolarity;
// Proposal generation
pub use crate;
pub use crate;
pub use crate;
pub use crateProposal;
// Support scoring
pub use crate;
// Refinement
pub use crate;
pub use crate;
pub use crate;
// Pipeline
pub use crate;