0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

M1搭載Macでprocessingのカメラが使えるか検証

Last updated at Posted at 2021-01-06

はじめに

M1 Macが届いたので、色々動作チェックをしたいと思います。
まず一番気になるprocessingのカメラ動作から

実行環境

2021.01.06
MacBook Air M1/16GB

Processing 3.5.4
Processing 3.5.3
video 2.0 (GStreamer-based video library)
OpenCV for Processing 0.5.4

結果

カメラを使用するサンプルが動くようになりました。

手順

processing 3.5.4をインストール後、videoライブラリをインストールして、サンプルからカメラの動作チェックをしましたが動きませんでした。OpenCVライブラリをインストールしてみましたが、こちらのカメラサンプルも動きませんでした。具体的には、ウィンドウは何も表示されず、processingのコンソールにも何もエラーっぽいものは出ません。無反応です。

Processing 3.5.3をインストール(3.5.4は消さずに)して、openCVライブラリのサンプルを動かしたら、
BaseSrc: [avfvideosrc0] : Device video access permission has just been denied
と2行表示され、動きませんでした。後で直そうと思い次へ進みました。

Processing 3.5.3でvideoライブラリのサンプルを動かしたら、今度は動きました。カメラが立ち上がるまで、やや時間がかかったので、もしかしたら、最初に3.5.4で動かなかったのは、起動が待ちきれずに、閉じてしまっただけかもしれません。openCVのサンプルを実行し直したら今度は、動きました。原因はわかりませんが、動くようになりました。

Processing 3.5.4に戻り、videoライブラリのサンプルopenCVのサンプル共に、動くことを確認しました。動かなかった原因がモヤモヤしますが、M1のmacでも、processingのカメラプログラミングはできるようなので、一安心です。

途中1回システムアップデート(11.0->11.1)で再起動したので、影響しているかもしれません。

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?