🤖 AIによる機械翻訳(非公式) — これは OpenCV 5.0.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は 公式英語版(原文) を参照してください。
Package org.opencv.dnn_superres
クラス DnnSuperResImpl
- java.lang.Object
-
- org.opencv.dnn_superres.DnnSuperResImpl
-
public class DnnSuperResImpl extends java.lang.ObjectA class to upscale images via convolutional neural networks. The following four models are implemented:- edsr
- espcn
- fsrcnn
- lapsrn
-
-
フィールドの要約
フィールド Modifier and Type Field Description protected longnativeObj
-
コンストラクタの要約
コンストラクタ Modifier Constructor Description protectedDnnSuperResImpl​(long addr)
-
メソッドの要約
すべてのメソッド 静的メソッド インスタンスメソッド 具象メソッド Modifier and Type Method Description static DnnSuperResImpl__fromPtr__​(long addr)static DnnSuperResImplcreate()Empty constructor for pythonjava.lang.StringgetAlgorithm()Returns the scale factor of the model:longgetNativeObjAddr()intgetScale()Returns the scale factor of the model:voidreadModel​(java.lang.String path)Read the model from the given pathvoidsetModel​(java.lang.String algo, int scale)Set desired modelvoidsetPreferableBackend​(int backendId)Set computation backendvoidsetPreferableTarget​(int targetId)Set computation targetvoidupsample​(Mat img, Mat result)Upsample via neural networkvoidupsampleMultioutput​(Mat img, java.util.List<Mat> imgs_new, MatOfInt scale_factors, java.util.List<java.lang.String> node_names)Upsample via neural network of multiple outputs
-
-
-
メソッドの詳細
-
getNativeObjAddr
public long getNativeObjAddr()
-
__fromPtr__
public static DnnSuperResImpl __fromPtr__​(long addr)
-
create
public static DnnSuperResImpl create()
Empty constructor for python- 戻り値:
- 自動生成
-
readModel
public void readModel​(java.lang.String path)
Read the model from the given path- 引数:
path- モデルファイルへのパス。
-
setModel
public void setModel​(java.lang.String algo, int scale)Set desired model- 引数:
algo- String containing one of the desired models:- __edsr__
- __espcn__
- __fsrcnn__
- __lapsrn__
scale- 拡大率を指定する整数
-
setPreferableBackend
public void setPreferableBackend​(int backendId)
Set computation backend- 引数:
backendId- 自動生成
-
setPreferableTarget
public void setPreferableTarget​(int targetId)
Set computation target- 引数:
targetId- 自動生成
-
upsample
public void upsample​(Mat img, Mat result)
Upsample via neural network- 引数:
img- 拡大する画像result- 拡大後の出力先画像
-
upsampleMultioutput
public void upsampleMultioutput​(Mat img, java.util.List<Mat> imgs_new, MatOfInt scale_factors, java.util.List<java.lang.String> node_names)
Upsample via neural network of multiple outputs- 引数:
img- 拡大する画像imgs_new- 拡大後の出力先画像群scale_factors- 出力ノードのスケーリング係数node_names- ニューラルネットワーク内の出力ノードの名前
-
getScale
public int getScale()
Returns the scale factor of the model:- 戻り値:
- 現在のスケールファクタ。
-
getAlgorithm
public java.lang.String getAlgorithm()
Returns the scale factor of the model:- 戻り値:
- 現在のアルゴリズム。
-
-