예제 #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
 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")