Dimensional Analysis is one of the most important tools in the Engineers tool kit. In today’s lesson we take you through it step-by-step with example problems.
All posts by admin
Arduino Tutorial 62: Understanding How to Use Dimensional Analysis
Dimensional Analysis is one of the most important tools used by practicing engineers and scientists, and allows you to convert from any set of units to any other set of units. It provides an a methodical method that takes the guess work out of conversions. This video takes you through the method step-by-step with several examples. The homework should be done before watching the next video.
AI on the Jetson Nano LESSON 40: Training Facial Recognition Models in OpenCV
In this lesson we learn to make training our AI Facial Recognition system simpler and more automated.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | import face_recognition import cv2 import os print(cv2.__version__) Encodings=[] Names=[] j=0 image_dir='/home/pjm/Desktop/pyPro/faceRecognizer/demoImages/known' for root, dirs, files in os.walk(image_dir): print(files) for file in files: path=os.path.join(root,file) print(path) name=os.path.splitext(file)[0] print(name) person=face_recognition.load_image_file(path) encoding=face_recognition.face_encodings(person)[0] Encodings.append(encoding) Names.append(name) print(Names) font=cv2.FONT_HERSHEY_SIMPLEX image_dir='/home/pjm/Desktop/pyPro/faceRecognizer/demoImages/unknown' for root,dirs, files in os.walk(image_dir): for file in files: print(root) print(file) testImagePath=os.path.join(root,file) testImage=face_recognition.load_image_file(testImagePath) facePositions=face_recognition.face_locations(testImage) allEncodings=face_recognition.face_encodings(testImage,facePositions) testImage=cv2.cvtColor(testImage,cv2.COLOR_RGB2BGR) for (top,right,bottom,left),face_encoding in zip(facePositions,allEncodings): name='Unknown Person' matches=face_recognition.compare_faces(Encodings,face_encoding) if True in matches: first_match_index=matches.index(True) name=Names[first_match_index] cv2.rectangle(testImage,(left,top),(right,bottom),(0,0,255),2) cv2.putText(testImage,name,(left,top-6),font,.75,(0,255,255),2) cv2.imshow('Picture', testImage) cv2.moveWindow('Picture',0,0) if cv2.waitKey(0)==ord('q'): cv2.destroyAllWindows() |
REVIEW of the New NVIDIA Jetson Xavier NX Single Board Super Computer
Guys I am really excited about the new NVIDIA Jetson Xavier NX supercomputer on a board. I have put this bad boy through his paces for the last couple of weeks, and above is my video review. Really love this new board, and you can pick yours up HERE.
Arduino Tutorial 61: Improving Precision of Your Distance Measurements

In this lesson we strive to improve the precision of our distance measurements using an average of a large number of measurements. This builds on the work we did in the last few lessons.
We are building this with parts from our Elegoo Kit , and our actual build is using an Arduino Nano, which allows the project to be built on a single breadboard. You can get the neat jumper wires HERE.
This video takes you through the process step-by-step.
The code developed in this video is included below for your convenience.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | #include <LiquidCrystal.h> int rs=7; int en=8; int d4=9; int d5=10; int d6=11; int d7=12; int buttonPin=A0; int buttonVal; int numMeas=100; float avMeas; int j; float bucket=0; LiquidCrystal lcd(rs,en,d4,d5,d6,d7); int trigPin=2; int echoPin=3; int pingTravelTime; float pingTravelDistance; float distanceToTarget; int dt=5000; void setup() { // put your setup code here, to run once: lcd.begin(16,2); pinMode(trigPin,OUTPUT); pinMode(echoPin,INPUT); pinMode(buttonPin,INPUT); digitalWrite(buttonPin,HIGH); Serial.begin(9600); } void loop() { // put your main code here, to run repeatedly: lcd.setCursor(0,0); lcd.print("Place the Target"); lcd.setCursor(0,1); lcd.print("Press to Measure"); buttonVal=digitalRead(buttonPin); while (buttonVal==1){ buttonVal=digitalRead(buttonPin); } lcd.setCursor(0,0); lcd.clear(); lcd.print("Measureing . . ."); for (j=1;j<=numMeas;j=j+1){ digitalWrite(trigPin,LOW); delayMicroseconds(10); digitalWrite(trigPin,HIGH); delayMicroseconds(10); digitalWrite(trigPin,LOW); pingTravelTime=pulseIn(echoPin,HIGH); delay(25); pingTravelDistance=(pingTravelTime*765.*5280.*12)/(3600.*1000000); distanceToTarget=pingTravelDistance/2; bucket=bucket+distanceToTarget; } avMeas=bucket/numMeas; Serial.print("Av. Dist. to Target is: "); Serial.print(avMeas); Serial.println(" in."); lcd.clear(); lcd.setCursor(0,0); lcd.print("Target Distance"); lcd.setCursor(0,1); lcd.print(distanceToTarget); lcd.print(" Inches"); delay(dt); } |