未验证 提交 284111d8 编写于 作者: A Andrey Zhavoronkov 提交者: GitHub

Fixed image quality for tasks created from images (#2963)

* fixed image quality for images

* updated changelog
上级 983e765f
......@@ -66,6 +66,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- An error about track shapes outside of the task frames during export (<https://github.com/openvinotoolkit/cvat/pull/2890>)
- Fixed project search field updating (<https://github.com/openvinotoolkit/cvat/pull/2901>)
- Fixed export error when invalid polygons are present in overlapping frames (<https://github.com/openvinotoolkit/cvat/pull/2852>)
- Fixed image quality option for tasks created from images (<https://github.com/openvinotoolkit/cvat/pull/2963>)
### Security
......
......@@ -313,8 +313,7 @@ class VideoReader(IMediaReader):
class IChunkWriter(ABC):
def __init__(self, quality, dimension=DimensionType.DIM_2D):
# translate inversed range [1:100] to [0:51]
self._image_quality = round(51 * (100 - quality) / 99)
self._image_quality = quality
self._dimension = dimension
@staticmethod
......@@ -375,6 +374,8 @@ class ZipCompressedChunkWriter(IChunkWriter):
class Mpeg4ChunkWriter(IChunkWriter):
def __init__(self, quality=67):
# translate inversed range [1:100] to [0:51]
quality = round(51 * (100 - quality) / 99)
super().__init__(quality)
self._output_fps = 25
try:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册