LoginSignup
6
5

More than 3 years have passed since last update.

MacBookのカメラでリアルタイム顔検出・顔認識 (macOS/Python/OpenCV4)

Last updated at Posted at 2019-05-11

概要

MacBookに搭載されたカメラを使用して、顔検出をしたい。(顔が存在していることを検出)
brewでOpenCVを入れたところ、OpenCVのバージョンが4になっており、参考サイトの顔検出のサンプルソースが動かなかったため、OpenCV4への対応を記す。

参考

結論は、サンプルソース内の顔検出に使用するXMLファイルの格納先指定パスを変更するだけです。

変更前 "/usr/local/share/OpenCV/haarcascades/〜"
変更後 "/usr/local/opt/opencv/share/opencv4/haarcascades/〜"

環境

  • macOS 10.14.4 Mojave
  • Python 3.7.3
  • pip 19.0.3

前提

  • pipで以下をインストール済
    • Jupyter Notebook
    • opencv-python

参考:【2019年5月】MacBookにJupyter Notebookをインストールする (macOS 10.14.4/Mojave)【macOS】Pythonのpipでライブラリをインストールする

使用したパッケージ

  • OpenCV 4.1

試したこと

brewでopencvをインストールする。

$ brew install opencv
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
cfn-lint         glooctl          jhipster         netpbm           postgresql@9.6   skaffold         wtf
checkbashisms    imagemagick      joplin           oniguruma        pygobject        socat            yarn
conan            istioctl         juju             opencoarrays     serverless       utf8proc         youtube-dl

==> Installing dependencies for opencv: eigen, aom, libpng, freetype, fontconfig, frei0r, gmp, libtasn1, libunistring, nettle, libffi, p11-kit, libevent, unbound, gnutls, lame, fribidi, gettext, pcre, glib, pixman, cairo, graphite2, icu4c, harfbuzz, libass, libbluray, libsoxr, libogg, libvorbis, libvpx, opencore-amr, jpeg, libtiff, little-cms2, openjpeg, opus, rtmpdump, flac, libsndfile, libsamplerate, rubberband, sdl2, snappy, speex, giflib, webp, leptonica, tesseract, theora, x264, x265, xvid, ffmpeg, gflags, glog, isl, mpfr, libmpc, gcc, openblas, python@2, numpy, ilmbase, openexr and tbb
==> Installing opencv dependency: eigen
==> Downloading https://homebrew.bintray.com/bottles/eigen-3.3.7.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/68/683c2dd898245f61c298d1f2675885e7c67ec7e18f6665df1ec56f088bd670f4?__gd
######################################################################## 100.0%
==> Pouring eigen-3.3.7.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/eigen/3.3.7: 487 files, 6.5MB
==> Installing opencv dependency: aom
==> Downloading https://homebrew.bintray.com/bottles/aom-1.0.0.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/fd/fdcfd3f69fbf8c9d5d3277a9cc0aabe6e4d708e3c505724828078ef93d3c82f7?__gd
######################################################################## 100.0%
==> Pouring aom-1.0.0.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/aom/1.0.0: 19 files, 12.6MB
==> Installing opencv dependency: libpng
==> Downloading https://homebrew.bintray.com/bottles/libpng-1.6.37.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/53/53bbd14cc27c86c16605e256e7646a1b5656c253abca084958c5d80a2961cb01?__gd
######################################################################## 100.0%
==> Pouring libpng-1.6.37.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/libpng/1.6.37: 27 files, 1.2MB
==> Installing opencv dependency: freetype
==> Downloading https://homebrew.bintray.com/bottles/freetype-2.10.0.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/d2/d231ab6634051c4b655bbfc07cd5b306ad5489d891ee2b105ed892347f2714af?__gd
######################################################################## 100.0%
==> Pouring freetype-2.10.0.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/freetype/2.10.0: 61 files, 2.3MB
==> Installing opencv dependency: fontconfig
==> Downloading https://homebrew.bintray.com/bottles/fontconfig-2.13.1.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/1c/1c704a5a4249252bf42dc4f2a458f911a7858a931858ad257d9ec39978ca5095?__gd
######################################################################## 100.0%
==> Pouring fontconfig-2.13.1.mojave.bottle.tar.gz
==> Regenerating font cache, this may take a while
==> /usr/local/Cellar/fontconfig/2.13.1/bin/fc-cache -frv
🍺  /usr/local/Cellar/fontconfig/2.13.1: 531 files, 3.3MB
==> Installing opencv dependency: frei0r
==> Downloading https://homebrew.bintray.com/bottles/frei0r-1.6.1.mojave.bottle.1.tar.gz
==> Downloading from https://akamai.bintray.com/a5/a509ee11dc4a3cd431a888c708d32c53d81e5ca67250520f91284d4370d946d4?__gd
######################################################################## 100.0%
==> Pouring frei0r-1.6.1.mojave.bottle.1.tar.gz
🍺  /usr/local/Cellar/frei0r/1.6.1: 137 files, 2.0MB
==> Installing opencv dependency: gmp
==> Downloading https://homebrew.bintray.com/bottles/gmp-6.1.2_2.mojave.bottle.1.tar.gz
==> Downloading from https://akamai.bintray.com/84/84f74594086bccc53bdb141f4d06d7847680374e255ebe016654da1e47db2dfc?__gd
######################################################################## 100.0%
==> Pouring gmp-6.1.2_2.mojave.bottle.1.tar.gz
🍺  /usr/local/Cellar/gmp/6.1.2_2: 18 files, 3.1MB
==> Installing opencv dependency: libtasn1
==> Downloading https://homebrew.bintray.com/bottles/libtasn1-4.13.mojave.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libtasn1-4.13.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/libtasn1/4.13: 59 files, 436KB
==> Installing opencv dependency: libunistring
==> Downloading https://homebrew.bintray.com/bottles/libunistring-0.9.10.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/1d/1d0c8e266acddcebeef3d9f6162d6f7fa0b193f5f71837174fb2ef0b39d324f3?__gd
######################################################################## 100.0%
==> Pouring libunistring-0.9.10.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/libunistring/0.9.10: 54 files, 4.4MB
==> Installing opencv dependency: nettle
==> Downloading https://homebrew.bintray.com/bottles/nettle-3.4.1.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/9e/9e7f78a4cc96ca57f75ca1d37cc12c11655b7e0aa7109da4becd0408a1e2ed6b?__gd
######################################################################## 100.0%
==> Pouring nettle-3.4.1.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/nettle/3.4.1: 85 files, 2MB
==> Installing opencv dependency: libffi
==> Downloading https://homebrew.bintray.com/bottles/libffi-3.2.1.mojave.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libffi-3.2.1.mojave.bottle.tar.gz
==> Caveats
libffi is keg-only, which means it was not symlinked into /usr/local,
because some formulae require a newer version of libffi.

For compilers to find libffi you may need to set:
  export LDFLAGS="-L/usr/local/opt/libffi/lib"

==> Summary
🍺  /usr/local/Cellar/libffi/3.2.1: 16 files, 296.8KB
==> Installing opencv dependency: p11-kit
==> Downloading https://homebrew.bintray.com/bottles/p11-kit-0.23.15.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/30/301934315c4d5c86b324d2278632252e43c196c3850bd3fe783fc4243c3474b5?__gd
######################################################################## 100.0%
==> Pouring p11-kit-0.23.15.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/p11-kit/0.23.15: 63 files, 2.9MB
==> Installing opencv dependency: libevent
==> Downloading https://homebrew.bintray.com/bottles/libevent-2.1.8.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/9a/9ab81f4ca9902042f7ea95d02bf36394c5cdc11d715b7f928badc9cf5724ca8b?__gd
######################################################################## 100.0%
==> Pouring libevent-2.1.8.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/libevent/2.1.8: 846 files, 2.2MB
==> Installing opencv dependency: unbound
==> Downloading https://homebrew.bintray.com/bottles/unbound-1.9.1_1.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/38/3897bcc25b36315cbda263d5048f608fb32736caa1839c2117146b8295c74530?__gd
######################################################################## 100.0%
==> Pouring unbound-1.9.1_1.mojave.bottle.tar.gz
==> Caveats
To have launchd start unbound now and restart at startup:
  sudo brew services start unbound
==> Summary
🍺  /usr/local/Cellar/unbound/1.9.1_1: 56 files, 4.8MB
==> Installing opencv dependency: gnutls
==> Downloading https://homebrew.bintray.com/bottles/gnutls-3.6.7.1.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/8a/8ac55be3286c011d104ebeadd3d79186a2513e7ac41b73e3e111fd2b474340c3?__gd
######################################################################## 100.0%
==> Pouring gnutls-3.6.7.1.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/gnutls/3.6.7.1: 1,205 files, 9.3MB
==> Installing opencv dependency: lame
==> Downloading https://homebrew.bintray.com/bottles/lame-3.100.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/73/737751faa513a68ac2499bb5cc607bc366e15dab8ff3bff5443567a455af5c3f?__gd
######################################################################## 100.0%
==> Pouring lame-3.100.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/lame/3.100: 27 files, 2.1MB
==> Installing opencv dependency: fribidi
==> Downloading https://homebrew.bintray.com/bottles/fribidi-1.0.5.mojave.bottle.tar.gz
######################################################################## 100.0%
==> Pouring fribidi-1.0.5.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/fribidi/1.0.5: 66 files, 581.3KB
==> Installing opencv dependency: gettext
==> Downloading https://homebrew.bintray.com/bottles/gettext-0.19.8.1.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/af/afc6a6120632b98d58b11fab82ae5e081206b89684dd948abf2d29caeb813ffd?__gd
######################################################################## 100.0%
==> Pouring gettext-0.19.8.1.mojave.bottle.tar.gz
==> Caveats
gettext is keg-only, which means it was not symlinked into /usr/local,
because macOS provides the BSD gettext library & some software gets confused if both are in the library path.

If you need to have gettext first in your PATH run:
  echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile

For compilers to find gettext you may need to set:
  export LDFLAGS="-L/usr/local/opt/gettext/lib"
  export CPPFLAGS="-I/usr/local/opt/gettext/include"

==> Summary
🍺  /usr/local/Cellar/gettext/0.19.8.1: 1,935 files, 16.9MB
==> Installing opencv dependency: pcre
==> Downloading https://homebrew.bintray.com/bottles/pcre-8.43.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/08/08e7414a7641d1e184c936537ff67f72f52649374d2308b896d4146ccc2c08fe?__gd
######################################################################## 100.0%
==> Pouring pcre-8.43.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/pcre/8.43: 204 files, 5.5MB
==> Installing opencv dependency: glib
==> Downloading https://homebrew.bintray.com/bottles/glib-2.60.2.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/19/1969b4088e0235f81bdd6fc846f0f990008d07122728b2e927a0af71b6edf56d?__gd
######################################################################## 100.0%
==> Pouring glib-2.60.2.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/glib/2.60.2: 429 files, 15.2MB
==> Installing opencv dependency: pixman
==> Downloading https://homebrew.bintray.com/bottles/pixman-0.38.4.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/39/3990b771ee29451c8a9bcb6cb077205ae08adc0d5af2faebf29197d13c36a51a?__gd
######################################################################## 100.0%
==> Pouring pixman-0.38.4.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/pixman/0.38.4: 13 files, 1.3MB
==> Installing opencv dependency: cairo
==> Downloading https://homebrew.bintray.com/bottles/cairo-1.16.0.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/20/204d0a3df9ebebef6f553b4a583351f14b84ca8682537941f2c04ba971999444?__gd
######################################################################## 100.0%
==> Pouring cairo-1.16.0.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/cairo/1.16.0: 117 files, 5.5MB
==> Installing opencv dependency: graphite2
==> Downloading https://homebrew.bintray.com/bottles/graphite2-1.3.13.mojave.bottle.tar.gz
######################################################################## 100.0%
==> Pouring graphite2-1.3.13.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/graphite2/1.3.13: 18 files, 232KB
==> Installing opencv dependency: icu4c
==> Downloading https://homebrew.bintray.com/bottles/icu4c-64.2.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/e8/e858556120acc0c2d52b8fb572b677856724cc28d24a7e1b2762d458a2977c8e?__gd
######################################################################## 100.0%
==> Pouring icu4c-64.2.mojave.bottle.tar.gz
==> Caveats
icu4c is keg-only, which means it was not symlinked into /usr/local,
because macOS provides libicucore.dylib (but nothing else).

If you need to have icu4c first in your PATH run:
  echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.bash_profile
  echo 'export PATH="/usr/local/opt/icu4c/sbin:$PATH"' >> ~/.bash_profile

For compilers to find icu4c you may need to set:
  export LDFLAGS="-L/usr/local/opt/icu4c/lib"
  export CPPFLAGS="-I/usr/local/opt/icu4c/include"

==> Summary
🍺  /usr/local/Cellar/icu4c/64.2: 257 files, 69.2MB
==> Installing opencv dependency: harfbuzz
==> Downloading https://homebrew.bintray.com/bottles/harfbuzz-2.4.0_1.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/61/61b7d23cecda1da3bb409f15ef7005e5ed1ff7c82ec9c86b1331c095892ccdcc?__gd
######################################################################## 100.0%
==> Pouring harfbuzz-2.4.0_1.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/harfbuzz/2.4.0_1: 145 files, 9.4MB
==> Installing opencv dependency: libass
==> Downloading https://homebrew.bintray.com/bottles/libass-0.14.0_1.mojave.bottle.1.tar.gz
==> Downloading from https://akamai.bintray.com/ad/adf25e0a4a61f098662952861b1103493f2be98a14975b1cdd27c8aab3a9603a?__gd
######################################################################## 100.0%
==> Pouring libass-0.14.0_1.mojave.bottle.1.tar.gz
🍺  /usr/local/Cellar/libass/0.14.0_1: 10 files, 509KB
==> Installing opencv dependency: libbluray
==> Downloading https://homebrew.bintray.com/bottles/libbluray-1.1.1.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/24/24eef45b0f6eb3bb19ae609d7dda031f590ef44520f541bd6d482ee65e4d31a8?__gd
######################################################################## 100.0%
==> Pouring libbluray-1.1.1.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/libbluray/1.1.1: 21 files, 1.5MB
==> Installing opencv dependency: libsoxr
==> Downloading https://homebrew.bintray.com/bottles/libsoxr-0.1.3.mojave.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libsoxr-0.1.3.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/libsoxr/0.1.3: 28 files, 242.4KB
==> Installing opencv dependency: libogg
==> Downloading https://homebrew.bintray.com/bottles/libogg-1.3.3.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/a6/a693f64d879c75f6380725c3b4b8516773cc6097c4116ae796677e7242568ced?__gd
######################################################################## 100.0%
==> Pouring libogg-1.3.3.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/libogg/1.3.3: 97 files, 459.9KB
==> Installing opencv dependency: libvorbis
==> Downloading https://homebrew.bintray.com/bottles/libvorbis-1.3.6.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/ac/ac35ee835666c32cd678636e1d19899dfef55191bcc776eeddedcd5ad19eac03?__gd
######################################################################## 100.0%
==> Pouring libvorbis-1.3.6.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/libvorbis/1.3.6: 157 files, 2.3MB
==> Installing opencv dependency: libvpx
==> Downloading https://homebrew.bintray.com/bottles/libvpx-1.8.0.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/8a/8acc007976c337e0ea107c07e984c7924516b1ce70fe7a862af480de0998cb96?__gd
######################################################################## 100.0%
==> Pouring libvpx-1.8.0.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/libvpx/1.8.0: 17 files, 1.5MB
==> Installing opencv dependency: opencore-amr
==> Downloading https://homebrew.bintray.com/bottles/opencore-amr-0.1.5.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/81/816d5463797b6412fd8944b98ab79d766dcf886b9eb37d83778fb7648d995603?__gd
######################################################################## 100.0%
==> Pouring opencore-amr-0.1.5.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/opencore-amr/0.1.5: 17 files, 645.4KB
==> Installing opencv dependency: jpeg
==> Downloading https://homebrew.bintray.com/bottles/jpeg-9c.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/1d/1daa0fc0c197d96dd4e1afddb9ad576951a15aafd6b85138b8a60817d1d8173c?__gd
######################################################################## 100.0%
==> Pouring jpeg-9c.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/jpeg/9c: 21 files, 733.4KB
==> Installing opencv dependency: libtiff
==> Downloading https://homebrew.bintray.com/bottles/libtiff-4.0.10_1.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/6e/6ecdca6159e5e4db0ec0fcbddbc76dbdc65e496139b131a05f2a9ed8187914f8?__gd
######################################################################## 100.0%
==> Pouring libtiff-4.0.10_1.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/libtiff/4.0.10_1: 246 files, 3.5MB
==> Installing opencv dependency: little-cms2
==> Downloading https://homebrew.bintray.com/bottles/little-cms2-2.9.mojave.bottle.1.tar.gz
==> Downloading from https://akamai.bintray.com/1c/1c69f212b9754cbc1700e822ceb659103cb692afe2e26366c9ae9eb9e3fc612d?__gd
######################################################################## 100.0%
==> Pouring little-cms2-2.9.mojave.bottle.1.tar.gz
🍺  /usr/local/Cellar/little-cms2/2.9: 18 files, 1MB
==> Installing opencv dependency: openjpeg
==> Downloading https://homebrew.bintray.com/bottles/openjpeg-2.3.1.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/6d/6de317bfef3ab808ff5f3eb9c1aa47f77e7236fba8ad0d606b29b38eb47c321e?__gd
######################################################################## 100.0%
==> Pouring openjpeg-2.3.1.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/openjpeg/2.3.1: 516 files, 12.8MB
==> Installing opencv dependency: opus
==> Downloading https://homebrew.bintray.com/bottles/opus-1.3.1.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/78/787bf9b6d56f63cc3d0cf0f7f17affeb85b6496b32bf9a200f57431c886ae4a5?__gd
######################################################################## 100.0%
==> Pouring opus-1.3.1.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/opus/1.3.1: 17 files, 982.3KB
==> Installing opencv dependency: rtmpdump
==> Downloading https://homebrew.bintray.com/bottles/rtmpdump-2.4+20151223.mojave.bottle.tar.gz
######################################################################## 100.0%
==> Pouring rtmpdump-2.4+20151223.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/rtmpdump/2.4+20151223: 20 files, 418.5KB
==> Installing opencv dependency: flac
==> Downloading https://homebrew.bintray.com/bottles/flac-1.3.2_1.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/e3/e3972de751c58d0b835ef606f5d21c4ef22bbac927b17f75440259fb2da06bd6?__gd
######################################################################## 100.0%
==> Pouring flac-1.3.2_1.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/flac/1.3.2_1: 53 files, 1.8MB
==> Installing opencv dependency: libsndfile
==> Downloading https://homebrew.bintray.com/bottles/libsndfile-1.0.28.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/e7/e7cb1a29d931a1637ec84a5ba6b71d37801dc0bb4eab38051df19755cb048667?__gd
######################################################################## 100.0%
==> Pouring libsndfile-1.0.28.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/libsndfile/1.0.28: 48 files, 1.8MB
==> Installing opencv dependency: libsamplerate
==> Downloading https://homebrew.bintray.com/bottles/libsamplerate-0.1.9_1.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/42/4230f5c4bc95c882164799c28d1e8e0fd58e24649aacd585a8d9fa03e7b54395?__gd
######################################################################## 100.0%
==> Pouring libsamplerate-0.1.9_1.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/libsamplerate/0.1.9_1: 28 files, 3.0MB
==> Installing opencv dependency: rubberband
==> Downloading https://homebrew.bintray.com/bottles/rubberband-1.8.2_1.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/e1/e100d79a7c55a6ba5642d0ce9e005971bdab26e8b7a0cdec011e21db19ccd767?__gd
######################################################################## 100.0%
==> Pouring rubberband-1.8.2_1.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/rubberband/1.8.2_1: 12 files, 634.0KB
==> Installing opencv dependency: sdl2
==> Downloading https://homebrew.bintray.com/bottles/sdl2-2.0.9_1.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/73/73dc083fe09bef54cdd08d6e1d86fba67172bc7bda4886e410d3e72fe5ab1c32?__gd
######################################################################## 100.0%
==> Pouring sdl2-2.0.9_1.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/sdl2/2.0.9_1: 87 files, 4.5MB
==> Installing opencv dependency: snappy
==> Downloading https://homebrew.bintray.com/bottles/snappy-1.1.7_1.mojave.bottle.tar.gz
######################################################################## 100.0%
==> Pouring snappy-1.1.7_1.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/snappy/1.1.7_1: 18 files, 115.8KB
==> Installing opencv dependency: speex
==> Downloading https://homebrew.bintray.com/bottles/speex-1.2.0.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/ed/ed212ec09c4a1a2c789e5c2a7a2679b56c75bcf252a52fe28d6615499d21534f?__gd
######################################################################## 100.0%
==> Pouring speex-1.2.0.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/speex/1.2.0: 21 files, 689.5KB
==> Installing opencv dependency: giflib
==> Downloading https://homebrew.bintray.com/bottles/giflib-5.1.4_1.mojave.bottle.tar.gz
######################################################################## 100.0%
==> Pouring giflib-5.1.4_1.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/giflib/5.1.4_1: 21 files, 312.6KB
==> Installing opencv dependency: webp
==> Downloading https://homebrew.bintray.com/bottles/webp-1.0.2.mojave.bottle.1.tar.gz
==> Downloading from https://akamai.bintray.com/38/38bdac64dbf41666310ae1589e6102b6bcd688540514f7af4334dd74996c4277?__gd
######################################################################## 100.0%
==> Pouring webp-1.0.2.mojave.bottle.1.tar.gz
🍺  /usr/local/Cellar/webp/1.0.2: 39 files, 2.1MB
==> Installing opencv dependency: leptonica
==> Downloading https://homebrew.bintray.com/bottles/leptonica-1.78.0.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/53/534b5e4c96c34aed7f2e3dd9ffc046fd49a9a015a1ed0c2f1859d2cc182ed66e?__gd
######################################################################## 100.0%
==> Pouring leptonica-1.78.0.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/leptonica/1.78.0: 49 files, 5.9MB
==> Installing opencv dependency: tesseract
==> Downloading https://homebrew.bintray.com/bottles/tesseract-4.0.0_1.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/46/46867f03eddad20bbcc7d17580d48ab718c3658291a1e51b928c6b0c2a55100f?__gd
######################################################################## 100.0%
==> Pouring tesseract-4.0.0_1.mojave.bottle.tar.gz
==> Caveats
This formula contains only the "eng", "osd", and "snum" language data files.
If you need all the other supported languages, `brew install tesseract-lang`.
==> Summary
🍺  /usr/local/Cellar/tesseract/4.0.0_1: 63 files, 30.0MB
==> Installing opencv dependency: theora
==> Downloading https://homebrew.bintray.com/bottles/theora-1.1.1.mojave.bottle.2.tar.gz
==> Downloading from https://akamai.bintray.com/04/0423b3f4858072285691307877ef1899e62e67b67fad2f871e7937d7db572836?__gd
######################################################################## 100.0%
==> Pouring theora-1.1.1.mojave.bottle.2.tar.gz
🍺  /usr/local/Cellar/theora/1.1.1: 97 files, 2MB
==> Installing opencv dependency: x264
==> Downloading https://homebrew.bintray.com/bottles/x264-r2917.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/47/474593a6930921e1668ff97daaa211d6b0da6c48a08f928496d76b45542afafe?__gd
######################################################################## 100.0%
==> Pouring x264-r2917.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/x264/r2917: 11 files, 5.9MB
==> Installing opencv dependency: x265
==> Downloading https://homebrew.bintray.com/bottles/x265-3.0.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/32/324e316181b0348c2362fec475d8a595828783f97a2f59593a7e04493bbcef1c?__gd
######################################################################## 100.0%
==> Pouring x265-3.0.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/x265/3.0: 11 files, 35.3MB
==> Installing opencv dependency: xvid
==> Downloading https://homebrew.bintray.com/bottles/xvid-1.3.5.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/c1/c1c30c17a4715958fa2fa27fb060b2835c02818b46342d6534131af8729ebd65?__gd
######################################################################## 100.0%
==> Pouring xvid-1.3.5.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/xvid/1.3.5: 10 files, 1.2MB
==> Installing opencv dependency: ffmpeg
==> Downloading https://homebrew.bintray.com/bottles/ffmpeg-4.1.3_1.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/dd/ddfb58dd5432eed657d9ecda3b4c2f06eb523815e9e7f339b1f05d1048f89d40?__gd
######################################################################## 100.0%
==> Pouring ffmpeg-4.1.3_1.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/ffmpeg/4.1.3_1: 282 files, 58.5MB
==> Installing opencv dependency: gflags
==> Downloading https://homebrew.bintray.com/bottles/gflags-2.2.2.mojave.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring gflags-2.2.2.mojave.bottle.1.tar.gz
🍺  /usr/local/Cellar/gflags/2.2.2: 24 files, 330.2KB
==> Installing opencv dependency: glog
==> Downloading https://homebrew.bintray.com/bottles/glog-0.4.0.mojave.bottle.tar.gz
######################################################################## 100.0%
==> Pouring glog-0.4.0.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/glog/0.4.0: 19 files, 227.8KB
==> Installing opencv dependency: isl
==> Downloading https://homebrew.bintray.com/bottles/isl-0.21.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/f9/f9188b5d486b2a835cd865f219be1a9848ce3926e27089a1538ee989db65447d?__gd
######################################################################## 100.0%
==> Pouring isl-0.21.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/isl/0.21: 72 files, 4.3MB
==> Installing opencv dependency: mpfr
==> Downloading https://homebrew.bintray.com/bottles/mpfr-4.0.2.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/cf/cfce7ab866e98360c9364cd924da620ae7936d3a224d686aacc209c2107d19aa?__gd
######################################################################## 100.0%
==> Pouring mpfr-4.0.2.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/mpfr/4.0.2: 28 files, 4.7MB
==> Installing opencv dependency: libmpc
==> Downloading https://homebrew.bintray.com/bottles/libmpc-1.1.0.mojave.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libmpc-1.1.0.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/libmpc/1.1.0: 12 files, 354KB
==> Installing opencv dependency: gcc
==> Downloading https://homebrew.bintray.com/bottles/gcc-9.1.0.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/1a/1af51e1a8c5394297c13b85548203a84279a2e24e6ab982fb299c526bdde3079?__gd
######################################################################## 100.0%
==> Pouring gcc-9.1.0.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/gcc/9.1.0: 1,461 files, 287MB
==> Installing opencv dependency: openblas
==> Downloading https://homebrew.bintray.com/bottles/openblas-0.3.6_1.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/ce/ce1788eedcf1776fcad04ae78cb81e7141e7db07762dafb44118c9cfb7748de0?__gd
######################################################################## 100.0%
==> Pouring openblas-0.3.6_1.mojave.bottle.tar.gz
==> Caveats
openblas is keg-only, which means it was not symlinked into /usr/local,
because macOS provides BLAS and LAPACK in the Accelerate framework.

For compilers to find openblas you may need to set:
  export LDFLAGS="-L/usr/local/opt/openblas/lib"
  export CPPFLAGS="-I/usr/local/opt/openblas/include"

==> Summary
🍺  /usr/local/Cellar/openblas/0.3.6_1: 21 files, 120MB
==> Installing opencv dependency: python@2
==> Downloading https://homebrew.bintray.com/bottles/python@2-2.7.16.mojave.bottle.1.tar.gz
==> Downloading from https://akamai.bintray.com/cb/cb90a15faf89116993fd85c330069965aefe2d5c6b189a594868d03a34c94aaa?__gd
######################################################################## 100.0%
==> Pouring python@2-2.7.16.mojave.bottle.1.tar.gz
==> /usr/local/Cellar/python@2/2.7.16/bin/python -s setup.py --no-user-cfg install --force --verbose --single-version-ex
==> /usr/local/Cellar/python@2/2.7.16/bin/python -s setup.py --no-user-cfg install --force --verbose --single-version-ex
==> /usr/local/Cellar/python@2/2.7.16/bin/python -s setup.py --no-user-cfg install --force --verbose --single-version-ex
==> Caveats
Pip and setuptools have been installed. To update them
  pip install --upgrade pip setuptools

You can install Python packages with
  pip install <package>

They will install into the site-package directory
  /usr/local/lib/python2.7/site-packages

See: https://docs.brew.sh/Homebrew-and-Python
==> Summary
🍺  /usr/local/Cellar/python@2/2.7.16: 3,706 files, 50.6MB
==> Installing opencv dependency: numpy
==> Downloading https://homebrew.bintray.com/bottles/numpy-1.16.3_1.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/d1/d1a6b200ef06b691881d2dce01ba40f4b18be032bd8fb75fdec6b098440d7cf5?__gd
######################################################################## 100.0%
==> Pouring numpy-1.16.3_1.mojave.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/f2py
Target /usr/local/bin/f2py
already exists. You may want to remove it:
  rm '/usr/local/bin/f2py'

To force the link and overwrite all conflicting files:
  brew link --overwrite numpy

To list all files that would be deleted:
  brew link --overwrite --dry-run numpy

Possible conflicting files are:
/usr/local/bin/f2py
/usr/local/bin/f2py3
/usr/local/bin/f2py3.7
/usr/local/lib/python3.7/site-packages/numpy/LICENSE.txt
/usr/local/lib/python3.7/site-packages/numpy/__config__.py
/usr/local/lib/python3.7/site-packages/numpy/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/_distributor_init.py
/usr/local/lib/python3.7/site-packages/numpy/_globals.py
/usr/local/lib/python3.7/site-packages/numpy/_pytesttester.py
/usr/local/lib/python3.7/site-packages/numpy/compat/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/compat/_inspect.py
/usr/local/lib/python3.7/site-packages/numpy/compat/py3k.py
/usr/local/lib/python3.7/site-packages/numpy/compat/setup.py
/usr/local/lib/python3.7/site-packages/numpy/compat/tests/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/compat/tests/test_compat.py
/usr/local/lib/python3.7/site-packages/numpy/conftest.py
/usr/local/lib/python3.7/site-packages/numpy/core/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/core/_add_newdocs.py
/usr/local/lib/python3.7/site-packages/numpy/core/_aliased_types.py
/usr/local/lib/python3.7/site-packages/numpy/core/_dtype.py
/usr/local/lib/python3.7/site-packages/numpy/core/_dtype_ctypes.py
/usr/local/lib/python3.7/site-packages/numpy/core/_dummy.cpython-37m-darwin.so
/usr/local/lib/python3.7/site-packages/numpy/core/_internal.py
/usr/local/lib/python3.7/site-packages/numpy/core/_methods.py
/usr/local/lib/python3.7/site-packages/numpy/core/_multiarray_tests.cpython-37m-darwin.so
/usr/local/lib/python3.7/site-packages/numpy/core/_multiarray_umath.cpython-37m-darwin.so
/usr/local/lib/python3.7/site-packages/numpy/core/_operand_flag_tests.cpython-37m-darwin.so
/usr/local/lib/python3.7/site-packages/numpy/core/_rational_tests.cpython-37m-darwin.so
/usr/local/lib/python3.7/site-packages/numpy/core/_string_helpers.py
/usr/local/lib/python3.7/site-packages/numpy/core/_struct_ufunc_tests.cpython-37m-darwin.so
/usr/local/lib/python3.7/site-packages/numpy/core/_type_aliases.py
/usr/local/lib/python3.7/site-packages/numpy/core/_umath_tests.cpython-37m-darwin.so
/usr/local/lib/python3.7/site-packages/numpy/core/arrayprint.py
/usr/local/lib/python3.7/site-packages/numpy/core/cversions.py
/usr/local/lib/python3.7/site-packages/numpy/core/defchararray.py
/usr/local/lib/python3.7/site-packages/numpy/core/einsumfunc.py
/usr/local/lib/python3.7/site-packages/numpy/core/fromnumeric.py
/usr/local/lib/python3.7/site-packages/numpy/core/function_base.py
/usr/local/lib/python3.7/site-packages/numpy/core/generate_numpy_api.py
/usr/local/lib/python3.7/site-packages/numpy/core/getlimits.py
/usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/__multiarray_api.h
/usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/__ufunc_api.h
/usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/_neighborhood_iterator_imp.h
/usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/_numpyconfig.h
/usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h
/usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/arrayscalars.h
/usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/halffloat.h
/usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/multiarray_api.txt
/usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h
/usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h
/usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/noprefix.h
/usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h
/usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/npy_3kcompat.h
/usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/npy_common.h
/usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/npy_cpu.h
/usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/npy_endian.h
/usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/npy_interrupt.h
/usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/npy_math.h
/usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/npy_no_deprecated_api.h
/usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/npy_os.h
/usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/numpyconfig.h
/usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/old_defines.h
/usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/oldnumeric.h
/usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/ufunc_api.txt
/usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/ufuncobject.h
/usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/utils.h
/usr/local/lib/python3.7/site-packages/numpy/core/info.py
/usr/local/lib/python3.7/site-packages/numpy/core/lib/libnpymath.a
/usr/local/lib/python3.7/site-packages/numpy/core/lib/npy-pkg-config/mlib.ini
/usr/local/lib/python3.7/site-packages/numpy/core/lib/npy-pkg-config/npymath.ini
/usr/local/lib/python3.7/site-packages/numpy/core/machar.py
/usr/local/lib/python3.7/site-packages/numpy/core/memmap.py
/usr/local/lib/python3.7/site-packages/numpy/core/multiarray.py
/usr/local/lib/python3.7/site-packages/numpy/core/numeric.py
/usr/local/lib/python3.7/site-packages/numpy/core/numerictypes.py
/usr/local/lib/python3.7/site-packages/numpy/core/overrides.py
/usr/local/lib/python3.7/site-packages/numpy/core/records.py
/usr/local/lib/python3.7/site-packages/numpy/core/setup.py
/usr/local/lib/python3.7/site-packages/numpy/core/setup_common.py
/usr/local/lib/python3.7/site-packages/numpy/core/shape_base.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/_locales.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/data/astype_copy.pkl
/usr/local/lib/python3.7/site-packages/numpy/core/tests/data/recarray_from_file.fits
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_abc.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_api.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_arrayprint.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_datetime.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_defchararray.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_deprecations.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_dtype.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_einsum.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_errstate.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_extint128.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_function_base.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_getlimits.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_half.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_indexerrors.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_indexing.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_item_selection.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_longdouble.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_machar.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_mem_overlap.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_memmap.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_multiarray.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_nditer.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_numeric.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_numerictypes.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_overrides.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_print.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_records.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_regression.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_scalar_ctors.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_scalarbuffer.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_scalarinherit.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_scalarmath.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_scalarprint.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_shape_base.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_ufunc.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_umath.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_umath_complex.py
/usr/local/lib/python3.7/site-packages/numpy/core/tests/test_unicode.py
/usr/local/lib/python3.7/site-packages/numpy/core/umath.py
/usr/local/lib/python3.7/site-packages/numpy/core/umath_tests.py
/usr/local/lib/python3.7/site-packages/numpy/ctypeslib.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/__config__.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/__version__.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/_shell_utils.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/ccompiler.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/command/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/command/autodist.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/command/bdist_rpm.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/command/build.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/command/build_clib.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/command/build_ext.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/command/build_py.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/command/build_scripts.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/command/build_src.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/command/config.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/command/config_compiler.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/command/develop.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/command/egg_info.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/command/install.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/command/install_clib.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/command/install_data.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/command/install_headers.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/command/sdist.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/compat.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/conv_template.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/core.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/cpuinfo.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/exec_command.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/extension.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/fcompiler/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/fcompiler/absoft.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/fcompiler/compaq.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/fcompiler/environment.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/fcompiler/g95.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/fcompiler/gnu.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/fcompiler/hpux.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/fcompiler/ibm.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/fcompiler/intel.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/fcompiler/lahey.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/fcompiler/mips.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/fcompiler/nag.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/fcompiler/none.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/fcompiler/pathf95.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/fcompiler/pg.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/fcompiler/sun.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/fcompiler/vast.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/from_template.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/info.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/intelccompiler.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/lib2def.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/line_endings.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/log.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/mingw/gfortran_vs2003_hack.c
/usr/local/lib/python3.7/site-packages/numpy/distutils/mingw32ccompiler.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/misc_util.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/msvc9compiler.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/msvccompiler.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/npy_pkg_config.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/numpy_distribution.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/pathccompiler.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/setup.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/system_info.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/tests/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/tests/test_exec_command.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/tests/test_fcompiler.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/tests/test_fcompiler_gnu.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/tests/test_fcompiler_intel.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/tests/test_fcompiler_nagfor.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/tests/test_from_template.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/tests/test_misc_util.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/tests/test_npy_pkg_config.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/tests/test_shell_utils.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/tests/test_system_info.py
/usr/local/lib/python3.7/site-packages/numpy/distutils/unixccompiler.py
/usr/local/lib/python3.7/site-packages/numpy/doc/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/doc/basics.py
/usr/local/lib/python3.7/site-packages/numpy/doc/broadcasting.py
/usr/local/lib/python3.7/site-packages/numpy/doc/byteswapping.py
/usr/local/lib/python3.7/site-packages/numpy/doc/constants.py
/usr/local/lib/python3.7/site-packages/numpy/doc/creation.py
/usr/local/lib/python3.7/site-packages/numpy/doc/glossary.py
/usr/local/lib/python3.7/site-packages/numpy/doc/indexing.py
/usr/local/lib/python3.7/site-packages/numpy/doc/internals.py
/usr/local/lib/python3.7/site-packages/numpy/doc/misc.py
/usr/local/lib/python3.7/site-packages/numpy/doc/structured_arrays.py
/usr/local/lib/python3.7/site-packages/numpy/doc/subclassing.py
/usr/local/lib/python3.7/site-packages/numpy/doc/ufuncs.py
/usr/local/lib/python3.7/site-packages/numpy/dual.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/__main__.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/__version__.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/auxfuncs.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/capi_maps.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/cb_rules.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/cfuncs.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/common_rules.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/crackfortran.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/diagnose.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/f2py2e.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/f2py_testing.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/f90mod_rules.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/func2subr.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/info.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/rules.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/setup.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/src/fortranobject.c
/usr/local/lib/python3.7/site-packages/numpy/f2py/src/fortranobject.h
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/src/assumed_shape/.f2py_f2cmap
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/src/assumed_shape/foo_free.f90
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/src/assumed_shape/foo_mod.f90
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/src/assumed_shape/foo_use.f90
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/src/assumed_shape/precision.f90
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/src/common/block.f
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/src/kind/foo.f90
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/src/mixed/foo.f
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/src/mixed/foo_fixed.f90
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/src/mixed/foo_free.f90
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/src/parameter/constant_both.f90
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/src/parameter/constant_compound.f90
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/src/parameter/constant_integer.f90
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/src/parameter/constant_non_compound.f90
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/src/parameter/constant_real.f90
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/src/regression/inout.f90
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/src/size/foo.f90
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/src/string/char.f90
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/test_array_from_pyobj.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/test_assumed_shape.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/test_block_docstring.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/test_callback.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/test_common.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/test_compile_function.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/test_kind.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/test_mixed.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/test_parameter.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/test_quoted_character.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/test_regression.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/test_return_character.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/test_return_complex.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/test_return_integer.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/test_return_logical.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/test_return_real.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/test_semicolon_split.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/test_size.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/test_string.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/tests/util.py
/usr/local/lib/python3.7/site-packages/numpy/f2py/use_rules.py
/usr/local/lib/python3.7/site-packages/numpy/fft/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/fft/fftpack.py
/usr/local/lib/python3.7/site-packages/numpy/fft/fftpack_lite.cpython-37m-darwin.so
/usr/local/lib/python3.7/site-packages/numpy/fft/helper.py
/usr/local/lib/python3.7/site-packages/numpy/fft/info.py
/usr/local/lib/python3.7/site-packages/numpy/fft/setup.py
/usr/local/lib/python3.7/site-packages/numpy/fft/tests/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/fft/tests/test_fftpack.py
/usr/local/lib/python3.7/site-packages/numpy/fft/tests/test_helper.py
/usr/local/lib/python3.7/site-packages/numpy/lib/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/lib/_datasource.py
/usr/local/lib/python3.7/site-packages/numpy/lib/_iotools.py
/usr/local/lib/python3.7/site-packages/numpy/lib/_version.py
/usr/local/lib/python3.7/site-packages/numpy/lib/arraypad.py
/usr/local/lib/python3.7/site-packages/numpy/lib/arraysetops.py
/usr/local/lib/python3.7/site-packages/numpy/lib/arrayterator.py
/usr/local/lib/python3.7/site-packages/numpy/lib/financial.py
/usr/local/lib/python3.7/site-packages/numpy/lib/format.py
/usr/local/lib/python3.7/site-packages/numpy/lib/function_base.py
/usr/local/lib/python3.7/site-packages/numpy/lib/histograms.py
/usr/local/lib/python3.7/site-packages/numpy/lib/index_tricks.py
/usr/local/lib/python3.7/site-packages/numpy/lib/info.py
/usr/local/lib/python3.7/site-packages/numpy/lib/mixins.py
/usr/local/lib/python3.7/site-packages/numpy/lib/nanfunctions.py
/usr/local/lib/python3.7/site-packages/numpy/lib/npyio.py
/usr/local/lib/python3.7/site-packages/numpy/lib/polynomial.py
/usr/local/lib/python3.7/site-packages/numpy/lib/recfunctions.py
/usr/local/lib/python3.7/site-packages/numpy/lib/scimath.py
/usr/local/lib/python3.7/site-packages/numpy/lib/setup.py
/usr/local/lib/python3.7/site-packages/numpy/lib/shape_base.py
/usr/local/lib/python3.7/site-packages/numpy/lib/stride_tricks.py
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/data/py2-objarr.npy
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/data/py2-objarr.npz
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/data/py3-objarr.npy
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/data/py3-objarr.npz
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/data/python3.npy
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/data/win64python2.npy
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/test__datasource.py
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/test__iotools.py
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/test__version.py
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/test_arraypad.py
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/test_arraysetops.py
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/test_arrayterator.py
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/test_financial.py
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/test_format.py
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/test_function_base.py
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/test_histograms.py
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/test_index_tricks.py
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/test_io.py
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/test_mixins.py
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/test_nanfunctions.py
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/test_packbits.py
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/test_polynomial.py
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/test_recfunctions.py
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/test_regression.py
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/test_shape_base.py
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/test_stride_tricks.py
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/test_twodim_base.py
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/test_type_check.py
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/test_ufunclike.py
/usr/local/lib/python3.7/site-packages/numpy/lib/tests/test_utils.py
/usr/local/lib/python3.7/site-packages/numpy/lib/twodim_base.py
/usr/local/lib/python3.7/site-packages/numpy/lib/type_check.py
/usr/local/lib/python3.7/site-packages/numpy/lib/ufunclike.py
/usr/local/lib/python3.7/site-packages/numpy/lib/user_array.py
/usr/local/lib/python3.7/site-packages/numpy/lib/utils.py
/usr/local/lib/python3.7/site-packages/numpy/linalg/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/linalg/_umath_linalg.cpython-37m-darwin.so
/usr/local/lib/python3.7/site-packages/numpy/linalg/info.py
/usr/local/lib/python3.7/site-packages/numpy/linalg/lapack_lite.cpython-37m-darwin.so
/usr/local/lib/python3.7/site-packages/numpy/linalg/linalg.py
/usr/local/lib/python3.7/site-packages/numpy/linalg/setup.py
/usr/local/lib/python3.7/site-packages/numpy/linalg/tests/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/linalg/tests/test_build.py
/usr/local/lib/python3.7/site-packages/numpy/linalg/tests/test_deprecations.py
/usr/local/lib/python3.7/site-packages/numpy/linalg/tests/test_linalg.py
/usr/local/lib/python3.7/site-packages/numpy/linalg/tests/test_regression.py
/usr/local/lib/python3.7/site-packages/numpy/ma/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/ma/bench.py
/usr/local/lib/python3.7/site-packages/numpy/ma/core.py
/usr/local/lib/python3.7/site-packages/numpy/ma/extras.py
/usr/local/lib/python3.7/site-packages/numpy/ma/mrecords.py
/usr/local/lib/python3.7/site-packages/numpy/ma/setup.py
/usr/local/lib/python3.7/site-packages/numpy/ma/tests/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/ma/tests/test_core.py
/usr/local/lib/python3.7/site-packages/numpy/ma/tests/test_deprecations.py
/usr/local/lib/python3.7/site-packages/numpy/ma/tests/test_extras.py
/usr/local/lib/python3.7/site-packages/numpy/ma/tests/test_mrecords.py
/usr/local/lib/python3.7/site-packages/numpy/ma/tests/test_old_ma.py
/usr/local/lib/python3.7/site-packages/numpy/ma/tests/test_regression.py
/usr/local/lib/python3.7/site-packages/numpy/ma/tests/test_subclassing.py
/usr/local/lib/python3.7/site-packages/numpy/ma/testutils.py
/usr/local/lib/python3.7/site-packages/numpy/ma/timer_comparison.py
/usr/local/lib/python3.7/site-packages/numpy/ma/version.py
/usr/local/lib/python3.7/site-packages/numpy/matlib.py
/usr/local/lib/python3.7/site-packages/numpy/matrixlib/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/matrixlib/defmatrix.py
/usr/local/lib/python3.7/site-packages/numpy/matrixlib/setup.py
/usr/local/lib/python3.7/site-packages/numpy/matrixlib/tests/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/matrixlib/tests/test_defmatrix.py
/usr/local/lib/python3.7/site-packages/numpy/matrixlib/tests/test_interaction.py
/usr/local/lib/python3.7/site-packages/numpy/matrixlib/tests/test_masked_matrix.py
/usr/local/lib/python3.7/site-packages/numpy/matrixlib/tests/test_matrix_linalg.py
/usr/local/lib/python3.7/site-packages/numpy/matrixlib/tests/test_multiarray.py
/usr/local/lib/python3.7/site-packages/numpy/matrixlib/tests/test_numeric.py
/usr/local/lib/python3.7/site-packages/numpy/matrixlib/tests/test_regression.py
/usr/local/lib/python3.7/site-packages/numpy/polynomial/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/polynomial/_polybase.py
/usr/local/lib/python3.7/site-packages/numpy/polynomial/chebyshev.py
/usr/local/lib/python3.7/site-packages/numpy/polynomial/hermite.py
/usr/local/lib/python3.7/site-packages/numpy/polynomial/hermite_e.py
/usr/local/lib/python3.7/site-packages/numpy/polynomial/laguerre.py
/usr/local/lib/python3.7/site-packages/numpy/polynomial/legendre.py
/usr/local/lib/python3.7/site-packages/numpy/polynomial/polynomial.py
/usr/local/lib/python3.7/site-packages/numpy/polynomial/polyutils.py
/usr/local/lib/python3.7/site-packages/numpy/polynomial/setup.py
/usr/local/lib/python3.7/site-packages/numpy/polynomial/tests/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/polynomial/tests/test_chebyshev.py
/usr/local/lib/python3.7/site-packages/numpy/polynomial/tests/test_classes.py
/usr/local/lib/python3.7/site-packages/numpy/polynomial/tests/test_hermite.py
/usr/local/lib/python3.7/site-packages/numpy/polynomial/tests/test_hermite_e.py
/usr/local/lib/python3.7/site-packages/numpy/polynomial/tests/test_laguerre.py
/usr/local/lib/python3.7/site-packages/numpy/polynomial/tests/test_legendre.py
/usr/local/lib/python3.7/site-packages/numpy/polynomial/tests/test_polynomial.py
/usr/local/lib/python3.7/site-packages/numpy/polynomial/tests/test_polyutils.py
/usr/local/lib/python3.7/site-packages/numpy/polynomial/tests/test_printing.py
/usr/local/lib/python3.7/site-packages/numpy/random/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/random/info.py
/usr/local/lib/python3.7/site-packages/numpy/random/mtrand.cpython-37m-darwin.so
/usr/local/lib/python3.7/site-packages/numpy/random/randomkit.h
/usr/local/lib/python3.7/site-packages/numpy/random/setup.py
/usr/local/lib/python3.7/site-packages/numpy/random/tests/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/random/tests/test_random.py
/usr/local/lib/python3.7/site-packages/numpy/random/tests/test_regression.py
/usr/local/lib/python3.7/site-packages/numpy/setup.py
/usr/local/lib/python3.7/site-packages/numpy/testing/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/testing/_private/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/testing/_private/decorators.py
/usr/local/lib/python3.7/site-packages/numpy/testing/_private/noseclasses.py
/usr/local/lib/python3.7/site-packages/numpy/testing/_private/nosetester.py
/usr/local/lib/python3.7/site-packages/numpy/testing/_private/parameterized.py
/usr/local/lib/python3.7/site-packages/numpy/testing/_private/utils.py
/usr/local/lib/python3.7/site-packages/numpy/testing/decorators.py
/usr/local/lib/python3.7/site-packages/numpy/testing/noseclasses.py
/usr/local/lib/python3.7/site-packages/numpy/testing/nosetester.py
/usr/local/lib/python3.7/site-packages/numpy/testing/print_coercion_tables.py
/usr/local/lib/python3.7/site-packages/numpy/testing/setup.py
/usr/local/lib/python3.7/site-packages/numpy/testing/tests/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/testing/tests/test_decorators.py
/usr/local/lib/python3.7/site-packages/numpy/testing/tests/test_doctesting.py
/usr/local/lib/python3.7/site-packages/numpy/testing/tests/test_utils.py
/usr/local/lib/python3.7/site-packages/numpy/testing/utils.py
/usr/local/lib/python3.7/site-packages/numpy/tests/__init__.py
/usr/local/lib/python3.7/site-packages/numpy/tests/test_ctypeslib.py
/usr/local/lib/python3.7/site-packages/numpy/tests/test_matlib.py
/usr/local/lib/python3.7/site-packages/numpy/tests/test_numpy_version.py
/usr/local/lib/python3.7/site-packages/numpy/tests/test_public_api.py
/usr/local/lib/python3.7/site-packages/numpy/tests/test_reloading.py
/usr/local/lib/python3.7/site-packages/numpy/tests/test_scripts.py
/usr/local/lib/python3.7/site-packages/numpy/tests/test_warnings.py
/usr/local/lib/python3.7/site-packages/numpy/version.py
==> Caveats
If you use system python (that comes - depending on the OS X version -
with older versions of numpy, scipy and matplotlib), you may need to
ensure that the brewed packages come earlier in Python's sys.path with:
  mkdir -p /Users/mac/Library/Python/2.7/lib/python/site-packages
  echo 'import sys; sys.path.insert(1, "/usr/local/lib/python3.7/site-packages")' >> /Users/mac/Library/Python/2.7/lib/python/site-packages/homebrew.pth
==> Summary
🍺  /usr/local/Cellar/numpy/1.16.3_1: 1,000 files, 26.2MB
==> Installing opencv dependency: ilmbase
==> Downloading https://homebrew.bintray.com/bottles/ilmbase-2.3.0.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/43/436dbe30d0bc520c5c056dac23a3558dd2595e5f5b68c6c17e18566716c71e56?__gd
######################################################################## 100.0%
==> Pouring ilmbase-2.3.0.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/ilmbase/2.3.0: 344 files, 5.6MB
==> Installing opencv dependency: openexr
==> Downloading https://homebrew.bintray.com/bottles/openexr-2.3.0.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/11/111658d105dc894ea67e1fdc98597c73c1bf1fa64ac52f1287372ded53a1cdab?__gd
######################################################################## 100.0%
==> Pouring openexr-2.3.0.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/openexr/2.3.0: 132 files, 10.7MB
==> Installing opencv dependency: tbb
==> Downloading https://homebrew.bintray.com/bottles/tbb-2019_U5_1.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/e4/e46dedc9910976bc00022a64376111ad81fc7886168b1dc543fd11f5d80c17d0?__gd
######################################################################## 100.0%
==> Pouring tbb-2019_U5_1.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/tbb/2019_U5_1: 135 files, 2.8MB
==> Installing opencv
==> Downloading https://homebrew.bintray.com/bottles/opencv-4.1.0_2.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/3b/3be6de71c28077e5279ffb0104729b0cef1267f81908e6ea0fb404fb81d913e6?__gd
######################################################################## 100.0%
==> Pouring opencv-4.1.0_2.mojave.bottle.tar.gz
Warning: opencv dependency gcc was built with a different C++ standard
library (libstdc++ from clang). This may cause problems at runtime.
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink lib/python3.7/site-packages/cv2/__init__.py
Target /usr/local/lib/python3.7/site-packages/cv2/__init__.py
already exists. You may want to remove it:
  rm '/usr/local/lib/python3.7/site-packages/cv2/__init__.py'

To force the link and overwrite all conflicting files:
  brew link --overwrite opencv

To list all files that would be deleted:
  brew link --overwrite --dry-run opencv

Possible conflicting files are:
/usr/local/lib/python3.7/site-packages/cv2/__init__.py
==> Summary
🍺  /usr/local/Cellar/opencv/4.1.0_2: 727 files, 237.5MB
==> Caveats
==> libffi
libffi is keg-only, which means it was not symlinked into /usr/local,
because some formulae require a newer version of libffi.

For compilers to find libffi you may need to set:
  export LDFLAGS="-L/usr/local/opt/libffi/lib"

==> unbound
To have launchd start unbound now and restart at startup:
  sudo brew services start unbound
==> gettext
gettext is keg-only, which means it was not symlinked into /usr/local,
because macOS provides the BSD gettext library & some software gets confused if both are in the library path.

If you need to have gettext first in your PATH run:
  echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile

For compilers to find gettext you may need to set:
  export LDFLAGS="-L/usr/local/opt/gettext/lib"
  export CPPFLAGS="-I/usr/local/opt/gettext/include"

==> icu4c
icu4c is keg-only, which means it was not symlinked into /usr/local,
because macOS provides libicucore.dylib (but nothing else).

If you need to have icu4c first in your PATH run:
  echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.bash_profile
  echo 'export PATH="/usr/local/opt/icu4c/sbin:$PATH"' >> ~/.bash_profile

For compilers to find icu4c you may need to set:
  export LDFLAGS="-L/usr/local/opt/icu4c/lib"
  export CPPFLAGS="-I/usr/local/opt/icu4c/include"

==> tesseract
This formula contains only the "eng", "osd", and "snum" language data files.
If you need all the other supported languages, `brew install tesseract-lang`.
==> openblas
openblas is keg-only, which means it was not symlinked into /usr/local,
because macOS provides BLAS and LAPACK in the Accelerate framework.

For compilers to find openblas you may need to set:
  export LDFLAGS="-L/usr/local/opt/openblas/lib"
  export CPPFLAGS="-I/usr/local/opt/openblas/include"

==> python@2
Pip and setuptools have been installed. To update them
  pip install --upgrade pip setuptools

You can install Python packages with
  pip install <package>

They will install into the site-package directory
  /usr/local/lib/python2.7/site-packages

See: https://docs.brew.sh/Homebrew-and-Python
==> numpy
If you use system python (that comes - depending on the OS X version -
with older versions of numpy, scipy and matplotlib), you may need to
ensure that the brewed packages come earlier in Python's sys.path with:
  mkdir -p /Users/mac/Library/Python/2.7/lib/python/site-packages
  echo 'import sys; sys.path.insert(1, "/usr/local/lib/python3.7/site-packages")' >> /Users/mac/Library/Python/2.7/lib/python/site-packages/homebrew.pth

顔検出の実行

画像から検出

参考サイトのソースを実行したところ、detectMultiScaleでエラーが発生した。
参考サイト:Python, OpenCVで顔検出と瞳検出(顔認識、瞳認識)

---------------------------------------------------------------------------
error                                     Traceback (most recent call last)
<ipython-input-1-b6b73bd9d549> in <module>
     28 
     29         # 顔認識の実行
---> 30         facerect = cascade.detectMultiScale(frame, scaleFactor=1.2, minNeighbors=2, minSize=(10,10))
     31 
     32         # 顔が見つかったらcv2.rectangleで顔に白枠を表示する

error: OpenCV(4.1.0) /Users/travis/build/skvark/opencv-python/opencv/modules/objdetect/src/cascadedetect.cpp:1658: error: (-215:Assertion failed) !empty() in function 'detectMultiScale'

原因

原因は顔検出に使用するXMLファイルの格納場所が、OpenCV 4になって変更されたためでした。

変更前 "/usr/local/share/OpenCV/haarcascades/〜"
変更後 "/usr/local/opt/opencv/share/opencv4/haarcascades/〜"

修正したソース

引用元
https://note.nkmk.me/python-opencv-face-detection-haar-cascade/

import cv2
import numpy as np
from IPython.display import display, Image

face_cascade_path = '/usr/local/opt/opencv/share/'\
                    'opencv4/haarcascades/haarcascade_frontalface_default.xml'
eye_cascade_path = '/usr/local/opt/opencv/share/'\
                   'opencv4/haarcascades/haarcascade_eye.xml'

face_cascade = cv2.CascadeClassifier(face_cascade_path)
eye_cascade = cv2.CascadeClassifier(eye_cascade_path)

src = cv2.imread('lenna.jpg')
src_gray = cv2.cvtColor(src, cv2.COLOR_BGR2GRAY)
cv2.imshow("color", src_gray)
print(src_gray.shape)
faces = face_cascade.detectMultiScale(src_gray)

for x, y, w, h in faces:
    cv2.rectangle(src, (x, y), (x + w, y + h), (255, 0, 0), 2)
    face = src[y: y + h, x: x + w]
    face_gray = src_gray[y: y + h, x: x + w]
    eyes = eye_cascade.detectMultiScale(face_gray)
    for (ex, ey, ew, eh) in eyes:
        cv2.rectangle(face, (ex, ey), (ex + ew, ey + eh), (0, 255, 0), 2)

cv2.imwrite('face_detect.jpg', src)

def display_cv_image(image, format='.png'):
    decoded_bytes = cv2.imencode(format, image)[1].tobytes()
    display(Image(data=decoded_bytes))

display_cv_image(src, '.png')

Jupyter Notebookで実行した結果

Jupyter-Notebookで実行した結果.png

検出に使用した元画像

lenna.jpg

検出結果の画像

face_detect.jpg

MacBookのカメラから取得した映像で顔検出

参考サイトのソースを使用。

変更前 "/usr/local/share/OpenCV/haarcascades/〜"
変更後 "/usr/local/opt/opencv/share/opencv4/haarcascades/〜"

スマホで顔画像を表示し、MacBookのカメラにかざしてみました。
画像はぱくたそからお借りしました。
MacBookのカメラで顔検出.png

リアルタイムに顔が検出されていました。

修正したソース

引用元
https://gist.github.com/kurozumi/04a75695dc32c46586be0d69e6a8243f

capture.py
# coding: utf-8

import cv2 
from IPython.display import display, Image

if __name__ == "__main__":

    # 内蔵カメラを起動
    cap = cv2.VideoCapture(0)

    # OpenCVに用意されている顔認識するためのxmlファイルのパス
    cascade_path = "/usr/local/opt/opencv/share/opencv4/haarcascades/haarcascade_frontalface_alt.xml"

    # カスケード分類器の特徴量を取得する
    cascade = cv2.CascadeClassifier(cascade_path)

    # 顔に表示される枠の色を指定(白色)
    color = (255,255,255)

    while True:

        # 内蔵カメラから読み込んだキャプチャデータを取得
        ret, frame = cap.read()

        # モノクロで表示する
        # frame = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)

        # 顔認識の実行
        facerect = cascade.detectMultiScale(frame, scaleFactor=1.2, minNeighbors=2, minSize=(10,10))

        # 顔が見つかったらcv2.rectangleで顔に白枠を表示する
        if len(facerect) > 0:
            for rect in facerect:
                cv2.rectangle(frame, tuple(rect[0:2]), tuple(rect[0:2]+rect[2:4]), color, thickness=2)

        # 表示
        cv2.imshow("frame", frame)

        # qキーを押すとループ終了
        if cv2.waitKey(1) & 0xFF == ord('q'):
            break

    # 内蔵カメラを終了
    cap.release()
    cv2.destroyAllWindows()
6
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
5