Cov txheej txheem:

Ntsej Muag Tua Phom: 4 Kauj Ruam
Ntsej Muag Tua Phom: 4 Kauj Ruam

Video: Ntsej Muag Tua Phom: 4 Kauj Ruam

Video: Ntsej Muag Tua Phom: 4 Kauj Ruam
Video: UA KAWG PEEV XWM -May maylee [official] New Song/MV/VDO 2024, Kaum ib hlis
Anonim
Ntsej Muag Tua Phom
Ntsej Muag Tua Phom

Txoj haujlwm no yog kev nthuav dav los ntawm txoj haujlwm laser mus ncig phom phom qhia ntawm no-https://www.instructables.com/id/Building-a-Sentry-Gun-with-Laser-Trip-Wire-System-/?ALLSTEPS Tsuas yog qhov sib txawv yog tias rab phom yuav tsis ua los ntawm laser tab sis los ntawm lub ntsej muag. Yeej, txoj haujlwm no sib txuas nrog lub ntsej muag taug qab thiab rab phom mus ncig laser, yog li, lub ntsej muag taug qab rab phom. Cov txheej txheem siv rau kev taug qab lub ntsej muag zoo ib yam li ua tiav los ntawm techbitar-https://www.instructables.com/id/Face-detection-and-tracking-with-Arduino-and-OpenC/?ALLSTEPS Txhawm rau siv lub ntsej muag taug qab, openCV tau siv. OpenCV (qhib qhov muag pom lub khoos phis tawj) yog lub tsev qiv ntawv ntawm kev ua haujlwm rau lub zeem muag ntawm lub computer tiag. Lawv lub tsev qiv ntawv tuaj yeem pom:

Kauj ruam 1:

Duab
Duab

Ua ntej tshaj, teeb lub vev xaib ntawm rab phom. Kuv siv txoj hlua khi los khi lawv ua ke.

Kauj Ruam 2: Teeb Microsoft Visual C ++ rau OpenCV

Ua ntej teeb tsa, Kuv yuav tau sau phau ntawv qhia no raws li qhov tseeb tias kuv tab tom siv 32 -ntsis qhov rais ua haujlwm. Tsis paub meej tias nws ua haujlwm rau 64 me ntsis tab sis, xav kom sim. Ua ntej, rub tawm OpenCV los ntawm https://sourceforge.net/projects/opencvlibrary/. Extract nws rau C: / root directory. Kuv yuav pom zoo hloov nws mus rau OpenCV2.4.0 raws li kuv yuav teeb tsa txoj hauv kev raws li nws. Tom qab ua qhov ntawd, peb yuav tsum teeb tsa txoj hauv kev hloov pauv ib puag ncig windows rau OpenCV's bin directory. Txhawm rau ua qhov ntawd, mus rau Control Panel - System thiab Security - System - Advanced System Settings - Environment Variables. Hauv qab "System Variables", nrhiav "Path". Ob npaug nias nws thiab ntxiv "; C: / OpenCV2.4.0 / build / x86 / vc10 / bin". ps Yog tias koj tuaj yeem pom tus lej cim thaum pib, koj tsis npau suav. Koj yuav tsum muab tso rau hauv thiab. Qhov ib uas ua rau kuv muaj teeb meem ntau ua ntej. Qhov thib ob, rub lub vis dis aus yog tias koj tseem tsis tau muaj los ntawm https://www.microsoft.com/en-us/download/details.aspx?id=12752. HO HO HO…. Peb yog SUUPER npaj los tsim ib qhov haujlwm. ahem, sry kuv hlub OP ntau heev. Yog li mus rau lub studio pom duab thiab nyem rau ntawm "New Project". Xaiv win32 console daim ntawv thov thiab sau lub npe ntawm koj txoj haujlwm. Ib lub qhov rai yuav tshwm tuaj, nyem tom ntej thiab xaiv "Empty Project" hauv qab cov kev xaiv ntxiv thiab nyem qhov ua tiav. Ntawm koj qhov kev tshawb nrhiav daws teeb meem, nyem rau lub hauv paus Cov Ntaub Ntawv Ntxiv Yam Khoom Tshiab. Xaiv C ++ Cov Ntaub Ntawv thiab sau koj lub npe thiab nyem ntxiv. Tam sim no mus rau Kuv Lub Computer thiab qhib "C: / OpenCV2.4.0 / kuaj / c" thiab qhib ntsej muag.cpp. Luam cov cai thiab muab nws tso rau hauv koj li ntaub ntawv C ++ tshiab. Koj yuav pom tias muaj ib pawg kab liab vim Visual studio tsis tuaj yeem nrhiav cov haujlwm thiab cov tsev qiv ntawv tseem. Yog li ua qhov ntawd, mus rau Project- Properties (Alt + F7). Ntawm no, peb yuav tsum xaiv Txhua Qhov Teeb Meem los ntawm Configuration drop box. Tom qab ntawv xaiv C/C ++ General Ntxiv nrog Cov Ntawv Teev Npe thiab ntxiv "C: / OpenCV2.4.0 / build / include". Tom ntej no, xaiv Linker General Ntxiv Cov Ntawv Teev Npe Ntxiv thiab ntxiv "C: / OpenCV2.4.0 / build / x86 / vc10 / lib". Tom qab ntawd, xaiv Cov Txuas Txuas Txuas Txuas Ntxiv thiab ntxiv cov npe tsev qiv ntawv cov ntaub ntawv tsim nyog nyob ntawd. Ib co piv txwv: opencv_calib3d240.lib, opencv_contrib240.lib, opencv_core240.lib, opencv_features2d240.lib, opencv_flann240.lib opencv_gpu240.lib, opencv_haartraining_engine.lib, opencv_highgui240.lib, opencv_imgproc240.lib, opencv_legacy240.lib, opencv_ml240.lib, opencv_objdetect240.lib, opencv_ts240.lib, opencv_video240.lib Cov no yog cov ntawv tso tawm ntawm lib cov ntaub ntawv, yog tias koj ntxiv "d" cov ntawv ntxiv rau lub npe nws yuav dhau los ua qhov debug version, piv txwv li opencv_core240.lib - tso tawm version, opencv_core240d.lib - debug version. Peb tsuas yog xaiv Txhua Qhov Kev Tsim Kho, yog li tom qab ntxiv cov ntaub ntawv lib tsim nyog, peb yuav tsum hloov kho teeb tsa kom debug thiab ntxiv "d" cov ntawv txuas ntxiv rau cov ntaub ntawv lib. Nco ntsoov tias cov no tsis yog txhua lub tsev qiv ntawv cov ntaub ntawv muaj rau koj. Txhawm rau pom txhua tus ntawm lawv, mus rau "C: / OpenCV2.4.0 / build / x86 / vc10 / lib". Tom ntej no mus rau https://threadingbuildingblocks.org/ver.php?fid=171 thiab rub tawm tbb30_20110427oss_win.zip. Tom qab rub tawm thiab unzipping nws, hloov cov npe npe los ntawm qee yam xws li "tbb30_20110427oss" rau "tbb". Tom qab ntawd mus rau Kuv Lub Computer thiab "C: / OpenCV2.4.0 / build / common". Muaj lwm lub npe tbb, hloov nws li "tbb_old" rau thaub qab. Tom qab ntawd luam cov ntawv rub tawm tshiab thiab hloov npe tbb cov npe rau qhov no "C: / OpenCV2.4.0 / build / common" qhov chaw. Peb kuj yuav tsum tau ntxiv qhov tshiab tbb qhov chaw nyob rau hauv phau ntawv teev npe rau txoj hauv kev hloov pauv ib puag ncig. Yog li, mus rau Tswj Vaj Huam Sib Luag Txheej Txheem thiab Kev Ruaj Ntseg Ua Ntej Cov Txheej Txheem Txheej Txheem Ib puag ncig hloov pauv thiab nrhiav txoj hauv Kev Hloov Pauv ntu, tom qab ntawd ntxiv "; C: / OpenCV2.4.0 / build / common / tbb / bin / ia32 / vc10".

Kauj ruam 3: Software Xav Tau

OpenCV v2.4.0: https://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.4.0/ Serial C ++ Library rau Win32 (los ntawm Thierry Schneider): https://www.tetraedre.ch/advanced/ serial.php Code rau arduino: https://snipt.org/vvfe0 C ++ code rau lub ntsej muag taug qab:

Pom zoo: