Cov txheej txheem:
- Kauj Ruam 1: Cov Cheeb Tsam Xav Tau
- Kauj Ruam 2: Lub Cev Lub Cev
- Kauj Ruam 3: Teeb thiab Coding
- Kauj Ruam 4: Raspberry Pi thiab Kev Pom Duab
- Kauj Ruam 5: LCD thiab Hais Lus
- Kauj Ruam 6: Kauj Ruam Kawg
Video: NAIN 1.0 - Tus Txheej Txheem Humanoid Robot Siv Arduino: 6 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:24
Nain 1.0 yuav muaj qhov tseem ceeb 5 tshem tawm cov qauv-
1) Caj npab - uas tuaj yeem tswj tau ntawm servos.
2) Log - uas tuaj yeem tswj tau nrog dc motors.
3) Ceg - Nain yuav tuaj yeem hloov ntawm lub log lossis txhais ceg kom txav mus los.
4) Lub taub hau - Nws lub taub hau tuaj yeem tswj tau rau ntau yam nods.
5) Lub koob yees duab module- uas tuaj yeem cuam tshuam rau Kev Pom Lub ntsej muag.
Nrog rau NAIN no yuav tuaj yeem tham thiab cuam tshuam nrog cov neeg siv thiab tuaj yeem qhia koj lub sijhawm los ntawm nws lub moos inbuilt. Nws yuav muaj kev tswj hwm wireless siv Wi-nkaus /Bluetooth.
Kauj Ruam 1: Cov Cheeb Tsam Xav Tau
- Servo Tsav -4
- Arduino Mega - 1
- Raspberry Pi - 1
- Usb Lub Koob Yees Duab -1
- Hais lus -1
- DC Tsav -2
- L293D -1
- Roj Teeb Pob - 1
- Log -2
- Castor Log - 2
Ua ke nrog cov no koj yuav xav tau txhuas daim kab xev los ua lub cev thiab srews thiab txiv ntoo kom haum lawv kom raug.
Kauj Ruam 2: Lub Cev Lub Cev
Lub cev qauv yuav ua los ntawm lub teeb yuag aluminium square pas nrig uas yuav pab ua kom yooj yim.
Raws li tam sim no sib sau ua ke raws li qhia hauv daim duab thiab tseem txiav tawm qhov chaw tsim nyog rau servo motors kom txuas rau hauv caj npab.
Muab ib tug ntoo hexagonal puag rau hauv qab.
Hauv qab ntawm lub hauv paus ntoo, txuas DC lub cav thiab lub log zoo li peb ua hauv ib kab twg cov neeg siv tom qab.
Qhov txaus siab, Ntxiv ob lub log castor- ib qho rau sab pem hauv ntej thiab lwm yam nyob tom qab ntawm tus neeg hlau.
Kauj Ruam 3: Teeb thiab Coding
Txhawm rau xaim cov qauv sib txawv xa mus rau cov lej txuas hauv ntu no.
Ua ntej tshaj plaws peb tau sim txhua tus qauv siv cov lej ib leeg thiab tom qab ntawd peb sib koom ua ke tag nrho hauv ib qho thiab tswj kev txav ntawm lub log thiab Caj npab siv lub bluetooth module.
Kauj Ruam 4: Raspberry Pi thiab Kev Pom Duab
Kev lees paub cov duab tau ua tiav siv USB Lub Koob Yees Duab thiab Raspberry Pi.
Txog qhov ntawd, koj yuav tsum teeb tsa Qhib CV lub tsev qiv ntawv ntawm koj tus Pi.
Koj tuaj yeem ua qhov ntawd los ntawm no-https://github.com/jabelone/OpenCV-for-Pi
Tom qab ntawd koj yuav tsum tau ua lub suab lees paub siv haar cascade.
Koj tuaj yeem ua qhov ntawd los ntawm no -https://thecodacus.com/category/opencv/#. WvsNC4iFPDc
Tom qab kawm cov kab ntawv saum toj no thiab ua raws qhov ntawd, Kuv tau hloov qee qhov hauv qhov kawg code kuv tau siv uas kuv tau muab tso rau hauv qab no -
DATASET GENERATOR:
importcv2
cam = cv2. VideoCapture (0)
ntes = cv2. CascadeClassifier ('Classifiers/face.xml')
kuv = 0
kev = 50
lub npe = raw_input ('nkag mus rau koj tus id')
thaum Muaj Tseeb:
ret, im = cam.read ()
txho = cv2.cvtColor (im, cv2. COLOR_BGR2GRAY)
face = detector.detectMultiScale (grey, scaleFactor = 1.2, min Neighbors = 5, minSize = (100, 100), chij = cv2. CASCADE_SCALE_IMAGE)
rau (x, y, w, h) hauv ntsej muag:
kuv = i+1
cv2.imwrite ("dataSet/face."+name+'.'+str (i)+".jpg", grey [y-offset: y+h+offset, x-offset: x+w+offset])
cv2.rectangle (im, (x-50, y-50), (x+w+50, y+h+50), (225, 0, 0), 2)
cv2.imshow ('im', im [y-offset: y+h+offset, x-offset: x+w+offset])
yog cv2.waitKey (100) & 0xFF == ord ('q'):
so
# tawg yog tias tus lej piv txwv ntau dua 20
elif (kuv> 20):
so
cam.release () thov
cv2.destroyAllWindows ()
Nws yuav tsim datset ntawm koj cov duab uas yuav siv rau kev txheeb xyuas qhov tseeb.
Tus kws qhia:
importcv2, os
import numpy as np
los ntawm PIL ntshuam duab
lees paub = cv2.face.createLBPHFaceRecognizer ()
cascadePath = "Classifiers/face.xml"
faceCascade = cv2. CascadeClassifier (cascadePath);
txoj kev = 'dataSet'
def get_images_and_labels (txoj kev):
image_paths = [os.path.join (txoj kev, f) rau f hauv os.listdir (txoj kev)]
# cov duab yuav muaj cov duab ntsej muag
dluab =
# daim ntawv lo yuav muaj daim ntawv lo uas tau muab rau daim duab
cov ntawv =
rau image_path hauv image_paths:
# Nyeem daim duab thiab hloov mus rau qhov xim dub
image_pil = Image.open (image_path).convert ('L')
# Hloov cov duab ua hom numpy array
image = np.array (image_pil, 'uint8')
# Tau txais daim ntawv lo ntawm daim duab
nbr = int (os.path.split (image_path) [-1].split (".") [1].replace ("face-", ""))
#nbr = int (''. koom nrog (str (ord (c)) rau c hauv nbr))
luam nbr
# Tshawb xyuas lub ntsej muag hauv daim duab
ntsej muag = faceCascade.detectMultiScale (duab)
# Yog tias pom lub ntsej muag, ntxiv lub ntsej muag rau cov duab thiab daim ntawv lo rau daim ntawv lo
rau (x, y, w, h) hauv ntsej muag:
images.append (duab [y: y + h, x: x + w])
cov ntawv.append (nbr)
cv2.imshow ("Ntxiv cov ntsej muag rau cov khoom sib dhos …", duab [y: y + h, x: x + w])
cv2.waitKey (10)
# rov qab cov npe duab thiab daim ntawv teev npe
xa cov duab, cov ntawv lo
cov duab, cov ntawv = get_images_and_labels (txoj kev)
cv2.imshow ('sim', duab [0])
cv2.waitKey (1)
recognizer.train (cov duab, np.array (cov ntawv)))
recognizer.save ('tus kws qhia/tus kws qhia.yml')
cv2.destroyAllWindows ()
DETECTOR
importcv2
import numpy as np
import os
c = 0 hli
lees paub = cv2.face.createLBPHFaceRecognizer ()
recognizer.load ('tus kws qhia/tus kws qhia.yml')
cascadePath = "Classifiers/face.xml"
faceCascade = cv2. CascadeClassifier (cascadePath);
cam = cv2. VideoCapture (0)
fontface = cv2. FONT_HERSHEY_SIMPLEX
fontscale = 1
fontcolor = (255, 255, 255)
thaum Muaj Tseeb:
ret, im = cam.read ()
txho = cv2.cvtColor (im, cv2. COLOR_BGR2GRAY)
ntsej muag = faceCascade.detectMultiScale (grey, 1.2, 5)
rau (x, y, w, h) hauv ntsej muag:
cv2.rectangle (im, (x-50, y-50), (x+w+50, y+h+50), (225, 0, 0), 2)
Id = recognizer.predict (grey [y: y+h, x: x+w])
yog (Id <70):
yog (Id == 1):
Id = "Shashank"
elif (Id == 2): ib
yog tias (c == 0):
Id = "Shivam"
c = ib+1
os.system ("espeak 'Zoo Siab Txais Tos Shivam Access Granted'")
lwm tus:
Id = "Shivam"
lwm tus:
ID = "Tsis paub"
cv2.putText (im, str (Id), (x, y+h), fontface, fontscale, fontcolor)
cv2.imshow ('im', im)
yog cv2.waitKey (10) & 0xFF == ord ('q'):
so
cam.release () thov
cv2.destroyAllWindows ()
Kauj Ruam 5: LCD thiab Hais Lus
Kuv kuj tau siv I2C LED Zaub thiab tus hais lus.
LED yog tswj los ntawm Arduino Mega thiab nws cov cai tau muab rau hauv tus lej kawg.
Txog Tus Hais Lus, nws txuas nrog Raspberry Pi thiab siv eSpeak Utility.
Koj tuaj yeem pom nws qhov kev siv ntawm no-https://www.dexterindustries.com/howto/make-your-raspberry-pi-speak/
Kauj Ruam 6: Kauj Ruam Kawg
Sib sau txhua yam thiab npaj rau lub bang.
Pom zoo:
4 txog 20 MA Cov Txheej Txheem Txheej Txheem Calibrator DIY - Kev Siv Hluav Taws Xob: 8 Kauj Ruam (nrog Duab)
4 txog 20 MA Cov Txheej Txheem Txheej Txheem Calibrator DIY | Kev Siv Hluav Taws Xob: Cov cuab yeej siv hluav taws xob thiab khoom siv hluav taws xob yog thaj chaw kim heev thiab nws tsis yooj yim kawm txog nws yog tias peb tsuas yog kawm tus kheej lossis nyiam ua haujlwm. Vim li ntawd kuv chav kawm ntsuas hluav taws xob thiab kuv tsim qhov peev nyiaj qis no 4 txog 20 mA
Linefollower HoGent - Txheej txheem txheej txheem: 8 Kauj Ruam
Linefollower HoGent - Syntheseproject: Voor het vak syntheseproject kregen peb de opdracht een linefollower te maken. Nyob rau hauv deze instructable zal ik uitleggen hoe ik deze gemaakt heb, en tegen welke problemen ik o.a ben aangelopen
Pheej Yig, Ob Sab Ob Sab, Daim phiaj-nws Cov Txheej Txheem Txheej Txheem: 4 Cov Kauj Ruam
Pheej Yig, Ob Sab Ob Sab, Daim phiaj-nws Cov Txheej Txheem Txheej Txheem: qhov no yog qhov yooj yim thiab pheej yig version ntawm ntau dua polished, muaj zog thiab feem ntau zoo dua daim phiaj-nws cov koom haum uas koj tuaj yeem yuav. Kuv tau them nyiaj ua qhov tsim zoo sib xws rau qhov qub thiab txiav txim siab tias nws tsis tsim nyog nws, txawm li cas los xij cov ntawv no raug nqi tsis muaj dab tsi (
Xim Txheej Txheem Txheej Txheem: Arduino Raws Li Txheej Txheem Nrog Ob Txoj Siv: 8 Kauj Ruam
Xim Txheej Txheem Txheej Txheem: Arduino Raws Li Txheej Txheem Nrog Ob Txoj Siv: Kev thauj mus los thiab/lossis ntim khoom ntawm cov khoom thiab cov khoom hauv thaj chaw ua haujlwm tau ua tiav siv cov kab ua siv siv txoj siv thauj khoom. Cov menyuam no pab txav cov khoom ntawm ib kis mus rau lwm qhov nrog qhov nrawm. Qee qhov kev ua lossis kev qhia paub ua haujlwm yuav yog
D4E1: Kev nyeem ntawv-cuab yeej 2.0 (Txheej Txheem Txheej Txheem Txheej Txheem): 9 Cov Kauj Ruam (nrog Duab)
D4E1: Kev nyeem ntawv-cuab yeej 2.0 (Txheej Txheem Txheej Txheem Txheej Txheem): Cov ntaub ntawv:-Ob tus tub ntxhais kawm Muaj cov khoom lag luam tsim qauv hauv Kortrijk (Belgium) tuaj nrog cov cuab yeej nyeem ntawv no. Peb pib raws qhov tsim qauv uas twb muaj lawm thiab tau txhim kho nws mus rau lwm qhov kev tsim. Kev nyeem ntawv-cuab yeej thaum xub thawj tau raug txhim kho rau cli & nte