A class to upscale images via convolutional neural networks. The following four models are implemented:
[詳解]
#include <dnn_superres.hpp>
畳み込みニューラルネットワークによって画像をアップスケールするクラスです.以下の4つのモデルが実装されています。
◆
DnnSuperResImpl()
cv::dnn_superres::DnnSuperResImpl::DnnSuperResImpl
|
( |
const String & |
algo,
|
|
|
int |
scale |
|
) |
|
|
希望するモデルを即座に設定するコンストラクタ
- 引数
-
algo |
希望するモデルの1つを含む文字列
|
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
|
) |
|
◆
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つを含む文字列
|
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 |
ニューラルネットワーク内の出力ノードの名前 |
このクラス詳解は次のファイルから抽出されました: