Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 1 | load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library") |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 2 | load("//tools/build_rules:gtk_dependent.bzl", "gtk_dependent_cc_binary", "gtk_dependent_cc_library") |
| 3 | load("@com_google_protobuf//:protobuf.bzl", "cc_proto_library") |
Parker Schuh | 4d2978f | 2017-02-25 11:13:06 -0800 | [diff] [blame] | 4 | |
| 5 | package(default_visibility = ["//visibility:public"]) |
| 6 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 7 | flatbuffer_cc_library( |
| 8 | name = "vision_fbs", |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 9 | srcs = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 10 | "vision.fbs", |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 11 | ], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 12 | gen_reflections = 1, |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 13 | visibility = ["//visibility:public"], |
Parker Schuh | 4d2978f | 2017-02-25 11:13:06 -0800 | [diff] [blame] | 14 | ) |
| 15 | |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 16 | cc_proto_library( |
| 17 | name = "vision_result", |
| 18 | srcs = ["vision_result.proto"], |
Parker Schuh | d497ed6 | 2017-03-04 20:11:58 -0800 | [diff] [blame] | 19 | ) |
| 20 | |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 21 | cc_proto_library( |
| 22 | name = "vision_config", |
| 23 | srcs = ["vision_config.proto"], |
| 24 | deps = [ |
| 25 | "//aos/vision/image:camera_params", |
| 26 | ], |
Parker Schuh | d497ed6 | 2017-03-04 20:11:58 -0800 | [diff] [blame] | 27 | ) |
| 28 | |
| 29 | cc_binary( |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 30 | name = "target_sender", |
| 31 | srcs = [ |
| 32 | "target_sender.cc", |
| 33 | ], |
| 34 | deps = [ |
| 35 | ":target_finder", |
| 36 | ":vision_config", |
| 37 | ":vision_result", |
| 38 | "//aos/logging", |
| 39 | "//aos/logging:implementations", |
| 40 | "//aos/time", |
| 41 | "//aos/vision/blob:codec", |
| 42 | "//aos/vision/blob:find_blob", |
| 43 | "//aos/vision/blob:range_image", |
| 44 | "//aos/vision/blob:threshold", |
| 45 | "//aos/vision/events:epoll_events", |
| 46 | "//aos/vision/events:socket_types", |
| 47 | "//aos/vision/events:udp", |
| 48 | "//aos/vision/image:image_stream", |
| 49 | "//aos/vision/image:jpeg_routines", |
| 50 | "//aos/vision/image:reader", |
| 51 | ], |
Parker Schuh | 4d2978f | 2017-02-25 11:13:06 -0800 | [diff] [blame] | 52 | ) |
| 53 | |
| 54 | cc_binary( |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 55 | name = "target_receiver", |
| 56 | srcs = [ |
| 57 | "target_receiver.cc", |
| 58 | ], |
| 59 | visibility = ["//visibility:public"], |
| 60 | deps = [ |
| 61 | ":target_finder", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 62 | ":vision_fbs", |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 63 | ":vision_result", |
| 64 | "//aos:init", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 65 | "//aos/events:shm_event_loop", |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 66 | "//aos/logging", |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 67 | "//aos/mutex", |
| 68 | "//aos/time", |
| 69 | "//aos/vision/events:udp", |
| 70 | ], |
Parker Schuh | 4d2978f | 2017-02-25 11:13:06 -0800 | [diff] [blame] | 71 | ) |
Parker Schuh | f7481be | 2017-03-04 18:24:33 -0800 | [diff] [blame] | 72 | |
| 73 | cc_library( |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 74 | name = "target_finder", |
| 75 | srcs = ["target_finder.cc"], |
| 76 | hdrs = ["target_finder.h"], |
| 77 | deps = [ |
| 78 | "//aos/vision/blob:threshold", |
| 79 | "//aos/vision/blob:transpose", |
| 80 | "//aos/vision/debug:overlay", |
| 81 | "//aos/vision/math:vector", |
| 82 | ], |
Parker Schuh | f7481be | 2017-03-04 18:24:33 -0800 | [diff] [blame] | 83 | ) |
Parker Schuh | 9ef6613 | 2017-03-05 16:18:36 -0800 | [diff] [blame] | 84 | |
| 85 | gtk_dependent_cc_binary( |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 86 | name = "debug_viewer", |
| 87 | srcs = ["debug_viewer.cc"], |
| 88 | deps = [ |
| 89 | ":target_finder", |
| 90 | "//aos/vision/blob:move_scale", |
| 91 | "//aos/vision/blob:threshold", |
| 92 | "//aos/vision/blob:transpose", |
| 93 | "//aos/vision/debug:debug_framework", |
| 94 | "//aos/vision/math:vector", |
| 95 | ], |
Parker Schuh | 9ef6613 | 2017-03-05 16:18:36 -0800 | [diff] [blame] | 96 | ) |