Cov txheej txheem:

Sipeed MaiX Bit OpenMV Demos - Computer Vision: 3 Kauj Ruam
Sipeed MaiX Bit OpenMV Demos - Computer Vision: 3 Kauj Ruam

Video: Sipeed MaiX Bit OpenMV Demos - Computer Vision: 3 Kauj Ruam

Video: Sipeed MaiX Bit OpenMV Demos - Computer Vision: 3 Kauj Ruam
Video: Насколько хорош Raspberry Pi для компьютерного зрения в 2022 году? 2024, Kaum ib hlis
Anonim
Image
Image

Nov yog kab lus thib ob hauv kab lus hais txog Sipeed AI ntawm Ntug microcontroller platform. Lub sijhawm no kuv yuav sau txog MaiX Bit (txuas rau Seeed Studio Shop), me dua, lub khob cij npaj npaj rau kev txhim kho. Nws qhov tshwj xeeb zoo ib yam li MaiX Dock, pawg thawj coj saib kuv siv rau kev qhia zaum kawg, txij li lawv siv tib lub nti, Kendryte K210.

Peb tab tom yuav siv micropython firmware los sim qee qhov qhib OpenMV. Nov yog cov lus piav qhia los ntawm OpenMV homepage:

Txoj haujlwm OpenMV yog hais txog kev tsim tus nqi qis, nthuav dav, Python siv lub tshuab, lub zeem muag pom lub tshuab thiab lub hom phiaj ntawm kev dhau los ua "Arduino ntawm Tshuab Lub Zeem Muag". Piv txwv li, find_blobs () txoj hauv kev pom cov xim blobs thiab xa cov npe ntawm 8 cov khoom muaj nuj nqis sawv cev rau txhua qhov blob xim. Hauv Python rov ua dua los ntawm cov npe cov khoom xa rov qab los ntawm find_blobs () thiab kos duab plaub fab puag ncig txhua qhov blob xim tau yooj yim ua hauv ob kab ntawm cov cai.

Yog li, txawm hais tias MaiX Bit nta tshwj xeeb rau kev ua haujlwm nrawm ntawm lub paj hlwb, qee zaum nws yuav yooj yim dua tsuas yog siv OpenMV nyuaj-coded algorithms los ua txoj haujlwm lossis siv lawv ua ke ib leeg.

Qee qhov siv cov xwm txheej uas los rau kuv lub siab yog:

1) Kab nrhiav kom tau rau kab hauv qab bot

2) Txheeb xyuas teeb pom kev zoo nrog lub voj voos thiab pom xim

3) Siv lub ntsej muag txhawm rau nrhiav lub ntsej muag kom paub lub ntsej muag (nrog DNN)

Github repository rau kab lus no

Kauj ruam 1: Flash Micropython Firmware

Txuas rau MaiX Bit
Txuas rau MaiX Bit

Ua ntej tshaj plaws peb yuav xav tau flash micropython firmware rau peb pawg thawj coj saib. Precompiled binary suav nrog hauv github repository rau kab lus no, ua ke nrog kflash.py (flash nyem). Yog tias koj xav sau cov firmware los ntawm qhov chaws, tsuas yog rub tawm qhov chaws los ntawm https://github.com/sipeed/MaixPy, teeb tsa lub cuab yeej cuab tam thiab suav sau qhov chaws rau hauv maixpy.bin cov ntaub ntawv. Cov lus qhia ntxaws ntxiv tuaj yeem nrhiav tau ntawm no.

Flash cov ntaub ntawv binary nrog

sudo python3 kflash.py kpu.bin

Tom qab ua tiav qhov ua tiav ua raws cov kauj ruam tom ntej.

Kauj Ruam 2: Txuas rau MaiX Bit

Tam sim no peb MaiX Me ntsis yuav tsum siv tau los ntawm USB txuas txuas nrog baudrate 115200. Koj tuaj yeem siv koj cov software nyiam rau kev sib txuas lus lossis tsuas yog miv thiab ncha lus txib, txawm li cas los xij koj xav tau. Kuv tau siv tshuaj ntsuam rau kev sib tham hauv xov tooj thiab pom nws yooj yim heev.

Cov lus txib rau tsim kom muaj kev sib tham sib tham nrog lub vijtsam yog

sudo screen /dev /ttyUSB0 115200

qhov twg /dev /ttyUSB0 yog qhov chaw nyob ntawm koj lub cuab yeej.

Koj yuav xav tau nias lub pob pib dua ntawm koj lub microcontroller kom pom cov lus txais tos thiab tus nab npawb txhais lus tam sim.

Kauj ruam 3: Khiav Demos

Tam sim no koj tuaj yeem nkag mus rau hom kev luam los ntawm nias Ctrl+E thiab theej-muab cov lej tso tawm. Txhawm rau khiav lawv nias Ctrl+D hauv hom luam.

Yog tias koj tsis xav sau cov vis dis aus, koj yuav tsum tawm tswv yim txog kab kaw kab video. Txwv tsis pub cov cai yuav pov qhov kev zam yog tias tsis muaj daim npav SD tso

Nov yog cov lus piav qhia luv ntawm txhua qhov demo:

Nrhiav cov voj voos - siv find_circles ua haujlwm los ntawm OpenMV. Xav tau ntau qhov kev hloov pauv rau koj daim ntawv thov tshwj xeeb, tshwj xeeb yog pib (tswj lub voj voos twg pom los ntawm kev hloov pauv. Tsuas yog cov voj voog uas muaj qhov ntau dua lossis sib npaug rau qhov pib tau rov qab) thiab r_min, r_max qhov tseem ceeb.

Nrhiav cov duab plaub - siv find_rects ua haujlwm los ntawm OpenMV. Koj tuaj yeem ua si ib puag ncig nrog tus nqi pib, tab sis tus nqi kuv muaj hauv kev ua haujlwm zoo heev rau kev nrhiav cov duab plaub.

Nrhiav ntsej muag, nrhiav qhov muag - siv kev pom_ ua haujlwm nrog Haar Cascades txhawm rau txheeb xyuas qhov muag thiab ntsej muag ntawm lub ntsej muag hauv daim duab. Koj tuaj yeem ua si ib puag ncig nrog qhov pib thiab ntsuas qhov tseem ceeb rau txoj cai nrawm-raug pauv pauv.

Nrhiav cov kab tsis muaj qhov kawg - siv txoj haujlwm find_lines txhawm rau nrhiav txhua kab tsis muaj qhov kawg hauv daim duab siv hough transform.

Ntsuas xim - siv get_statistics ua haujlwm kom tau txais cov khoom feem pua thiab tom qab ntawd hloov cov ntsiab lus tseem ceeb ntawm LAB tuple rau RGB qhov tseem ceeb tuple. Kuv tau sau qhov piv txwv no kuv tus kheej thiab nws ua haujlwm tau zoo heev, tab sis nco ntsoov qhov txiaj ntsig ntawm kev kuaj pom xim yuav cuam tshuam los ntawm cov teeb pom kev ib puag ncig.

Koj tuaj yeem pom ntau qhov nthuav nthuav tawm hauv OpenMV github chaw cia khoom! Lawv feem ntau sib xws nrog MaiX Bit micropython, qhov tsuas yog qhov koj yuav tsum nco ntsoov yog ntxiv sensor.run (1) tom qab teeb tsa pixformat thiab framesize.

Zoo siab sim nrog OpenMV code. Yog tias koj muaj lus nug lossis xav qhia qee qhov ntawm koj qhov txiaj ntsig zoo, tsis txhob yig tiv tauj kuv ntawm Youtube lossis LinkedIn. Tam sim no, thov zam txim, Kuv yuav mus ua qee tus neeg hlau!

Pom zoo: