Monday, July 31, 2017

Kansas Water Towers as Seen by a Drone

As I headed home to Idaho last weekend, I made a few stops to test my new camera, an Apeman A60. The camera was slung beneath my Blade Chroma and setup to record video. I took screen shots of some of the video and would like to share them.

My first goal in shooting video was to show that flying around infrastructure is safe, as long as you keep a respectful distance and don't cross private property lines. Second, I wanted the video to show that drones are a safe and inexpensive way to inspect infrastructure. These still images could show more detail if it was used by a county or state employee who's job was to inspect infrastructure. Finally, a drone platform let's you see what the top of stuff looks like and gives a better feel for its placement in the community.

The Hays, Kansas water tower next to the Sternberg Museum. I made sure my drone did not cross the fence around the tower.
At 400 feet up, the water tower is way below the drone. Now we can see what's on top of the tower. This image is looking towards the East.
The Park, Kansas water tower. Again, I kept a respectful distance away from the tower.

Sunday, July 30, 2017

UAVSonde Data for NearSys Station, 30 July 2017

UAVSonde data were collected at 6:45 AM. Here are the data.

Altitude: 2,257 feet
Temperature: 78 *F
Relative Humidity: 39%
Pressure: 934.0 mb

Altitude: 2,663 feet
Temperature: 86 *F
Relative Humidity: 3%
Pressure: 917.6 mb

Tuesday, July 25, 2017

Manhattan Planet Walk

In 1999, I worked with the K-State Physics Club to create a Planet Walk for Manhattan, KS. While visiting family this summer, I took a quick trip out to the start of the Planet Walk to see what part of it still existed. In years past, I've discovered that parts of it were knocked over or removed. I was hoping I would find some parts of it were still standing when I visited this summer.

The Little Apple Planet Walk was set to a scale of one million miles per yard. This scale means the the sun is the size of a beach ball. It also means that the distance between the sun and Earth is 93 yards. A walk from the sun to Pluto was a walk of some two miles. That's a doable distance and one that can give you some pleasant exercise.

It was amazing how quickly one would walk between the sun the terrestrial planets of Mercury, Venus, Earth, and Mars. Then walkers would experience a large gap between Mars and Jupiter. The distance between the gas giants of Jupiter, Saturn, Uranus, and Neptune were equally large. Taking a Planet Walk is a good way to experience the vast and lonely distances that make up the outer solar system.

The Little Apple's Planet Walk begins at the entrance of the Linear Park Trail's entrance at Pecan Circle. This informative sign was created by Thomson Signs and donated to the planet walk  
Each planet's average distance from the sun was marked with a limestone pillar. The pillars were created by Manhattan Monuments and donated to the planet walk. Originally, each pillar held a stainless steel disk cut to the proper scale size of each planet. The KSU Physics Machine Shop made the disks.
Over time, walkers of the Manhattan Linear Trail removed the disks for each planet and knocked over the pillars. I know that Mercury's pillar is still standing, but those of the rest f the terrestrial planets do not. And I suspect the remaining planets aren't standing anymore either.

It was a fun project and I liked getting the donations that made it happen. I am especially happy that the Manhattan Parks and Rec went out of their way to get the walk installed. Thanks everyone for making its possible. I just wish people were more careful around it. I hope to get another one installed somewhere in the future.

Images Above Kansas State University

I made a quick flight above KSU (one of my old Alma Maters) with the Quadcopter and got two images worth keeping.

Looking toward the northwest from the southeast corner of the campus. Altitude is around 300 feet.

My quadcopter wasn't the only thing above KSU. Now I know what the campus looks like from a bird's perspective.

Thursday, July 20, 2017

Earth's Shadow

Many people have seen Earth's shadow, but were unaware of its presence. After the sun sets, or before it rises, there's about a 20 minute window to watch Earth's shadow projected on the atmosphere. It appears as a slightly darker blue band above the horizon with a reddish band above it.


I produced a short time-lapse movie of Earth's shadow in the west as the sun rises in the east. The movie has two parts. The first part is in visible light, or how we would see it with our eyes. The second part is through the eyes of near infrared. Interesting that the slightly smoky skies we're dealing with in the Treasure Valley prevents our eyes from seeing the anticrepuscular rays but that NIR cuts right through the haze. What are anticrepuscular rays? Well, crepuscular rays are the dark shadow of clouds projected into the atmosphere as lines or rays. Anticrepuscular rays are those cloud shadows projected onto the opposite end of the sky. They point to the anti-solar point, or the point in the sky are is opposite the sun.


You an see my Morning Movie at the NearSys YouTube channel.




Earth's shadow on visible light, or how your eyes would see it.



This is Earth's shadow in near infrared. Notice how much darker it appears.
 

Saturday, July 15, 2017

UAVSonde Data for NearSys Station, 15 July 2017

UAVSonde data were collected at 8:10 PM. Here are the data.

Altitude: 2,227 feet
Temperature: 103*F
Relative Humidity: NA
Pressure: 917.6 mb

Altitude: 2,811 feet
Temperature: 100*F
Relative Humidity: NA
Pressure: 914.6 mb

The GPS reciever misbehaved at high altitude. If this repeats, the GPS will be replaced.

Friday, July 14, 2017

Can Robotic Vision Guide a Robot Down a Row of an Orchard?

Based on this color-near infrared image, is this robot driving down the middle of the orchard row? Can the robot determine how much and in what direction it must adjust its driving path? Image from the NNU Robotics Vision Lab. 


Orchard work is labor intensive and labor costs money. In order to keep costs down, agriculture, along with manufacturing, is trying to automate processes. In agriculture, automated systems means things like programming robots to drive down the rows between trees in an orchard to inspect the fruit or spray the trees. For robot to drive through an orchard without crashing into trees, it must first recognize trees in its robotic vision, determine its location based on that image, and then plan a driving path. I was given an opportunity to analyze an image recorded by the camera system of a robot built by NNU and see what I could come up with. Here's what I did, using ImageJ to analyze the image above (as told by the images generated in each step). With a pinch of luck, this will help robots see trees from the orchard (forest).


First, crop the image. I took about the center 1/3rd of the image and it doesn't seem my method doesn't cares exactly how much of the image is cropped, as long as it includes the tree trunks.  


Next, split apart the three color channels and retain just the near infrared. Notice that the tree trunks appear very dark compared to the leaves, grass, and even the sky. On  cloudy day,  the sky should appear even brighter, which makes the next process even easier. 
The image is then segmented by setting a threshold using the Otsu method. However, in this case, I selected to invert the image by isolating the high end of the histogram. I suspect one could invert the image first and then let the Otsu method segment the image as it determined is best. Segmenting an image means finding a good threshold value in to which to split the image into either black or white pixels.  














































After the image is segmented, its filtered to remove the more distant trees and grasses. The filtering that does this works by dividing the image into ten pixel groups and making every pixel in the group as bright as the brightest pixel in the group of ten. So it's called maximum filtering.  

Now the image is scaled. The scaling decreases the x-axis by a factor of 2 (scaling factor is 0.5) and the y-axis by a factor of four. So essentially, the image is being stretched vertically and shrunk horizontally. The image is shrunk in the x-axis to keep the image size from becoming too large. 


After scaling, the image is cropped to keep just the middle third. The stretching and cropping is repeated a second time.  
This is what the image looks like after the second round of scaling and cropping.


Now the image is made into a binary file. In other words, each pixel is just a 1 or a 0.
In this step, the image is skeletonized. That means the middle of each region is replaced with a line running through its middle. So notice that this process has turned the tree trunks visible in the near infrared image into a series of vertical black lines. 
Now the robot's vision system just needs to detect the black lines across the image. I think the reference line can be taken at any height across the image.
Final Thoughts
My feeling is that the vision system should count the x-axis location of a black line as it goes across the image. Since the lines are a single pixel wide, the location of each black line becomes a single number. The location of each black pixel must be taken in reference to the center of the image (in other words, the origin of the horizontal sampling line is the center of the image. Pixel locations left of the center of the image have negative values and pixel locations right of the center of the image have positive values. Now add the pixel values together. The sum indicates the center of the tree rows relative to the center of the image. If the sum is positive, then the robot needs to drive forward and right. If the sum of the pixel values is negative, the robot needs to drive forward and to the left. And of course, if the sum is zero, the robot just needs to drive forwards. The absolute value of the pixel sum indicates just how far off the center the robot is.




For higher accuracy and certainty, the robotic vision system might want to take measurements across the final skeletonized image in several rows.