A class to upscale images via convolutional neural networks. The following four models are implemented:  
 More...
#include <opencv2/dnn_superres.hpp>
A class to upscale images via convolutional neural networks. The following four models are implemented: 
◆ DnnSuperResImpl() [1/2]
      
        
          | cv::dnn_superres::DnnSuperResImpl::DnnSuperResImpl | ( |  | ) |  | 
      
 
 
◆ DnnSuperResImpl() [2/2]
      
        
          | cv::dnn_superres::DnnSuperResImpl::DnnSuperResImpl | ( | const String & | algo, | 
        
          |  |  | int | scale | 
        
          |  | ) |  |  | 
      
 
Constructor which immediately sets the desired model. 
- Parameters
- 
  
    | algo | String containing one of the desired models: |  | scale | Integer specifying the upscale factor |  
 
 
 
◆ create()
| Python: | 
|---|
|  | cv.dnn_superres.DnnSuperResImpl.create( |  | ) -> | retval | 
|  | cv.dnn_superres.DnnSuperResImpl_create( |  | ) -> | retval | 
 
Empty constructor for python. 
 
 
◆ getAlgorithm()
      
        
          | String cv::dnn_superres::DnnSuperResImpl::getAlgorithm | ( |  | ) |  | 
      
| Python: | 
|---|
|  | cv.dnn_superres.DnnSuperResImpl.getAlgorithm( |  | ) -> | retval | 
 
Returns the scale factor of the model: 
- Returns
- Current algorithm. 
 
 
◆ getScale()
      
        
          | int cv::dnn_superres::DnnSuperResImpl::getScale | ( |  | ) |  | 
      
| Python: | 
|---|
|  | cv.dnn_superres.DnnSuperResImpl.getScale( |  | ) -> | retval | 
 
Returns the scale factor of the model: 
- Returns
- Current scale factor. 
 
 
◆ readModel() [1/2]
      
        
          | void cv::dnn_superres::DnnSuperResImpl::readModel | ( | const String & | path | ) |  | 
      
| Python: | 
|---|
|  | cv.dnn_superres.DnnSuperResImpl.readModel( | path | ) -> | None | 
 
Read the model from the given path. 
- Parameters
- 
  
    | path | Path to the model file. |  
 
 
 
◆ readModel() [2/2]
      
        
          | void cv::dnn_superres::DnnSuperResImpl::readModel | ( | const String & | weights, | 
        
          |  |  | const String & | definition | 
        
          |  | ) |  |  | 
      
| Python: | 
|---|
|  | cv.dnn_superres.DnnSuperResImpl.readModel( | path | ) -> | None | 
 
Read the model from the given path. 
- Parameters
- 
  
    | weights | Path to the model weights file. |  | definition | Path to the model definition file. |  
 
 
 
◆ setModel()
      
        
          | void cv::dnn_superres::DnnSuperResImpl::setModel | ( | const String & | algo, | 
        
          |  |  | int | scale | 
        
          |  | ) |  |  | 
      
| Python: | 
|---|
|  | cv.dnn_superres.DnnSuperResImpl.setModel( | algo, scale | ) -> | None | 
 
Set desired model. 
- Parameters
- 
  
    | algo | String containing one of the desired models: |  | scale | Integer specifying the upscale factor |  
 
 
 
◆ setPreferableBackend()
      
        
          | void cv::dnn_superres::DnnSuperResImpl::setPreferableBackend | ( | int | backendId | ) |  | 
      
| Python: | 
|---|
|  | cv.dnn_superres.DnnSuperResImpl.setPreferableBackend( | backendId | ) -> | None | 
 
 
◆ setPreferableTarget()
      
        
          | void cv::dnn_superres::DnnSuperResImpl::setPreferableTarget | ( | int | targetId | ) |  | 
      
| Python: | 
|---|
|  | cv.dnn_superres.DnnSuperResImpl.setPreferableTarget( | targetId | ) -> | None | 
 
 
◆ upsample()
      | Python: | 
|---|
|  | cv.dnn_superres.DnnSuperResImpl.upsample( | img[, result] | ) -> | result | 
 
Upsample via neural network. 
- Parameters
- 
  
    | img | Image to upscale |  | result | Destination upscaled image |  
 
 
 
◆ upsampleMultioutput()
      
        
          | void cv::dnn_superres::DnnSuperResImpl::upsampleMultioutput | ( | InputArray | img, | 
        
          |  |  | std::vector< Mat > & | imgs_new, | 
        
          |  |  | const std::vector< int > & | scale_factors, | 
        
          |  |  | const std::vector< String > & | node_names | 
        
          |  | ) |  |  | 
      
| Python: | 
|---|
|  | cv.dnn_superres.DnnSuperResImpl.upsampleMultioutput( | img, imgs_new, scale_factors, node_names | ) -> | None | 
 
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 |  
 
 
 
The documentation for this class was generated from the following file: