# Feature Point Extraction

- enum FadasFPEPipeline\_e

    - Algorithm pipeline specifying what algorithm pipeline is run by subsequent calls to [FadasFPE\_Run()](https://docs.qualcomm.com/doc/80-63309-1/topic/feature-point-extraction.html#group__fpe_1ga5393ec18a30459db3493eedfc69df2df) and [FadasFPE\_RunMT()](https://docs.qualcomm.com/doc/80-63309-1/topic/feature-point-extraction.html#group__fpe_1ga434669a7d3f96e0945cee228177cdc04).

Feature point extraction (detection) using the algorithm pipeline specified by [FadasFPEPipeline\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/feature-point-extraction.html#group__fpe_1gabaf2ab1fa28eb85b1d81e578b6b6acb0).

- Param FADAS\_FPE\_PIPELINE\_FAST10:

    - Extract feature points from images using the Features from Accelerated Segment Test (FAST) algorithm [1]. **WARNING:** A border of 4 pixels is ignored.

[1] E. Rosten, T. Drummond, “Machine learning for high-speed corner

detection.” European Conference on Computer Vision. Lecture Notes in Computer Science. Vol. 1. pp. 430-443.

- Param FADAS\_FPE\_PIPELINE\_FAST10Scores:

    - Same as FADAS\_FPE\_PIPELINE\_FAST10 but adds scores. Extract feature points from images using the FAST10 corners algorithm. Include score estimates as well. A border of 4 pixels is ignored.

- Param FADAS\_FPE\_PIPELINE\_FAST10ScoresNMS:

    - Same as FADAS\_FPE\_PIPELINE\_FAST10Scores but adds non-maximum suppression within a 3 x 3 block. **WARNING:** A border of 4 pixels is ignored.

- Param FADAS\_FPE\_PIPELINE\_FAST10ScoresNMSu12:

    - Same as FADAS\_FPE\_PIPELINE\_FAST10Scores but adds non-maximum suppression within a 3 x 3 block. **WARNING:** A border of 4 pixels is ignored.

- Param FADAS\_FPE\_PIPELINE\_FAST10ScoresNmsNxM:

    - Same as FADAS\_FPE\_PIPELINE\_FAST10Scores but adds non-maximum suppression within a N x M block of pixels. **WARNING:** A border of 4 pixels is ignored.

*Values:*

- enumerator FADAS\_FPE\_PIPELINE\_FAST10

    - FAST10 feature points.

- enumerator FADAS\_FPE\_PIPELINE\_FAST10Scores

    - FAST10 feature points with scores.

- enumerator FADAS\_FPE\_PIPELINE\_FAST10ScoresNMS

    - FADAS\_FPE\_PIPELINE\_FAST10Scores + non-maximum suppression.

- enumerator FADAS\_FPE\_PIPELINE\_FAST10Scores12b

    - FADAS\_FPE\_PIPELINE\_FAST10Scores for 12-bit images.

- enumerator FADAS\_FPE\_PIPELINE\_FAST10ScoresNMS12b

    - FADAS\_FPE\_PIPELINE\_FAST10ScoresNMS for 12-bit images.

- enumerator FADAS\_FPE\_PIPELINE\_FAST10ScoresNmsNxM

    - FADAS\_FPE\_PIPELINE\_FAST10Scores + non-maximum suppression (N x M)

- enumerator FADAS\_FPE\_PIPELINE\_MAX

    - **WARNING:** must be last

- [FadasError\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#_CPPv412FadasError_e) FadasFPE\_Init(const char \*licenseKey)

    - Initialize feature point extraction. **WARNING:** Must be called once before other FastADAS functions except [FadasVersion()](https://docs.qualcomm.com/doc/80-63309-1/topic/misc.html#group__misc_1ga55cbdff48d751f2a0227ae4ac106d746).

- Parameters:

    - **licenseKey** – Pointer to the license key string.

- Returns:

    - [FADAS\_ERROR\_NONE](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#fadas_8h_1a280abf443019bfc722ac1158e5fe1013aea09a4171f0866f38326d7e5323f2d12) — Success.

- [FadasError\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#_CPPv412FadasError_e) FadasFPE\_DeInit(void)

    - Deinitialize feature point extraction. **WARNING:** Must be called once after all other FastADAS functions.

- Returns:

    - [FADAS\_ERROR\_NONE](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#fadas_8h_1a280abf443019bfc722ac1158e5fe1013aea09a4171f0866f38326d7e5323f2d12) — Success.

- [FadasFPE\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_fadas_f_p_e_8h_1a6995ae7a0aa6ada39f5d1da6adbb5b51.html#_CPPv410FadasFPE_t) \*FadasFPE\_Create([FadasImgProps\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_img_props__t.html#_CPPv415FadasImgProps_t) imgProps)

    - Create a feature point extraction object.

- Parameters:

    - **imgProps** – Image properties that must match the properties of the srcImg parameter in [FadasFPE\_Run()](https://docs.qualcomm.com/doc/80-63309-1/topic/feature-point-extraction.html#group__fpe_1ga5393ec18a30459db3493eedfc69df2df).

- Returns:

    - Pointer to object.

- [FadasError\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#_CPPv412FadasError_e) FadasFPE\_Destroy([FadasFPE\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_fadas_f_p_e_8h_1a6995ae7a0aa6ada39f5d1da6adbb5b51.html#_CPPv410FadasFPE_t) \*obj)

    - Destroy feature point extraction object.

- Parameters:

    - **obj** – Pointer to the FPE object returned by [FadasFPE\_Create()](https://docs.qualcomm.com/doc/80-63309-1/topic/feature-point-extraction.html#group__fpe_1ga7e8e74b362763bd2bf7bc4762db314dc).

- Returns:

    - [FADAS\_ERROR\_NONE](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#fadas_8h_1a280abf443019bfc722ac1158e5fe1013aea09a4171f0866f38326d7e5323f2d12) — Success.

- [FadasError\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#_CPPv412FadasError_e) FadasFPE\_SetNmsNxM([FadasFPE\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_fadas_f_p_e_8h_1a6995ae7a0aa6ada39f5d1da6adbb5b51.html#_CPPv410FadasFPE_t) \*obj, uint32\_t w, uint32\_t h)

    - Set non-max suppression window size used by the [FADAS\_FPE\_PIPELINE\_FAST10ScoresNmsNxM](https://docs.qualcomm.com/doc/80-63309-1/topic/feature-point-extraction.html#group__fpe_1ggabaf2ab1fa28eb85b1d81e578b6b6acb0a5d33a478a874bcdf59a6aa13afbb63e5) pipeline.

- Parameters:

    - - **obj** – Pointer to the FPE object returned by [FadasFPE\_Create()](https://docs.qualcomm.com/doc/80-63309-1/topic/feature-point-extraction.html#group__fpe_1ga7e8e74b362763bd2bf7bc4762db314dc).
- **w** – Width of NMS window. **WARNING:** Must be an odd number.
- **h** – Height of NMS window. **WARNING:** Must be an odd number.

- Returns:

    - [FADAS\_ERROR\_NONE](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#fadas_8h_1a280abf443019bfc722ac1158e5fe1013aea09a4171f0866f38326d7e5323f2d12) — Success.

- [FadasError\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#_CPPv412FadasError_e) FadasFPE\_Run([FadasFPEPipeline\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_group__fpe_1gabaf2ab1fa28eb85b1d81e578b6b6acb0.html#_CPPv418FadasFPEPipeline_e) ePipeline, [FadasFPE\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_fadas_f_p_e_8h_1a6995ae7a0aa6ada39f5d1da6adbb5b51.html#_CPPv410FadasFPE_t) \*obj, [FadasImage\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_image__t.html#_CPPv412FadasImage_t) \*src, [FadasROI\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_r_o_i__t.html#_CPPv410FadasROI_t) \*roi, int16\_t barrier, uint32\_t n\_pts\_max, uint32\_t \*n\_pts, [float32\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_fadas_8h_1a4611b605e45ab401f02cab15c5e38715.html#_CPPv49float32_t) \*ptX, [float32\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_fadas_8h_1a4611b605e45ab401f02cab15c5e38715.html#_CPPv49float32_t) \*ptY, uint32\_t \*ptScore)

    - Extracts feature points from image and computes an optional score for each point.

- Parameters:

    - - **ePipeline** – Descriptor of the execution pipeline to use.
- **obj** – Pointer to the FPE object returned by [FadasFPE\_Create()](https://docs.qualcomm.com/doc/80-63309-1/topic/feature-point-extraction.html#group__fpe_1ga7e8e74b362763bd2bf7bc4762db314dc).
- **src** – Pointer to input image frame data.
- **roi** – Pointer to specification of the region of interest for which feature points should be extracted from. **WARNING:** See [FadasFPEPipeline\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/feature-point-extraction.html#group__fpe_1gabaf2ab1fa28eb85b1d81e578b6b6acb0) for potential untouched border pixels for different algorithm pipelines that supplant the specified ROI where the ROI crosses those border pixels.
- **barrier** – Threshold value for how strong a feature point’s associated score must be before inclusion in the list of points. In the case of FAST corners, this threshold value \((b)\) is the value added to or subtracted from the center pixel \((I\_c)\) to test that each pixel \((I\_i)\) in the segment passes the test: \(I\_i &gt; I\_c + b\) or \(I\_i &lt; I\_c - b\).
- **n\_pts\_max** – Maximum number of features that can be added to the following arrays. This number usually represents the amount of memory allocated.
- **n\_pts** – Filled with the number of features found.
- **ptX** – Filled with the x values for the locations of features found.
- **ptY** – Filled with the y values for the locations of features found.
- **ptScore** – Filled with the score values for the locations of features found if requested by the chosen pipeline value.

- Returns:

    - [FADAS\_ERROR\_NONE](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#fadas_8h_1a280abf443019bfc722ac1158e5fe1013aea09a4171f0866f38326d7e5323f2d12) — Success.

- [FadasError\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#_CPPv412FadasError_e) FadasFPE\_RunMT(void \*wrkrs, [FadasFPE\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_fadas_f_p_e_8h_1a6995ae7a0aa6ada39f5d1da6adbb5b51.html#_CPPv410FadasFPE_t) \*obj, [FadasImage\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_image__t.html#_CPPv412FadasImage_t) \*src, [FadasROI\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_r_o_i__t.html#_CPPv410FadasROI_t) \*roi, int16\_t barrier, uint32\_t n\_pts\_max, uint32\_t \*n\_pts, [float32\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_fadas_8h_1a4611b605e45ab401f02cab15c5e38715.html#_CPPv49float32_t) \*ptX, [float32\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_fadas_8h_1a4611b605e45ab401f02cab15c5e38715.html#_CPPv49float32_t) \*ptY, uint32\_t \*ptScore)

    - Extracts feature points from an image and computes an optional score for each point.

- Parameters:

    - - **wrkrs** – Pointer to the worker pool created by [FadasFPE\_CreateWorkers()](https://docs.qualcomm.com/doc/80-63309-1/topic/feature-point-extraction.html#group__fpe_1ga018ca36386e52ac6e1575675ab03c95c).
- **obj** – Pointer to the FPE object returned by [FadasFPE\_Create()](https://docs.qualcomm.com/doc/80-63309-1/topic/feature-point-extraction.html#group__fpe_1ga7e8e74b362763bd2bf7bc4762db314dc).
- **src** – Pointer to the input image frame data.
- **roi** – Pointer to the specification of the region of interest to extract feature points from. **WARNING:** See [FadasFPEPipeline\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/feature-point-extraction.html#group__fpe_1gabaf2ab1fa28eb85b1d81e578b6b6acb0) for potential untouched border pixels for different algorithm pipelines that supplant the specified ROI where the ROI crosses those border pixels.
- **barrier** – Threshold value for how strong the associated score feature point must be before inclusion in the list of points. When there are FAST corners, this threshold value \((b)\) is added to or subtracted from the center pixel \((I\_c)\) to test that each pixel \((I\_i)\) in the segment passes the test: \(I\_i &gt; I\_c + b\) or \(I\_i &lt; I\_c - b\).
- **n\_pts\_max** – Maximum number of features that can be added to the following arrays. This number usually represents the amount of memory allocated.
- **n\_pts** – Filled with the number of features found.
- **ptX** – Filled with the x values for the locations of features found.
- **ptY** – Filled with the y values for the locations of features found.
- **ptScore** – Filled with the score values for the locations of features found if requested by the chosen pipeline value.

- Returns:

    - [FADAS\_ERROR\_NONE](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#fadas_8h_1a280abf443019bfc722ac1158e5fe1013aea09a4171f0866f38326d7e5323f2d12) — Success.

- void \*FadasFPE\_CreateWorkers(uint32\_t nThreads, int32\_t pThreadsAffinity[], [FadasFPEPipeline\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_group__fpe_1gabaf2ab1fa28eb85b1d81e578b6b6acb0.html#_CPPv418FadasFPEPipeline_e) ePipeline)

    - Creates a multithreaded worker pool specifically for the feature point extraction feature.

- Parameters:

    - - **nThreads** – Requested number of threads. Can be limited to the maximum number of threads if requesting more than that the limit. The maximum is the maximum number of physical or logical cores. If requesting 0 threads, use the maximum number.
- **pThreadsAffinity** – Array for setting threads affinity
- **ePipeline** – Descriptor of execution pipeline to use.

- Returns:

    - Worker pool pointer.

- [FadasError\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#_CPPv412FadasError_e) FadasFPE\_DestroyWorkers(void \*wrkrs)

    - Destroys a feature point extraction worker pool.

- Parameters:

    - **wrkrs** – Pointer to the worker pool created by [FadasFPE\_CreateWorkers()](https://docs.qualcomm.com/doc/80-63309-1/topic/feature-point-extraction.html#group__fpe_1ga018ca36386e52ac6e1575675ab03c95c).

- Returns:

    - [FADAS\_ERROR\_NONE](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#fadas_8h_1a280abf443019bfc722ac1158e5fe1013aea09a4171f0866f38326d7e5323f2d12) — Success.

## Related examples

- [fpe/app.cpp](https://docs.qualcomm.com/doc/80-63309-1/topic/fpe.html)

Last Published: Sep 30, 2024

[Previous Topic
Filtering](https://docs.qualcomm.com/bundle/publicresource/80-63309-1/topics/filtering.md) [Next Topic
Feature Point Tracking](https://docs.qualcomm.com/bundle/publicresource/80-63309-1/topics/feature-point-tracking.md)