Cov txheej txheem:

Lub Sijhawm Rubik Lub Cube Lub Qhov Muag Tsis Pom Kev Siv Raspberry Pi thiab OpenCV: 4 Cov Kauj Ruam
Lub Sijhawm Rubik Lub Cube Lub Qhov Muag Tsis Pom Kev Siv Raspberry Pi thiab OpenCV: 4 Cov Kauj Ruam

Video: Lub Sijhawm Rubik Lub Cube Lub Qhov Muag Tsis Pom Kev Siv Raspberry Pi thiab OpenCV: 4 Cov Kauj Ruam

Video: Lub Sijhawm Rubik Lub Cube Lub Qhov Muag Tsis Pom Kev Siv Raspberry Pi thiab OpenCV: 4 Cov Kauj Ruam
Video: qub dev ces tsuas taug qub lw ( officail m v ) cover kavanlee love song 2024, Kaum ib hlis
Anonim

Nov yog qhov thib ob ntawm Rubik lub voos xwmfab cuab yeej ua rau daws qhov muag qhov muag. 1st version tau tsim los ntawm javascript, koj tuaj yeem pom qhov project RubiksCubeBlindfolded1

Tsis zoo li yav dhau los, cov ntawv no siv OpenCV lub tsev qiv ntawv txhawm rau txheeb xyuas cov xim thiab nkag mus rau cov tswv yim, thiab muab cov txheej txheem pom kev zoo dua.

Qhov teeb meem loj tshaj plaws hauv qhov hloov tshiab tshaj plaws no yog kev pom pom ntawm cov txiaj ntsig, cov khoom sib lawv liag tau nthuav tawm ntawm cov duab kos 1 ntawm ib lub sijhawm. Txij li lub voos xwmfab yog 3D duab, nws nyuaj rau pom txhua sab nyob rau tib lub sijhawm. Saib cov txiaj ntsig ntawm kuv li YouTube channel YouTube video

Kuv tab tom siv lub voos xwmfab uas tsis muaj ntawv nplaum, qhov no xav tau kev lees paub kev cai thiab feem ntau qhib qhov chaws tsis raug txhawb. Kuv siv qhov kev qhib qhib no tsim los ntawm Kim Koomen uas qhia meej thaj chaw ruaj khov ntawm lub koob yees duab kom pom qhov tseeb xim ntawm lub voos xwmfab ntsej muag qbr project

Kauj Ruam 1: Cov Cheeb Tsam Xav Tau

  • Raspberry Pi
  • webcam

lossis koj tuaj yeem siv koj lub laptop

Kauj Ruam 2: Kev vam khom

  • Nab hab sej 3
  • numpy tsev qiv ntawv
  • OpenCV lub tsev qiv ntawv

$ sudo apt-tau nruab python3-opencv

RubiksBlindfolded pob

$ pip3 nruab RubiksBlindfolded

Kauj ruam 3: Kev npaj

Koj yuav tsum ntsuas qhov ntsuas pom xim ua ntej ua ntej. HSV xim xim sib txawv vim yog teeb pom kev zoo, lub koob yees duab zoo thiab daws teeb meem, thiab lub voos xwmfab xim nws tus kheej. Hauv kuv qhov xwm txheej, kuv ua ke teeb dawb thiab daj kom tau txais cov txiaj ntsig raug.

Hloov kho get_color_name (hsv) ua haujlwm ntawm colordetection.py

Thawj qhov chaws siv kociemba pob los daws lub voos xwmfab, nws daws los ntawm kev nrhiav cov kauj ruam thim rov qab ntawm ib qho kev sib tw. Hauv cov ntawv no, Kuv siv kuv tus kheej pob ntawv daws teeb meem hu ua RubiksBlindfolded uas luam tawm ntawm PyPI. Saib cov lus piav qhia kom paub siv nws li cas RubiksBlindfolded

Kauj ruam 4: Siv

Pab
Pab
Pab
Pab

Tom qab txhim kho txhua qhov kev vam khom thiab teeb tsa koj lub koob yees duab, qhov no yog lub sijhawm los ua qhov muag dig qhov muag.py tsab ntawv

Ua ntej tshaj, koj yuav tsum luam theej duab koj lub voos xwmfab kom raug. Qhov no yog lub voos xwmfab qauv, qhov kev txiav txim ntawm scan lub ntsej muag tsis tseem ceeb. Daim ntawv ceeb toom tias cov no yog cov xim qub ntawm lub ntsej muag lub ntsej muag, koj tuaj yeem hloov lawv los ntawm kev hloov kho cov ntawv txhais lus ntawm qhov muag tsis pom.py tsab ntawv

Txhawm rau luam theej duab nias qhov chaw tseem ceeb kom txuag qhov pom thiab ESC qhov tseem ceeb tom qab ua tiav

Qhov thib ob, koj tuaj yeem pom cov kev daws teeb meem ntawm lub console, thiab ntsuas qhov sib npaug los qhia rau koj yog tias koj xav tau los thov kev ua haujlwm sib luag lossis tsis yog

Qhov thib peb, yuav tsim ib lub thav duab tshiab uas qhia txog 2 daim duab kos rau ntug ntu thiab kaum ib ntu. Koj tuaj yeem siv cov laug xub thiab txoj cai xub rau kev hloov pauv ntawm cov khoom sib xws, thiab nce thiab nqis xub tuav rau kev hloov ntawm ntug thiab kaum. lub teeb txho xim sawv cev rau ntu tam sim no.

Koj tuaj yeem pom cov xim ntawm qhov tsis nyob tam sim no uas tau hloov pauv los ntawm xub tuav. Cov xim grey sawv cev rau lub hom phiaj cubie, thiab xim liab sawv cev rau lub ntsej muag sib pauv

Qhov chaws

github.com/mn-banjar/blindfolded2

Pom zoo: