12/2/2022 0 Comments Arduino serial port monitor![]() RaspiDist = (knownwidth*focallength)/perwidth Perwidth = bbox #This is what will update every frame, unable to update for now Knownwidth = 30.480 #Almost the same size as A4 paper # Initialize tracker with first frame and bounding boxįps = cv2.getTickFrequency() / (cv2.getTickCount() - timer) The Python code is as follows: import cv2 Int distance = DETECTORsensor.getDistance() SharpIR DETECTORsensor( SharpIR::GP2Y0A21YK0F, A0 ) I closed the serial monitor that seemed to help once but it wont work again for some reason. Ive tried clearing the Arduino code and flashing it again, that didnt help. It will also output to the screen the distance read by the IR sensor attached to Arduino. The python script is an OpenCV program to track an object, it asks for a bounding box then tracks this box in the camera stream. ![]() ![]() Im encountering the issue where it denies access to the COM port to read the data. ![]() Im trying to read the data from Arduino through Pyserial lib. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |