report #6.
Note :
After attempting to read the range images with various formats, I found the images with a *.range extension gave correct xyz coordinates. After using the correct information to manipulate the *.xyz images I found the coordinates jumped around to much. So I had to use other code, found in the rangek2a directory, to manipulate *.range images.
Part I( calculating regions )

cube 
tower 
original 

All regions 

Region1 

Region2 

Region3 
Output
Okay. Now the images shown are not without some errors. Many parameters had to be considered in order to display any region. For example, the length of the vectors used to calculate the cross product played an important factor in accumulating angles. Also the angles within the image could have been off by 10 degrees. I had to empirically determined the cutoff value of the smallest as well as the largest accumulated angle of beta and alpha. If a high cutoff value existed, then possibly no regions would get detected. If the value remained too low, than many regions would be considered for display.
In region three of the tower image, one plane has more intensity than the other, but two planes are present. These two images are somewhat close together with respect to their angle. If that is the case, then why do regions one and two of the tower image show cleaner breaks from one another? The angle between the faces on the right could have been just slightly more than the angle between the faces on the left. That is, just enough of a difference existed to avoid the plus or minus errors. This angle difference may have been caused by the setting parameters of the range camera. Also, in my attempt to get a more reasonable region, I may have used a different parameter on the right then on the left.
Part II( equating angles and planes )
equations
equation 
cube 
tower 
equation 
Z=0.97x + 1.04y 
Z=0.54x + 0.47y 

Z=0.92x  0.21y 
Z= 0.11x + 1.01y 

Z= 3.94x + 0.69y 
Top left(z =1.42x+0.04y)
Bot left( z=3.59x  1.03y) 
Angles
angle \ cube 
Plane1 
Plane2 

119 degrees 

107 degrees 

45 degrees 

Angle \ tower 
Left side 
Right side 


Before 


94 degrees 
After 
Output
After detecting the regions, a few errant angles within the same plus or minus value, may offset the equation of the plane, and hence the angles between each face. Since the sum of least squares method was used to formulate the equation of each plane, the pixels should have been grouped without any stragglers, or a minimum amount of variation. Many pixels were not grouped as one. This is one source of error. In determining the plane equations for the left side of the tower image, I had to manually separate the top left from the bottom left of the image.
Discussion
Consider computing unit normals by fitting a plane to a small neighborhood. Consider various noise reduction techniques for the raw data. Do you get any improved results?
I used a vector length of about 5 pixels to computer vectors above and to the right of each pixel. I first used a vector length of one. With the vector length of one I obtain the different regions but all with the same alphas and betas. So I vary lengths and found the length of five to be satisfactory. I believe even with the use of doubles one still had to take into account the calibration of the range scanner. With a larger vector length, the regions inherently became smaller. So with all of that in mind computing unit normals on a small plane can drastically limit the accuracy and area of each region.
I believe the noise reduction techniques such as smoothing can decrease the standard deviation among the pixels within each region. I noticed a slight increase in the quantity of pixels for a region after using neighborhood smoothing of window of size 9. However, implementing median smoothing techniques seemed to enhance the edges in a range image and smoothing the background much more. After the median filters use some regions blended into the background, thus producing more regions. So, yes, improved results can be had by smoothing operations. However, one must be careful in choosing the correct algorithm.
Part III( Region growing )
Unfortunately, I have had little time to progress to this part of the program. However I will talk briefly about my method of putting this algorithm together.
The implementation scheme will start by the user mouse clicking onto the region. The program will take over after that part. The program will look for similar pixels in the way of alpha and beta angles. I planned to implement a local convolution of the neighboring pixels with a 3x3 array and then taking the average. If the average is within some tolerance, say 70% of the original seed value of alpha and beta, then I would accept that pixel. This type of implementation and can make use of an incremental looping mechanism since previous values of the 3x3 array will be known after each movement, either up or down, or left to right.
To start I would go left. Once I am at the end of the row, I would turn north. Once I step out of the region's boundary I would step up or northward and turn right . I would then look at the next group of pixels and start at the beginning of the next row. Once I reach the top, I would start over again from the seed position and go right and down.