Wednesday, June 26, 2019

Finding animals with Loc8

Rapidly finding animals is useful in many fields but this post will focus on agriculture. Through cooperation with Purdue's Beef Unit myself and two undergraduates were able to acquire data-sets of cattle in a field. In this data-set there were two populations of cattle that I was interested in, brown and black. I began by creating spectral databases following the rules that I described in my last post, large numbers of individual color files instead of color ranges or single files of individual colors. The databases I created can be seen in figure 1.
Figure 1: Color databases
Figure 2 and 3 show examples of the data-set collected.
Figure 2: Cattle data-set sample 1

Figure 3: Cattle data-set sample 2
Looking at figures 2 and 3 it is clear that most of the cattle are black, and that there are two main groupings. The grouping near the giant puddle and the grouping in separate pens. Within these groupings there are separate groups. The puddle group has the cattle in the puddle and those trailing away from the puddle. The pen group has two groups somewhat near each other in the pens. Only one grouping, the puddle grouping, has a brown cow. I performed 3 tests looking for brown cattle in the data-set manipulating the minimum number of pixels allowed for a positive hit. I began by looking with a minimum pixel of 1 then 2 then 4 and determined that using a minimum pixel of 1 was most effective. Figures 4 through 7 show examples of these results.
Figure 4: Brown Cow example 1
Figure 5: Close up of example 1

Figure 6: Brown Cow example 2
Figure 7: Close up of example 2
In both of these examples the desired animal was found. In figure 5 the close up shows that Loc8 found multiple positive hits on the animal while figure 7 only shows one positive hit. While this is fairly interesting there is no real functional difference, and the software was able to provide the location for the animal in both cases. This test shows the capability of Loc8 to find and Geo-locate a specific animal out of a group of animals. This was possible because the animal had different coloration patterns from the group, but this has potential for future investigation.


Locating one unique animal in a group is useful, but will the software be able to find the location of the larger groups? The biggest challenge with finding the black cattle, or any black object, is preventing shadows from being located instead of the desired objects. Figures 8 and 9 show examples of the puddle group of the cattle.
Figure 8: Puddle group example 1

Figure 9: Puddle group example 2
Figure 8 shows that most of the cattle trailing towards the puddle have been located using this method, and that the cattle in the puddle are all encompassed in a single circle. Figure 9 does not alert to any of the cattle leading up to the puddle, but does alert to the puddle cattle separately. This is interesting because sometimes the groups of cattle are located as a group and sometimes they are located as individuals. I am unsure of why this is, but both methods do provide the location of the animal groups. Figure 10 below shows how Loc8 performed in finding the cattle in separate pens.

Figure 10: Cattle in pens
Figure 10 shows most of the cattle being found in five groups, and one false positive of a shadow. As I stated earlier, when looking for black objects shadows often show up as false positives. This data-set showed surprisingly few false positives from shadow, and I believe this is because of the many shades of black used for the search.


Wednesday, June 19, 2019

Reduced False positives

Figure 1: GCP without false positives


My last Loc8 post focused on reducing false positives while searching for GCPs in a field. That post described the methods in which I reduced the number of incorrectly identified images in a data-set. One problem I described at the end of the post was a large amount of false positives in correctly identified images, like the image shown below.
Figure 2: Correct Identification with false positives
One of the circles in figure 2 has correctly circled one of the pink GCPs, the bottom rightmost circle, and because of this I marked it as correctly identifying the target. While this works for assessing images in a "non-time-critical" environment, it would be much less useful when time is of the essence. While doing this processing I inspected every pixel that was identified, it became monotonous quickly and I found that I was looking through the hits far too quickly. This rapid searching often had me going back through the image to take another look at a point, just to be sure I had correctly identified it as a positive or false positive hit. Since I have worked with this data-set extensively I know where the GCPs are in most images, and the searching still greatly increased the time I spent inspecting each image.

After many attempts to eliminate/reduce false positives in the data-set I had a conversation with Loc8 and was given the idea to create multiple discrete colors and search that. In my last post I created a spectral range using multiple individual colors, and that did reduce the false positives. This time I tried using multiple "ranges" of individual colors, and received 0 false positives. Figure 3 below is an example from this run. For this test I only focused on the pink GCPs.


Figure 3: No false positives
Figure 3 is one of the 15 images that Loc8 flagged as containing a GCP, and none of them contained a false positive. While figure 3 does not show a false positive it does have two false negatives, the GCPs at the top and bottom of the image have not been identified. There are also many images containing GCPs that were not identified. Finding a balance between false positives and false negatives is the next hurdle to clear.



Tuesday, June 4, 2019

Assessing storm damage with geospatial data


A storm came through West Lafayette, spawning a tornado and destroyed one of Purdue's Agricultural barns. We were able to take the class out to the debris field and gather data with two different platforms. One of the goals of this flight was to experiment with using Loc8 and geospatial video to determine the location of the debris in the path. Using these software packages to find debris, could assist communities in disaster recovery by decreasing the amount of time required to clean up after a disaster. A student team processed the debris field data in Pix4D to create an orthomosaic, and 3D mesh.
Figure 1: Orthomosaic
This gives us a rough idea of the size of the debris field, and the direction it is going. f we were to use this image to collect the debris we would run into a problem. The debris collectors would lose track of where they were in the field because the environment is very uniform. This might prevent them from collecting all of the debris on their first attempt, and subsequent flights may need to be performed. By using Loc8 this problem can be removed.
Figure 2: Loc8ed debris
Figure 3: Debris location
Figure 2 shows that Loc8 found a ton of false positives during it's search for the debris in this image. While this isn't perfect it isn't bad. The software still found the debris, and provided us with a GPS coordinate for everything in the image. If we were to send out debris collection teams we could provide them with a list of GPS coordinates for them to search, as long as the images were reviewed beforehand and appropriately flagged/archived (as suggested in Loc8's tutorial videos). The downside to this approach is that the GPS coordinate is for the entire image, so searching would still be necessary. This could be easily mitigated by providing the collection teams with the flagged images for referencing in the field.

The third method that I investigated for debris cleanup was using LineVision geospatial video.
Figure 4: Debris pattern in LineVision

Figure 5: Frame with desired debris



Figure 6: Debris coordinates

Using LineVision I found the same debris that can be seen in Figure 2. This software was able to provide the GPS coordinates of the object inside the image, as opposed to the GPS coordinates where the image was taken. This coordinate was provided after I identified the debris and manually marked it. In disaster cleanup this software could be used to provide cleanup teams with checklists for debris removal.

Each software package used for debris analysis is very capable, but for tracking debris it would seem that LineVision is the best. The capability to remove any sort of guessing from debris removal is very appealing, and could reduce cleanup times. Loc8 provided similar capabilities, but was not able to be as exact as LineVision in this situation. Where Loc8 shines is in situations where manual tagging is impossible or infeasible, and in this situation the debris was very easy to manually tag. Pix4D was not a good choice for locating the debris. While the orthomosaic does include the debris it does not provide much in the way of location information for removal. Where Pix4D was useful was in assessing the damage done to the barn that created the debris, figure 7.

Figure 7: Barn
The condition of the damaged barn surprised all of us. We collected data two days after the storm, and the barn had been completely torn down by then. Had the barn still been standing we would have been able to use Pix4D to assess the damage of the building, but instead we were able to assess the cleanup efforts.







Improving Crew Resource Management

 Improving CRM in UAS operations Crew Resource Management (CRM) is a method in aviation that increases the situational awareness and flexi...