Home
hgh plus lisinopril blood in the urine effexor vs zoloft buy viagra on line on viagra soma lingerie cymbalta lawsuit viagra results cialis mexico prednisone tapering schedule best online casinos levitra alternative buy viagra order viagra poison ivy prednisone cymbalta men desire extreme tiredness on cymbalta affiliate casino marketing program diovan vs lisinopril all poker casino cymbalta lawsuit viagra patent ultram pain medication order cialis online duloxetine cymbalta herbal cialis cialis drug prescription is cymbalta good for back pain hgh effects cymbalta side-effects cialis injury attorney columbus best casino rebound from cymbalta tramadol information cialis effect on women effexor xr vytorin interaction side effects viagra online uk paxil medication purchase viagra cialis overnight delivery effexor bipolar 15mg oxycontin does hgh work pepsid prednisone interaction cialis lawyer ohio paxil lawyer buy soma online no prescription 5mg cialis ultram respiratory u 3312 viagra cialis viagra erection duration
Fast Image Mosaicking using Multicore CPUs PDF  | Print |  E-mail
Written by Ray Seyfarth   
Wednesday, 25 June 2008 13:52

Fast Image Mosaicking using Multicore CPUs

In January 2007 I started working on the CZMIL project which is multiyear project involving the University of Southern Mississippi Department of Marine Science, Optech International, the US Army Corps of Engineers, and the Naval Oceanographic Office. The primary purpose of the CZMIL project is to develop a new Lidar collection system in support of the Joint Airborne Lidar Bathymetry Technical Center (JALBTCX) located at Stennis Airport in Kiln, MS. A secondary purpose of this project is to streamline the ongoing data collection and processing at JALBTCX. My work has been in streamlining the production of mosaics of digital camera images collected along with the Lidar data.

JALBTCX

JALBTCX is a collaborative center for Lidar processing, research and development housed at the Stennis Airport. Government partners at JALBTCX include the US Army Corps of Engineers (USACE), the US Naval Meteorology and Oceanography Command, the National Oceanic and Atmospheric Administration (NOAA) and the Naval Oceanographic Office. JALBTCX conducts surveys using the Compact Hydrographic Airborne Rapid Total Survey (CHARTS) system which includes topographic and bathymetric lidar, a hyperspectral camera and a digital RGB camera.

Previous Mosaic Processing

The digital camera system in the CHARTS system is a DuncanTech DT4000 color camera. The system collects approximately 1 1600x1200 pixel color image per second as lidar data is collected. The original purpose for the camera was to assist in determining what features cause the responses in the lidar data. Seeing an image of the water or ground cover can quickly eliminate some confusion in lidar points.

Over time JALBTCX users started producing RGB orthomosaics to provide an overview of survey areas. These mosaics were produced using commercial software which required about 3 hours to produce a mosaic with about 600 input images. In addition there were size limits imposed which forced using coarse resolution elevation data as part of the process. Overall the quality of the mosaics was not great and the time was a processing bottleneck.

The problems with the previous mosaic solution were a result of performing orthorectification of 1 RGB image at a time with a subsequent mosaicking process. Each image processed resulted in the separate execution of external processes. The net effect was a fairly low CPU usage (usually under 25%) and slow processing.

A More Efficient Solution

One way to improve efficiency is to perform orthorectification and mosaicking as a single process, which reduces I/O requirements. Another issue is to avoid mapping output pixels multiple times. There is substantial overlap (~50%) between successive images and overlap between flight lines. When separate orthorectification is performed, each input pixel is mapped into the output space. This means that over half of the pixels produced in these separate orthorectified files will be overwritten when the mosaic is prepared.

The mosaic program uses a Voronoi image as an integral tool for improving efficiency. First the centers of each input image are mapped to their output UTM coordinates. From these centers a distance is calculated for each output pixel to the nearest image center. This is shown in the gray-scale image below. The image centers are located at the center of the dark circles. At the same time that the distance image is computed a Voronoi image is also computed. The Voronoi image (in color below) indicates which original image center is closest to a particular output pixel. In the Voronoi image below the mapping would start with pixels being mapped from the image identified by the yellow polygon. After about 50 pixels from the yellow image, pixels would be mapped from the blue image. Thus the Voronoi image tells the mosaic program which input image to use for each output pixel.

Distance image Voronoi image

There are several improvements which result from using the Voronoi image as a guide in the mosaic process. As previously stated this allows mapping each output pixel exactly once, eliminating redundant calculcations. A second benefit is that the pixels mapped tend to be from the central parts of input images which improves the accuracy of the mapping. Finally it is fairly easy to divide the output image into tiles which can be processed in parallel taking advantage of the availability of multi-core CPUs.

Parallel Processes

The mosaic program uses 5 different types of processes to perform its work: a single master process, a DEM reader process, multiple RGB image reader processes, multiple mapper processes and a single writer process. In the initial version of the parallel mosaic program these processes are initiated by performing fork calls and executing specific functions. Due to Windows not directly supporting the fork system call, the software is being redesigned to use processes and threads, but the overall strategy is still much the same.

Master Process

The master process reads a parameter file which contains specific parameters such as camera boresight and lens values, names of other files, and a variety of processing parameters. The master reads a file containing the names and aircraft attitude of the RGB input images to be mosaicked. Then it computes the Voronoi image and determines the sequence for reading the input images and how many must be in memory to avoid deadlock. Then it starts the other processes and enters a loop where it services requests arriving over pipes.

DEM Reader

The DEM reader process reads a single digital elevation model image (32 bit floating point values) into a shared memory array. After it completes reading the file, it sends a message to the master announcing completion so that the master can allow the mapper processes to verify that the elevation data is available for processing.

RGB Readers

The RGB readers request from the master the image number of the next image to read. The master delays sending the reply until the shared memory region for the file is available for use. There are typically under 100 shared memory regions for RGB images though there can be many more images to read. The master knows when images are no longer needed and, thus, when their memory can be reused. When a reader completes reading an image, it sends a completion message to the master so that the mapper processes can access that image after it is ready. Eventully the master sends -1 image numbers to the readers to tell them to exit.

Mappers

There are multiple mapper processes - typically as many as the number of CPU cores in the system. Each mapper works on 1 tile at a time. A reasonable tile size is perhaps 512x512. The mappers request tile numbers from the master allowing the master to control the use of the memory for the tiles. After a mapper completes a tile, it sends a completion message to the master which ultimately allows the writer to write that tile to the output file. Eventually the master sends -1 tile number to the mappers to signal the end of processing.

Writer

There is a single writer process which writes the output file one tile at a time. The writer requests tile numbers from the master, writes the tiles and signals completion. Signaling completion of tile writing allows mappers to reuse tiles for different parts of the output image.

 

Dataflow

Modeling

The basic model used is a 3 dimensional affine transformation from pixel coordinates to UTM coordinates. The resampling uses the inverse of this transformation so that each output pixel can be mapped to an input pixel position. The output pixels have northing and easting values based on their location in the output file and elevation values from the DEM image. Typically the resolution of the DEM image is coarser than the output image, so bilinear interpolation is applied to elevation values. The northing, easting and elevation values are transformed into pixel coordinates and interpolation is applied to the input pixel values.

The mosaic program implements a radial lends distortion correction as part of the mapping. This correction is applied by precomputing a 2 dimensional array of scale factors which are multiplied times the pixel coordinates before adding the principal point values. The distortion is supplied as a set of coefficients for a 4th degree polynomial. As part of the precomputation the polynomial inverse is approximated by a 7th degree polynomial over the practical range of the polynomial (limited from 0 to 1000 pixels). The scale factor array is computed using this 7th degree inverse polynomial.

The user can select geographic (latitude/longitude) output coordinates if desired. In that case the actual mapping is still performed using UTM coordinates. The output geographic coordinates are converted to UTM prior to mapping. Since this conversion is non-trivial, every 10th row and column are converted using the PROJ4 library and interpolation is used to get accurate approximations during the mapping.

Results

The test area for this report is over Pickering, Ontario. The input consists of 608 RGB images. Most of the flight lines are approximately north-south or south-north, though some are east-west or west-east. A sample of the output image is shown below.

Sample output image

Performance

Performance testing was performed on an 8 core AMD Opteron computer. This system has 4 dual-core CPUs operating at 2.4 GHz. The system has 32 GB of RAM and runs a 64 bit version of Fedora Linux. The disk system uses SATA disks without RAID.  Linux allowed enabling and disabling CPUs as desired during testing. In addition Linux allowed flushing the disk cache so that each test properly reflected the time spent reading input images. Below you can see elapsed time and speedup graphs based on using 1 to 8 cores. In this test the speedup is nearly ideal through 4 cores. After 4 cores the system is probably limited by the single writer process which produced a compressed GeoTiff file. Eliminating compression would improve efficiency beyond 4 cores. Overall the time required is less than 1 minute for a task which had previously required 2 to 3 hours to complete.

CPU time
Speedup

Last Updated on Thursday, 26 June 2008 15:11
 
What do I teach? PDF  | Print |  E-mail
Written by Ray Seyfarth   
Tuesday, 24 June 2008 07:45

What do I teach?

Hello

I try to teach Computer Science, but what I really teach is whatever effect I have on students' lives. Perhaps I have only a little effect, but certainly I interact with many students which must have some effect.

What do I want students to learn?

Honestly I want students to be happy, productive people. This might not require that they all be computer experts. Some students will be computer experts and I hope to teach them computer skills. Others will find computer work boring, tiresome or distasteful. This is a fine conclusion. We do not all need to be the same. Hopefully these students will learn something useful from my classes.

Confidence

Life can be difficult and adversity can weaken the mind. I want students to have confidence in their ability to live well. It is not important that they have confidence in computer skills (unless they wish to be computer experts). So, how can students learn confidence? For some this will result from doing well in my class. Others will perform poorly which is not a boost to their confidence. For them I wish to not destroy their confidence. I aim to treat them with respect even though I may give them low grades. I do not wish grades in my classes to be evaluations beyond performance in the class. Some people will do poorly, but can do better later. Others can do better by switching to a different discipline. All of my students have the potential to be happy and productive, regardless of their grades in my classes. I don't know how to teach confidence, but I can allow confidence and try not to destroy it.

Curiosity

Many of the best achievements are based on creativity.  Problems exist and creative people discover effective solutions.  I believe that the basis for creativity is curiosity.  A curious person will discover solutions before encountering the problems.  Creative solutions are the result of a long-term investment of energy due to curiosity.  I think people can exercise curiosity best by trying to solve problems which are slightly challenging.  It does little good to repeatedly solve simple problems.  Instead you need to encounter problems which you can't solve initially and discover how to solve them.  I can provide an environment for curiosity to develop.

Peace

In order to succeed it is essential to be able to use all your talent.  This is true in computer science and other disciplines.  You need to be able to focus on the task at hand without worrying about problems.  I consider this to be a result of inner peace.  I don't know how to teach peace, but I can try to live in peace and allow others to live in peace.

Love 

It is important to love your work.  It is far easier to work when the work is what you really want to do.  Life should be much more than work, so there needs to be more to love than just your work.  I don't know how to teach love, but I hope to love my own work.

I can teach computer skills.  The work is hard, but the plan is simple - practice makes perfect.  The tangibles are not easy to achieve, but at least I know something to do to directly achieve them.  The intangibles are probably more important.  I can't teach enough skills to last for an entire career.  I hope to foster confidence, curiosity, peace and love.  If you have these traits you will continually develop new skills.

Last Updated on Friday, 29 August 2008 14:18
 
Platform Bed PDF  | Print |  E-mail
Written by Ray Seyfarth   
Sunday, 17 February 2008 16:45

Platform Bed

I gave my bedroom furniture to my wife's mother recently so that she could have a nice queen size bed and I could have a little fun building furniture. Step 1 was to build a bed. I wanted a platform bed to provide a firm surface which is usually considered better for your back and also to provide for some storage underneath.

Last Updated on Monday, 17 March 2008 17:31
Read more...
 
Trellis PDF  | Print |  E-mail
Written by Ray Seyfarth   
Monday, 17 March 2008 03:49

Trellis Construction

Patio frame layoutI built a trellis during Spring Break which covers the patio in my backyard and extends to shade a double window in the den. The diagram on the right shows the structure of the trellis frame. There are 9 4x4 treated pine posts (dark blue). Seven of the posts are planted about 3 feet deep in the ground. Two of the posts are simply standing on the concrete of the patio. The tops of the posts are about 7 feet above the level of the patio.

The red and purple boards are all 2x6 treated pine boards. The three longest boards are just under 12 feet long. I used 2 boards in the center to try to reduce the stress in the middle of the patio. The other three red boards are just under 10 feet long. The boards connected to posts are connected with zinc plated bolts. There are metal brackets used to support cross beams so that all the boards are even with the top of the posts.

On top of the frame I used 4 foot by 8 foot sheets of vinyl lattice to provide shade and eventually a place for vines to cover. In front of the five outer posts I placed 2 foot wide sheets of lattice to give the grape and blackberry vines support.  I also placed a 9 inch strip of lattice in front of the exterior 2x6 boards to improve the appearance.

It looks fairly nice, but plain.  I added a couple of hummingbird feeders to give it a little color.  I think it's time to wait for the vines to grow.  I am getting about 50% sun blockage at this time.  I may decide to cover the trellis with shade fabric if the summer heat bothers us this summer. 

Last Updated on Monday, 17 March 2008 17:20
 
Check out the images PDF  | Print |  E-mail
Written by Ray Seyfarth   
Thursday, 17 January 2008 07:58

Check out the images using the "Images" link under the penguin the main menu on the left.  This is using the RSGallery module for Joomla which is a connection to Gallery2.  Please email me a picture or drop by my office if I should add your picture to on of the galleries.

Enjoy! 

 
« StartPrev123NextEnd »

Page 1 of 3
home search