Introduction
In this project the camera sends video frames for the Visual Studio C ++ that contains Open CV library working on our computer. Visual Studio C ++ program detects the image of the object from the webcam and then calculates the coordinates of co of X, Y axis and the radius of the object. The coordinates are therefore sent to the arduino UNO / Mega via Serial communication between the arduino and visual studio c ++, allowing to use artificial vision.
Artificial Vision or Computer Vision is the ability to analyze images captured by a camera and obtain relevant information for a given purpose. Being Artificial Vision is a branch of AI (artificial intelligence) since in itself artificial vision are the eyes of robots. The number of applications in this field is almost infinite and new ideas with new ones appear day after day. OpenCV is the Artificial Vision library par excellence, it is developed by Intel.
Development
What is Artificial vision?
It is a scientific discipline that includes methods to acquire, process, analyze and understand the images of the real world in order to produce numerical or symbolic information so that they can be treated by a computer. Just as humans use our eyes and brains to understand the world around us, artificial vision tries to produce the same effect so that computers can perceive and understand an image or sequence of images and act as appropriate in a given situation.
What is Opencv?
OpenCV is a free library originally developed by Intel. It was released in 1999. Originally written in C / C ++, its best virtue is that it is cross-platform, it can be run on different operating systems (Linux, Windows, Mac OS X, Android and iOS). We can also use it in different programming languages such as Java, Objective C, Python and C #.
Project Development
Theme
In the project you have to capture with a video camera and recognize the figure and then determine the location, which in turn this position data will allow you to move the head of a robot.
NECESSARY MATERIAL:
HARDWARE:
1. x 2 servomotors
2. Webcam (any webcam) x 1
3. Arduino Mega / One x 1
4. board
5. single base cable connection
SOFTWARE:
1. Arduino IDE
2. OpenCV 2.3.1
3. Visual Studio C ++ or Xcode
For the development of the project we use OpenCVn and c ++ to perform the logical part that will take all the data with our camera, that is, all the artificial vision part to then be processed and arduino that will allow us to capture the data of our program, and move the head in the direction of our image.
C ++ code with OpenCV
We start all the libraries that we are going to use in our program taking into account that we have to make a header with the name SerialPort.h that will contain all the part of the connection to the arduino. We start the variables to perform the segmentation of our figure and the Invariant Moments of HU.
In this part we start the camera of our computer and starting our Mat that would become our matrices that will contain the data obtained by the camera. To then be scaled and segmented our images captured with the camera of our computer, calculating the invariant moments of hu to get the center of our segmented image and get the data from the x and y section.
In this section we obtain the position of x and y and then send this data to our arduino that for the operation of our robot and finally we visualize our MAT that are the windows of our images both the original and the segmented.
Arduino Code
In this part of the arduino initialize the variables of our servosmotors that will be in section 9 and 10 and we have it initialized in 90 degrees and we receive the data sent from c ++ for the movement of the servos according to the angles.
Conclusion
Artificial vision is experiencing an exciting moment with its successful integration into industrial environments. There are increasing bets for solutions based on computer vision in the industry, both in industrial and non-industrial applications. The skills of this branch are acquired progressively, either from professional immersion to the creation of specialized seminars and workshops and taught by professionals in the sector.
The application of artificial vision is very interesting since it helps in many areas especially referred to in human vision, since we can create mechanisms that do work not simply by receiving orders but if they are able to visualize their objective, take decisions and execute them.
Upon completion of this project, the different OpenCV functions focused on image processing, such as segmentation for object recognition, motion detection, video analysis and camera utilization, could be better understood.
Integrantes: Oscar Tenesaca, Angel Paqui
Integrantes: Oscar Tenesaca, Angel Paqui















