Cov txheej txheem:

Lub Sijhawm Lapse Lub Koob Yees Duab Rig: 6 Kauj Ruam
Lub Sijhawm Lapse Lub Koob Yees Duab Rig: 6 Kauj Ruam

Video: Lub Sijhawm Lapse Lub Koob Yees Duab Rig: 6 Kauj Ruam

Video: Lub Sijhawm Lapse Lub Koob Yees Duab Rig: 6 Kauj Ruam
Video: SCP-610 Плоть, что ненавидит (все документы и журналы) 2024, Hlis ntuj nqeg
Anonim
Lub Sijhawm Lapse Lub Koob Yees Duab Rig
Lub Sijhawm Lapse Lub Koob Yees Duab Rig

Kuv lub sij hawm-lapse rig siv thawj gen 'Pi + pheej yig heev USB webcam + sawv dawb (bipod). Ib feem ntawm kuv qhov kev tsim qauv yog rov qab siv/nce-khoom khoom kuv twb tau txais lawm, txwv tsis pub kuv tsuas yog tau tawm mus thiab yuav Pi lub koob yees duab module thiab siv cov phiaj xwm no. Huag.. thiab nws txhua yam yuav tsum tau khiav ntawm lub davhlau ya nyob twg - raws li kuv tau xav tias feem ntau/txhua qhov ntawm kev tshaj tawm yuav ua tiav nyob deb (tsis muaj taub hau), lossis tsis siv lub network.

Khoom siv

Nqi & khoom siv:

  • RPi 1st Gen = £ 5: 00
  • 16GB SD Card = £ 5: 00
  • Fais fab mov = £ 4: 00
  • USB lub vev xaib = £ 1: 00
  • CAT5 ethernet cable = pub dawb
  • Bipod = pub dawb

Kauj Ruam 1: Kauj Ruam 1: Nruab Fswebcam

Kauj ruam 1: Nruab Fswebcam
Kauj ruam 1: Nruab Fswebcam
Kauj ruam 1: Nruab Fswebcam
Kauj ruam 1: Nruab Fswebcam

NCO TSEG: Kuv siv daim npav 16Gb SD nrog kev teeb tsa huv ntawm tam sim no OS Raspbian (Buster desktop version). Kuv siv Etcher los nyem kuv daim npav.

Pib los ntawm kev teeb tsa fswebcam, raws li tau piav qhia hauv RPi cov ntaub ntawv no.

sudo apt nruab fswebcam

Plug rau hauv koj lub webcam pheej yig/tsis txaus thiab sim nws siv:

fswebcam -r 800X600 image.jpg

Yog tias ua haujlwm tau zoo, tsim cov npe los tuav koj cov duab ntau.

mkdir webcam

Kauj Ruam 2: Kauj Ruam 2: Tsim Bash Script & Automate

Kauj ruam 2: Tsim Bash Script & Automate
Kauj ruam 2: Tsim Bash Script & Automate

Txhua cov lus txib ua tiav siv lub davhlau ya nyob twg qhov rai / kab hais kom ua.

Tsim tsab ntawv bash hauv nano (hu ua webcam.sh). Tsim cov ntaub ntawv khoob los ntawm kev ntaus:

nano webcam.sh

Tiav tsab ntawv bash tiav:

#!/bin/tsoo

DATE = $ (hnub tim +"%Y-%m-%d_%H%M")

fswebcam -r 800x600 -tsis -banner /home/pi/webcam/$DATE.jpg

Siv cov lus txib no kom ua tiav:

chmod +x webcam.sh

Kuaj tsab ntawv siv cov lus txib no:

./webcam.sh

Automate tus txheej txheem siv cron (piav qhia zoo ntawm no).

Ntaus cov lus txib hauv qab no hauv kab hais kom ua, mus rau hauv qab ntawm cov ntawv ntawd thiab ntaus hauv kab lus thib ob:

crontab -e

* * * * * /home/pi/webcam.sh 2> & 1

Muaj txawm tias muaj txiaj ntsig online crontab generator uas ua txhua qhov kev xav rau koj:

Txuag thiab tawm ntawm cov ntawv sau. Rov pib dua, teeb tsa koj lub vev xaib thiab mus. Cov ntawv no tam sim no siv cov duab txhua ob vib nas this (niaj hnub) nrog lub sijhawm tshwj xeeb-lub npe-lub npe-npe ntawm res '800X600 txhua qhov pov tseg hauv koj lub vev xaib.

Kauj Ruam 3: Kauj Ruam 3: Txheeb Xyuas Koj Cov Duab

Kauj Ruam 3: Txheeb Xyuas Koj Cov Duab
Kauj Ruam 3: Txheeb Xyuas Koj Cov Duab
Kauj Ruam 3: Txheeb Xyuas Koj Cov Duab
Kauj Ruam 3: Txheeb Xyuas Koj Cov Duab

Tsis pub dhau lub webcam nplaub tshev hom:

sawv ls

Qhov no qhia txog cov ntawv tais ceev tseg nrog lub sijhawm hloov tshiab tiag.

Kuv xav tau txoj hauv kev nrawm los mus hla (qee qhov) cov duab siv kab hais kom ua (txhawm rau txheeb xyuas lawv ua ntej nkag mus). Hom hauv:

sudo apt-tau hloov tshiab

lees txais tag nrho cov lus qhia

Ces ntaus:

sudo apt -tau -y nruab fbi

Txhawm rau ua kom nrawm (1 thib ob rau ib daim duab) swb cov duab siv cov syntax (thaum txuas nrog tus saib): fbi -a -t 1 *.jpg

Nco tseg: “FBI tsuas yog ua haujlwm los ntawm kab hais kom ua uas tsis muaj lwm cov duab sib txuas ua haujlwm. Yog li yog tias koj khau raj ncaj qha rau kab hais kom ua nws yuav ua haujlwm zoo. Yog tias koj khau raj rau hauv lub desktop thiab tom qab ntawd siv lub qhov rai davhlau ya nyob twg nws yuav tsis ua."

Ua tsaug yuav tsum mus rau Raspberrypi-spy txiv leej tub rau daim ntawv no & fbi lub tswv yim.

Kauj Ruam 4: Kauj Ruam 4: Nkag Mus & Ua Yeeb Yaj Kiab

Kauj ruam 4: Nkag & Ua Si Cov Yees Duab
Kauj ruam 4: Nkag & Ua Si Cov Yees Duab

Nruab FFMPEG - uas yog ib qho loj ntawm cov khoom siv kho cov vis dis aus. FFMPEG tuaj yeem sib cav los ntawm kab hais kom ua (yog tias koj paub koj tab tom ua dab tsi!). Nruab nws:

sudo apt-tau nruab ffmpeg

Hloov koj li jpegs rau ua yeeb yaj kiab siv cov syntax - hauv kab ntawv webcam:

miv *-j.webp" />

Yog li cov kav dej no tawm cov npe jpegs rau hauv ffmepg los ua; ntawm tus lej ntawm 20, tawm kom tiav cov vis dis aus tso tawm.mkv lossis mpg/mp4, thiab lwm yam.. Muaj ntau ntau qhov sib txawv koj tuaj yeem hloov kho siv cov hloov pauv los hloov kho koj cov vis dis aus!

Nov yog qhov yooj yim tshaj plaws uas kuv pom - thiab ua tsaug yuav tsum mus rau Lukas Smith rau nws cov vis dis aus ntawm cov ncauj lus. Muaj lwm txoj hauv kev, thiab nplooj ntawv ffmpeg pab kuj muab qee qhov piv txwv zoo.

Txhawm rau ua cov vis dis aus los ntawm kab hais kom ua, Kuv siv VLC media player.

Ua qhov no los ntawm kev ntaus ntawv:

vlc --zoom 0.5 --loop video.mkv

Qhov no ua yeeb yaj kiab ntawm 0.5 nplai looped kom txog thaum koj nias CTRL + C txhawm rau rho tawm tsab ntawv. Kuv tau pom tias qhov no ua haujlwm zoo tshaj yog tias koj mus rau lub desktop desktop (startx) ces qhib lub davhlau ya nyob twg. Txwv tsis pub cov laus dua ntawm pi yuav poob ntas los ntawm cov yeeb yaj kiab loj / hi rez. VLC media player muaj cov lus txib ua tiav - zoo ib yam li ffmpeg, kom khiav los ntawm lub qhov rais qhib.

Kauj Ruam 5: Kauj Ruam 5: Kev Nkag Mus Rau Chaw Pi

Kauj Ruam 5: Kev Nkag Mus Rau Chaw Pi
Kauj Ruam 5: Kev Nkag Mus Rau Chaw Pi
Kauj Ruam 5: Kev Nkag Mus Rau Chaw Pi
Kauj Ruam 5: Kev Nkag Mus Rau Chaw Pi
Kauj Ruam 5: Kev Nkag Mus Rau Chaw Pi
Kauj Ruam 5: Kev Nkag Mus Rau Chaw Pi
Kauj Ruam 5: Kev Nkag Mus Rau Chaw Pi
Kauj Ruam 5: Kev Nkag Mus Rau Chaw Pi

Txhawm rau sau cov ntawv, kaw tus pi, thiab hloov cov ntaub ntawv Kuv siv ob lub Windows daim ntawv thov thiab CAT 5 ethernet cable.

Kev nkag mus rau Pi tau ua tiav siv Cat 5 cable, raws li kuv xav tias nws tau muab txoj hauv kev nrawm thiab yooj yim. Kuv xav txog kuv lub koob yees duab rig hauv qhov tso lossis sab nraum qee lub sijhawm (tsis muaj network). Yog li kev sib txuas ntawm lub cev zoo li zoo tagnrho, kom txog thaum kuv teeb tsa tus IP zoo li qub thiab siv lub xov tooj kub!

Yog li yooj yim ntsaws lub cable rau hauv koj lub pi thiab lub laptop/PC. Nruab ob lub software dawb no:

  • Putty
  • WinSCP

Kuv siv Putty los khiav cov ntawv ffmeg thiab kaw Pi (sudo kaw tam sim no). Pib khau raj Putty ntawm koj lub PC Windows. Nyob hauv Hom Npe Hom hauv lub npe ntawm koj Pi ua raws.local. ie kuv yog:

pi-webcam.local

Nyem rau Qhib khawm, tom qab ntawv ua raws cov lus qhia rau lub npe & tus password. Tom qab ntawd koj tau nkag mus rau Pi ntawm qib davhlau ya nyob twg, zoo tshaj plaws rau kev sau cov ntawv thiab taug kev ncig cov npe.

Txhawm rau luam lossis txav cov vis dis aus los ntawm Pi rau kuv lub khoos phis tawj Kuv siv WinSCP. Qhov no ua haujlwm zoo ib yam, hais txog kev nkag mus rau koj qhov chaw nyob ntawm pi xaus rau hauv.local, thiab ua raws cov lus qhia kom nkag mus rau koj tus lej Pi.

Tom qab ntawd yooj yim rub cov ntawv los ntawm koj Pi (sab xis) rau koj lub khoos phis tawj Windows (sab laug).

Kauj Ruam 6: Kauj Ruam 6: Tso Yeeb Yaj Kiab

Ob qhov piv txwv kuv tau sim nrog, tau qhia hauv qab no. Ob leeg tau muab tawm ua *.mkv uas tau muab cov txiaj ntsig zoo, ib yam li *.mp4 CODEC. Nws zoo nkaus li *.mpg/Mpeg video format tau hloov pauv. Ob qho yeeb yaj kiab raug ntes nyob rau hnub cua daj cua dub - yog li qhov pom tseeb dhau mus. Jpgs raug ntes ntawm 650X480. Kuv yuav sim nrog rez jpegs siab dua thiab txawv tus nqi sib txawv thaum ua yeeb yaj kiab.

Ua tsaug rau Andy & Emily @ Telford Makerspace rau lawv txoj kev pab.

Pom zoo: