mirror of https://github.com/opencv/opencv.git
Open Source Computer Vision Library
https://opencv.org/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
276 B
13 lines
276 B
3 years ago
|
from .megapix_scaler import MegapixScaler
|
||
|
|
||
|
|
||
|
class MegapixDownscaler(MegapixScaler):
|
||
|
|
||
|
@staticmethod
|
||
|
def force_downscale(scale):
|
||
|
return min(1.0, scale)
|
||
|
|
||
|
def set_scale(self, scale):
|
||
|
scale = self.force_downscale(scale)
|
||
|
super().set_scale(scale)
|