Bez popisu

check_blobs.R 1.0KB

123456789101112131415161718192021222324252627282930313233
  1. ## Read in csvs and match data from tracked blobs in
  2. ## vehicle detection process
  3. library(dplyr)
  4. library(ggplot2)
  5. setwd("~/Veh Detection/Sample Scripts")
  6. # read in blobs data
  7. blobs <- read.csv("/Users/datascience9/Veh Detection/Sample Scripts/tracked_blobs.csv",
  8. header = T, stringsAsFactors = F)
  9. # read in contours data
  10. contours <- read.csv("/Users/datascience9/Veh Detection/Sample Scripts/tracked_conts.csv",
  11. header = T, stringsAsFactors = F)
  12. blobs$id <- as.character(blobs$id)
  13. # do some plots
  14. cPlot <- ggplot(contours, aes(x = width, y = height)) + geom_point() +
  15. xlim(0,100) + ylim(0,100)
  16. bPlot <- ggplot(blobs, aes(x = vector_y, y = vector_x, color=id)) + geom_point() +
  17. scale_color_discrete() +
  18. ylim(0,mean(blobs$vector_x, na.rm = T)) + xlim(-180,180)
  19. # store plots
  20. # dev.copy(png, "../Outputs/contourPlot.png")
  21. # cPlot
  22. # dev.off()
  23. #
  24. # dev.copy(png, "../Outputs/blobPlot.png")
  25. # bPlot
  26. # dev.off()
  27. ggsave("../Outputs/contourPlot.png",cPlot)
  28. ggsave("../Outputs/blobPlot.png",bPlot)