I'm currently working on a project which involves computer vision and an Arduino board to control a Stepper motor.
The idea of my project is to search for a small dark spot on a white area using a webcam and then the laser will point out that spot.
I use a webcam and the OpenCV library to detect black spot on a white background. After determining the pixel of that spot, I want to send this data(pixel / x-y position) to the serial port of my laptop and then my Arduino board (Atmega328) connected via USB will access that data and then use it to control 2 servo motors (x and y) which has mirrors mounted on it to reflect the laser.
What I can do now is to search for the spot of a black spot and determine it's pixel(coordinates). I can also control the stepper motor using my Arduino board.
My problem is the communications of my laptop and the Arduino board. How can I send the data to my serial port and then send it to my board.
I really need help. Thanks!