Commit Graph

385 Commits

Author SHA1 Message Date
Alexander Alekhin
3e513ee6ab Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-06-03 16:23:36 +00:00
Nikolay Polyarniy
746bd47ce5 EXR reading: support Z channel if no Y channel 2021-06-02 15:53:32 +03:00
Alexander Alekhin
7d66f1e391 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-05-18 18:06:26 +00:00
Smirnov Egor
1d7d18afba Document imwrite depth fallback 2021-05-12 19:55:58 +03:00
Alexander Smorkalov
083a7c8f0a Fix OpenCV build with OpenEXR before 2.2.0. 2021-04-29 09:50:30 +03:00
Antonio Rojas
971dacaf41
Merge pull request #19970 from antonio-rojas:master
Support building with OpenEXR 3.x

* Support OpenEXR 3.0

Try to find OpenEXR 3.0 using the upstream cmake config, and fallback to the previous algorithm if not found

* Add explicit ImfFrameBuffer.h include

This was transitively included with OpenEXR 2.x, but that's no longer the case with OpenEXR 3.x
2021-04-26 22:13:59 +00:00
Harald Scheirich
fcaeeac931
Merge pull request #19780 from HarryDC:feature/index-multiimage-tiff
Add reading of specific images from multipage tiff

* Add reading of specific images from multipage tiff

* Fix build issues

* Add missing flag for gdal

* Fix unused param warning

* Remove duplicated code

* change public parameter type to int

* Fix warnings

* Fix parameter check
2021-04-23 20:48:32 +00:00
Alexander Alekhin
d643a90efa Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-03-06 17:31:08 +00:00
Alexander Alekhin
a1e2c4f338
Merge pull request #19655 from raaldrid:EXR_rw_alpha_support_16115 2021-03-05 16:54:31 +03:00
Rachel A
cc22a73d0f EXR alpha support for 4 channel reading and writing. Issue https://github.com/opencv/opencv/issues/16115. 2021-03-02 11:49:56 -08:00
Alexander Alekhin
0a6f216f83 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-02-21 20:14:09 +00:00
Alexander Alekhin
6d81a88288 build warning (windows 32-bit) 2021-02-20 18:30:49 +00:00
Alexander Smorkalov
c131c12fd7
Merge pull request #19540 from asmorkalov:as/openexr_comression_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>
2021-02-20 16:28:08 +00:00
Alexander Alekhin
5b16b190c1 Merge pull request #19543 from alalek:hotfix_19439 2021-02-16 16:05:09 +00:00
Alexander Alekhin
0885a79c28 imgcodecs(test): don't include png.h 2021-02-16 13:26:51 +00:00
Alexander Alekhin
d2d6eba16a cmake: fix add_apple_compiler_options() calls and OBJCXX handling 2021-02-13 18:37:30 +00:00
Alexander Alekhin
e5d78960c6 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-02-12 21:34:49 +00:00
Zhuo Zhang
84a290097b
fix link order: put zlib after png/tiff/openexr
Previous link dependency: imgcodecs --> zlib --> libpng
this can generate imgcodecs shared lib, until Visual Studio integrated
with vcpkg, which will additionally specify LIBPATH, pointing to vcpkg
installed zlib (if any), which links the wrong zlib.

Fixed link dependency: imgcodecs --> libpng --> zlib
in this fixed case, symbols in zlib referenced in libpng will be found
in the build-from-source static zlib, instead of the vcpkg one.

related discussion:
- https://github.com/microsoft/vcpkg/issues/16165
- https://github.com/opencv/opencv/issues/17051
- https://github.com/opencv/opencv/issues/10576

MSVC linking order reference pages:
- https://docs.microsoft.com/en-us/cpp/build/reference/link-input-files?view=msvc-160
  for link order
- https://docs.microsoft.com/en-us/cpp/build/reference/linking?view=msvc-160
  LIB environment variable, for library file searching
- https://docs.microsoft.com/en-us/cpp/build/reference/libpath-additional-libpath?view=msvc-160
  LIBPATH option, for library file searching
2021-02-12 22:19:35 +08:00
Rachel A
650836d700 Exif parsing for PNG files to support Exif orientation tag. Moved decoder specific Exif parsing to JPEG and PNG decoders, respectively. Issue 16579 2021-02-09 10:35:27 -08:00
Mark Harfouche
7405075ede CHange import order to avoid apple check error 2021-02-05 23:24:56 -05:00
Zhuo Zhang
6e1da2ef91
Merge pull request #19203 from zchrissirhcz:fix-cvSaveImage
Fix cvSaveImage( ) function bug

* fix cvSaveImage crash

* replace emplace_back with {}, no C++11 required

* fix MacOSX build with vector's push_back
2020-12-24 16:58:16 +00:00
Stefan Dragnev
b13b5d86f6
Merge pull request #19109 from tailsu:sd/imdecode-jp2k-codestream
* OpenJPEG: decoder for J2K codestreams

* code review fixes

* exclude .j2c from GDAL tests
2020-12-23 12:33:33 +00:00
Jonathan Cole
85b0fb2a9c
Merge pull request #18826 from Rightpoint:feature/colejd/build-catalyst-xcframework
Support XCFramework builds, Catalyst

* Early work on xcframework support

* Improve legibility

* Somehow this works

* Specify ABIs in a place where they won't get erased

If you pass in the C/CXX flags from the Python script, they won't be respected. By doing it in the actual toolchain, the options are respected and Catalyst successfully links.

* Clean up and push updates

* Actually use Catalyst ABI

Needed to specify EXE linker flags to get compiler tests to link to the Catalyst ABIs.

* Clean up

* Revert changes to common toolchain that don't matter

* Try some things

* Support Catalyst build in OSX scripts

* Remove unnecessary iOS reference to AssetsLibrary framework

* Getting closer

* Try some things, port to Python 3

* Some additional fixes

* Point Cmake Plist gen to osx directory for Catalyst targets

* Remove dynamic lib references for Catalyst, copy iOS instead of macos

* Add flag for building only specified archs, remove iOS catalyst refs

* Add build-xcframework.sh

* Update build-xcframework.sh

* Add presumptive Apple Silicon support

* Add arm64 iphonesimulator target

* Fix xcframework build

* Working on arm64 iOS simulator

* Support 2.7 (replace run with check_output)

* Correctly check output of uname_m against arch

* Clean up

* Use lipo for intermediate frameworks, add python script

Remove unneeded __init__.py

* Simplify python xcframework build script

* Add --only-64-bit flag

* Add --framework-name flag

* Document

* Commit to f-strings, improve console output

* Add i386 to iphonesimulator platform in xcframework generator

* Enable objc for non-Catalyst frameworks

* Fix xcframework builder for paths with spaces

* Use arch when specifying Catalyst build platform in build command

* Fix incorrect settings for framework_name argparse configuration

* Prefer underscores instead of hyphens in new flags

* Move Catalyst flags to where they'll actually get used

* Use --without=objc on Catalyst target for now

* Remove get_or_create_folder and simplify logic

* Remove unused import

* Tighten up help text

* Document

* Move common functions into cv_build_utils

* Improve documentation

* Remove old build script

* Add readme

* Check for required CMake and Xcode versions

* Clean up TODOs and re-enable `copy_samples()`

Remove TODO

Fixup

* Add missing print_function import

* Clarify CMake dependency documentation

* Revert python2 change in gen_objc

* Remove unnecessary builtins imports

* Remove trailing whitespace

* Avoid building Catalyst unless specified

This makes Catalyst support a non-breaking change, though defaults should be specified when a breaking change is possible.

* Prevent lipoing for the same archs on different platforms before build

* Rename build-xcframework.py to build_xcframework.py

* Check for duplicate archs more carefully

* Prevent sample copying error when directory already exists

This can happen when building multiple architectures for the same platform.

* Simplify code for checking for default archs

* Improve build_xcframework.py header text

* Correctly resolve Python script paths

* Parse only known args in ios/osx build_framework.py

* Pass through uncaptured args in build_xcframework to osx/ios build

* Fix typo

* Fix typo

* Fix unparameterized build path for intermediate frameworks

* Fix dyanmic info.plist path for catalyst

* Fix utf-8 Python 3 issue

* Add dynamic flag to osx script

* Rename platform to platforms, remove armv7s and i386

* Fix creation of dynamic framework on maccatalyst and macos

* Update platforms/apple/readme.md

* Add `macos_archs` flag and deprecate `archs` flag

* Allow specification of archs when generating xcframework from terminal

* Change xcframework platform argument names to match archs flag names

* Remove platforms as a concept and shadow archs flags from ios/osx .py

* Improve documentation

* Fix building of objc module on Catalyst, excluding Swift

* Clean up build folder logic a bit

* Fix framework_name flag

* Drop passthrough_args, use unknown_args instead

* minor: coding style changes

Co-authored-by: Chris Ballinger <cballinger@rightpoint.com>
2020-11-24 21:54:54 +00:00
Alexander Alekhin
0105f8fa38 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-11-20 20:32:00 +00:00
Jonathan Cole
c4c9cdd2b1
Merge pull request #18855 from Rightpoint:feature/colejd/add-apple-conversions-to-framework-builds
Expose CGImage <-> Mat conversion for iOS platforms

* Add apple_conversions to framework builds

This exposes CGImage <-> Mat conversion.

* Export Mat <-> CGImage methods on iOS targets

* Add CGImage converters to iOS objc helper class

* Add CF_RETURNS_RETAINED annotations to methods returning CGImageRef
2020-11-19 21:20:32 +00:00
Suleyman TURKMEN
cc7f17f011 update documentation 2020-11-18 17:07:04 +03:00
Alexander Alekhin
cfbdbffcad objc: rework headers import
- 'AdditionalImports' can be removed from misc/objc/gen_dict.json
- avoid using of legacy 'opencv.hpp'
2020-11-15 05:24:01 +00:00
Alexander Alekhin
e8058b9fdb Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-10-21 15:55:23 +00:00
Pavel Rojtberg
bc6a70c689 imwrite: multi-image overload for bindings 2020-10-16 11:27:09 +00:00
mtfrctl
7de189114b
Merge pull request #18547 from mtfrctl:objc-conversions-macosx
Mat conversions for macOS/AppKit

* Extract CoreGraphics conversion logics from ios_conversions.mm to apple_conversions.h, apple_conversions. Add macosx_conversions.mm

* Add macosx.h

* Add Mat+Conversions.h and Mat+Conversions.mm

* Delete duplicated declaration from apple_conversion.mm

* Use short license header

* Add compile guard

* Delete unused imports

* Move precomp.hpp import from header to implementation

* Add macosx.h to skip headers

* Fix compile guard condition

* Use short license header

* Remove commented out unused code
2020-10-14 16:58:06 +00:00
Alexander Alekhin
6c575e8826 imgcodecs(openjpeg): add checks for input 2020-09-21 18:10:51 +00:00
Alexander Alekhin
f52a2cf5e1 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-09-19 17:03:08 +00:00
Alexander Alekhin
7dfe68cac6 imgcodecs: lazy on-demand codecs initialization 2020-09-13 11:14:56 +00:00
Alexander Alekhin
620629593b Merge pull request #18270 from komakai:swift-inout-arrays 2020-09-06 20:12:16 +00:00
Giles Payne
8b61719a9d Swift native in/out array handling 2020-09-03 21:31:11 +09:00
Alexander Alekhin
cf8322c0d3 Merge pull request #18194 from VadimLevin:dev/vlevin/openjpeg-source-intergration 2020-09-02 22:48:09 +00:00
Vadim Levin
0384eb7d8c 3rdparty: integrate OpenJPEG build to the OpenCV CMake
- adopted build scripts
- OpenJPEG build warnings are suppressed
2020-09-02 20:45:35 +00:00
Vadim Levin
bce5d364df feat: change OpenJPEG encoder to lossy with default parameters 2020-08-27 15:11:45 +03:00
Alexander Alekhin
fa25faa2d2 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-08-06 14:15:52 +00:00
Florian Jung
f66fc199a2 Fix build of grfmt_jpeg2000.cpp
libjasper has recently changed `jas_matrix_get` from a macro to an inline function
(389951d071 in https://github.com/jasper-software/jasper), causing the build to fail.
2020-07-30 19:23:52 +02:00
Alexander Alekhin
524a2fffe9 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-07-06 23:05:04 +00:00
Alexander Alekhin
3f13339071 Merge pull request #17728 from sturkmen72:patch-4 2020-07-06 23:01:27 +00:00
Maksim Shabunin
e8129429e9 imgcodecs: fix test build with disabled JPEG and PNG libs 2020-07-06 14:52:52 +03:00
Suleyman TURKMEN
2566d13100 Update documentation of imwrite() 2020-07-06 11:02:50 +03:00
Alexander Alekhin
a711e2aa41 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-06-29 21:19:09 +00:00
Giles Payne
59ba33658a Dynamic build for Objective-C/Swift wrapper 2020-06-26 08:26:05 +09:00
okamotoR
0e69cddda2 add if block for indexed color images 2020-06-23 21:36:47 +09:00
Giles Payne
02385472b6
Merge pull request #17165 from komakai:objc-binding
Objc binding

* Initial work on Objective-C wrapper

* Objective-C generator script; update manually generated wrappers

* Add Mat tests

* Core Tests

* Imgproc wrapper generation and tests

* Fixes for Imgcodecs wrapper

* Miscellaneous fixes. Swift build support

* Objective-C wrapper build/install

* Add Swift wrappers for videoio/objdetect/feature2d

* Framework build;iOS support

* Fix toArray functions;Use enum types whenever possible

* Use enum types where possible;prepare test build

* Update test

* Add test runner scripts for iOS and macOS

* Add test scripts and samples

* Build fixes

* Fix build (cmake 3.17.x compatibility)

* Fix warnings

* Fix enum name conflicting handling

* Add support for document generation with Jazzy

* Swift/Native fast accessor functions

* Add Objective-C wrapper for calib3d, dnn, ml, photo and video modules

* Remove IntOut/FloatOut/DoubleOut classes

* Fix iOS default test platform value

* Fix samples

* Revert default framework name to opencv2

* Add converter util functions

* Fix failing test

* Fix whitespace

* Add handling for deprecated methods;fix warnings;define __OPENCV_BUILD

* Suppress cmake warnings

* Reduce severity of "jazzy not found" log message

* Fix incorrect #include of compatibility header in ios.h

* Use explicit returns in subscript/get implementation

* Reduce minimum required cmake version to 3.15 for Objective-C/Swift binding
2020-06-08 18:32:53 +00:00
shijiayuan
4e97c69792
Merge pull request #17275 from shijiayuan:fixbug
* fix bug for CHECK issue

* remove chack for bpp

* add test for tif file

* add test for tiff file

* change the test name

* use proper bpp value, use clear test names
2020-05-25 18:49:37 +00:00
Alexander Alekhin
593af7287b Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-05-18 17:50:16 +00:00