blob: c37d4880df06a86b4b916345e73ae9a7a2088883 [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",
Henry Speiser1f34eea2022-01-30 14:35:21 -080035 "//aos/events:shm_event_loop",
Jim Ostrowskiff7b3de2022-01-22 22:20:26 -080036 "//aos/network:team_number",
37 "//frc971/vision:v4l2_reader",
38 "//frc971/vision:vision_fbs",
39 "//third_party:opencv",
40 "//y2020/vision/sift:sift_fbs",
41 "//y2020/vision/sift:sift_training_fbs",
42 "//y2020/vision/tools/python_code:sift_training_data",
Jim Ostrowskiff0f5e42022-01-22 01:35:31 -080043 ],
44)
45
46cc_library(
47 name = "blob_detector_lib",
48 srcs = [
49 "blob_detector.cc",
50 ],
51 hdrs = [
52 "blob_detector.h",
53 ],
54 target_compatible_with = ["@platforms//os:linux"],
55 visibility = ["//y2022:__subpackages__"],
56 deps = [
57 "//aos/network:team_number",
58 "//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)