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

* fixed image quality for images

* updated changelog
main
Andrey Zhavoronkov 5 years ago committed by GitHub
parent 983e765fab
commit 284111d824
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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:

Loading…
Cancel
Save