blob: c82df3e2d23449ead923109f2461283ec5230c33 [file] [log] [blame]
milind-u92195982022-01-22 20:29:31 -08001load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
2
Jim Ostrowskiff0f5e42022-01-22 01:35:31 -08003cc_binary(
4 name = "camera_reader",
5 srcs = [
6 "camera_reader_main.cc",
7 ],
8 target_compatible_with = ["@platforms//os:linux"],
9 visibility = ["//y2022:__subpackages__"],
10 deps = [
Jim Ostrowskiff7b3de2022-01-22 22:20:26 -080011 ":camera_reader_lib",
Jim Ostrowskiff0f5e42022-01-22 01:35:31 -080012 "//aos:init",
13 "//aos/events:shm_event_loop",
Jim Ostrowskiff7b3de2022-01-22 22:20:26 -080014 ],
15)
16
17cc_library(
18 name = "camera_reader_lib",
19 srcs = [
20 "camera_reader.cc",
21 ],
22 hdrs = [
23 "camera_reader.h",
24 ],
25 data = [
26 "//y2022:config",
27 ],
28 target_compatible_with = ["@platforms//os:linux"],
29 visibility = ["//y2022:__subpackages__"],
30 deps = [
milind-u92195982022-01-22 20:29:31 -080031 ":blob_detector_lib",
32 ":target_estimator_lib",
Jim Ostrowskiff7b3de2022-01-22 22:20:26 -080033 "//aos:flatbuffer_merge",
34 "//aos/events:event_loop",
35 "//aos/network:team_number",
36 "//frc971/vision:v4l2_reader",
37 "//frc971/vision:vision_fbs",
38 "//third_party:opencv",
39 "//y2020/vision/sift:sift_fbs",
40 "//y2020/vision/sift:sift_training_fbs",
41 "//y2020/vision/tools/python_code:sift_training_data",
Jim Ostrowskiff0f5e42022-01-22 01:35:31 -080042 ],
43)
44
45cc_library(
46 name = "blob_detector_lib",
47 srcs = [
48 "blob_detector.cc",
49 ],
50 hdrs = [
51 "blob_detector.h",
52 ],
53 target_compatible_with = ["@platforms//os:linux"],
54 visibility = ["//y2022:__subpackages__"],
55 deps = [
56 "//aos/network:team_number",
Milind Upadhyaye7aa40c2022-01-29 22:36:21 -080057 "//aos/time",
Jim Ostrowskiff0f5e42022-01-22 01:35:31 -080058 "//third_party:opencv",
59 ],
60)
61
milind-u92195982022-01-22 20:29:31 -080062cc_library(
63 name = "target_estimator_lib",
64 srcs = [
65 "target_estimator.cc",
66 ],
67 hdrs = [
68 "target_estimator.h",
69 ],
70 target_compatible_with = ["@platforms//os:linux"],
71 visibility = ["//y2022:__subpackages__"],
72 deps = [
73 ":target_estimate_fbs",
74 "//third_party:opencv",
75 ],
76)
77
78flatbuffer_cc_library(
79 name = "target_estimate_fbs",
80 srcs = ["target_estimate.fbs"],
81 gen_reflections = 1,
82 target_compatible_with = ["@platforms//os:linux"],
83 visibility = ["//y2022:__subpackages__"],
84)
85
Jim Ostrowskiff0f5e42022-01-22 01:35:31 -080086cc_binary(
87 name = "viewer",
88 srcs = [
89 "viewer.cc",
90 ],
91 data = [
Jim Ostrowski977850f2022-01-22 21:04:22 -080092 "//y2022:config",
Jim Ostrowskiff0f5e42022-01-22 01:35:31 -080093 ],
94 target_compatible_with = ["@platforms//os:linux"],
95 visibility = ["//y2022:__subpackages__"],
96 deps = [
97 ":blob_detector_lib",
milind-u92195982022-01-22 20:29:31 -080098 ":target_estimator_lib",
Jim Ostrowskiff0f5e42022-01-22 01:35:31 -080099 "//aos:init",
100 "//aos/events:shm_event_loop",
Jim Ostrowski977850f2022-01-22 21:04:22 -0800101 "//frc971/vision:vision_fbs",
Jim Ostrowskiff0f5e42022-01-22 01:35:31 -0800102 "//third_party:opencv",
Jim Ostrowskiff0f5e42022-01-22 01:35:31 -0800103 ],
104)