お知らせ

  • 利用規約を守って投稿してください。また、よくある質問および投稿の手引きも参照してください。
  • メッセージの投稿にはアカウントが必要です。未登録の方は、ユーザ登録ページからアカウントを作成することができます。

#1 2013-11-07 23:44:40

kazu_123
新しいメンバ
登録日: 2013-11-07

Ubuntu10.04におけるARToolKitでの1394接続のwebカメラでのサンプルプログラム(simpleLite)の実行について

uname -rでは2.6.31-11-rtと表示されます。また32bitです。(uname -mでi686と表示されるため)

http://www.kameda-lab.org/_local/imagelab.tsukuba.ac.jp/ubuntu1004+opencv21/ARToolKitk/index-j.html
のサイトを参考にしているのですが、
./simpleLiteをすると

No video config string supplied, using defaults.
video device (/dev/video0) open failed
setupCamera(): Unable to open connection to camera.
main(): Unable to set up AR camera.

と表示され実行できません。


ARToolKit導入の手順としては、まず
$ sudo apt-get install libxmu-dev
をし、

$ tar xvfz ARToolKit-2.72.1.tgz    で解凍し、
$ patch -p0 -d . < artk-v4l2-2.72.1.20101003.patch     でパッチをあて
$ cd ARToolKit
$ ./Configure

をしました。
./Configureでは
Select a video capture driver.
  1: Video4Linux
  2: Video4Linux+JPEG Decompression (EyeToy)
  3: Video4Linux2
  4: Digital Video Camcoder through IEEE 1394 (DV Format)
  5: Digital Video Camera through IEEE 1394 (VGA NONCOMPRESSED Image Format)
  6: GStreamer Media Framework
で3を選び、
Color conversion should use x86 assembly (not working for 64bit)?
でyを選び、
Do you want to create debug symbols? (y or n)
ではnを選び、
Build gsub libraries with texture rectangle support? (y or n)
GL_NV_texture_rectangle is supported on most NVidia graphics cards
and on ATi Radeon and better graphics cards
ではnを選びました。

$ make
をし、
$ cd bin
で、bin内で
$ sudo ./simpleLite
を実行しました。

すると、
No video config string supplied, using defaults.
video device (/dev/video0) open failed
setupCamera(): Unable to open connection to camera.
main(): Unable to set up AR camera.
と表示され実行できないのです。
一応opencvなどでカメラに認識はできています。(sudoでのみ)

また、
./videoTestでは
No video config string supplied, using defaults.
video device (/dev/video0) open failed
となります。


実行できない原因が分かる方がいたらよろしくお願いします。

オフライン

 

#2 2013-11-15 07:53:44

YesKah
拒否
From: 福岡
登録日: 2012-03-10

Re: Ubuntu10.04におけるARToolKitでの1394接続のwebカメラでのサンプルプログラム(simpleLite)の実行について

※規約違反により追放されたユーザの投稿は、ログインユーザにのみ表示されます。

オフライン

 

#3 2013-11-15 09:31:39

Mocchi
管理者
登録日: 2009-05-17

Re: Ubuntu10.04におけるARToolKitでの1394接続のwebカメラでのサンプルプログラム(simpleLite)の実行について

kazu_123 による投稿:

./simpleLiteをすると

No video config string supplied, using defaults.
video device (/dev/video0) open failed
setupCamera(): Unable to open connection to camera.
main(): Unable to set up AR camera.

と表示され実行できません。

「open failed」でソースをgrepすると、以下のコードが見つかります。

/lib/SRC/VideoLinuxV4L/video.c

コード:

    vid->fd = open(vid->dev, O_RDWR);// O_RDONLY ?
    if(vid->fd < 0){
        printf("video device (%s) open failed\n",vid->dev); 
        free( vid );
        return 0;
    }

O_RDWRでキャラクターデバイス「/dev/video0」をopen(2)するところで失敗しているようです。原因としてありそうだなと私が思うことは、/dev/video0自体がないか、プロセスが/dev/video0へのアクセスパーミションを持っていない、という2点です。

そこで、3点の確認をお願いします。
1. IEEE1394接続のカメラを接続した状態で、システムに/dev/video0が設けられているかどうか
2. もし設けられているのなら、/dev/video0のパーミション
3. 実行形式「./simpleLite」のパーミション

オフライン

 

Board footer

Powered by FluxBB