Project import generated by Copybara.
PiperOrigin-RevId: 267460010
This commit is contained in:
parent
59a398924f
commit
785d266e3f
|
@ -120,7 +120,9 @@ http_archive(
|
|||
load("@org_tensorflow//tensorflow:workspace.bzl", "tf_workspace")
|
||||
tf_workspace(tf_repo_name = "org_tensorflow")
|
||||
|
||||
# Please run $ sudo apt-get install libopencv-dev
|
||||
# Please run
|
||||
# $ sudo apt-get install libopencv-core-dev libopencv-highgui-dev \
|
||||
# libopencv-imgproc-dev libopencv-video-dev
|
||||
new_local_repository(
|
||||
name = "linux_opencv",
|
||||
build_file = "@//third_party:opencv_linux.BUILD",
|
||||
|
@ -133,7 +135,7 @@ new_local_repository(
|
|||
path = "/usr"
|
||||
)
|
||||
|
||||
# Please run $ brew install opencv
|
||||
# Please run $ brew install opencv@3
|
||||
new_local_repository(
|
||||
name = "macos_opencv",
|
||||
build_file = "@//third_party:opencv_macos.BUILD",
|
||||
|
|
|
@ -8,8 +8,9 @@ Note: If you plan to use TensorFlow calculators and example apps, there is a
|
|||
known issue with gcc and g++ version 6.3 and 7.3. Please use other versions.
|
||||
|
||||
Note: While Mediapipe configuring TensorFlow with Python 2, if you see the
|
||||
following error: "org_tensorflow/third_party/git/git_configure.bzl", line 14, in
|
||||
_fail fail(("%sGit Configuration Error:%s %...)))", please install the python
|
||||
following error:
|
||||
'"/private/var/.../org_tensorflow/third_party/git/git_configure.bzl", line 14,
|
||||
in _fail fail(("%sGit Configuration Error:%s %...)))', please install the python
|
||||
future library by `$ pip install --user future`
|
||||
|
||||
Choose your operating system:
|
||||
|
@ -243,23 +244,17 @@ To build and run iOS apps:
|
|||
4. Install OpenCV and FFmpeg.
|
||||
|
||||
Option 1. Use HomeBrew package manager tool to install the pre-compiled
|
||||
OpenCV libraries. FFmpeg will be installed via OpenCV.
|
||||
OpenCV 3.4.5 libraries. FFmpeg will be installed via OpenCV.
|
||||
|
||||
```bash
|
||||
$ brew install opencv
|
||||
|
||||
# A Known issue with OpenCV 4.1.1 or above:
|
||||
# If you see a missing dependency declaration error when building mediapipe target,
|
||||
# you may need to uninstall glog as a temporary workaround. The error message looks like:
|
||||
# ERROR: this rule is missing dependency declarations for the following files included
|
||||
# by 'mediapipe/calculators/image/scale_image_utils.cc':
|
||||
# '/usr/local/include/glog/logging.h'
|
||||
# '/usr/local/include/glog/log_severity.h'
|
||||
# '/usr/local/include/glog/vlog_is_on.h'
|
||||
$ brew uninstall --ignore-dependencies glog
|
||||
$ bazel clean --expunge
|
||||
$ brew install opencv@3
|
||||
```
|
||||
|
||||
Note: If you do `$brew install opencv`, there is a known issue caused by the
|
||||
glog dependency of OpenCV 4.1.1 or above. The problem is solvable by
|
||||
uninstalling the glog. You need to do `$ brew uninstall
|
||||
--ignore-dependencies glog`
|
||||
|
||||
Option 2. Use MacPorts package manager tool to install the OpenCV libraries.
|
||||
|
||||
```bash
|
||||
|
|
19
third_party/opencv_macos.BUILD
vendored
19
third_party/opencv_macos.BUILD
vendored
|
@ -6,23 +6,22 @@ licenses(["notice"]) # BSD license
|
|||
exports_files(["LICENSE"])
|
||||
|
||||
# The following build rule assumes that OpenCV is installed by
|
||||
# 'brew install opencv' command on macos.
|
||||
# 'brew install opencv@3' command on macos.
|
||||
# If you install OpenCV separately, please modify the build rule accordingly.
|
||||
cc_library(
|
||||
name = "opencv",
|
||||
srcs = glob(
|
||||
[
|
||||
"local/opt/opencv/lib/libopencv_core.dylib",
|
||||
"local/opt/opencv/lib/libopencv_highgui.dylib",
|
||||
"local/opt/opencv/lib/libopencv_imgcodecs.dylib",
|
||||
"local/opt/opencv/lib/libopencv_imgproc.dylib",
|
||||
"local/opt/opencv/lib/libopencv_optflow.dylib",
|
||||
"local/opt/opencv/lib/libopencv_video.dylib",
|
||||
"local/opt/opencv/lib/libopencv_videoio.dylib",
|
||||
"local/opt/opencv@3/lib/libopencv_core.dylib",
|
||||
"local/opt/opencv@3/lib/libopencv_highgui.dylib",
|
||||
"local/opt/opencv@3/lib/libopencv_imgcodecs.dylib",
|
||||
"local/opt/opencv@3/lib/libopencv_imgproc.dylib",
|
||||
"local/opt/opencv@3/lib/libopencv_video.dylib",
|
||||
"local/opt/opencv@3/lib/libopencv_videoio.dylib",
|
||||
],
|
||||
),
|
||||
hdrs = glob(["local/opt/opencv/include/opencv4/**/*.h*"]),
|
||||
includes = ["local/opt/opencv/include/opencv4/"],
|
||||
hdrs = glob(["local/opt/opencv@3/include/opencv2/**/*.h*"]),
|
||||
includes = ["local/opt/opencv@3/include/"],
|
||||
linkstatic = 1,
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user