Cov txheej txheem:

Kev Taw Qhia rau Kev Ua Duab: Pixy & Nws Cov Kev Xaiv: 6 Cov Kauj Ruam
Kev Taw Qhia rau Kev Ua Duab: Pixy & Nws Cov Kev Xaiv: 6 Cov Kauj Ruam

Video: Kev Taw Qhia rau Kev Ua Duab: Pixy & Nws Cov Kev Xaiv: 6 Cov Kauj Ruam

Video: Kev Taw Qhia rau Kev Ua Duab: Pixy & Nws Cov Kev Xaiv: 6 Cov Kauj Ruam
Video: Qhia tshuaj ntsuab kho mob 2024, Hlis ntuj nqeg
Anonim
Kev Taw Qhia rau Kev Ua Duab: Pixy & Nws Txoj Kev Xaiv
Kev Taw Qhia rau Kev Ua Duab: Pixy & Nws Txoj Kev Xaiv

Hauv kab lus no, Peb yuav piav qhia lub ntsiab lus ntawm Digital Image Processing (DIP) thiab yog vim li cas thiaj siv kho vajtse zoo li Pixy thiab lwm yam cuab yeej los ua tus txheej txheem ntawm cov duab lossis yeeb yaj kiab. Qhov kawg ntawm kab lus no, Koj yuav kawm:

  • Daim duab duab zoo li cas.
  • Kev ua cov duab digital yog dab tsi.
  • Cov cuab yeej rau kev ua duab.
  • Pixy yog dab tsi thiab yuav siv nws li cas.

Kauj Ruam 1: Kev Ua Duab Yog Dab Tsi?

Kev Ua Duab Yog Dab Tsi?
Kev Ua Duab Yog Dab Tsi?

Cov duab, yeeb yaj kiab, thiab cov duab feem ntau ntxiv rau txuag lub sijhawm peb nco, muaj lwm cov ntawv thov ib yam. Tej zaum koj pom lub koob yees duab ruaj ntseg nyob rau hauv cov chaw pej xeem lossis koj pom cov neeg hlau taug qab kab, cov khoom lossis ntau dua qhov ua tiav qhov xwm txheej, cais cov khoom tsis huv los ntawm cov khoom lag luam ntawm kab ntau lawm thiab ntau qhov zoo sib xws lossis txawm tias tsis zoo li daim ntawv thov ua nrog qee qhov kev suav ntawm cov duab thiab Cov xam yog lub npe ua duab.

Txhawm rau nkag siab zoo tshaj plaws, nws muaj txiaj ntsig kom paub cov qauv duab. Txhua daim duab yog lub teeb liab nrog tus nqi pixel ntawm txhua qhov ntawm qhov ntawd. (pixel yog lub hauv paus tseem ceeb ntawm cov duab digital uas tuaj yeem muaj qhov sib txawv rau nws qhov ci ci thiab/lossis xim, cov txiaj ntsig no hu ua "siv zog") Lub teeb liab yog qhov txuas hluav taws xob txuas ntxiv tau muab los ntawm lub ntsuas qhov muag, lub teeb liab no yuav hloov mus rau digital tsim nrog qee cov txheej txheem xws li piv txwv. Cov ntaub ntawv digital ntawm cov ntaub ntawv no zoo li ob-seem kab lossis matrix ua cov duab digital yog li lawv daim ntawv f (X, Y) rau qhov chaw thiab tus nqi. Tsis txhob hnov qab txhua qhov vis dis aus yog txheej ntawm cov duab ua si nrog tus lej tshwj xeeb ntawm kev ua si hauv ib pliag.

Tom qab tsim cov duab, cov txheej txheem yuav pib. Rau lub hom phiaj twg peb xav tau txheej txheem? Yog tias peb xav tau cov ntaub ntawv los ntawm daim duab, peb yuav siv lub zeem muag hauv computer. Lub zeem muag hauv computer yog ib txoj hauv kev ua raws tib neeg lub zeem muag. Tib neeg lub zeem muag muaj peev xwm "kawm" thiab muab cov ntaub ntawv los ntawm kev nkag mus pom. Lub zeem muag ntawm lub khoos phis tawj yog lub hauv paus uas ua rau khoos phis tawj kom nkag siab qib siab los ntawm cov duab lossis vis dis aus, txawm tias siv sijhawm tiag; thiab kev ua cov duab digital yog ib feem ntawm qhov ntawd.

Kauj Ruam 2: Yuav Ua Li Cas Ua Duab?

Yuav Ua Li Cas Ua Duab?
Yuav Ua Li Cas Ua Duab?
Yuav Ua Li Cas Ua Duab?
Yuav Ua Li Cas Ua Duab?

Yog tias peb tab tom xav txog daim ntawv thov neeg hlau rau kev ua duab, muaj ob txoj hauv kev:

  1. xaiv lub koob yees duab ib txwm siv (muab cov duab yam tsis muaj kev ua tiav ntawm nws) thiab tom qab ntawd siv lub cajmeem thiab suav los ntawm tus neeg siv.
  2. Siv cov khoom hnyav uas ua cov txheej txheem no kom siv tau sai dua thiab yooj yim dua; Zoo li lub koob yees duab pixy…

thawj qhov kev daws teeb meem: Rau thawj txoj hauv kev, muaj cov khoom muag sib txawv xws li MATLAB lossis cov tsev qiv ntawv zoo li OpenCV rau coding. Muaj lwm lub npe hauv kev ua cov cuab yeej, ib yam nkaus; tab sis cov npe nrov tshawb rau qhov ua tiav no yog OpenCV thiab MATLAB. Cia peb pom kev sib piv nrawm ntawm lawv. daim duab ntawm MATLAB thiab OpenCV sib piv yuav pab peb.

Kev daws thib ob: siv cov cuab yeej tshwj xeeb! zoo li cov koob yees duab nrog lub peev xwm ntawm kev ua duab. Lawv feem ntau muaj tus neeg siv interface thiab tsis xav tau coding. Qhov ntawd zoo li yooj yim dua tab sis qee qhov ua rau txwv thiab lawv tuaj yeem ua qhov lawv tau teev tseg rau qhov ntawd; piv txwv li, lub ntsej muag ntsuas lub koob yees duab tsis tuaj yeem ua xim ib txwm ib txwm muaj (tej zaum nrog qee qhov kev hloov pauv hauv firmware tuaj yeem hloov qhov kev lees paub algorithm tab sis qhov nyuaj thiab tsis yog txoj hauv kev!) Ob txoj hauv kev, tab sis qhov twg zoo dua?

daim ntawv thib ob yog kev sib piv ntawm ob txoj hauv kev.

Kauj Ruam 3: Pib Pib los ntawm Pixy

Pib Pib los ntawm Pixy
Pib Pib los ntawm Pixy

PIXY yog ib qho ntawm lub koob yees duab txheej txheem teev tseg rau kev ua cov duab, kev lees paub qhov tseeb yog xim-xim lim. Lub hom phiaj tseem ceeb ntawm lub koob yees duab no yog paub cov xim thiab npe lawv raws li cov khoom paub. Lub koob yees duab no tuaj yeem "kawm" xim twg koj "xav" nws thaum xub thawj.

Tam sim no koj paub dab tsi Pixy yog, cia saib seb peb yuav pib siv Pixy li cas.

Kauj ruam 4: Yuav tsum tau Hardwares

Yuav tsum tau Hardwares
Yuav tsum tau Hardwares

Pixy CMUcam5 Duab Sensor

Arduino UNO R3

Kauj Ruam 5: Pib Pib los ntawm Pixy

Pib Pib los ntawm Pixy
Pib Pib los ntawm Pixy

Tam sim no, los nrog peb ib qib zuj zus kom txog thaum kawg:

Thawj kauj ruam:

Yuav khoom pixy! PIXY tsis tu ncua thiab PIXY2 yog ob lub koob yees duab pixy. nyem qhov txuas saum toj no rau kev yuav khoom ib txwm, uas peb txuas ntxiv cov kauj ruam ntawm kev siv pawg no.

Thib ob:

Fais fab nws. Lub rooj tsavxwm muaj USB chaw nres nkoj rau lub zog. Nws yuav raug siv los txuas rau lub khoos phis tawj USB chaw nres nkoj.it tuaj yeem siv tau ntawm ob tus pin tom qab lub rooj tsavxwm nrog roj teeb (6-10v).

Peb:

Txuas nws mus rau lub khoos phis tawj ntawm USB cable. Ib qho kawg rau lub khoos phis tawj thiab lwm qhov rau micro USB chaw nres nkoj ntawm PIXY.

Tsim nyog:

Rub tawm software ntawm koj lub cam ntawm no. PIXY Mon yog daim ntawv thov PIXY rau Linux, Mac thiab Windows platform. Qhov app no tuaj yeem ua dab tsi yog teeb tsa thiab qhia dab tsi PIXY tuaj yeem pom.

Thib tsib:

Txog rau tam sim no, lub koob yees duab tsis tas yuav txuas nrog lub microcontroller lossis pawg thawj coj yog tias koj xav pom thiab lees paub yam tsis muaj dab tsi ntxiv; kev lees paub tsis yog nyob ntawm kev sib txuas micro. Xijpeem, rau kev qhia, xaiv yam khoom uas muaj qhov sib txawv thiab cov xim zoo. Vim tias qhov hue-based color filtering recognition algorithm, hue thiab lub teeb ntawm ib puag ncig tuaj yeem cuam tshuam rau qhov tshwm sim. Yog li, tsis txhob xaiv cov khoom dawb, dub lossis txho vim cov xim no tsis yog xim!

Rau:

Nias lub pob saum PIXY kom pib qhia ntawv. Ua ntej, LED yuav ntsais thiab tom qab ntawd, RGB LED yuav tau txais xim ntawm qhov nruab nrab ntawm thaj chaw pom. Xaiv cov khoom nyob rau pem hauv ntej ntawm lub koob yees duab, yog tias LED pom cov xim raug nws qhia pom txoj cai xauv. qhov kev ncua deb ntawm lo ntsiab muag thiab qhov khoom yuav tsum yog 6-20 ntiv tes. Txoj kev thib ob yog siv PIXY MON; xaiv thaj tsam loj ntawm cov khoom hauv PIXY MON thiab tom qab ntawd nws xaiv cov khoom.

Xya:

Cov kab sib chaws ntawm cov khoom yuav pom hauv pixy mon. saib yog daim phiaj yog thaj chaw raug ntawm cov khoom tsis suav nrog keeb kwm yav dhau. Sliders hauv kev teeb tsa tuaj yeem pab kom muaj thaj chaw zoo dua.

Yim

Tam sim no rau txhua "xim", lub koob yees duab yuav teeb tus lej. 7 kos npe txhais tau tias 7 xim kom paub. Nrog siv cov xim ze rau ib leeg, piv txwv li, daim ntawv lo nrog cov xim liab-liab-xiav koj tuaj yeem txhais cov khoom lossis chaw rau lub koob yees duab, piv txwv li, daim ntawv lo qhia lub qhov rooj. Qhov no tuaj yeem pab kom paub ntau txhiab yam khoom nrog lub koob yees duab no! Cov txheej xim no hu ua “xim chaws” lossis CC. rau teeb tsa CC koj yuav tsum siv PIXY mon thiab tom qab ntawd nws tuaj yeem siv tau zoo li txhua yam kos npe.

Cuaj:

Tom qab kev qhia ua tiav, yog tias lub microcontroller lossis board tau txuas nrog lub koob yees duab, tuaj yeem muab cov khoom pom los ntawm pixy. Yog tias koj siv Arduino, siv tus pinout no rau kev sib txuas. (nyem rau ntawm no kom paub ntau ntxiv), tom qab rub tawm PIXY lub tsev qiv ntawv ntawm no, ntxiv rau lub tsev qiv ntawv ntawm Arduino raws li kev kos duab> suav nrog tsev qiv ntawv> Ntxiv ZIP lub tsev qiv ntawv. Tam sim no xaiv zip cov ntaub ntawv ntawm lub tsev qiv ntawv. Qhov ntawd tiav lawm! Tam sim no nrog qhov pib kos duab ntawm PIXY, nws yuav muab X thiab Y (qhov chaw) thiab dav thiab ntev (loj) ntawm qhov khoom. Lwm daim duab tuaj yeem siv tau ib yam nkaus; zoo li lauj kaub thiab qaij. Rau lwm cov laug cam txuas, koj tuaj yeem pom ntawm no.

NCO TSEG: Kev qhia muaj ob txoj hauv kev raws li peb tau piav qhia: 1. Siv PIXY yam tsis muaj PIXY MON, zoo li neeg hlau ua dab tsi thiab lawv tsis txuas nrog lub PC. Txoj kev yuav yog tab sis yuav teeb tus lej kos npe li cas? Tus coj yog PIXY yuav hloov xim thaum thawj lub sijhawm qhia, nyem qhov koj ua ntawm cov xim twg yuav teev tus lej; los ntawm lub ntsiab lus liab 1 mus rau lub ntsiab lus violet 7. Hauv txoj kev 2, tus lej teev yuav ua tiav nrog daim ntawv thov nkaus xwb.

Kauj Ruam 6: Nyob ze rau "KAWG"

Peb tau piav qhia txog dab tsi ua rau xav tau siv cov duab, dab tsi yog kev ua cov duab digital thiab nws tuaj yeem ua li cas. Txoj kev twg peb muaj thiab los ntawm kho vajtse uas tam sim no tuaj yeem pab peb, peb xaiv PIXY rau qhov kev piav qhia. peb piav qhia nws ua haujlwm li cas thiab yuav ua li cas yog tias koj yog tus pib ntawm lub koob yees duab pixy! Tam sim no koj tuaj yeem pib ua cov duab rau koj tus neeg hlau me thiab txaus siab rau qhov muag thib peb nrog koj lub khoos phis tawj.

Koj tseem tuaj yeem nyeem txoj haujlwm no ntawm ElectroPeak lub vev xaib raug cai:

Pom zoo: