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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
//! Image enhancement module.
//!
//! This module provides advanced image enhancement algorithms including:
//!
//! - **Super-resolution**: AI-powered upscaling using multiple neural network models
//! - **Denoising**: Neural network-based image denoising
//!
//! # Features
//!
//! ## Super-Resolution
//!
//! The `super_resolution` module provides video super-resolution with:
//! - Multiple model types (ESRGAN, Real-ESRGAN, EDSR, SRCNN, VDSR)
//! - Multiple upscaling factors (2x, 4x, 8x)
//! - Quality modes (Fast, Balanced, High Quality, Animation)
//! - Video-specific features:
//! - Temporal consistency filtering
//! - Motion-aware processing
//! - Frame buffering
//! - YUV color space support
//! - Pre/post processing (denoising, edge enhancement, artifact reduction)
//! - Tile-based processing for large frames
//! - Model caching for efficient batch processing
//! - GPU acceleration via ONNX Runtime
//!
//! ## Denoising
//!
//! The `denoising` module provides CNN-based denoising with:
//! - Blind denoising (automatic noise estimation)
//! - Noise-level-aware denoising
//! - Color and luminance denoising control
//! - Tile-based processing
//!
//! # Example
//!
//! ```
//! use oximedia_cv::enhance::{SuperResolutionEnhancer, UpscaleMode};
//!
//! fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // CPU-based bicubic upscaling (no ONNX required)
//! let input = vec![128u8; 64 * 64 * 3];
//! let enhancer = SuperResolutionEnhancer::new(UpscaleMode::Bicubic2x);
//! let upscaled = enhancer.upscale(&input, 64, 64)?;
//! assert_eq!(upscaled.len(), 128 * 128 * 3);
//! Ok(())
//! }
//! ```
//!
//! ```no_run
//! # #[cfg(feature = "onnx")]
//! # fn onnx_example() -> oximedia_cv::error::CvResult<()> {
//! use oximedia_cv::enhance::{
//! SuperResolutionModel, ModelType, UpscaleFactor, QualityMode,
//! VideoSuperResolution, VideoFrame, NeuralDenoiser,
//! };
//!
//! // Super-resolution with quality mode (requires 'onnx' feature)
//! let mut model = SuperResolutionModel::from_quality_mode(
//! QualityMode::HighQuality,
//! UpscaleFactor::X4,
//! )?;
//! let input = vec![0u8; 256 * 256 * 3];
//! let upscaled = model.upscale(&input, 256, 256)?;
//! # Ok(())
//! # }
//! ```
// Re-export CPU upscaling items (always available)
pub use ;
// Re-export commonly used items
pub use ;
pub use ;