Menu

group2_project_description

Valentin Dallerit ThomaSven
Group 2

Goal

As the presentation said, we have to create a program to rebuild a 3D object. To do that we only have a webcam, a lazer, a rotative table.
The camera will film the object to scan, and with a program which will convert 2D points to 3D point, we will give a 3d representation on wavefront.
Two groups of students are competitors.
Each groups is devided in two subgroups.

Procedure

The goal is to share the work and the search to win times. The first subgroup is on charge to create a program which find the track of the lazer on the object. It has to generate the coordinates (x,y) of any red points detected.
The second group is on charge to find a solution to communicate with the rotative table. After that it has to change the 2D coordinates to 3D coordinates, considering the table rotation.

Schedule

During the first lessons we learned how to use C+ and programs which will be useful ( Visuastudio, Doxygen, blender, etc ). Moreover we have learned the HSV technique. After that we established the two groups and we chose to work compete. Then we began to work on the project. As we say above, we established two subgroups. Sven and Thomas are responsible for detected lazer's track and send the 2D coordinates of red points. Valentin and Romain are on charge to create the program which will converted the 2D points to 3D points and create the object in blender.

Subgroups 1 : detected red points

The goal of this part of the final program is to extract the position of the laser on an image captured by the webcam.

So at first, we began with the part of the script which would capture an image from a webcam.
We also began to think about the extraction of the colors of each pixel, so we get an array which represent the Red, Green and Blue components.
After that, how to define the color of the laser in "RGB" ? We had to change this array RGB in HSV (Hue, Saturation, Value) which is easier to use because of the Value. Indeed, the object we have to capture with the webcam will be in the dark, so the Value is the more important component. You can see more precisely on our page. On this page you can the the both pictures concerning the extraction, as the difference between what the camera see and what we obtain after treating.

When we finished (at the first time) the script, it worked but wasn't beautiful and easy to use with the other group. In fact, there was too code in the main, whereas the most would have been that our final function used only functions well defined. So we changed the script in order to be rigorous.
According to this, we have to create the head for each function (function.h) in order to include these functions in the final program.

Subgroups 2 : generate 3D coordinates

The goal of this subgroup is to convert the 2D coordinates given by the other subgroup
to 3D coordinates. According to this, the equation is not easy to find. To learn more you can find our relations on this page. The program is able to communicate with the rotative table. At the end of the program we recover a wavefront file which we have to open with blender. This hardware is used to manipulate the virtual object.

As the other subgroup said, we have met some problem to share the code. Our code and their code use the same variables. So in common we have rebuilt one main with the useful functions. Indeed, some part of code were not used because of the struct of our program.

Completion

Each subgroup has finished its program. The code has been shared and the main is ready. You can find the last code's version on our page. The code is commented with doxygen's syntax. As the code is finish, we can start the scan. We have set the scene and we have measured all the datas we need to run our program.

Here you can see a picture of our montage seen by the top.

montage

And here you can see the montage seen by the programmer.

montage

First we measured the opening angles of the camera.
As we said in the other wiki page, we have to measure the distance between the camera and the rotation center and the distance beatween the laser and the rotation center. With the cosinus function we can find the angle between the camera and the laser, used in equations.

Group 2 : laser extraction explication

Group 2 : converter 2d to 3d points explication

wiki home


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.