Skip to content

OpenEXR compression options#19540

Merged
alalek merged 2 commits intoopencv:masterfrom
asmorkalov:as/openexr_comression_options
Feb 20, 2021
Merged

OpenEXR compression options#19540
alalek merged 2 commits intoopencv:masterfrom
asmorkalov:as/openexr_comression_options

Conversation

@asmorkalov
Copy link
Copy Markdown
Contributor

Replaces abandoned PR #19295

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

…mat.

There are compression modes other than the default that are more suited for certain data. Mainly grainy/noisy data.
@asmorkalov asmorkalov force-pushed the as/openexr_comression_options branch from 650d8db to a89b0d3 Compare February 16, 2021 12:20
@asmorkalov asmorkalov force-pushed the as/openexr_comression_options branch from a89b0d3 to 93db5c8 Compare February 16, 2021 13:20
Comment on lines +114 to +125
enum ImwriteEXRCompressionFlags {
IMWRITE_EXR_COMPRESSION_NO = 0, //!< no compression
IMWRITE_EXR_COMPRESSION_RLE = 1, //!< run length encoding
IMWRITE_EXR_COMPRESSION_ZIPS = 2, //!< zlib compression, one scan line at a time
IMWRITE_EXR_COMPRESSION_ZIP = 3, //!< zlib compression, in blocks of 16 scan lines
IMWRITE_EXR_COMPRESSION_PIZ = 4, //!< piz-based wavelet compression
IMWRITE_EXR_COMPRESSION_PXR24 = 5, //!< lossy 24-bit float compression
IMWRITE_EXR_COMPRESSION_B44 = 6, //!< lossy 4-by-4 pixel block compression, fixed compression rate
IMWRITE_EXR_COMPRESSION_B44A = 7, //!< lossy 4-by-4 pixel block compression, flat fields are compressed more
IMWRITE_EXR_COMPRESSION_DWAA = 8, //!< lossy DCT based compression, in blocks of 32 scanlines. More efficient for partial buffer access.
IMWRITE_EXR_COMPRESSION_DWAB = 9, //!< lossy DCT based compression, in blocks of 256 scanlines. More efficient space wise and faster to decode full frames than DWAA_COMPRESSION.
};
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix indentation here too.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I aligned indentation with other enums in header. It's strange, but enum keys has 7 spaces indentation.

@asmorkalov asmorkalov force-pushed the as/openexr_comression_options branch from 93db5c8 to 1e4042b Compare February 17, 2021 06:56
Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thank you 👍

@alalek alalek merged commit c131c12 into opencv:master Feb 20, 2021
@alalek alalek mentioned this pull request Apr 9, 2021
a-sajjad72 pushed a commit to a-sajjad72/opencv that referenced this pull request Mar 30, 2023
…_options

OpenEXR compression options

* Adding possibility to select the compression type for the OpenEXR format.

There are compression modes other than the default that are more suited for certain data. Mainly grainy/noisy data.

* Code review fixes.

Co-authored-by: Daniel Rydstrom <daniel.rydstrom@sick.se>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants