コード例 #1
0
    def reconstruct(self, ratio, method_type):
        """Reconstruct a SR image by the given SR method.

        @param ratio: reconstruct ratio
        @type ratio: float
        @param method_type: SR method type
        @type method_type: str
        @return: reconstructed SR image
        @rtype: L{sr_image.SRImage}
        """
        sr_method = SRMethodFactory.create_method(method_type)
        return sr_method.reconstruct(ratio, self)
コード例 #2
0
ファイル: sr_image.py プロジェクト: void-main/SRLab
    def reconstruct(self, ratio, method_type):
        """Reconstruct a SR image by the given SR method.

        @param ratio: reconstruct ratio
        @type ratio: float
        @param method_type: SR method type
        @type method_type: str
        @return: reconstructed SR image
        @rtype: L{sr_image.SRImage}
        """
        sr_method = SRMethodFactory.create_method(method_type)
        return sr_method.reconstruct(ratio, self)
コード例 #3
0
ファイル: test_sr_method_factory.py プロジェクト: ACPK/SRLab
 def test_create_sr_method(self):
     sr_method = SRMethodFactory.create_method("iccv09")
     self.assertEqual("iccv09", sr_method.get_method_type())
     with self.assertRaises(SRException):
         SRMethodFactory.create_method("invalid method type")
コード例 #4
0
 def test_create_sr_method(self):
     sr_method = SRMethodFactory.create_method("iccv09")
     self.assertEqual("iccv09", sr_method.get_method_type())
     with self.assertRaises(SRException):
         SRMethodFactory.create_method("invalid method type")