switch image_writer to glog

Change-Id: I286751f0f5090d2b7361eb833ea62f25b510d542
diff --git a/y2019/vision/BUILD b/y2019/vision/BUILD
index b87e2ce..c7f0009 100644
--- a/y2019/vision/BUILD
+++ b/y2019/vision/BUILD
@@ -39,8 +39,8 @@
     srcs = ["image_writer.cc"],
     hdrs = ["image_writer.h"],
     deps = [
-        "//aos/logging",
         "//aos/vision/image:image_types",
+        "@com_github_google_glog//:glog",
     ],
 )
 
diff --git a/y2019/vision/image_writer.cc b/y2019/vision/image_writer.cc
index ac35114..51e2c60 100644
--- a/y2019/vision/image_writer.cc
+++ b/y2019/vision/image_writer.cc
@@ -1,19 +1,19 @@
 #include <fstream>
 #include <sys/stat.h>
 
-#include "aos/logging/logging.h"
+#include "glog/logging.h"
 #include "y2019/vision/image_writer.h"
 
 namespace y2019 {
 namespace vision {
 
 ImageWriter::ImageWriter() {
-  LOG(INFO, "Initializing image writer\n");
+  LOG(INFO) <<  "Initializing image writer";
   SetDirPath();
 }
 
 void ImageWriter::WriteImage(::aos::vision::DataRef data) {
-  LOG(INFO, "Writing image %d", image_count_);
+  LOG(INFO) << "Writing image " << image_count_;
   std::ofstream ofs(
       dir_path_ + file_prefix_ + std::to_string(image_count_) + ".yuyv",
       std::ofstream::out);
@@ -29,7 +29,7 @@
     std::string option = base_path + std::to_string(i);
     if (stat(option.c_str(), &st) != 0) {
       file_prefix_ = option + "/";
-      LOG(INFO, "Writing to %s\n", file_prefix_.c_str());
+      LOG(INFO) << "Writing to " << file_prefix_.c_str();
       mkdir(file_prefix_.c_str(), 0777);
       break;
     }
diff --git a/y2019/vision/target_geometry.cc b/y2019/vision/target_geometry.cc
index efa2def..de76acb 100644
--- a/y2019/vision/target_geometry.cc
+++ b/y2019/vision/target_geometry.cc
@@ -84,7 +84,7 @@
     ::Eigen::Matrix<T, 2, 1> pt =
         Project<T>(ToEigenMatrix<T>(template_pt), intrinsics, extrinsics);
     residual[0] = result.x() - pt(0, 0);
-    residual[1] = result.y() - pt(0, 1);
+    residual[1] = result.y() - pt(1, 0);
     return true;
   }