The project I have been working on in PHYS291 is to check the urbanization
in a region over time using satelite pictures. The idea was to use a decrease
in green pixels, or the plant life in the area, to show the growth of
the urban areas now taking up that space. The same idea can be used for areas
without green nature, using a different color to represent the nature of that
place. For this project I have chosen Huston, Las Vegas and Shanghai as regions so look at.
Huston was a suggestion from Boris Wagner, who helped me finding a project,
while Las Vegas and Shanghai came from this
arch daily article .
The code, images used and results can be downloaded here.
I used two .C files for my work in this project, ProjectV2.C and printrgb.C.
the primary function of printrgb.C is to write some rgb values from an image to
a file. ProjectV2.C counts the pixels in an image that match some conditions that are
set manually, by seperating the rgba values for each pixel into r, g, b and a
values, and checking wether or not they meet the conditions that are set. This
is repeated for each image, and the results are put into a graph.
This graph shows the number of the pixels that meet the conditions each year,
revealing the change in this number of those pixels. A significant decrease in
this number should be close to the opposite of the increase in urban areas, and
should work as a model for the urbanization in that region, as long as no other
events greatly altered the area in the time between the images.
The harderst part of this project is to find general traits of the non-
urban areas while excluding the pixels of the urban ones. At this point I
still haven't been able to find good conditions to count all the correct pixels,
and only those. Below are the results from some of my attemps:
Figure 1: Huston 1st set of conditions, that green has
highest value, the value of red can't be more than 20 more/less than blue and
green is more than 100.
Figure 2: Huston 2nd set of conditions. Modified first
set of conditions, minimum green raised to 130 and max distance between red
and blue is now 30.
Figure 3: Las Vegas. Conditions: Blue lower than both red and
green, red more than 220 and green more than 200.
Figure 4: Shanghai. Conditions: green highest, green more
than 50, red less than 50 and blue less than 100.
From my experience, this is much harder to do this than what I thought at the
start of the project. Apart from the difficulty of finding the right parameters
for one image, the images have some differences in lighting, so the colors are
slightly different from image to image. The spikes in the graphs are
most likely from these alterations, where a significant amount of of pixels
either meet the conditions or they now longer does. Another point is that the
urban areas have colors between green and yellow, making the colors closer to
those of non-urban areas, increasing the difficulty of the conditions even more.
From the images, it seems like Huston around 1999 stats to develop the green
areas, which is hard to tell from the graphs. It does show a decline after around 2005, but at the end it goes up, and it is too
unreliable to trust.
The graph from Las Vegas has a nice shape drecreasing from 1984 from 2016, but
it still has several spikes, making the results somewhat uncertain.
I am not sure what happend with Shanghai, but looking at the images, there is
a lot of interference in the atmosphere, and of the three areas I have chosen,
this region has the least consistent images.
In conclusion, this program in its current stat is unable to easily check urbanization
in an area. The current program requires use input of conditions, which will
differ for each area, and it is easily affected by external factors intefering
with getting the image, such as the atmosphere or light.