blob: e893e5403105b29c57aaf59f357c37e7af118525 [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",
57 "//third_party:opencv",
58 ],
59)
60
milind-u92195982022-01-22 20:29:31 -080061cc_library(
62 name = "target_estimator_lib",
63 srcs = [
64 "target_estimator.cc",
65 ],
66 hdrs = [
67 "target_estimator.h",
68 ],
69 target_compatible_with = ["@platforms//os:linux"],
70 visibility = ["//y2022:__subpackages__"],
71 deps = [
72 ":target_estimate_fbs",
73 "//third_party:opencv",
74 ],
75)
76
77flatbuffer_cc_library(
78 name = "target_estimate_fbs",
79 srcs = ["target_estimate.fbs"],
80 gen_reflections = 1,
81 target_compatible_with = ["@platforms//os:linux"],
82 visibility = ["//y2022:__subpackages__"],
83)
84
Jim Ostrowskiff0f5e42022-01-22 01:35:31 -080085cc_binary(
86 name = "viewer",
87 srcs = [
88 "viewer.cc",
89 ],
90 data = [
Jim Ostrowski977850f2022-01-22 21:04:22 -080091 "//y2022:config",
Jim Ostrowskiff0f5e42022-01-22 01:35:31 -080092 ],
93 target_compatible_with = ["@platforms//os:linux"],
94 visibility = ["//y2022:__subpackages__"],
95 deps = [
96 ":blob_detector_lib",
milind-u92195982022-01-22 20:29:31 -080097 ":target_estimator_lib",
Jim Ostrowskiff0f5e42022-01-22 01:35:31 -080098 "//aos:init",
99 "//aos/events:shm_event_loop",
Jim Ostrowski977850f2022-01-22 21:04:22 -0800100 "//frc971/vision:vision_fbs",
Jim Ostrowskiff0f5e42022-01-22 01:35:31 -0800101 "//third_party:opencv",
Jim Ostrowskiff0f5e42022-01-22 01:35:31 -0800102 ],
103)