Konuyu Oyla:
  • Toplam: 0 Oy - Ortalama: 0
Share Thread:
USB Kameradan Hareket algılama
#1
Merhaba

Ben USB kameradan hareket algılandığında fotoğraf çektirip mail attırmaya araştırıyorum.

PIR sensörü ile değil. USB kameranın kendisi hareketi algılamalı

Bu konuda yardım bekliyorum.
Şimdiden teşekkür ederim.
Ara
Cevapla
#2
Adım adım yapacaklarını yazayım. Ancak bunları nasıl yapacağını kendin bulman gerekli.
1-RPi'nin kamerayı tanıması ve kameradan resim alabilmesi gerekiyor (kamera uyumlu mu değil mi deneyip öğrenmek gerek).
2-OpenCV kütüphanesini yükleyip (Nasıl yuklenir linki) ufak bir kod yazarak kodda resmi kütüphanenin ilgili fonksiyonuna gönderip hareket var/yok bilgisini döndürüyoruz. (python yada c++ dili ile yapabilirsin)
3-Eğer hareket varsa istediğin adrese mail atıyorsun..
Ara
Cevapla
#3
Merhaba
OpenCV yüklediktan sonra ufak bir kod yazma kısmında çuvalıyorum işte. Pyhton veya C++ bilmiyorum.
Biryerlerden örnek script bulmaya çalışıyorum.
Yardımcı olabilirmisiniz?
Ara
Cevapla
#4
Benim önerim burdaki PiKrellCam uygulaması, kendi web kameramı tanımadığı için kullanma şansım olmadı ama arayüzü ve imkanları çok güzel, sizin istediğiniz kameradan hareket algılama ve mail atma var, kurulumu sitesinde mevcut ve kolay, umarım sizde çalışır..

Başarılar.. Smile


Ara
Cevapla
#5
Merhaba 
Bahsettiğiniz uygulamayı yüklemeyi denedim. Root olarak yüklenmemelidir diye bir uyarı verdi. "Pi" user ı ile login olup kurmaya çalıştım. Aşağıda görebileceğiniz hataları aldım.

http:192.168.1.188:8082 den bir yere ulaşamıyorum.
Ne yapabilirim?

pi@NagiosPi:~/pikrellcam $ ./install-pikrellcam.sh
mkdir: cannot create directory ‘media’: Permission denied
mkdir: cannot create directory ‘media/archive’: No such file or directory
mkdir: cannot create directory ‘media/videos’: No such file or directory
mkdir: cannot create directory ‘media/thumbs’: No such file or directory
mkdir: cannot create directory ‘media/stills’: No such file or directory
chown: cannot access ‘media’: No such file or directory
chown: cannot access ‘media/archive’: No such file or directory
chown: cannot access ‘media/videos’: No such file or directory
chown: cannot access ‘media/thumbs’: No such file or directory
chown: cannot access ‘media/stills’: No such file or directory
chmod: cannot access ‘media’: No such file or directory
chmod: cannot access ‘media/archive’: No such file or directory
chmod: cannot access ‘media/videos’: No such file or directory
chmod: cannot access ‘media/thumbs’: No such file or directory
chmod: cannot access ‘media/stills’: No such file or directory
ln: failed to create symbolic link ‘www/media’: Permission denied
ln: failed to create symbolic link ‘www/archive’: Permission denied

Set the port for the nginx web server.
If you already have a web server configuration using the default
port 80, you should enter an alternate port for PiKrellCam.
Otherwise you can use the default port 80 or an alternate as you wish.
The port number will be set in: /etc/nginx.sites-available/pikrellcam.
Enter web server port: 8082

For auto starting at boot, a PiKrellCam start command must be in rc.local.
If you don't start at boot, PiKrellCam can always be started and stopped
from the web page.
Do you want PiKrellCam to be auto started at boot? (yes/no): yes

Enter a password for a web page login for user: pi
Enter a blank entry if you do not want the password login.
Enter password: 1qaz2wsx

Starting PiKrellCam install...
Installing packages:  nginx
Running: apt-get update
Hit http://mirrordirector.raspbian.org jessie InRelease
Hit http://archive.raspberrypi.org jessie InRelease
Hit http://mirrordirector.raspbian.org jessie/main armhf Packages
Hit http://archive.raspberrypi.org jessie/main armhf Packages
Hit http://mirrordirector.raspbian.org jessie/contrib armhf Packages
Hit http://archive.raspberrypi.org jessie/ui armhf Packages
Hit http://mirrordirector.raspbian.org jessie/non-free armhf Packages
Hit http://mirrordirector.raspbian.org jessie/rpi armhf Packages
Ign http://archive.raspberrypi.org jessie/main Translation-en_GB
Ign http://archive.raspberrypi.org jessie/main Translation-en
Ign http://archive.raspberrypi.org jessie/ui Translation-en_GB
Ign http://archive.raspberrypi.org jessie/ui Translation-en
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en
Ign http://mirrordirector.raspbian.org jessie/main Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
nginx is already the newest version.
The following packages were automatically installed and are no longer required:
  libfontconfig1-dev libice-dev libjbig-dev liblzma-dev libpthread-stubs0-dev
  libsm-dev libtiffxx5 libvpx-dev libx11-dev libx11-doc libxau-dev libxcb1-dev
  libxdmcp-dev libxpm-dev libxt-dev x11proto-core-dev x11proto-input-dev
  x11proto-kb-dev xorg-sgml-doctools xtrans-dev
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up nginx-full (1.6.2-5+deb8u2) ...
Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalc                                                                                                                     tl -xn' for details.
invoke-rc.d: initscript nginx, action "start" failed.
dpkg: error processing package nginx-full (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of nginx:
 nginx depends on nginx-full (>= 1.6.2-5+deb8u2) | nginx-light (>= 1.6.2-5+deb8u                                                                                                                     2) | nginx-extras (>= 1.6.2-5+deb8u2); however:
  Package nginx-full is not configured yet.
  Package nginx-light is not installed.
  Package nginx-extras is not installed.
 nginx depends on nginx-full (<< 1.6.2-5+deb8u2.1~) | nginx-light (<< 1.6.2-5+de                                                                                                                     b8u2.1~) | nginx-extras (<< 1.6.2-5+deb8u2.1~); however:
  Package nginx-full is not configured yet.
  Package nginx-light is not installed.
  Package nginx-extras is not installed.

dpkg: error processing package nginx (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 nginx-full
 nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)
Adding a pikrellcam autostart command to /etc/rc.local:
su pi -c '(sleep 5; /home/pi/pikrellcam/pikrellcam) &'
Adding to /etc/sudoers.d: www-data permission to run pikrellcam as user pi:
htpasswd: cannot create file www/.htpasswd
chown: cannot access ‘www/.htpasswd’: No such file or directory
Turning off nginx access_log.
Installing /etc/nginx/sites-available/pikrellcam
    nginx web server port: 8082
    nginx web server root: /home/pi/pikrellcam/www
Adding /etc/nginx/sites-enabled/pikrellcam link to sites-available/pikrellcam.
A password for the web page is not set.
Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalc                                                                                                                     tl -xn' for details.
mkfifo: cannot create fifo ‘/home/pi/pikrellcam/www/FIFO’: Permission denied
chown: cannot access ‘/home/pi/pikrellcam/www/FIFO’: No such file or directory
chmod: cannot access ‘/home/pi/pikrellcam/www/FIFO’: No such file or directory
mkdir: cannot create directory ‘scripts’: Permission denied
cp: cannot create regular file ‘../scripts’: Permission denied
cp: cannot create regular file ‘../scripts’: Permission denied
cp: cannot create regular file ‘../scripts’: Permission denied
cp: cannot create regular file ‘../scripts’: Permission denied
cp: cannot create regular file ‘../scripts’: Permission denied
cp: cannot create regular file ‘../scripts’: Permission denied
cp: cannot create regular file ‘../scripts’: Permission denied
cp: cannot create regular file ‘../scripts’: Permission denied
cp: cannot create regular file ‘../scripts’: Permission denied
cp: cannot create regular file ‘../scripts’: Permission denied
cp: cannot create regular file ‘../scripts’: Permission denied

Install finished.
This install script does not automatically start pikrellcam.
To start pikrellcam, open a browser page to:
    http://your_pi:8082
and click on the "System" panel and then the "Start PiKrellCam" button.
PiKrellCam can also be run from a Pi terminal for testing purposes.
Automatic pikrellcam starting at boot is enabled.
Ara
Cevapla
#6
Komutun başına sudo ekle.
Truva Linux - Türkiye'nin Linux Dağıtımı
http://www.truvalinux.org.tr
http://truvalinux.blogspot.com
---------------------------------------------
Raspberry Pi Model B 256 Mb
Raspberry Pi Model B+
Cevapla
#7
sudo ekleyince aynı şekilde bu komut root olarak çalıştırılamaz diyor.
Ara
Cevapla


Hızlı Menü:


Konuyu Okuyanlar: 1 Ziyaretçi