diff --git a/.travis.yml b/.travis.yml
index 2e0f30b0978..e9f14fbb641 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -146,33 +146,33 @@ jobs:
         script: ./ci/install-travis.sh
 
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=opencv OS=ios-arm64
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=openblas OS=ios-arm64
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=skia OS=ios-arm64
         install: true
         script: ./ci/install-travis.sh
 
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=opencv OS=ios-x86_64
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=openblas OS=ios-x86_64
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=skia OS=ios-x86_64
         install: true
         script: ./ci/install-travis.sh
@@ -507,142 +507,142 @@ jobs:
         script: ./ci/install-travis.sh
 
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=opencv,artoolkitplus,chilitags,flandmark,gym OS=macosx-x86_64
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=ffmpeg OS=macosx-x86_64
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=ffmpeg OS=macosx-x86_64 EXT=-gpl
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=libdc1394,libfreenect,libfreenect2,librealsense,librealsense2 OS=macosx-x86_64
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=arrow OS=macosx-x86_64
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=hdf5 OS=macosx-x86_64
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=hyperscan OS=macosx-x86_64
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=mkl OS=macosx-x86_64
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=mkl-dnn,dnnl OS=macosx-x86_64
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=openblas OS=macosx-x86_64
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=arpack-ng,cminpack,fftw,gsl OS=macosx-x86_64
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=cpython,numpy,scipy OS=macosx-x86_64
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=llvm OS=macosx-x86_64
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=libpostal OS=macosx-x86_64
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=leptonica,tesseract OS=macosx-x86_64
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=caffe,openpose OS=macosx-x86_64
         install: true
         script: ./ci/install-travis.sh
 #      - os: osx
-#        osx_image: xcode11.3
+#        osx_image: xcode12.2
 #        env: PROJ=cuda OS=macosx-x86_64
 #        install: true
 #        script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=mxnet OS=macosx-x86_64
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=tensorflow OS=macosx-x86_64
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=ale OS=macosx-x86_64
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=onnx OS=macosx-x86_64
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=ngraph OS=macosx-x86_64
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=onnxruntime OS=macosx-x86_64
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=tvm OS=macosx-x86_64
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=liquidfun OS=macosx-x86_64
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=skia OS=macosx-x86_64
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=qt OS=macosx-x86_64
         install: true
         script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=cpu_features,systems OS=macosx-x86_64
         install: true
         script: ./ci/install-travis.sh
@@ -681,37 +681,37 @@ jobs:
         script: ./ci/install-travis.sh
 
 #      - os: osx
-#        osx_image: xcode11.3
+#        osx_image: xcode12.2
 #        env: PROJ=opencv OS=macosx-x86_64 EXT=-gpu
 #        install: true
 #        script: ./ci/install-travis.sh
 #      - os: osx
-#        osx_image: xcode11.3
+#        osx_image: xcode12.2
 #        env: PROJ=caffe OS=macosx-x86_64 EXT=-gpu
 #        install: true
 #        script: ./ci/install-travis.sh
 #      - os: osx
-#        osx_image: xcode11.3
+#        osx_image: xcode12.2
 #        env: PROJ=mxnet OS=macosx-x86_64 EXT=-gpu
 #        install: true
 #        script: ./ci/install-travis.sh
 #      - os: osx
-#        osx_image: xcode11.3
+#        osx_image: xcode12.2
 #        env: PROJ=tensorflow OS=macosx-x86_64 EXT=-gpu
 #        install: true
 #        script: ./ci/install-travis.sh
       - os: osx
-        osx_image: xcode11.3
+        osx_image: xcode12.2
         env: PROJ=tensorflow OS=macosx-x86_64 EXT=-python
         install: true
         script: ./ci/install-travis.sh
 #      - os: osx
-#        osx_image: xcode11.3
+#        osx_image: xcode12.2
 #        env: PROJ=tensorflow OS=macosx-x86_64 EXT=-python-gpu
 #        install: true
 #        script: ./ci/install-travis.sh
 #      - os: osx
-#        osx_image: xcode11.3
+#        osx_image: xcode12.2
 #        env: PROJ=onnxruntime OS=macosx-x86_64 EXT=-gpu
 #        install: true
 #        script: ./ci/install-travis.sh
diff --git a/ci/install-travis.sh b/ci/install-travis.sh
index 383bda9b50f..7b3004416cf 100755
--- a/ci/install-travis.sh
+++ b/ci/install-travis.sh
@@ -233,6 +233,7 @@ if [ "$TRAVIS_OS_NAME" == "osx" ]; then
    brew cask install adoptopenjdk8
    export JAVA_HOME=$(/usr/libexec/java_home -v1.8)
    export _JAVA_OPTIONS=-Xmx2048m
+   export MACOSX_DEPLOYMENT_TARGET=10.13
 
    # Try to use ccache to speed up the build and work around issue with Sectigo CA root certificate
    export PATH=/usr/local/opt/ccache/libexec/:/usr/local/opt/curl/bin/:/usr/local/opt/gpg1/libexec/gpgbin/:/usr/local/opt/bison/bin/:/usr/local/opt/flex/bin/:$PATH