[−][src]Trait opencv::dnn_superres::DnnSuperResImplTrait
A class to upscale images via convolutional neural networks. The following four models are implemented:
- edsr
- espcn
- fsrcnn
- lapsrn
Required methods
pub fn as_raw_DnnSuperResImpl(&self) -> *const c_void
[src]
pub fn as_raw_mut_DnnSuperResImpl(&mut self) -> *mut c_void
[src]
Provided methods
pub fn read_model(&mut self, path: &str) -> Result<()>
[src]
pub fn read_model_1(&mut self, weights: &str, definition: &str) -> Result<()>
[src]
Read the model from the given path
Parameters
- weights: Path to the model weights file.
- definition: Path to the model definition file.
pub fn set_model(&mut self, algo: &str, scale: i32) -> Result<()>
[src]
Set desired model
Parameters
- algo: String containing one of the desired models:
- edsr
- espcn
- fsrcnn
- lapsrn
- scale: Integer specifying the upscale factor
pub fn set_preferable_backend(&mut self, backend_id: i32) -> Result<()>
[src]
Set computation backend
pub fn set_preferable_target(&mut self, target_id: i32) -> Result<()>
[src]
Set computation target
pub fn upsample(
&mut self,
img: &dyn ToInputArray,
result: &mut dyn ToOutputArray
) -> Result<()>
[src]
&mut self,
img: &dyn ToInputArray,
result: &mut dyn ToOutputArray
) -> Result<()>
pub fn upsample_multioutput(
&mut self,
img: &dyn ToInputArray,
imgs_new: &mut Vector<Mat>,
scale_factors: &Vector<i32>,
node_names: &Vector<String>
) -> Result<()>
[src]
&mut self,
img: &dyn ToInputArray,
imgs_new: &mut Vector<Mat>,
scale_factors: &Vector<i32>,
node_names: &Vector<String>
) -> Result<()>
Upsample via neural network of multiple outputs
Parameters
- img: Image to upscale
- imgs_new: Destination upscaled images
- scale_factors: Scaling factors of the output nodes
- node_names: Names of the output nodes in the neural network