forked from argoverse/argoverse-api
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathargoverse.utils.html
2942 lines (2711 loc) · 279 KB
/
argoverse.utils.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>argoverse.utils package — argoverse documentation</title>
<script type="text/javascript" src="_static/js/modernizr.min.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/graphviz.css" type="text/css" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> argoverse
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<!-- Local TOC -->
<div class="local-toc"><ul>
<li><a class="reference internal" href="#">argoverse.utils package</a><ul>
<li><a class="reference internal" href="#submodules">Submodules</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.bfs">argoverse.utils.bfs module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.calibration">argoverse.utils.calibration module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.camera_stats">argoverse.utils.camera_stats module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.centerline_utils">argoverse.utils.centerline_utils module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.city_visibility_utils">argoverse.utils.city_visibility_utils module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.cuboid_interior">argoverse.utils.cuboid_interior module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.cv2_plotting_utils">argoverse.utils.cv2_plotting_utils module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.datetime_utils">argoverse.utils.datetime_utils module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.dilation_utils">argoverse.utils.dilation_utils module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.ffmpeg_utils">argoverse.utils.ffmpeg_utils module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.forecasting_evaluation">argoverse.utils.forecasting_evaluation module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.frustum_clipping">argoverse.utils.frustum_clipping module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.geometry">argoverse.utils.geometry module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.grid_interpolation">argoverse.utils.grid_interpolation module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.helpers">argoverse.utils.helpers module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.heuristic_ground_removal">argoverse.utils.heuristic_ground_removal module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.interpolate">argoverse.utils.interpolate module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.json_utils">argoverse.utils.json_utils module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.line_projection">argoverse.utils.line_projection module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.manhattan_search">argoverse.utils.manhattan_search module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.mayavi_wrapper">argoverse.utils.mayavi_wrapper module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.mesh_grid">argoverse.utils.mesh_grid module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.mpl_plotting_utils">argoverse.utils.mpl_plotting_utils module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.pkl_utils">argoverse.utils.pkl_utils module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.plane_visualization_utils">argoverse.utils.plane_visualization_utils module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.ply_loader">argoverse.utils.ply_loader module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.polyline_density">argoverse.utils.polyline_density module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.se2">argoverse.utils.se2 module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.se3">argoverse.utils.se3 module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.subprocess_utils">argoverse.utils.subprocess_utils module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils.transform">argoverse.utils.transform module</a></li>
<li><a class="reference internal" href="#module-argoverse.utils">Module contents</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">argoverse</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> »</li>
<li>argoverse.utils package</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/argoverse.utils.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="argoverse-utils-package">
<h1>argoverse.utils package<a class="headerlink" href="#argoverse-utils-package" title="Permalink to this headline">¶</a></h1>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h2>
</div>
<div class="section" id="module-argoverse.utils.bfs">
<span id="argoverse-utils-bfs-module"></span><h2>argoverse.utils.bfs module<a class="headerlink" href="#module-argoverse.utils.bfs" title="Permalink to this headline">¶</a></h2>
<p>Breadth-First-Search of Graphs.</p>
<dl class="function">
<dt id="argoverse.utils.bfs.bfs_enumerate_paths">
<code class="sig-prename descclassname">argoverse.utils.bfs.</code><code class="sig-name descname">bfs_enumerate_paths</code><span class="sig-paren">(</span><em class="sig-param">graph</em>, <em class="sig-param">start</em>, <em class="sig-param">max_depth=4</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/bfs.html#bfs_enumerate_paths"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.bfs.bfs_enumerate_paths" title="Permalink to this definition">¶</a></dt>
<dd><p>Run Breadth-First-Search. Cycles are allowed and are accounted for.</p>
<p>Find (u,v) edges in E of graph (V,E)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>graph</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Mapping" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Mapping</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>, <a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Sequence" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Sequence</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>]]) – Python dictionary representing an adjacency list</p></li>
<li><p><strong>start</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>) – key representing hash of start/source node in the graph search</p></li>
<li><p><strong>max_depth</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – maximum depth to traverse in graph from start node</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>list of graph paths</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>all_paths</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="argoverse.utils.bfs.remove_duplicate_paths">
<code class="sig-prename descclassname">argoverse.utils.bfs.</code><code class="sig-name descname">remove_duplicate_paths</code><span class="sig-paren">(</span><em class="sig-param">paths</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/bfs.html#remove_duplicate_paths"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.bfs.remove_duplicate_paths" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove duplicate subpaths from a set of paths.</p>
<p>For example, if <code class="docutils literal notranslate"><span class="pre">['1',</span> <span class="pre">'2',</span> <span class="pre">'6']</span></code> and <code class="docutils literal notranslate"><span class="pre">['1',</span> <span class="pre">'2']</span></code> are
included, remove the latter.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>paths</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Sequence" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Sequence</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Sequence" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Sequence</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.7)"><code class="xref py py-data docutils literal notranslate"><span class="pre">Any</span></code></a>]]) – Python list of lists, each element is a node key.</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Sequence" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Sequence</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Sequence" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Sequence</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>]]</p>
</dd>
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>Python list of lists, each element is a node key</p>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-argoverse.utils.calibration">
<span id="argoverse-utils-calibration-module"></span><h2>argoverse.utils.calibration module<a class="headerlink" href="#module-argoverse.utils.calibration" title="Permalink to this headline">¶</a></h2>
<p>make util to project RGB values onto the point cloud</p>
<dl class="class">
<dt id="argoverse.utils.calibration.Calibration">
<em class="property">class </em><code class="sig-prename descclassname">argoverse.utils.calibration.</code><code class="sig-name descname">Calibration</code><span class="sig-paren">(</span><em class="sig-param">camera_config</em>, <em class="sig-param">calib</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/calibration.html#Calibration"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.calibration.Calibration" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Calibration matrices and utils.</p>
<p>3d XYZ are in 3D egovehicle coord.
2d box xy are in image coord, normalized by width and height
Point cloud are in egovehicle coord</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">xy_image</span> <span class="o">=</span> <span class="n">K</span> <span class="o">*</span> <span class="p">[</span><span class="n">R</span><span class="o">|</span><span class="n">T</span><span class="p">]</span> <span class="o">*</span> <span class="n">xyz_ego</span>
<span class="n">xyz_image</span> <span class="o">=</span> <span class="p">[</span><span class="n">R</span><span class="o">|</span><span class="n">T</span><span class="p">]</span> <span class="o">*</span> <span class="n">xyz_ego</span>
<span class="n">image</span> <span class="n">coord</span><span class="p">:</span>
<span class="o">----></span> <span class="n">x</span><span class="o">-</span><span class="n">axis</span> <span class="p">(</span><span class="n">u</span><span class="p">)</span>
<span class="o">|</span>
<span class="o">|</span>
<span class="n">v</span> <span class="n">y</span><span class="o">-</span><span class="n">axis</span> <span class="p">(</span><span class="n">v</span><span class="p">)</span>
</pre></div>
</div>
<p>egovehicle coord:
front x, left y, up z</p>
<dl class="method">
<dt id="argoverse.utils.calibration.Calibration.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">camera_config</em>, <em class="sig-param">calib</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/calibration.html#Calibration.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.calibration.Calibration.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a Calibration instance.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>camera_config</strong> (<a class="reference internal" href="#argoverse.utils.calibration.CameraConfig" title="argoverse.utils.calibration.CameraConfig"><code class="xref py py-class docutils literal notranslate"><span class="pre">CameraConfig</span></code></a>) – A camera config</p></li>
<li><p><strong>calib</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Dict" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Dict</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>, <a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.7)"><code class="xref py py-data docutils literal notranslate"><span class="pre">Any</span></code></a>]) – Calibration data</p></li>
</ul>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">None</span></code></p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="argoverse.utils.calibration.Calibration.cart2hom">
<code class="sig-name descname">cart2hom</code><span class="sig-paren">(</span><em class="sig-param">pts_3d</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/calibration.html#Calibration.cart2hom"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.calibration.Calibration.cart2hom" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert Cartesian coordinates to Homogeneous.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>pts_3d</strong> (<em><built-in function array></em>) – nx3 points in Cartesian</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a></p>
</dd>
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>nx4 points in Homogeneous by appending 1</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="argoverse.utils.calibration.Calibration.project_cam_to_ego">
<code class="sig-name descname">project_cam_to_ego</code><span class="sig-paren">(</span><em class="sig-param">pts_3d_rect</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/calibration.html#Calibration.project_cam_to_ego"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.calibration.Calibration.project_cam_to_ego" title="Permalink to this definition">¶</a></dt>
<dd><p>Project point in camera frame to egovehicle frame.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>pts_3d_rect</strong> (<em>np.array</em>) – nx3 points in cam coord.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>nx3 points in ego coord.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>np.array</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="argoverse.utils.calibration.Calibration.project_ego_to_cam">
<code class="sig-name descname">project_ego_to_cam</code><span class="sig-paren">(</span><em class="sig-param">pts_3d_ego</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/calibration.html#Calibration.project_ego_to_cam"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.calibration.Calibration.project_ego_to_cam" title="Permalink to this definition">¶</a></dt>
<dd><p>Project egovehicle point onto camera frame.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>pts_3d_ego</strong> (<em><built-in function array></em>) – nx3 points in egovehicle coord.</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a></p>
</dd>
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>nx3 points in camera coord.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="argoverse.utils.calibration.Calibration.project_ego_to_image">
<code class="sig-name descname">project_ego_to_image</code><span class="sig-paren">(</span><em class="sig-param">pts_3d_ego</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/calibration.html#Calibration.project_ego_to_image"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.calibration.Calibration.project_ego_to_image" title="Permalink to this definition">¶</a></dt>
<dd><p>Project egovehicle coordinate to image.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>pts_3d_ego</strong> (<em><built-in function array></em>) – nx3 points in egovehicle coord</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a></p>
</dd>
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>nx2 points in image coord</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="argoverse.utils.calibration.Calibration.project_image_to_cam">
<code class="sig-name descname">project_image_to_cam</code><span class="sig-paren">(</span><em class="sig-param">uv_depth</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/calibration.html#Calibration.project_image_to_cam"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.calibration.Calibration.project_image_to_cam" title="Permalink to this definition">¶</a></dt>
<dd><p>Project 2D image with depth to camera coordinate.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>uv_depth</strong> (<em><built-in function array></em>) – nx3 first two channels are uv, 3rd channel
is depth in camera coord.</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a></p>
</dd>
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>nx3 points in camera coord.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="argoverse.utils.calibration.Calibration.project_image_to_ego">
<code class="sig-name descname">project_image_to_ego</code><span class="sig-paren">(</span><em class="sig-param">uv_depth</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/calibration.html#Calibration.project_image_to_ego"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.calibration.Calibration.project_image_to_ego" title="Permalink to this definition">¶</a></dt>
<dd><p>Project 2D image with depth to egovehicle coordinate.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>uv_depth</strong> (<em><built-in function array></em>) – nx3 first two channels are uv, 3rd channel
is depth in camera coord. So basically in image coordinate.</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a></p>
</dd>
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>nx3 points in ego coord.</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="argoverse.utils.calibration.CameraConfig">
<em class="property">class </em><code class="sig-prename descclassname">argoverse.utils.calibration.</code><code class="sig-name descname">CameraConfig</code><span class="sig-paren">(</span><em class="sig-param">extrinsic</em>, <em class="sig-param">intrinsic</em>, <em class="sig-param">img_width</em>, <em class="sig-param">img_height</em>, <em class="sig-param">distortion_coeffs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/calibration.html#CameraConfig"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.calibration.CameraConfig" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Camera config for extrinsic matrix, intrinsic matrix, image width/height.</p>
<dl class="method">
<dt id="argoverse.utils.calibration.CameraConfig.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">extrinsic</em>, <em class="sig-param">intrinsic</em>, <em class="sig-param">img_width</em>, <em class="sig-param">img_height</em>, <em class="sig-param">distortion_coeffs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/calibration.html#CameraConfig.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.calibration.CameraConfig.__init__" title="Permalink to this definition">¶</a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>extrinsic</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>) – extrinsic matrix</p></li>
<li><p><strong>intrinsic</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>) – intrinsic matrix</p></li>
<li><p><strong>img_width</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – image width</p></li>
<li><p><strong>img_height</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – image height</p></li>
</ul>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="function">
<dt id="argoverse.utils.calibration.determine_valid_cam_coords">
<code class="sig-prename descclassname">argoverse.utils.calibration.</code><code class="sig-name descname">determine_valid_cam_coords</code><span class="sig-paren">(</span><em class="sig-param">uv</em>, <em class="sig-param">uv_cam</em>, <em class="sig-param">camera_config</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/calibration.html#determine_valid_cam_coords"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.calibration.determine_valid_cam_coords" title="Permalink to this definition">¶</a></dt>
<dd><p>Given a set of coordinates in the image plane and corresponding points
in the camera coordinate reference frame, determine those points
that have a valid projection into the image. 3d points with valid
projections have x coordinates in the range [0,img_width-1], y-coordinates
in the range [0,img_height-1], and a positive z-coordinate (lying in
front of the camera frustum).</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>uv</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>) – Numpy array of shape (N,2)</p></li>
<li><p><strong>uv_cam</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>) – Numpy array of shape (N,3)</p></li>
<li><p><strong>camera_config</strong> (<a class="reference internal" href="#argoverse.utils.calibration.CameraConfig" title="argoverse.utils.calibration.CameraConfig"><code class="xref py py-class docutils literal notranslate"><span class="pre">CameraConfig</span></code></a>) – A camera configuration</p></li>
</ul>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a></p>
</dd>
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>Numpy array of shape (N,) with dtype bool</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="argoverse.utils.calibration.distort_single">
<code class="sig-prename descclassname">argoverse.utils.calibration.</code><code class="sig-name descname">distort_single</code><span class="sig-paren">(</span><em class="sig-param">radius_undist</em>, <em class="sig-param">distort_coeffs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/calibration.html#distort_single"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.calibration.distort_single" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculate distortion for a single undistorted radius.
Note that we have 3 distortion parameters.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>radius_undist</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code></a>) – undistorted radius</p></li>
<li><p><strong>distort_coeffs</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.List" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code></a>]) – list of distortion coefficients</p></li>
</ul>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code></a></p>
</dd>
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>distortion radius</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="argoverse.utils.calibration.get_calibration_config">
<code class="sig-prename descclassname">argoverse.utils.calibration.</code><code class="sig-name descname">get_calibration_config</code><span class="sig-paren">(</span><em class="sig-param">calibration</em>, <em class="sig-param">camera_name</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/calibration.html#get_calibration_config"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.calibration.get_calibration_config" title="Permalink to this definition">¶</a></dt>
<dd><p>Get calibration config dumped with log.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>calibration</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Dict" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Dict</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>, <a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.7)"><code class="xref py py-data docutils literal notranslate"><span class="pre">Any</span></code></a>]) – </p></li>
<li><p><strong>camera_name</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>) – name of the camera.</p></li>
</ul>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference internal" href="#argoverse.utils.calibration.CameraConfig" title="argoverse.utils.calibration.CameraConfig"><code class="xref py py-class docutils literal notranslate"><span class="pre">CameraConfig</span></code></a></p>
</dd>
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>instance of CameraConfig class</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="argoverse.utils.calibration.get_camera_extrinsic_matrix">
<code class="sig-prename descclassname">argoverse.utils.calibration.</code><code class="sig-name descname">get_camera_extrinsic_matrix</code><span class="sig-paren">(</span><em class="sig-param">config</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/calibration.html#get_camera_extrinsic_matrix"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.calibration.get_camera_extrinsic_matrix" title="Permalink to this definition">¶</a></dt>
<dd><p>Load camera calibration rotation and translation.</p>
<dl class="simple">
<dt>Note that the camera calibration file contains the SE3 for sensor frame to the vehicle frame, i.e.</dt><dd><p>pt_egovehicle = egovehicle_SE3_sensor * pt_sensor</p>
</dd>
</dl>
<p>Then build extrinsic matrix from rotation matrix and translation, a member
of SE3. Then we return the inverse of the SE3 transformation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>config</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Dict" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Dict</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>, <a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.7)"><code class="xref py py-data docutils literal notranslate"><span class="pre">Any</span></code></a>]) – Calibration config in json, or calibration file path.</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a></p>
</dd>
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>Camera rotation and translation matrix.</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="argoverse.utils.calibration.get_camera_intrinsic_matrix">
<code class="sig-prename descclassname">argoverse.utils.calibration.</code><code class="sig-name descname">get_camera_intrinsic_matrix</code><span class="sig-paren">(</span><em class="sig-param">camera_config</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/calibration.html#get_camera_intrinsic_matrix"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.calibration.get_camera_intrinsic_matrix" title="Permalink to this definition">¶</a></dt>
<dd><p>Load camera calibration data and constructs intrinsic matrix.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>camera_config</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Dict" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Dict</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>, <a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.7)"><code class="xref py py-data docutils literal notranslate"><span class="pre">Any</span></code></a>]) – Calibration config in json</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a></p>
</dd>
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>Camera intrinsic matrix.</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="argoverse.utils.calibration.load_calib">
<code class="sig-prename descclassname">argoverse.utils.calibration.</code><code class="sig-name descname">load_calib</code><span class="sig-paren">(</span><em class="sig-param">calib_filepath</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/calibration.html#load_calib"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.calibration.load_calib" title="Permalink to this definition">¶</a></dt>
<dd><p>Load Calibration object for all camera from calibration filepath</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>calib_filepath</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – path to the calibration file</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Dict" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Dict</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.7)"><code class="xref py py-data docutils literal notranslate"><span class="pre">Any</span></code></a>, <a class="reference internal" href="#argoverse.utils.calibration.Calibration" title="argoverse.utils.calibration.Calibration"><code class="xref py py-class docutils literal notranslate"><span class="pre">Calibration</span></code></a>]</p>
</dd>
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>list of Calibration object for all cameras</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="argoverse.utils.calibration.load_image">
<code class="sig-prename descclassname">argoverse.utils.calibration.</code><code class="sig-name descname">load_image</code><span class="sig-paren">(</span><em class="sig-param">img_filename</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/calibration.html#load_image"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.calibration.load_image" title="Permalink to this definition">¶</a></dt>
<dd><p>Load image.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>img_filename</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – Image file name</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a></p>
</dd>
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>Image data</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="argoverse.utils.calibration.point_cloud_to_homogeneous">
<code class="sig-prename descclassname">argoverse.utils.calibration.</code><code class="sig-name descname">point_cloud_to_homogeneous</code><span class="sig-paren">(</span><em class="sig-param">points</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/calibration.html#point_cloud_to_homogeneous"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.calibration.point_cloud_to_homogeneous" title="Permalink to this definition">¶</a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>points</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>) – Numpy array of shape (N,3)</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a></p>
</dd>
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>Numpy array of shape (N,4)</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="argoverse.utils.calibration.proj_cam_to_uv">
<code class="sig-prename descclassname">argoverse.utils.calibration.</code><code class="sig-name descname">proj_cam_to_uv</code><span class="sig-paren">(</span><em class="sig-param">uv_cam</em>, <em class="sig-param">camera_config</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/calibration.html#proj_cam_to_uv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.calibration.proj_cam_to_uv" title="Permalink to this definition">¶</a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">Tuple</span></code>[<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>, <a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>, <a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>, <a class="reference internal" href="#argoverse.utils.calibration.CameraConfig" title="argoverse.utils.calibration.CameraConfig"><code class="xref py py-class docutils literal notranslate"><span class="pre">CameraConfig</span></code></a>]</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="argoverse.utils.calibration.project_lidar_to_img">
<code class="sig-prename descclassname">argoverse.utils.calibration.</code><code class="sig-name descname">project_lidar_to_img</code><span class="sig-paren">(</span><em class="sig-param">lidar_points_h</em>, <em class="sig-param">calib_data</em>, <em class="sig-param">camera_name</em>, <em class="sig-param">return_camera_config=False</em>, <em class="sig-param">remove_nan=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/calibration.html#project_lidar_to_img"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.calibration.project_lidar_to_img" title="Permalink to this definition">¶</a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>lidar_points_h</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>) – Numpy array of shape (4,N)</p></li>
<li><p><strong>calib_data</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Dict" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Dict</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>, <a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.7)"><code class="xref py py-data docutils literal notranslate"><span class="pre">Any</span></code></a>]) – calibration data</p></li>
<li><p><strong>camera_name</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>) – representing name of this camera sensor</p></li>
<li><p><strong>return_camera_config</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>) – adds camera config to the return tuple</p></li>
<li><p><strong>remove_nan</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>) – filter out nan values from uv and uv_cam</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Numpy array of shape (N,2) with dtype np.float32
uv_cam: Numpy array of shape (3,N) with dtype np.float32
valid_pts_bool: Numpy array of shape (N,) with dtype bool</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>uv</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="argoverse.utils.calibration.project_lidar_to_img_motion_compensated">
<code class="sig-prename descclassname">argoverse.utils.calibration.</code><code class="sig-name descname">project_lidar_to_img_motion_compensated</code><span class="sig-paren">(</span><em class="sig-param">pts_h_lidar_time</em>, <em class="sig-param">calib_data</em>, <em class="sig-param">camera_name</em>, <em class="sig-param">cam_timestamp</em>, <em class="sig-param">lidar_timestamp</em>, <em class="sig-param">dataset_dir</em>, <em class="sig-param">log_id</em>, <em class="sig-param">return_K=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/calibration.html#project_lidar_to_img_motion_compensated"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.calibration.project_lidar_to_img_motion_compensated" title="Permalink to this definition">¶</a></dt>
<dd><p>Because of the high frame rate, motion compensation’s role between the
sensors is not very significant, moving points only by millimeters
to centimeters. If the vehicle is moving at 25 miles per hour, equivalent
to 11 meters/sec, then in 17 milliseconds (the max time between a lidar sweep
and camera image capture) we should be able to move up to 187 millimeters.</p>
<dl class="simple">
<dt>This can be verified in practice as the mean_change:</dt><dd><p>mean_change = np.amax(pts_h_cam_time.T[:,:3] - pts_h_lidar_time ,axis=0)</p>
</dd>
</dl>
<p>Adjust LiDAR points for ego-vehicle motion. This function accepts the
egovehicle’s pose in the city map both at camera time and also at
the LiDAR time.</p>
<p>We perform the following transformation, where “ego” stands for
egovehicle reference frame</p>
<blockquote>
<div><p>pt_ego_cam_t = ego_cam_t_SE3_map * map_SE3_ego_lidar_t * pt_ego_lidar_t</p>
</div></blockquote>
<p>Note that both “cam_time_pts_h” and “lidar_time_pts_h” are 3D points in the
vehicle coordinate frame, but captured at different times. These LiDAR points
always live in the vehicle frame, but just in different timestamps. If we take
a lidar point in the egovehicle frame, captured at lidar time, and bring it into
the map at this lidar timestamp, then we know the transformation from map to
egovehicle reference frame at the time when the camera image was captured.</p>
<p>Thus, we move from egovehicle @ lidar time, to the map (which is time agnostic),
then we move from map to egovehicle @camera time. Now we suddenly have lidar points
living in the egovehicle frame @ camera time.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>pts_h_lidar_time</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>) – Numpy array of shape (4,N)</p></li>
<li><p><strong>calib_data</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Dict" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Dict</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>, <a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.7)"><code class="xref py py-data docutils literal notranslate"><span class="pre">Any</span></code></a>]) – Python dictionary</p></li>
<li><p><strong>camera_name</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>) – string, representing name of camera</p></li>
<li><p><strong>cam_timestamp</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – integer, representing time in nanoseconds when
camera image was recorded</p></li>
<li><p><strong>lidar_timestamp</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – integer, representing time in nanoseconds when
LiDAR sweep was recorded</p></li>
<li><p><strong>dataset_dir</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>) – string, representing path to where dataset is stored</p></li>
<li><p><strong>log_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>) – string, representing unique ID of vehicle log</p></li>
<li><p><strong>return_K</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>) – return a copy of the</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Numpy array of shape (N,2) with dtype np.float32
uv_cam: Numpy array of shape (N,3) with dtype np.float32
valid_pts_bool: Numpy array of shape (N,) with dtype bool</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>uv</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="argoverse.utils.calibration.project_lidar_to_undistorted_img">
<code class="sig-prename descclassname">argoverse.utils.calibration.</code><code class="sig-name descname">project_lidar_to_undistorted_img</code><span class="sig-paren">(</span><em class="sig-param">lidar_points_h</em>, <em class="sig-param">calib_data</em>, <em class="sig-param">camera_name</em>, <em class="sig-param">remove_nan=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/calibration.html#project_lidar_to_undistorted_img"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.calibration.project_lidar_to_undistorted_img" title="Permalink to this definition">¶</a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">Tuple</span></code>[<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>, <a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>, <a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>, <a class="reference internal" href="#argoverse.utils.calibration.CameraConfig" title="argoverse.utils.calibration.CameraConfig"><code class="xref py py-class docutils literal notranslate"><span class="pre">CameraConfig</span></code></a>]</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="argoverse.utils.calibration.remove_nan_values">
<code class="sig-prename descclassname">argoverse.utils.calibration.</code><code class="sig-name descname">remove_nan_values</code><span class="sig-paren">(</span><em class="sig-param">uv</em>, <em class="sig-param">uv_cam</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/calibration.html#remove_nan_values"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.calibration.remove_nan_values" title="Permalink to this definition">¶</a></dt>
<dd><p>Accept corrupt array</p>
<dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">Tuple</span></code>[<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>, <a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>]</p>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-argoverse.utils.camera_stats">
<span id="argoverse-utils-camera-stats-module"></span><h2>argoverse.utils.camera_stats module<a class="headerlink" href="#module-argoverse.utils.camera_stats" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="argoverse.utils.camera_stats.get_image_dims_for_camera">
<code class="sig-prename descclassname">argoverse.utils.camera_stats.</code><code class="sig-name descname">get_image_dims_for_camera</code><span class="sig-paren">(</span><em class="sig-param">camera_name</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/camera_stats.html#get_image_dims_for_camera"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.camera_stats.get_image_dims_for_camera" title="Permalink to this definition">¶</a></dt>
<dd><p>Get image dimensions for camera.
:type camera_name: <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>
:param camera_name: Camera name.</p>
<dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">Tuple</span></code>[<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Optional" title="(in Python v3.7)"><code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>], <a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Optional" title="(in Python v3.7)"><code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>]]</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Tuple of [img_width, image_height] in pixels</p>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-argoverse.utils.centerline_utils">
<span id="argoverse-utils-centerline-utils-module"></span><h2>argoverse.utils.centerline_utils module<a class="headerlink" href="#module-argoverse.utils.centerline_utils" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="argoverse.utils.centerline_utils.centerline_to_polygon">
<code class="sig-prename descclassname">argoverse.utils.centerline_utils.</code><code class="sig-name descname">centerline_to_polygon</code><span class="sig-paren">(</span><em class="sig-param">centerline</em>, <em class="sig-param">width_scaling_factor=1.0</em>, <em class="sig-param">visualize=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/centerline_utils.html#centerline_to_polygon"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.centerline_utils.centerline_to_polygon" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert a lane centerline polyline into a rough polygon of the lane’s area.</p>
<p>On average, a lane is 3.8 meters in width. Thus, we allow 1.9 m on each side.
We use this as the length of the hypotenuse of a right triangle, and compute the
other two legs to find the scaled x and y displacement.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>centerline</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>) – Numpy array of shape (N,2).</p></li>
<li><p><strong>width_scaling_factor</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code></a>) – Multiplier that scales 3.8 meters to get the lane width.</p></li>
<li><p><strong>visualize</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>) – Save a figure showing the the output polygon.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Numpy array of shape (2N+1,2), with duplicate first and last vertices.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>polygon</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="argoverse.utils.centerline_utils.convert_lane_boundaries_to_polygon">
<code class="sig-prename descclassname">argoverse.utils.centerline_utils.</code><code class="sig-name descname">convert_lane_boundaries_to_polygon</code><span class="sig-paren">(</span><em class="sig-param">right_lane_bounds</em>, <em class="sig-param">left_lane_bounds</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/centerline_utils.html#convert_lane_boundaries_to_polygon"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.centerline_utils.convert_lane_boundaries_to_polygon" title="Permalink to this definition">¶</a></dt>
<dd><p>Take a left and right lane boundary and make a polygon of the lane segment, closing both ends of the segment.</p>
<p>These polygons have the last vertex repeated (that is, first vertex == last vertex).</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>right_lane_bounds</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>) – Right lane boundary points. Shape is (N, 2).</p></li>
<li><p><strong>left_lane_bounds</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>) – Left lane boundary points.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Numpy array of shape (2N+1,2)</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>polygon</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="argoverse.utils.centerline_utils.filter_candidate_centerlines">
<code class="sig-prename descclassname">argoverse.utils.centerline_utils.</code><code class="sig-name descname">filter_candidate_centerlines</code><span class="sig-paren">(</span><em class="sig-param">xy</em>, <em class="sig-param">candidate_cl</em>, <em class="sig-param">stationary_threshold=2.0</em>, <em class="sig-param">max_dist_margin=2.0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/centerline_utils.html#filter_candidate_centerlines"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.centerline_utils.filter_candidate_centerlines" title="Permalink to this definition">¶</a></dt>
<dd><p>Filter candidate centerlines based on the distance travelled along the centerline.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>xy</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>) – Trajectory coordinates.</p></li>
<li><p><strong>candidate_cl</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.List" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code></a>[<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>]) – List of candidate centerlines.</p></li>
<li><p><strong>stationary_threshold</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code></a>) – minimum displacement to be called as non-stationary.</p></li>
<li><p><strong>max_dist_margin</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code></a>) – </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>filtered list of candidate centerlines</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>filtered_candidate_centerlines</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="argoverse.utils.centerline_utils.get_centerlines_most_aligned_with_trajectory">
<code class="sig-prename descclassname">argoverse.utils.centerline_utils.</code><code class="sig-name descname">get_centerlines_most_aligned_with_trajectory</code><span class="sig-paren">(</span><em class="sig-param">xy</em>, <em class="sig-param">candidate_cl</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/centerline_utils.html#get_centerlines_most_aligned_with_trajectory"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.centerline_utils.get_centerlines_most_aligned_with_trajectory" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the centerline from candidate_cl along which the trajectory travelled maximum distance</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>xy</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>) – Trajectory coordinates</p></li>
<li><p><strong>candidate_cl</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.List" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code></a>[<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>]) – List of candidate centerlines</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>centerlines along which distance travelled is maximum</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>candidate_centerlines</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="argoverse.utils.centerline_utils.get_normal_and_tangential_distance_point">
<code class="sig-prename descclassname">argoverse.utils.centerline_utils.</code><code class="sig-name descname">get_normal_and_tangential_distance_point</code><span class="sig-paren">(</span><em class="sig-param">x</em>, <em class="sig-param">y</em>, <em class="sig-param">centerline</em>, <em class="sig-param">delta=0.01</em>, <em class="sig-param">last=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/centerline_utils.html#get_normal_and_tangential_distance_point"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.centerline_utils.get_normal_and_tangential_distance_point" title="Permalink to this definition">¶</a></dt>
<dd><p>Get normal (offset from centerline) and tangential (distance along centerline) for the given point,
along the given centerline</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>x</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code></a>) – x-coordinate in map frame</p></li>
<li><p><strong>y</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code></a>) – y-coordinate in map frame</p></li>
<li><p><strong>centerline</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>) – centerline along which n-t is to be computed</p></li>
<li><p><strong>delta</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code></a>) – Used in computing offset direction</p></li>
<li><p><strong>last</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>) – True if point is the last coordinate of the trajectory</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>tangential and normal distances</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>(tang_dist, norm_dist)</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="argoverse.utils.centerline_utils.get_nt_distance">
<code class="sig-prename descclassname">argoverse.utils.centerline_utils.</code><code class="sig-name descname">get_nt_distance</code><span class="sig-paren">(</span><em class="sig-param">xy</em>, <em class="sig-param">centerline</em>, <em class="sig-param">viz=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/centerline_utils.html#get_nt_distance"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.centerline_utils.get_nt_distance" title="Permalink to this definition">¶</a></dt>
<dd><p>Get normal (offset from centerline) and tangential (distance along centerline) distances for the given xy trajectory,
along the given centerline.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>xy</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>) – Sequence of x,y,z coordinates.</p></li>
<li><p><strong>centerline</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>) – centerline along which n-t is to be computed</p></li>
<li><p><strong>viz</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>) – True if you want to visualize the computed centerlines.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>normal (offset from centerline) and tangential (distance along centerline) distances.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>nt_distance</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="argoverse.utils.centerline_utils.get_oracle_from_candidate_centerlines">
<code class="sig-prename descclassname">argoverse.utils.centerline_utils.</code><code class="sig-name descname">get_oracle_from_candidate_centerlines</code><span class="sig-paren">(</span><em class="sig-param">candidate_centerlines</em>, <em class="sig-param">xy</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/centerline_utils.html#get_oracle_from_candidate_centerlines"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.centerline_utils.get_oracle_from_candidate_centerlines" title="Permalink to this definition">¶</a></dt>
<dd><p>Get oracle centerline from candidate centerlines. Chose based on direction of travel and maximum offset.
First find the centerlines along which the distance travelled is close to maximum.
If there are multiple candidates, then chose the one which has minimum max offset</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>candidate_centerlines</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.List" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code></a>[<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>]) – List of candidate centerlines</p></li>
<li><p><strong>xy</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>) – Trajectory coordinates</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Oracle centerline</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>oracle_centerline</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="argoverse.utils.centerline_utils.is_overlapping_lane_seq">
<code class="sig-prename descclassname">argoverse.utils.centerline_utils.</code><code class="sig-name descname">is_overlapping_lane_seq</code><span class="sig-paren">(</span><em class="sig-param">lane_seq1</em>, <em class="sig-param">lane_seq2</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/centerline_utils.html#is_overlapping_lane_seq"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.centerline_utils.is_overlapping_lane_seq" title="Permalink to this definition">¶</a></dt>
<dd><p>Check if the 2 lane sequences are overlapping.
Overlapping is defined as:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">s1</span><span class="o">------</span><span class="n">s2</span><span class="o">-----------------</span><span class="n">e1</span><span class="o">--------</span><span class="n">e2</span>
</pre></div>
</div>
<p>Here lane2 starts somewhere on lane 1 and ends after it, OR:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">s1</span><span class="o">------</span><span class="n">s2</span><span class="o">-----------------</span><span class="n">e2</span><span class="o">--------</span><span class="n">e1</span>
</pre></div>
</div>
<p>Here lane2 starts somewhere on lane 1 and ends before it</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>lane_seq1</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Sequence" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Sequence</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>]) – list of lane ids</p></li>
<li><p><strong>lane_seq2</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Sequence" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Sequence</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>]) – list of lane ids</p></li>
</ul>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a></p>
</dd>
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>bool, True if the lane sequences overlap</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="argoverse.utils.centerline_utils.lane_waypt_to_query_dist">
<code class="sig-prename descclassname">argoverse.utils.centerline_utils.</code><code class="sig-name descname">lane_waypt_to_query_dist</code><span class="sig-paren">(</span><em class="sig-param">query_xy_city_coords</em>, <em class="sig-param">nearby_lane_objs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/centerline_utils.html#lane_waypt_to_query_dist"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.centerline_utils.lane_waypt_to_query_dist" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute the distance from a query to the closest waypoint in nearby lanes.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>query_xy_city_coords</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>) – Numpy array of shape (2,)</p></li>
<li><p><strong>nearby_lane_objs</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.List" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code></a>[<a class="reference internal" href="argoverse.map_representation.html#argoverse.map_representation.lane_segment.LaneSegment" title="argoverse.map_representation.lane_segment.LaneSegment"><code class="xref py py-class docutils literal notranslate"><span class="pre">LaneSegment</span></code></a>]) – list of LaneSegment objects</p></li>
</ul>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">Tuple</span></code>[<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>, <a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>, <a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>]</p>
</dd>
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>Tuple of (per_lane_dists, min_dist_nn_indices, dense_centerlines); all numpy arrays</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="argoverse.utils.centerline_utils.remove_overlapping_lane_seq">
<code class="sig-prename descclassname">argoverse.utils.centerline_utils.</code><code class="sig-name descname">remove_overlapping_lane_seq</code><span class="sig-paren">(</span><em class="sig-param">lane_seqs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/centerline_utils.html#remove_overlapping_lane_seq"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.centerline_utils.remove_overlapping_lane_seq" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove lane sequences which are overlapping to some extent</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>lane_seqs</strong> (<em>list of list of integers</em>) – List of sequence of lane ids (Eg. [[12345, 12346, 12347], [12345, 12348]])</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.List" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Sequence" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Sequence</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>]]</p>
</dd>
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>List of sequence of lane ids (e.g. <code class="docutils literal notranslate"><span class="pre">[[12345,</span> <span class="pre">12346,</span> <span class="pre">12347],</span> <span class="pre">[12345,</span> <span class="pre">12348]]</span></code>)</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="argoverse.utils.centerline_utils.swap_left_and_right">
<code class="sig-prename descclassname">argoverse.utils.centerline_utils.</code><code class="sig-name descname">swap_left_and_right</code><span class="sig-paren">(</span><em class="sig-param">condition</em>, <em class="sig-param">left_centerline</em>, <em class="sig-param">right_centerline</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/centerline_utils.html#swap_left_and_right"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.centerline_utils.swap_left_and_right" title="Permalink to this definition">¶</a></dt>
<dd><p>Swap points in left and right centerline according to condition.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>condition</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>) – Numpy array of shape (N,) of type boolean. Where true, swap the values in the left and
right centerlines.</p></li>
<li><p><strong>left_centerline</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>) – The left centerline, whose points should be swapped with the right centerline.</p></li>
<li><p><strong>right_centerline</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>) – The right centerline.</p></li>
</ul>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Iterable" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Iterable</span></code></a>[<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>]</p>
</dd>
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>left_centerline
right_centerline</p>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-argoverse.utils.city_visibility_utils">
<span id="argoverse-utils-city-visibility-utils-module"></span><h2>argoverse.utils.city_visibility_utils module<a class="headerlink" href="#module-argoverse.utils.city_visibility_utils" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="argoverse.utils.city_visibility_utils.clip_point_cloud_to_visible_region">
<code class="sig-prename descclassname">argoverse.utils.city_visibility_utils.</code><code class="sig-name descname">clip_point_cloud_to_visible_region</code><span class="sig-paren">(</span><em class="sig-param">egovehicle_pts</em>, <em class="sig-param">lidar_pts</em>, <em class="sig-param">n_polar_bins=100</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/city_visibility_utils.html#clip_point_cloud_to_visible_region"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.city_visibility_utils.clip_point_cloud_to_visible_region" title="Permalink to this definition">¶</a></dt>
<dd><p>LiDAR points provide visibility information for a map point cloud in city coordinates.
We bin the world into polar bins, and then if you’ve gone past the farthest LiDAR point
in that orientation bin, we ignore such city points. Those city points could be lane
centerlines or ROI boundary.</p>
<p>Other options would be to fix a skinny rectangle around the egovehicle (long along road,
and skinny along sidewalks), or to combine cells with <1.41 distance to each other into
a polygon, growing the region with DBSCAN. Could also vectorize this.</p>
<p>We loop through 2 pi radians in n polar bins to find the closest lidar return.
Arctan has range [-pi, pi], so we start our loop there.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>egovehicle_pts</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>) – 3d points in city coordinate fram</p></li>
<li><p><strong>lidar_pts</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>) – Array of LiDAR returns</p></li>
<li><p><strong>n_polar_bins</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – number of bins to discretize the unit circle with</p></li>
</ul>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a></p>
</dd>
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>egovehicle_pts</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="argoverse.utils.city_visibility_utils.viz_polar_bin_contents">
<code class="sig-prename descclassname">argoverse.utils.city_visibility_utils.</code><code class="sig-name descname">viz_polar_bin_contents</code><span class="sig-paren">(</span><em class="sig-param">bin_lidar_pts</em>, <em class="sig-param">invalid_egovehicle_pts</em>, <em class="sig-param">filename</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/city_visibility_utils.html#viz_polar_bin_contents"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.city_visibility_utils.viz_polar_bin_contents" title="Permalink to this definition">¶</a></dt>
<dd><p>Visualize what the utility is doing within each polar bin.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>bin_lidar_pts</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>) – array</p></li>
<li><p><strong>invalid_egovehicle_pts</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>) – array</p></li>
</ul>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">None</span></code></p>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-argoverse.utils.cuboid_interior">
<span id="argoverse-utils-cuboid-interior-module"></span><h2>argoverse.utils.cuboid_interior module<a class="headerlink" href="#module-argoverse.utils.cuboid_interior" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="argoverse.utils.cuboid_interior.extract_pc_in_box3d_hull">
<code class="sig-prename descclassname">argoverse.utils.cuboid_interior.</code><code class="sig-name descname">extract_pc_in_box3d_hull</code><span class="sig-paren">(</span><em class="sig-param">pc</em>, <em class="sig-param">bbox_3d</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/argoverse/utils/cuboid_interior.html#extract_pc_in_box3d_hull"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#argoverse.utils.cuboid_interior.extract_pc_in_box3d_hull" title="Permalink to this definition">¶</a></dt>
<dd><p>Find points that fall within a 3d cuboid, by treating the 3d cuboid as a hull.
Scipy.spatial’s Delaunay class performs tesselation in N dimensions. By finding
the simplices containing the given points, we also can determine which points
lie outside the triangulation. Such invalid points obtain the value “-1”. We
threshold these to find the points that fall within the cuboid/hull.</p>
<p>Please see Apache 2.0 license below, which governs this specific function.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>pc</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.16)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>) – Numpy array of shape (N,3) representing point cloud</p></li>