Compute the image undistort map only once
Reusing the map is almost 10 times faster than recomputing it each
iteration.
Also cleaned up some reused code between camera reader and viewer.
Signed-off-by: Milind Upadhyay <milind.upadhyay@gmail.com>
Change-Id: I2c1e6b6b5533054e356eca077778f01f9e8456a1
diff --git a/y2022/vision/BUILD b/y2022/vision/BUILD
index a26c507..30ab84a 100644
--- a/y2022/vision/BUILD
+++ b/y2022/vision/BUILD
@@ -250,6 +250,7 @@
deps = [
":blob_detector_lib",
":calibration_data",
+ ":camera_reader_lib",
":target_estimator_lib",
"//aos:init",
"//aos/events:shm_event_loop",