TI Autonomous Driving Algorithms (TIADALG) Library User Guide
tiadalg_structure_from_motion.h
Go to the documentation of this file.
1 /*
2 * module name : Structure From Motion
3 *
4 * module descripton : Generates sparse 3D points from optical flow information for camera captured images
5 *
6 */
7 /*
8 
9 Copyright (c) 2009-2021 Texas Instruments Incorporated
10 
11 All rights reserved not granted herein.
12 
13 Limited License.
14 
15 Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive license under copyrights and patents it now or hereafter owns or controls to make, have made, use, import, offer to sell and sell ("Utilize") this software subject to the terms herein. With respect to the foregoing patent license, such license is granted solely to the extent that any such patent is necessary to Utilize the software alone. The patent license shall not apply to any combinations which include this software, other than combinations with devices manufactured by or for TI (�TI Devices�). No hardware patent is licensed hereunder.
16 
17 Redistributions must preserve existing copyright notices and reproduce this license (including the above copyright notice and the disclaimer and (if applicable) source code license limitations below) in the documentation and/or other materials provided with the distribution
18 
19 Redistribution and use in binary form, without modification, are permitted provided that the following conditions are met:
20 
21 * No reverse engineering, decompilation, or disassembly of this software is permitted with respect to any software provided in binary form.
22 
23 * any redistribution and use are licensed by TI for use only with TI Devices.
24 
25 * Nothing shall obligate TI to provide you with source code for the software licensed and provided to you in object code.
26 
27 If software source code is provided to you, modification and redistribution of the source code are permitted provided that the following conditions are met:
28 
29 * any redistribution and use of the source code, including any resulting derivative works, are licensed by TI for use only with TI Devices.
30 
31 * any redistribution and use of any object code compiled from the source code and any resulting derivative works, are licensed by TI for use only with TI Devices.
32 
33 Neither the name of Texas Instruments Incorporated nor the names of its suppliers may be used to endorse or promote products derived from this software without specific prior written permission.
34 
35 DISCLAIMER.
36 
37 THIS SOFTWARE IS PROVIDED BY TI AND TI�S LICENSORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TI AND TI�S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 
39 */
53 
54 #ifndef ISFM_TI_H
55 #define ISFM_TI_H
56 
57 #include <ivision.h>
58 
59 #ifdef __cplusplus
60 extern "C" {
61 #endif
62 
63 /*
64  * Size of the Camera Extrinsic parameters consisting of
65  * rotation and translation parameters.
66  */
67 #define SFM_TI_CAMERA_EXTRENSIC_PARAM_SIZE (12)
68 
69 /*
70  * Size of Camera Intrinsic parameters.
71  */
72 #define SFM_TI_CAMERA_INTRINSIC_PARAM_SIZE (9)
73 
74 /*
75  * Maximum number of past frames for which a key point is tracked.
76 */
77 #define MAX_NUM_FRAMES_TO_TRACK (6)
78 
82 extern const IVISION_Fxns SFM_TI_VISION_FXNS;
83 
94 typedef enum
95 {
100 
101 
127 typedef enum
128 {
136 
137 
151 typedef enum
152 {
153 
157 
159 
202 typedef struct
203 {
204  IVISION_Params visionParams;
205 
206  uint16_t imgWidth;
207  uint16_t imgHeight;
208  uint16_t keyPointStep;
209 
210  uint16_t maxNumKeyPoints ;
211  uint16_t maxNumTracks ;
212 
214 
215  /* Note : .*/
216  void * udmaDrvObj ;
217 
218  int32_t flowCtrl;
219 
220  /*Enables dumping out of visualization buffer (SFM_TI_OUT_BUFDESC_LUMA_PTCLD_BUFFER) by algorithm itself. */
221  int32_t enAlgPtCldVis ;
222 
223  /*Sqaure occupancy grid width or height in pixels*/
225 
226  /*Enables dumping out of visualization buffer (SFM_TI_OUT_BUFDESC_LUMA_OCPGRD_BUFFER) by algorithm itself. */
227  int32_t enAlgOcpGrdVis ;
228 
229  /*input and output image color format. 0 for yuv nv12, and 1 for BGR */
230  int32_t imgColorFmt ;
231 
232  uint16_t rsvd1 ;
233  uint16_t rsvd2 ;
235 
300 typedef struct
301 {
302  IVISION_InArgs iVisionInArgs ;
303 
304  int32_t flowConfThr ;
305  int32_t flowInvalidPadX ;
306  int32_t flowInvalidPadY ;
307 
309  uint32_t fMatrixCalcMethod ;
310  uint32_t fMatrixPrunEn ;
311  uint32_t fMatrixInTh ;
312  uint32_t maxRansacItr ;
313  uint32_t maxTriangItr ;
315  float staticFrmTh ;
316  int32_t reset ;
317  uint32_t reserved0 ;
318  uint32_t reserved1 ;
319 } SFM_TI_InArgs;
320 
345 typedef struct
346 {
347  uint32_t numIterFMat ;
348  uint32_t numInlierFmat ;
349  uint32_t numCur3DPnts ;
350  uint8_t isStatic ;
351  size_t rsvd1 ;
352  size_t rsvd2 ;
353 } SFM_TI_Stats;
354 
355 
372 typedef struct
373 {
374  IVISION_OutArgs iVisionOutArgs;
376  uint32_t outNumPoints ;
378 
416 typedef struct
417 {
418  float point2dX;
419  float point2dY;
420  float point3dX;
421  float point3dY;
422  float point3dZ;
423  uint16_t trackAge;
424  uint16_t trackId;
425 
426 } SFM_TI_output;
427 
429 /* ti_ivision_TI_SFM */
430 
431 #ifdef __cplusplus
432 }
433 #endif
434 
435 #endif /* ISFM_TI_H */
436 /*==========================================================================*/
437 /* END of the FILE */
438 /*==========================================================================*/
439 
440 
IVISION_InArgs iVisionInArgs
Definition: tiadalg_structure_from_motion.h:302
uint16_t maxNumTracks
Definition: tiadalg_structure_from_motion.h:211
Definition: tiadalg_structure_from_motion.h:154
This structure reports statistics of running SFM.
Definition: tiadalg_structure_from_motion.h:345
#define SFM_TI_CAMERA_INTRINSIC_PARAM_SIZE
Definition: tiadalg_structure_from_motion.h:72
uint16_t imgHeight
Definition: tiadalg_structure_from_motion.h:207
uint32_t outNumPoints
Definition: tiadalg_structure_from_motion.h:376
uint16_t keyPointStep
Definition: tiadalg_structure_from_motion.h:208
Definition: tiadalg_structure_from_motion.h:98
int32_t flowInvalidPadX
Definition: tiadalg_structure_from_motion.h:305
uint32_t reserved1
Definition: tiadalg_structure_from_motion.h:318
const IVISION_Fxns SFM_TI_VISION_FXNS
The unique constant function table for SFM.
int32_t imgColorFmt
Definition: tiadalg_structure_from_motion.h:230
uint16_t imgWidth
Definition: tiadalg_structure_from_motion.h:206
uint32_t fMatrixCalcMethod
Definition: tiadalg_structure_from_motion.h:309
int32_t flowCtrl
Definition: tiadalg_structure_from_motion.h:218
float point2dX
Definition: tiadalg_structure_from_motion.h:418
int32_t ocpGrdSizeInPixels
Definition: tiadalg_structure_from_motion.h:224
float point3dZ
Definition: tiadalg_structure_from_motion.h:422
IVISION_OutArgs iVisionOutArgs
Definition: tiadalg_structure_from_motion.h:374
int32_t enAlgPtCldVis
Definition: tiadalg_structure_from_motion.h:221
uint32_t numCur3DPnts
Definition: tiadalg_structure_from_motion.h:349
uint32_t fMatrixInTh
Definition: tiadalg_structure_from_motion.h:311
Definition: tiadalg_structure_from_motion.h:97
float point3dX
Definition: tiadalg_structure_from_motion.h:420
This structure contains all the parameters which are given as an input to OD algorithm at frame level...
Definition: tiadalg_structure_from_motion.h:300
SFM_TI_OutBufOrder
Process call provides most of the information through IVISION buffers during process call...
Definition: tiadalg_structure_from_motion.h:127
uint16_t rsvd1
Definition: tiadalg_structure_from_motion.h:232
Definition: tiadalg_structure_from_motion.h:155
float pointPruneAngle
Definition: tiadalg_structure_from_motion.h:314
uint32_t maxTriangItr
Definition: tiadalg_structure_from_motion.h:313
float point3dY
Definition: tiadalg_structure_from_motion.h:421
uint32_t maxRansacItr
Definition: tiadalg_structure_from_motion.h:312
size_t rsvd2
Definition: tiadalg_structure_from_motion.h:352
Definition: tiadalg_structure_from_motion.h:130
int32_t flowConfThr
Definition: tiadalg_structure_from_motion.h:304
#define SFM_TI_CAMERA_EXTRENSIC_PARAM_SIZE
Definition: tiadalg_structure_from_motion.h:67
IVISION_Params visionParams
Definition: tiadalg_structure_from_motion.h:204
SFM_TI_InBufOrder
User provides most of the information through IVISION buffers during process call. Below enums define the purpose of each input buffers.
Definition: tiadalg_structure_from_motion.h:94
void * udmaDrvObj
Definition: tiadalg_structure_from_motion.h:216
uint16_t rsvd2
Definition: tiadalg_structure_from_motion.h:233
Definition: tiadalg_structure_from_motion.h:134
Definition: tiadalg_structure_from_motion.h:129
uint32_t reserved0
Definition: tiadalg_structure_from_motion.h:317
size_t rsvd1
Definition: tiadalg_structure_from_motion.h:351
uint16_t maxNumKeyPoints
Definition: tiadalg_structure_from_motion.h:210
int32_t enAlgOcpGrdVis
Definition: tiadalg_structure_from_motion.h:227
uint16_t trackId
Definition: tiadalg_structure_from_motion.h:424
This structure contains all the parameters which are given as output.
Definition: tiadalg_structure_from_motion.h:372
int32_t flowInvalidPadY
Definition: tiadalg_structure_from_motion.h:306
float staticFrmTh
Definition: tiadalg_structure_from_motion.h:315
int32_t reset
Definition: tiadalg_structure_from_motion.h:316
Definition: tiadalg_structure_from_motion.h:133
float point2dY
Definition: tiadalg_structure_from_motion.h:419
uint16_t trackAge
Definition: tiadalg_structure_from_motion.h:423
SFM_TI_Stats sfmStats
Definition: tiadalg_structure_from_motion.h:375
Definition: tiadalg_structure_from_motion.h:156
uint32_t numInlierFmat
Definition: tiadalg_structure_from_motion.h:348
uint32_t numIterFMat
Definition: tiadalg_structure_from_motion.h:347
Definition: tiadalg_structure_from_motion.h:96
Definition: tiadalg_structure_from_motion.h:131
Definition: tiadalg_structure_from_motion.h:132
This structure contains all the parameters which controls SFM algorithm at create time...
Definition: tiadalg_structure_from_motion.h:202
SFM_TI_FmatrixCalcType
Defines the method to calculate/estimate Fundamental Matrix. It is recommended to use SFM_TI_FMAT_FRO...
Definition: tiadalg_structure_from_motion.h:151
uint32_t fMatrixPrunEn
Definition: tiadalg_structure_from_motion.h:310
This structure defines the format of output buffer given out from algorithm.
Definition: tiadalg_structure_from_motion.h:416
uint8_t isStatic
Definition: tiadalg_structure_from_motion.h:350

© Copyright 2018 Texas Instruments Incorporated. All rights reserved.
Document generated by doxygen 1.8.6