Wednesday, February 29, 2012

Malta: Technical Update

In Malta news today, I have been working on my depth recognition software. On the flight over I took a good span of time reading about a variety of different depth recognition algorithms. The simplest of these is the Fixed Window algorithm. The algorithm relies on summing the differences in pixel intensities over a box of pixels or a window of fixed size. The pixel box is kept stationary on the left image while it is moved on the right image. The distance between the two boxes that correspond the most, or the two boxes with the fewest differences in pixel intensity, are used to measure the disparity at that point on the image. So, the disparity is equal to the horizontal difference in position of the right box compared to the left box. I have been attempting to implement this algorithm in my code to detect the depth using images from our GoPro cameras. Currently, the code works for very simple images that I have constructed in Microsoft Paint, but not for more complex images.
One downside of using this algorithm is the fact that it computes the disparity at every single pixel in the image. The images from the GoPros are 8 mega-pixels before my correction software converts and updates them. So the depth map for a full image takes more than an hour to compute. Nonetheless, when everything is working, these high resolution images will allow us to have a precise measurement of distance from our underwater images. Time permitting, I hope to implement more efficient depth computation algorithms later. Two such algorithms are Fast Bilateral Stereo and Fast Segment Driven Detection. Both of these produce rapid noisy results that can be corrected with a Logically Consistent Stereo algorithm.
The other members of the team were working on their own coding projects today. Eric had a great deal of progress with Unity3D and Google Earth. Tyler was similarly productive with his image correction software. He used a number of techniques related to thresholding that masked off the non-textured areas of the image. Ultimately, this will allow us to texture images from the ROV onto the sonar and image generated cistern meshes because it will remove the dark water regions from the textures leaving only wall images. Both of us will be working on the projective texturing code over the next few days.

Tuesday, February 28, 2012

Greetings from Malta!

Hi readers,
Yesterday we touched down in Malta! The days blurred together during the flights, but passing over the Swiss alps at 10,000m made up for the rest of the mind numbing travel. Once we arrived, we took a precarious bus ride to our apartments to get situated. All of us promptly passed out and woke up some inordinate amount of time later to a fresh morning in Malta! Upon waking, Jeff, Sara and I took a ~2 hour long walk down the coast of Sliema. Here's what that looked like:




After we got back everybody else was up so we unpacked the gear to check the condition of the robots. We all got a little bit of work done with our projects, and shortly after Tim and I went to the ironmonger (hardware store in Malta) to get some sandpaper/rubbing alcohol/superglue/various other odds and ends. We returned and finished some more work. At around 1:00PM (it felt more like 4:00AM...) the group went out in search of lunch. We stumbled upon a traditional Maltese restaurant and took a seat inside. Everybody in the group tried some wild orders. Billy and I were a little bit tame, and got crab and lobster ravioli. Some of the other orders were more interesting. Jeff got sea urchin pasta, and Tyler got rabbit (below)!


After lunch (which is 3 hours and 6 courses long in Malta), we headed to the grocery store and then back home. Sliema is an incredibly dense city, so navigating can be difficult. We had some trouble in this manner, but found our way back home. Back to work!

Sunday, February 26, 2012

Meetings and Technical Update

It truly has been a busy week. As that all us Cal Poly students leave tomorrow, much preparation was done this week. Many of us had to take one or more final exams, and finish final projects for our classes. Thursday night the team went out to dinner to take a small break from preparations and plan the packing of our technical equipment. On Friday we packed everything we needed from the Lair and confirmed some last minute details.

For a little more than the last week I have been helping Sara with the water and society part of ICEX. I worked to install the Omeka database system on the server space provided by the Cal Poly Computer Science Department. Due to my lack of experience in database installation it took longer than expected but on Friday it was successfully installed. The website for the database is not currently in a state that we would like to share with the public but I expect that it won't be very long until it is. Unfortunately, due to the time it took me to set up the database among the other work for this past week, I have not had the chance to work on the programming side of my project but Tyler and Tim have gotten some work done on the mounting of the Otter Box cases.These will house the salinity sensor, the pressure/temperature sensor and the PAM. See the post below for more details.

Saturday, February 25, 2012

Technical Update: Mounting Hardware

The time for Malta is almost here!

Work on the ROV is progressing nicely. The GoPro's have been mounted to the ROV using modified GoPro hardware. Each GoPro camera came with a set of mountable sticky pads that are designed to be clipped into by GoPro mounting clips. Instead of using the adhesive, holes were drilled into the sticky pads to allow them to mount to the ROV, as shown below.



From the mounting clips the cameras are attached to a series of plastic joints as seen below.



The camera then protrudes from the underside of the ROV, giving a similar view to the main drive camera.





A more complex mounting bracket was installed to hold the Otter Box. It consists of three metal plates. One of these is mounted to the ROV. The other two are used to sandwich the Otter Box. The plates are all bolted together using two bolts at either end of the plates (see image below).




Mounting the bottom plate to the ROV required the use of a number of washers to prevent the plastic on the ROV from bowing towards the metal plate.

Maltese Farming Update

In my last cultural blog I discussed the state of Maltese agriculture with respect to the water situation on Malta. In this entry I plan to address my latest research on Maltese agriculture, organic farming. I have come to the conclusion over the past two weeks that organic farming has not taken off in Malta to the degree that was desired by either the government or the organic activist groups.

Let me begin by defining organic farming compared to normal farming. The first important distinction is that organic farming requires that crops be rotated every year. This is due to the fact that different plant families add and remove different nutrients from the soil. Rotating crops allows soil nutrients to be replenished between years.
The second important distinction is that organic farming requires farmers to use non-chemical insect controls and fertilizers. Insect control may include "friendly" insects and insect repelling plants. Farmers may only choose to use organic fertilizers such as plant compost or manure from organically raised animals.
The third and final distinction is the fact that farmers may not use any genetically modified organisms (GMOs). That is, farmers can grow any variety of plant that has not been genetically tampered with by humans.

The importance of organic farming was highlighted by the Government in the National Climate Change Adaption Strategy report in 2010. They recommend the use of organic farming methods primarily to help stop soil erosion, decline in soil organic matter, and soil contamination. They also stated that organic farming should be encouraged because of its environmental benefits and biodiversity benefits.

Unfortunately, before 2003, there was no way for organic farming to take place on Malta. No governmental bodies existed to approve organic farming methods or organic produce. As a result of this the Ministry for Rural Affairs was tasked with setting up the Organic Farming Unit, which is solely concerned with promoting, certifying, and inspecting organic farming in Malta.

A number of activist groups have cropped up in Malta to support the organic movement as a way to combat global warming. Perhaps the biggest of these groups is the Maltese Organic Agriculture Movement (MOAM). The group lists a number of reasons that all Maltese farmers should choose organic farming including economics and water supplies. Their argument for economics is that while Maltese farmers cannot out produce farmers in larger countries like Spain they can produce better products and charge more for them. For water, the MOAM argues that organic farming methods encourage good soil development and soil retention. Good soil is able to retain water much better than arid or sandy soil. So, in the end, less water will be needed on organic farms.

Reports from the Organic Farming Unit indicate that, in 2004, 20 farms were in the process of converting to organic farming. This accounts for 0.09% of the total agricultural land in Malta. However, even by 2010, only 0.19% of the total agricultural land was being used for organic farming. This represents a little more than a doubling of interest in organic farming over a 6 year period. While this shows growth, it is not substantial growth.

So, organic farming is moving forward but is off to a slow start. A professor at the University of Malta suggests that farmers are afraid to trust their crops to purely organic farming methods. It could also be the case that because 98% of farms in Malta are family owned and only 3.8% of farmers have training in farming methods, farmers are not willing to experiment with new farming methods. Both of these are potential reasons for farmer's lack of interest in organic farming, but there is doubtlessly more information that I have yet to find.

Wednesday, February 22, 2012

Technical Update - Mapping and Image Processing

Departure is nearly upon us! We have been doing a great deal of work the last few weeks getting everything ready. Erik and I had an opportunity recently to drive the ROV in the pool and perform a full mapping run. We positioned the ROV in strategic locations throughout the pool and captured a series of sonar scans. These were fed through Billy's mapping program to generate a map of the pool.

It was an excellent opportunity for us to practice the teamwork and processes necessary for a full deployment, including setup, un-boxing, deployment, scanning, assembly, and take-down. After the session I feel a great deal more comfortable with the equipment and software we will be using in Malta.
In addition, I have been doing further research on the topic of image processing. In particular, I need to smooth the back-scatter out of the cistern photos, then sharpen the images and equalize their appearance for texturing. Smoothing will be done using a median filter, as shown below. Notice how an increasing filter size greatly reduces the noise in the picture. However, it also blurs the subject of the image. This effect may be reversed using a laplacian mask to re-sharpen the transitions of the image. Once this process is complete, I hope to have a clear, sharp picture ready for texturing. The final step will be to equalize the gamma across all images so they blend smoothly together on the final mesh.

Tim is also doing some image processing work with his 3D imaging project. I am hoping that the research I have done for texture smoothing will also be able to help him in generating his bump and disparity maps.

Malta's Military History

My cultural research project for Malta is focused on the island's military history and its influences on their culture. The island's strategic importance and history of occupation has contributed to a very rich and colorful history dating back several hundred years. While the Maltese have never been an aggressive military force, the defenses on the island were an active focus for a prolonged period of time.

While on the island, I intend to visit several of the museums and sites of importance. Hopefully these visits will provide a considerable insight into military development and history. In addition, I intend to perform a few in-person interviews to get a better feel for how much of an effect, if any, the island's unique history has had on her modern citizens.