mirror of
https://github.com/opencv/opencv.git
synced 2024-12-14 17:29:17 +08:00
13 lines
276 B
Python
13 lines
276 B
Python
|
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)
|