Cov txheej txheem:

NAIN 1.0 - Tus Txheej Txheem Humanoid Robot Siv Arduino: 6 Kauj Ruam
NAIN 1.0 - Tus Txheej Txheem Humanoid Robot Siv Arduino: 6 Kauj Ruam

Video: NAIN 1.0 - Tus Txheej Txheem Humanoid Robot Siv Arduino: 6 Kauj Ruam

Video: NAIN 1.0 - Tus Txheej Txheem Humanoid Robot Siv Arduino: 6 Kauj Ruam
Video: Rate my back to base fit [SpeakerWoman] #skibiditoilet #shorts 2024, Kaum ib hlis
Anonim
NAIN 1.0 - Tus Txheej Txheem Humanoid Robot Siv Arduino
NAIN 1.0 - Tus Txheej Txheem Humanoid Robot Siv Arduino

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

Cheeb Tsam Xav Tau
Cheeb Tsam Xav Tau
Cheeb Tsam Xav Tau
Cheeb Tsam Xav Tau
Cheeb Tsam Xav Tau
Cheeb Tsam Xav Tau
  1. Servo Tsav -4
  2. Arduino Mega - 1
  3. Raspberry Pi - 1
  4. Usb Lub Koob Yees Duab -1
  5. Hais lus -1
  6. DC Tsav -2
  7. L293D -1
  8. Roj Teeb Pob - 1
  9. Log -2
  10. 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 Lub Cev
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

Coding thiab Coding
Coding thiab Coding
Coding thiab Coding
Coding 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

Raspberry Pi thiab Kev Paub Duab
Raspberry Pi thiab Kev Paub Duab
Raspberry Pi thiab Kev Paub Duab
Raspberry Pi thiab Kev Paub 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: