Showing posts with label Open GL. Show all posts
Showing posts with label Open GL. Show all posts

Tuesday, February 14, 2012

Scientific Data Acquisition and Modeling Project Update 2

Progress has been made since my last post. As for the sensor part of the project, the salinity sensor has been built. Tyler is currently adjusting it to be able to measure the range of salinity we expect to encounter in the cisterns. The pressure sensors that we will be using to take temperature measurements arrived about a week ago along with the PAMs. We are currently in the process of acquiring the cable used to program them. Once we program the PAMs we will connect everything together and start testing. Also the otter boxes which we will be putting the sensors in to protect from the water should be here by Wednesday
or Thursday.

As for the modelling part of the project, I have made some modest progress. I have written a CSV file parser to parse the salinity, temperature, and position data and represent it in the cistern. The visualization for this can be seen to above. Also I implemented a bounding box that will help me calculate what is in the cistern and what is not for when I do the scattered data interpolation view. This can be seen to the right.

Friday, January 6, 2012

Winter Break Work:

Over break I implemented a bump map rendering system and researched stereo imaging. Both of these projects will be used to create more realistic, bumpy, cistern walls.

The bump map rendering system combines a surface texture, a bump map, and a mesh of vertices to create the illusion of surface deformations, or depth. The bump map is actually a map of normal vectors for each pixel in the map. The colors of each pixel in the bump map, red, green, and blue, determine the x, y, and z components of the normal vector at that pixel. Given the normal vector of a pixel, the position of a light, and some coordinate transformations, the amount of light that falls on any one pixel can be calculated. A grayscale mask can then be constructed to dim the desired pixels. The mask is then applied on top of the original texture to create the illusion of bumps. The following is a screenshot of a cylinder that has been textured with a yellow and blue checker grid and a bump map.







The renderer uses OpenGL and GLUT. I had never used either of these, so a good portion of my break was dedicated to setting up OpenGL and learning about the graphics pipeline. It was a great learning experience to be sure!

Stereo imaging will be used to create bump maps for the aforementioned renderer. The trick to stereo imaging is to capture two images simultaneously and then compare almost identical features in both images to compute the relative distance of those features using triangulation. I am currently planning on using the OpenCV libraries for camera calibrations and 3D map generation. After discussions, we are planning on mounting two GoPro cameras to the top of the Video Ray−as mentioned below.