
Binary image
Using the follow command, the edges of the quadrilateral image (white) was traced, and the corresponding coordinates listed. Below is a plot of the coordinates gathered from this function. From the graph, the area of the shape can be measures crudely by noting how many pixels the width and the length measure. The gathered minimum for x, is 94 pixels and the maximum is 444 pixels, that is 350 pixels in width. For y on the other hand, the minimum is at 73 pixels and the maimum is at 257 pixels, that is 184 pixels in length. From this method, the area is 64400 square pixels. Green's method resulted to 64400 square pixels as well. Summing the image on the other hand gave 64935 square pixels. This was a particularly easy shape to measure, being a well defined quadrilateral. The analytic result was the same as that of Green's method. However, the sum of the image had a 535 pixel difference. Perhaps there are still some scattered 1's in the image that are not part of the shape in case.

Plot of the quadrilateral.
For this activity, I am using the Moses Mabhida Stadium as my object of interest. According to South Africa's official website, the ground is formerly the Kings Park Soccer Stadium and the current Stadium was built especially for this year's World Cup. Here is a Google Earth snapshot of the 2010 World Cup arena.
From Google Maps is this image of the stadium, taken as a screen shot.
I measured the total area of the stadium, using image analysis. First, it should be noted that the image is 634x478 pixels, and it has 96 dpi. I loaded the image into Scilab and then converted it into black and white.
I used paint go get the coordinates of the scale of the image. From there, the measured scale equivalent to 100 meters is to 66 pixels. Also by using Paint, I isolated the area I wanted to measure so to exclude (darkened) the unwanted details.
Using the follow command, I measured the area of the field by summing the image and Green's theorem, which are 31816 and 31522.5 respectively. These are in terms of pixels, so using the initially noted scale factor of 66 pixels : 100 meters, 4356 square pixels : 10000 square meters. This is a factor of 0.4356 to be multiplied to the pixel area measured to get the true value of the area.
Wikipedia lists its field area to beWith the Green's theorem result, the stadium measures 13744.269 square meters. With the summing of the image, the stadium measures 13859.0496 square meters. There is a 0.83% difference in these two measurements. This, I think, is good enough for an approximation.
--
Code for the Green's method:
A=imread('C:\Documents and Settings\2006-54324\Desktop\mosesbw085-3.bmp');
[x,y]=follow(A);
lenx=length(x);
leny=length(y);
x1=zeros(lenx);
xs=lenx-1;
x1(1:xs)=x(2:lenx);
x1(lenx)=x(1);
y1=zeros(leny);
ys=leny-1;
y1(1:ys)=y(2:leny);
y1(lenx)=y(1);
T=0.5.*((x.*y1)-(y.*x1));
TAR=sum(T);
--
Acknowledgements:
Aivin, for the helpful conversations
Che, for sharing the idea that I can sum the image as another way of finding the area :)
--
Technical correctness: 5
Quality of presentation: 5
Initiative:




No comments:
Post a Comment