OpenCV 4.5.3(日本語機械翻訳)
公開メンバ関数 | 静的公開メンバ関数 | 全メンバ一覧
cv::dnn_superres::DnnSuperResImpl クラス

A class to upscale images via convolutional neural networks. The following four models are implemented: [詳解]

#include <dnn_superres.hpp>

公開メンバ関数

DnnSuperResImpl (const String &algo, int scale)
希望するモデルを即座に設定するコンストラクタ[【詳解】(英語]
CV_WRAP void readModel (const String &path)
指定されたパスからモデルを読み込む[【詳解】(英語]
void readModel (const String &weights, const String &definition)
指定されたパスからモデルを読み込む[【詳解】(英語]
CV_WRAP void setModel (const String &algo, int scale)
目的のモデルを設定[【詳解】(英語]
CV_WRAP void setPreferableBackend (int backendId)
Set computation backend
CV_WRAP void setPreferableTarget (int targetId)
計算対象の設定
CV_WRAP void upsample (InputArray img, OutputArray result)
ニューラルネットワークによるアップサンプル[【詳解】(英語]
CV_WRAP void upsampleMultioutput (InputArray img, std::vector< Mat > &imgs_new, const std::vector< int > &scale_factors, const std::vector< String > &node_names)
複数出力のニューラルネットワークによるアップサンプル[【詳解】(英語]
CV_WRAP int getScale ()
モデルのスケールファクターを返します。[【詳解】(英語]
CV_WRAP String getAlgorithm ()
モデルのスケールファクターを返します。[【詳解】(英語]

静的公開メンバ関数

static CV_WRAP Ptr< DnnSuperResImpl > create ()
pythonの空のコンストラクタ

詳解

畳み込みニューラルネットワークによって画像をアップスケールするクラスです.以下の4つのモデルが実装されています。

構築子と解体子

DnnSuperResImpl()

cv::dnn_superres::DnnSuperResImpl::DnnSuperResImpl ( const String & algo,
int scale
)

希望するモデルを即座に設定するコンストラクタ

引数
algo 希望するモデルの1つを含む文字列
  • edsr
  • espcn
  • fsrcnn
  • lapsrn
scale アップスケールファクターを指定する整数

関数詳解

getAlgorithm()

CV_WRAP String cv::dnn_superres::DnnSuperResImpl::getAlgorithm ( )

モデルのスケールファクターを返します。

戻り値
現在のアルゴリズム

getScale()

CV_WRAP int cv::dnn_superres::DnnSuperResImpl::getScale ( )

モデルのスケールファクターを返します。

戻り値
現在のスケールファクター

readModel() [1/2]

CV_WRAP void cv::dnn_superres::DnnSuperResImpl::readModel ( const String & path )

指定されたパスからモデルを読み込む

引数
path モデルファイルへのパス。

readModel() [2/2]

void cv::dnn_superres::DnnSuperResImpl::readModel ( const String & weights,
const String & definition
)

指定されたパスからモデルを読み込む

引数
weights モデルウエイトファイルへのパス
definition モデル定義ファイルへのパス

setModel()

CV_WRAP void cv::dnn_superres::DnnSuperResImpl::setModel ( const String & algo,
int scale
)

目的のモデルを設定

引数
algo 希望するモデルの1つを含む文字列
  • edsr
  • espcn
  • fsrcnn
  • lapsrn
scale アップスケールファクターを指定する整数

upsample()

CV_WRAP void cv::dnn_superres::DnnSuperResImpl::upsample ( InputArray img,
OutputArray result
)

ニューラルネットワークによるアップサンプル

引数
img アップスケールする画像
result アップスケール先の画像

upsampleMultioutput()

CV_WRAP 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
)

複数出力のニューラルネットワークによるアップサンプル

引数
img アップスケールする画像
imgs_new アップスケール後の画像
scale_factors 出力ノードのスケーリング係数
node_names ニューラルネットワーク内の出力ノードの名前

このクラス詳解は次のファイルから抽出されました: