🤖 AIによる機械翻訳(非公式) — これは OpenCV 5.0.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は 公式英語版(原文) を参照してください。

クラス DnnSuperResImpl


  • public class DnnSuperResImpl
    extends java.lang.Object
    A class to upscale images via convolutional neural networks. The following four models are implemented:
    • edsr
    • espcn
    • fsrcnn
    • lapsrn
    • フィールドの詳細

      • nativeObj

        protected final long nativeObj
    • コンストラクタの詳細

      • DnnSuperResImpl

        protected DnnSuperResImpl​(long addr)
    • メソッドの詳細

      • getNativeObjAddr

        public long getNativeObjAddr()
      • 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:
        戻り値:
        現在のアルゴリズム。