11bd4fe43Sopenharmony_ci/* 21bd4fe43Sopenharmony_ci * Copyright (c) 2022 HiSilicon (Shanghai) Technologies CO., LIMITED. 31bd4fe43Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 41bd4fe43Sopenharmony_ci * you may not use this file except in compliance with the License. 51bd4fe43Sopenharmony_ci * You may obtain a copy of the License at 61bd4fe43Sopenharmony_ci * 71bd4fe43Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 81bd4fe43Sopenharmony_ci * 91bd4fe43Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 101bd4fe43Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 111bd4fe43Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 121bd4fe43Sopenharmony_ci * See the License for the specific language governing permissions and 131bd4fe43Sopenharmony_ci * limitations under the License. 141bd4fe43Sopenharmony_ci */ 151bd4fe43Sopenharmony_ci 161bd4fe43Sopenharmony_ci#ifndef _HI_MPI_IVE_H_ 171bd4fe43Sopenharmony_ci#define _HI_MPI_IVE_H_ 181bd4fe43Sopenharmony_ci 191bd4fe43Sopenharmony_ci#include "hi_ive.h" 201bd4fe43Sopenharmony_ci 211bd4fe43Sopenharmony_ci#ifdef __cplusplus 221bd4fe43Sopenharmony_ci#if __cplusplus 231bd4fe43Sopenharmony_ciextern "C" { 241bd4fe43Sopenharmony_ci#endif 251bd4fe43Sopenharmony_ci#endif 261bd4fe43Sopenharmony_ci 271bd4fe43Sopenharmony_ci/***************************************************************************** 281bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_DMA 291bd4fe43Sopenharmony_ci* Description : Direct memory access (DMA): 301bd4fe43Sopenharmony_ci* 1. Direct memory copy; 311bd4fe43Sopenharmony_ci* 2. Copy with interval bytes; 321bd4fe43Sopenharmony_ci* 3. Memset using 3 bytes; 331bd4fe43Sopenharmony_ci* 4. Memset using 8 bytes; 341bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task. 351bd4fe43Sopenharmony_ci* IVE_DATA_S *pstSrc Input source data.The input data is treated as U8C1 data. 361bd4fe43Sopenharmony_ci* IVE_DATA_S *pstDst Output result data. 371bd4fe43Sopenharmony_ci* IVE_DMA_CTRL_S *pstDmaCtrl DMA control parameter. 381bd4fe43Sopenharmony_ci* HI_BOOL bInstant Flag indicating whether to generate an interrupt. 391bd4fe43Sopenharmony_ci* If the output result blocks the next operation, 401bd4fe43Sopenharmony_ci* set bInstant to HI_TRUE. 411bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 421bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 32x1 pixels to 1920x1080 pixels. 431bd4fe43Sopenharmony_ci* The stride must be 16-byte-aligned. 441bd4fe43Sopenharmony_ci*****************************************************************************/ 451bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_DMA(IVE_HANDLE *pIveHandle, IVE_DATA_S *pstSrc, IVE_DST_DATA_S *pstDst, 461bd4fe43Sopenharmony_ci IVE_DMA_CTRL_S *pstDmaCtrl, HI_BOOL bInstant); 471bd4fe43Sopenharmony_ci 481bd4fe43Sopenharmony_ci/***************************************************************************** 491bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_Filter 501bd4fe43Sopenharmony_ci* Description : 5x5 template filter. 511bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 521bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc Input source data. 531bd4fe43Sopenharmony_ci* The U8C1,SP420 and SP422 input formats are supported. 541bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstDst Output result, of same type with the input. 551bd4fe43Sopenharmony_ci* IVE_FILTER_CTRL_S *pstFltCtrl Control parameters of filter 561bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 571bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 581bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1920x1024 pixels. 591bd4fe43Sopenharmony_ci* The physical addresses of the input data and output data must be 16-byte-aligned. 601bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 611bd4fe43Sopenharmony_ci*****************************************************************************/ 621bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_Filter(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc, IVE_DST_IMAGE_S *pstDst, 631bd4fe43Sopenharmony_ci IVE_FILTER_CTRL_S *pstFltCtrl, HI_BOOL bInstant); 641bd4fe43Sopenharmony_ci 651bd4fe43Sopenharmony_ci/***************************************************************************** 661bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_CSC 671bd4fe43Sopenharmony_ci* Description : YUV2RGB\YUV2HSV\YUV2LAB\RGB2YUV color space conversion are supported. 681bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 691bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc Input source data: 701bd4fe43Sopenharmony_ci* 1. SP420\SP422 type for YUV2RGB\YUV2HSV\YUV2LAB; 711bd4fe43Sopenharmony_ci* 2. U8C3_PACKAGE\U8C3_PLANAR type for RGB2YUV; 721bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstDst Output result: 731bd4fe43Sopenharmony_ci* 1. U8C3_PACKAGE\U8C3_PLANAR typed for 741bd4fe43Sopenharmony_ci* YUV2RGB\YUV2HSV\YUV2LAB; 751bd4fe43Sopenharmony_ci* 2. SP420\SP422 type for RGB2YUV; 761bd4fe43Sopenharmony_ci* IVE_CSC_CTRL_S *pstCscCtrl Control parameters for CSC 771bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 781bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 791bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1920x1080 pixels. 801bd4fe43Sopenharmony_ci* The physical addresses of the input data and output data must be 16-byte-aligned. 811bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 821bd4fe43Sopenharmony_ci*****************************************************************************/ 831bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_CSC(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc, IVE_DST_IMAGE_S *pstDst, 841bd4fe43Sopenharmony_ci IVE_CSC_CTRL_S *pstCscCtrl, HI_BOOL bInstant); 851bd4fe43Sopenharmony_ci 861bd4fe43Sopenharmony_ci/***************************************************************************** 871bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_FILTER_AND_CSC 881bd4fe43Sopenharmony_ci* Description : Only support YUV2RGB color space conversion. 891bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task. 901bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc Input source data.Only SP420\SP422 type 911bd4fe43Sopenharmony_ci* are supported. 921bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstDst Output result.Only U8C3_PACKAGE\U8C3_PLANAR 931bd4fe43Sopenharmony_ci* are supported. 941bd4fe43Sopenharmony_ci* IVE_FILTER_AND_CSC_CTRL_S *pstFltCscCtrl Control parameters. 951bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 961bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 971bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1920x1024 pixels. 981bd4fe43Sopenharmony_ci* The physical addresses of the input data and output data must be 16-byte-aligned. 991bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 1001bd4fe43Sopenharmony_ci*****************************************************************************/ 1011bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_FilterAndCSC(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc, IVE_DST_IMAGE_S *pstDst, 1021bd4fe43Sopenharmony_ci IVE_FILTER_AND_CSC_CTRL_S *pstFltCscCtrl, HI_BOOL bInstant); 1031bd4fe43Sopenharmony_ci 1041bd4fe43Sopenharmony_ci/***************************************************************************** 1051bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_Sobel 1061bd4fe43Sopenharmony_ci* Description : SOBEL is used to extract the gradient information. 1071bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 1081bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc Input source data. Only the U8C1 input image 1091bd4fe43Sopenharmony_ci* is supported. 1101bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstDstH The (horizontal) result of input image filtered by 1111bd4fe43Sopenharmony_ci* the input mask; 1121bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstDstV The (vertical) result of input image filtered by 1131bd4fe43Sopenharmony_ci* the transposed mask; 1141bd4fe43Sopenharmony_ci* IVE_SOBEL_CTRL_S *pstSobelCtrl Control parameters 1151bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 1161bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 1171bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1920x1024 pixels. 1181bd4fe43Sopenharmony_ci* The physical addresses of the input data and output data must be 16-byte-aligned. 1191bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 1201bd4fe43Sopenharmony_ci*****************************************************************************/ 1211bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_Sobel(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc, IVE_DST_IMAGE_S *pstDstH, 1221bd4fe43Sopenharmony_ci IVE_DST_IMAGE_S *pstDstV, IVE_SOBEL_CTRL_S *pstSobelCtrl, HI_BOOL bInstant); 1231bd4fe43Sopenharmony_ci 1241bd4fe43Sopenharmony_ci/***************************************************************************** 1251bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_MagAndAng 1261bd4fe43Sopenharmony_ci* Description : MagAndAng is used to extract the edge information. 1271bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 1281bd4fe43Sopenharmony_ci* IVE_SRC_INFO_S *pstSrc Input source data. Only the U8C1 input format 1291bd4fe43Sopenharmony_ci* is supported. 1301bd4fe43Sopenharmony_ci* IVE_MEM_INFO_S *pstDstMag Output magnitude. 1311bd4fe43Sopenharmony_ci* IVE_MEM_INFO_S *pstDstAng Output angle. 1321bd4fe43Sopenharmony_ci* If the output mode is set to magnitude only, 1331bd4fe43Sopenharmony_ci* this item can be set to null. 1341bd4fe43Sopenharmony_ci* IVE_MAG_AND_ANG_CTRL_S *pstMagAndAngCtrl Control parameters 1351bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 1361bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 1371bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1920x1024 pixels. 1381bd4fe43Sopenharmony_ci* The physical addresses of the input data and output data must be 16-byte-aligned. 1391bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 1401bd4fe43Sopenharmony_ci*****************************************************************************/ 1411bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_MagAndAng(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc, IVE_DST_IMAGE_S *pstDstMag, 1421bd4fe43Sopenharmony_ci IVE_DST_IMAGE_S *pstDstAng, IVE_MAG_AND_ANG_CTRL_S *pstMagAndAngCtrl, HI_BOOL bInstant); 1431bd4fe43Sopenharmony_ci 1441bd4fe43Sopenharmony_ci/***************************************************************************** 1451bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_Dilate 1461bd4fe43Sopenharmony_ci* Description : 5x5 template dilate. Only the U8C1 binary image input is supported. 1471bd4fe43Sopenharmony_ci* Or else the result is not expected. 1481bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 1491bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc Input binary image, which consists of 0 or 255 1501bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstDst Output result. 1511bd4fe43Sopenharmony_ci* IVE_DILATE_CTRL_S *pstDilateCtrl Control parameters. 1521bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 1531bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 1541bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1920x1024 pixels. 1551bd4fe43Sopenharmony_ci* The physical addresses of the input data and output data must be 16-byte-aligned. 1561bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 1571bd4fe43Sopenharmony_ci* The input value, output value, and mask value must be 0 or 255. 1581bd4fe43Sopenharmony_ci*****************************************************************************/ 1591bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_Dilate(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc, IVE_DST_IMAGE_S *pstDst, 1601bd4fe43Sopenharmony_ci IVE_DILATE_CTRL_S *pstDilateCtrl, HI_BOOL bInstant); 1611bd4fe43Sopenharmony_ci 1621bd4fe43Sopenharmony_ci/***************************************************************************** 1631bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_Erode 1641bd4fe43Sopenharmony_ci* Parameters : 5x5 template erode. Only the U8C1 binary image input is supported. 1651bd4fe43Sopenharmony_ci* Or else the result is not correct. 1661bd4fe43Sopenharmony_ci* Input : IVE_HANDLE *pIveHandle Returned handle ID of a task 1671bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc Input binary image, which consists of 0 or 255 1681bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstDst Output result. 1691bd4fe43Sopenharmony_ci* IVE_ERODE_CTRL_S *pstErodeCtrl Control parameters 1701bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 1711bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 1721bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1920x1024 pixels. 1731bd4fe43Sopenharmony_ci* The physical addresses of the input data and output data must be 16-byte-aligned. 1741bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 1751bd4fe43Sopenharmony_ci* The input value, output value, and mask value must be 0 or 255. 1761bd4fe43Sopenharmony_ci*****************************************************************************/ 1771bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_Erode(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc, IVE_DST_IMAGE_S *pstDst, 1781bd4fe43Sopenharmony_ci IVE_ERODE_CTRL_S *pstErodeCtrl, HI_BOOL bInstant); 1791bd4fe43Sopenharmony_ci 1801bd4fe43Sopenharmony_ci/***************************************************************************** 1811bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_Thresh 1821bd4fe43Sopenharmony_ci* Description : Thresh operation to the input image. 1831bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 1841bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc Input source data. Only the U8C1 input format is supported. 1851bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstDst Output result 1861bd4fe43Sopenharmony_ci* IVE_THRESH_CTRL_S *pstThrCtrl Control parameters 1871bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 1881bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 1891bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1920x1080 pixels. 1901bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 1911bd4fe43Sopenharmony_ci*****************************************************************************/ 1921bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_Thresh(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc, IVE_DST_IMAGE_S *pstDst, 1931bd4fe43Sopenharmony_ci IVE_THRESH_CTRL_S *pstThrCtrl, HI_BOOL bInstant); 1941bd4fe43Sopenharmony_ci 1951bd4fe43Sopenharmony_ci/***************************************************************************** 1961bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_And 1971bd4fe43Sopenharmony_ci* Description : Binary images' And operation. 1981bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 1991bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc1 The input source1. Only U8C1 input format is supported. 2001bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc2 The input source2.Only U8C1 input format is supported. 2011bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstDst Output result of " src1 & src2 ". 2021bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 2031bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 2041bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1920x1080 pixels. 2051bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 2061bd4fe43Sopenharmony_ci* The types, widths, heights of two input sources must be the same. 2071bd4fe43Sopenharmony_ci*****************************************************************************/ 2081bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_And(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc1, IVE_SRC_IMAGE_S *pstSrc2, 2091bd4fe43Sopenharmony_ci IVE_DST_IMAGE_S *pstDst, HI_BOOL bInstant); 2101bd4fe43Sopenharmony_ci 2111bd4fe43Sopenharmony_ci/***************************************************************************** 2121bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_Sub 2131bd4fe43Sopenharmony_ci* Description : Two gray images' Sub operation. 2141bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 2151bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc1 Minuend of the input source.Only the U8C1 input format 2161bd4fe43Sopenharmony_ci* is supported. 2171bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc2 Subtrahend of the input source.Only the U8C1 input 2181bd4fe43Sopenharmony_ci* format is supported. 2191bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstDst Output result of src1 minus src2 2201bd4fe43Sopenharmony_ci* IVE_SUB_CTRL_S *pstSubCtrl Control parameter 2211bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 2221bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 2231bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1920x1080 pixels. 2241bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 2251bd4fe43Sopenharmony_ci* The types, widths, heights of two input sources must be the same. 2261bd4fe43Sopenharmony_ci*****************************************************************************/ 2271bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_Sub(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc1, IVE_SRC_IMAGE_S *pstSrc2, 2281bd4fe43Sopenharmony_ci IVE_DST_IMAGE_S *pstDst, IVE_SUB_CTRL_S *pstSubCtrl, HI_BOOL bInstant); 2291bd4fe43Sopenharmony_ci 2301bd4fe43Sopenharmony_ci/***************************************************************************** 2311bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_Or 2321bd4fe43Sopenharmony_ci* Description : Two binary images' Or operation. 2331bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 2341bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc1 Input source1. Only the U8C1 input format is supported. 2351bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc2 Input source2. Only the U8C1 input format is supported. 2361bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstDst Output result src1 or src2 2371bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 2381bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 2391bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1920x1080 pixels. 2401bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 2411bd4fe43Sopenharmony_ci* The types, widths, heights of two input sources must be the same. 2421bd4fe43Sopenharmony_ci*****************************************************************************/ 2431bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_Or(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc1, IVE_SRC_IMAGE_S *pstSrc2, 2441bd4fe43Sopenharmony_ci IVE_DST_IMAGE_S *pstDst, HI_BOOL bInstant); 2451bd4fe43Sopenharmony_ci 2461bd4fe43Sopenharmony_ci/***************************************************************************** 2471bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_INTEG 2481bd4fe43Sopenharmony_ci* Description : Calculate the input gray image's integral image. 2491bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 2501bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc Input source data.Only the U8C1 input format 2511bd4fe43Sopenharmony_ci* is supported. 2521bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstDst Output result.Can be U32C1 or U64C1, relied on the 2531bd4fe43Sopenharmony_ci* control parameter. 2541bd4fe43Sopenharmony_ci* IVE_INTEG_CTRL_S *pstIntegCtrl Integ Control 2551bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 2561bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 2571bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1920x1080 pixels. 2581bd4fe43Sopenharmony_ci* The physical addresses of the input data and output data must be 16-byte-aligned. 2591bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 2601bd4fe43Sopenharmony_ci* The pixel can be 32bit or 64 bit relied on the control parameter. 2611bd4fe43Sopenharmony_ci*****************************************************************************/ 2621bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_Integ(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc, IVE_DST_IMAGE_S *pstDst, 2631bd4fe43Sopenharmony_ci IVE_INTEG_CTRL_S *pstIntegCtrl, HI_BOOL bInstant); 2641bd4fe43Sopenharmony_ci 2651bd4fe43Sopenharmony_ci/***************************************************************************** 2661bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_Hist 2671bd4fe43Sopenharmony_ci* Description : Calculate the input gray image's histogram. 2681bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 2691bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc Input source data. Only the U8C1 input format 2701bd4fe43Sopenharmony_ci* is supported. 2711bd4fe43Sopenharmony_ci* IVE_DST_MEM_INFO_S *pstDst Output result. 2721bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 2731bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 2741bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1920x1080 pixels. 2751bd4fe43Sopenharmony_ci* The physical addresses of the input data and output data must be 16-byte-aligned. 2761bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 2771bd4fe43Sopenharmony_ci*****************************************************************************/ 2781bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_Hist(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc, IVE_DST_MEM_INFO_S *pstDst, 2791bd4fe43Sopenharmony_ci HI_BOOL bInstant); 2801bd4fe43Sopenharmony_ci 2811bd4fe43Sopenharmony_ci/***************************************************************************** 2821bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_Thresh_S16 2831bd4fe43Sopenharmony_ci* Description : S16 image's THRESH operation. 2841bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 2851bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc Input source data.Only the S16 input format 2861bd4fe43Sopenharmony_ci* is supported. 2871bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstDst Output result. 2881bd4fe43Sopenharmony_ci* IVE_THRESH_S16_CTRL_S *pstThrS16Ctrl Control parameters 2891bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 2901bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 2911bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1920x1080 pixels. 2921bd4fe43Sopenharmony_ci* The physical addresses of the input data must be 2-byte-aligned. 2931bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 2941bd4fe43Sopenharmony_ci*****************************************************************************/ 2951bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_Thresh_S16(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc, IVE_DST_IMAGE_S *pstDst, 2961bd4fe43Sopenharmony_ci IVE_THRESH_S16_CTRL_S *pstThrS16Ctrl, HI_BOOL bInstant); 2971bd4fe43Sopenharmony_ci 2981bd4fe43Sopenharmony_ci/***************************************************************************** 2991bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_Thresh_U16 3001bd4fe43Sopenharmony_ci* Description : U16 image's THRESH operation. 3011bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 3021bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc Input source data. Only the U16 input 3031bd4fe43Sopenharmony_ci* format is supported. 3041bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstDst Output result 3051bd4fe43Sopenharmony_ci* IVE_THRESH_U16_CTRL_S *pstThrU16Ctrl Control parameters 3061bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 3071bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 3081bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1920x1080 pixels. 3091bd4fe43Sopenharmony_ci* The physical addresses of the input data must be 2-byte-aligned. 3101bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 3111bd4fe43Sopenharmony_ci*****************************************************************************/ 3121bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_Thresh_U16(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc, IVE_DST_IMAGE_S *pstDst, 3131bd4fe43Sopenharmony_ci IVE_THRESH_U16_CTRL_S *pstThrU16Ctrl, HI_BOOL bInstant); 3141bd4fe43Sopenharmony_ci 3151bd4fe43Sopenharmony_ci/***************************************************************************** 3161bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_16BitTo8Bit 3171bd4fe43Sopenharmony_ci* Description : Scale the input 16bit data to the output 8bit data. 3181bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 3191bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc Input source data.Only U16C1\S16C1 3201bd4fe43Sopenharmony_ci* input is supported. 3211bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstDst Output result 3221bd4fe43Sopenharmony_ci* IVE_16BITTO8BIT_CTRL_S *pst16BitTo8BitCtrl control parameter 3231bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 3241bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 3251bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1920x1080 pixels. 3261bd4fe43Sopenharmony_ci* The physical addresses of the input data must be 2-byte-aligned. 3271bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 3281bd4fe43Sopenharmony_ci*****************************************************************************/ 3291bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_16BitTo8Bit(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc, IVE_DST_IMAGE_S *pstDst, 3301bd4fe43Sopenharmony_ci IVE_16BIT_TO_8BIT_CTRL_S *pst16BitTo8BitCtrl, HI_BOOL bInstant); 3311bd4fe43Sopenharmony_ci 3321bd4fe43Sopenharmony_ci/***************************************************************************** 3331bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_OrdStatFilter 3341bd4fe43Sopenharmony_ci* Description : Order Statistic Filter. It can be used as median\max\min value filter. 3351bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 3361bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc Input source data. Only U8C1 input 3371bd4fe43Sopenharmony_ci* is supported 3381bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstDst Output result 3391bd4fe43Sopenharmony_ci* IVE_ORD_STAT_FILTER_CTRL_S *pstOrdStatFltCtrl Control parameter 3401bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 3411bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 3421bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1920x1024 pixels. 3431bd4fe43Sopenharmony_ci* The physical addresses of the input data and output data must be 16-byte-aligned. 3441bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 3451bd4fe43Sopenharmony_ci*****************************************************************************/ 3461bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_OrdStatFilter(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc, IVE_DST_IMAGE_S *pstDst, 3471bd4fe43Sopenharmony_ci IVE_ORD_STAT_FILTER_CTRL_S *pstOrdStatFltCtrl, HI_BOOL bInstant); 3481bd4fe43Sopenharmony_ci 3491bd4fe43Sopenharmony_ci/***************************************************************************** 3501bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_Map 3511bd4fe43Sopenharmony_ci* Description : Map a image to another through a lookup table. 3521bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 3531bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc Input source. Only the U8C1 input format is supported. 3541bd4fe43Sopenharmony_ci* IVE_SRC_MEM_INFO_S *pstMap Input lookup table. Must be an U8 array of size 256. 3551bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstDst Output result. 3561bd4fe43Sopenharmony_ci* IVE_MAP_CTRL_S *pstMapCtrl Map control parameter. 3571bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 3581bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 3591bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1920x1080 pixels. 3601bd4fe43Sopenharmony_ci* The physical addresses of the input data and output data must be 16-byte-aligned. 3611bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 3621bd4fe43Sopenharmony_ci*****************************************************************************/ 3631bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_Map(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc, IVE_SRC_MEM_INFO_S *pstMap, 3641bd4fe43Sopenharmony_ci IVE_DST_IMAGE_S *pstDst, IVE_MAP_CTRL_S *pstMapCtrl, HI_BOOL bInstant); 3651bd4fe43Sopenharmony_ci 3661bd4fe43Sopenharmony_ci/***************************************************************************** 3671bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_EqualizeHist 3681bd4fe43Sopenharmony_ci* Description : Enhance the input image's contrast through histogram equalization. 3691bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 3701bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc Input source.Only U8C1 input format 3711bd4fe43Sopenharmony_ci* is supported. 3721bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstDst Output result. 3731bd4fe43Sopenharmony_ci* IVE_EQUALIZEHIST_CTRL_S *pstEqualizeHistCtrl EqualizeHist control parameter. 3741bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 3751bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 3761bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1920x1080 pixels. 3771bd4fe43Sopenharmony_ci* The physical addresses of map data must be 16-byte-aligned. 3781bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 3791bd4fe43Sopenharmony_ci*****************************************************************************/ 3801bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_EqualizeHist(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc, IVE_DST_IMAGE_S *pstDst, 3811bd4fe43Sopenharmony_ci IVE_EQUALIZE_HIST_CTRL_S *pstEqualizeHistCtrl, HI_BOOL bInstant); 3821bd4fe43Sopenharmony_ci 3831bd4fe43Sopenharmony_ci/***************************************************************************** 3841bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_Add 3851bd4fe43Sopenharmony_ci* Description : Two gray images' Add operation. 3861bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 3871bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc1 Augend of the input source.Only the U8C1 input 3881bd4fe43Sopenharmony_ci* format is supported. 3891bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc2 Addend of the input source.Only the U8C1 input 3901bd4fe43Sopenharmony_ci* format is supported. 3911bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstDst Output result of src1 plus src2 3921bd4fe43Sopenharmony_ci* IVE_ADD_CTRL_S *pstAddCtrl Control parameter 3931bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 3941bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 3951bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1920x1080 pixels. 3961bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 3971bd4fe43Sopenharmony_ci* The types, widths, heights of two input sources must be the same. 3981bd4fe43Sopenharmony_ci*****************************************************************************/ 3991bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_Add(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc1, IVE_SRC_IMAGE_S *pstSrc2, 4001bd4fe43Sopenharmony_ci IVE_DST_IMAGE_S *pstDst, IVE_ADD_CTRL_S *pstAddCtrl, HI_BOOL bInstant); 4011bd4fe43Sopenharmony_ci 4021bd4fe43Sopenharmony_ci/***************************************************************************** 4031bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_Xor 4041bd4fe43Sopenharmony_ci* Description : Two binary images' Xor operation. 4051bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 4061bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc1 The input source1.Only the U8C1 input format is supported. 4071bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc2 The input source2. 4081bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstDst Output result 4091bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 4101bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 4111bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1920x1080 pixels. 4121bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 4131bd4fe43Sopenharmony_ci* The types, widths, heights of two input sources must be the same. 4141bd4fe43Sopenharmony_ci*****************************************************************************/ 4151bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_Xor(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc1, IVE_SRC_IMAGE_S *pstSrc2, 4161bd4fe43Sopenharmony_ci IVE_DST_IMAGE_S *pstDst, HI_BOOL bInstant); 4171bd4fe43Sopenharmony_ci 4181bd4fe43Sopenharmony_ci/***************************************************************************** 4191bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_NCC 4201bd4fe43Sopenharmony_ci* Description : Calculate two gray images' NCC (Normalized Cross Correlation). 4211bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 4221bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc1 Input source1. Only the U8C1 input format is supported. 4231bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc2 Input source2. Must be of the same type, size of source1. 4241bd4fe43Sopenharmony_ci* IVE_DST_MEM_INFO_S *pstDst Output result 4251bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 4261bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 4271bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1920x1024 pixels. 4281bd4fe43Sopenharmony_ci* The physical addresses of output data must be 16-byte-aligned. 4291bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 4301bd4fe43Sopenharmony_ci*****************************************************************************/ 4311bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_NCC(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc1, IVE_SRC_IMAGE_S *pstSrc2, 4321bd4fe43Sopenharmony_ci IVE_DST_MEM_INFO_S *pstDst, HI_BOOL bInstant); 4331bd4fe43Sopenharmony_ci 4341bd4fe43Sopenharmony_ci/***************************************************************************** 4351bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_CCL 4361bd4fe43Sopenharmony_ci* Description : Connected Component Labeling. Only 8-Connected method is supported. 4371bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 4381bd4fe43Sopenharmony_ci* IVE_IMAGE_S *pstSrcDst Input source 4391bd4fe43Sopenharmony_ci* IVE_MEM_INFO_S *pstBlob Output result of detected region; 4401bd4fe43Sopenharmony_ci* IVE_CCL_CTRL_S *pstCclCtrl CCL control parameter 4411bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 4421bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 4431bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 720x640 pixels. 4441bd4fe43Sopenharmony_ci* The physical addresses of the input data and output data must be 16-byte-aligned. 4451bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 4461bd4fe43Sopenharmony_ci*****************************************************************************/ 4471bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_CCL(IVE_HANDLE *pIveHandle, IVE_IMAGE_S *pstSrcDst, IVE_DST_MEM_INFO_S *pstBlob, 4481bd4fe43Sopenharmony_ci IVE_CCL_CTRL_S *pstCclCtrl, HI_BOOL bInstant); 4491bd4fe43Sopenharmony_ci 4501bd4fe43Sopenharmony_ci/***************************************************************************** 4511bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_GMM 4521bd4fe43Sopenharmony_ci* Description : Separate foreground and background using GMM(Gaussian Mixture Model) method; 4531bd4fe43Sopenharmony_ci* Gray or RGB GMM are supported. 4541bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 4551bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc Input source. Only support U8C1 or U8C3_PACKAGE input. 4561bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstFg Output foreground (Binary) image. 4571bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstBg Output background image. Of the sampe type of pstSrc. 4581bd4fe43Sopenharmony_ci* IVE_MEM_INFO_S *pstModel Model data. 4591bd4fe43Sopenharmony_ci* IVE_GMM_CTRL_S *pstGmmCtrl Control parameter. 4601bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 4611bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 4621bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 720x576 pixels. 4631bd4fe43Sopenharmony_ci* The physical addresses of the input data and output data must be 16-byte-aligned. 4641bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 4651bd4fe43Sopenharmony_ci*****************************************************************************/ 4661bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_GMM(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc, IVE_DST_IMAGE_S *pstFg, 4671bd4fe43Sopenharmony_ci IVE_DST_IMAGE_S *pstBg, IVE_MEM_INFO_S *pstModel, IVE_GMM_CTRL_S *pstGmmCtrl, HI_BOOL bInstant); 4681bd4fe43Sopenharmony_ci 4691bd4fe43Sopenharmony_ci/***************************************************************************** 4701bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_GMM2 4711bd4fe43Sopenharmony_ci* Description : Separate foreground and background using GMM(Gaussian Mixture Model) method; 4721bd4fe43Sopenharmony_ci* Gray or RGB GMM are supported. 4731bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 4741bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc Only U8C1 or U8C3_PACKAGE input are supported. 4751bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstFactor U16C1 input, low-8bits is sensitivity factor, 4761bd4fe43Sopenharmony_ci* and high-8bits is life update factor. 4771bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstFg Output foreground (Binary) image. 4781bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstBg Output background image. With same type of pstSrc. 4791bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstMatchModelInfo Output U8C1 match model info image. 4801bd4fe43Sopenharmony_ci* Low-1bit is match flag,and high-7bits is 4811bd4fe43Sopenharmony_ci* max freq index. 4821bd4fe43Sopenharmony_ci* IVE_MEM_INFO_S *pstModel Model data. 4831bd4fe43Sopenharmony_ci* IVE_GMM2_CTRL_S *pstGmm2Ctrl Control parameter. 4841bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 4851bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 4861bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1280x720 pixels. 4871bd4fe43Sopenharmony_ci* The physical addresses of the input data and output data must be 16-byte-aligned. 4881bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 4891bd4fe43Sopenharmony_ci*****************************************************************************/ 4901bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_GMM2(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc, IVE_SRC_IMAGE_S *pstFactor, 4911bd4fe43Sopenharmony_ci IVE_DST_IMAGE_S *pstFg, IVE_DST_IMAGE_S *pstBg, IVE_DST_IMAGE_S *pstMatchModelInfo, IVE_MEM_INFO_S *pstModel, 4921bd4fe43Sopenharmony_ci IVE_GMM2_CTRL_S *pstGmm2Ctrl, HI_BOOL bInstant); 4931bd4fe43Sopenharmony_ci 4941bd4fe43Sopenharmony_ci/***************************************************************************** 4951bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_CannyHysEdge 4961bd4fe43Sopenharmony_ci* Description : The first part of canny Edge detection. Including step: gradient calculation, 4971bd4fe43Sopenharmony_ci* magnitude and angle calculation, hysteresis threshold, NMS(Non-Maximum Suppression) 4981bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 4991bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc Input source. Only the U8C1 input 5001bd4fe43Sopenharmony_ci* format is supported 5011bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstEdge Output result. 5021bd4fe43Sopenharmony_ci* IVE_DST_MEM_INFO_S *pstStack OutPut stack for CannyEdge 5031bd4fe43Sopenharmony_ci* IVE_CANNY_HYS_EDGE_CTRL_S *pstCannyHysEdgeCtrl Control parameter. 5041bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 5051bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 5061bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1920x1024 pixels. 5071bd4fe43Sopenharmony_ci* The physical addresses of the input data and output data must be 16-byte-aligned. . 5081bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 5091bd4fe43Sopenharmony_ci*****************************************************************************/ 5101bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_CannyHysEdge(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc, IVE_DST_IMAGE_S *pstEdge, 5111bd4fe43Sopenharmony_ci IVE_DST_MEM_INFO_S *pstStack, IVE_CANNY_HYS_EDGE_CTRL_S *pstCannyHysEdgeCtrl, HI_BOOL bInstant); 5121bd4fe43Sopenharmony_ci 5131bd4fe43Sopenharmony_ci/***************************************************************************** 5141bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_CannyEdge 5151bd4fe43Sopenharmony_ci* Description : The second part of canny Edge detection: trace strong edge by weak edge. 5161bd4fe43Sopenharmony_ci* Parameters : IVE_IMAGE_S *pstEdge Input and Output source. Only the U8C1 format is supported 5171bd4fe43Sopenharmony_ci* IVE_MEM_INFO_S *pstStack stack for CannyEdge 5181bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 5191bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1920x1024 pixels. 5201bd4fe43Sopenharmony_ci* The physical addresses of the input data and output data must be 16-byte-aligned. 5211bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 5221bd4fe43Sopenharmony_ci*****************************************************************************/ 5231bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_CannyEdge(IVE_IMAGE_S *pstEdge, IVE_MEM_INFO_S *pstStack); 5241bd4fe43Sopenharmony_ci 5251bd4fe43Sopenharmony_ci/***************************************************************************** 5261bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_LBP 5271bd4fe43Sopenharmony_ci* Description : LBP calculation using the original method and a extensional method. 5281bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 5291bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc Input source.Only the U8C1 input format is supported. 5301bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstDst Output result 5311bd4fe43Sopenharmony_ci* IVE_LBP_CTRL_S *pstLbpCtrl Control parameter 5321bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 5331bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 5341bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1920x1024 pixels. 5351bd4fe43Sopenharmony_ci* The physical addresses of the input data and output data must be 16-byte-aligned. 5361bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 5371bd4fe43Sopenharmony_ci*****************************************************************************/ 5381bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_LBP(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc, IVE_DST_IMAGE_S *pstDst, 5391bd4fe43Sopenharmony_ci IVE_LBP_CTRL_S *pstLbpCtrl, HI_BOOL bInstant); 5401bd4fe43Sopenharmony_ci 5411bd4fe43Sopenharmony_ci/***************************************************************************** 5421bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_NormGrad 5431bd4fe43Sopenharmony_ci* Description : Gradient calculation and the output is normalized to S8. 5441bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 5451bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc Input source data 5461bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstDstH The (horizontal) result of input image filtered 5471bd4fe43Sopenharmony_ci* by the input mask 5481bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstDstV The (vertical) result of input image filtered 5491bd4fe43Sopenharmony_ci* by the transposed mask 5501bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstDstHV Output the horizontal and vertical component 5511bd4fe43Sopenharmony_ci* in single image in package format. 5521bd4fe43Sopenharmony_ci* IVE_NORM_GRAD_CTRL_S *pstNormGradCtrl Control parameter 5531bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 5541bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 5551bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1920x1024 pixels. 5561bd4fe43Sopenharmony_ci* The physical addresses of the input data and output data must be 16-byte-aligned. 5571bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 5581bd4fe43Sopenharmony_ci*****************************************************************************/ 5591bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_NormGrad(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc, IVE_DST_IMAGE_S *pstDstH, 5601bd4fe43Sopenharmony_ci IVE_DST_IMAGE_S *pstDstV, IVE_DST_IMAGE_S *pstDstHV, IVE_NORM_GRAD_CTRL_S *pstNormGradCtrl, HI_BOOL bInstant); 5611bd4fe43Sopenharmony_ci 5621bd4fe43Sopenharmony_ci/***************************************************************************** 5631bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_LKOpticalFlowPyr 5641bd4fe43Sopenharmony_ci* Description : Calculate LK Optical Flow using multi-layer of the pyramid-images. 5651bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 5661bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S astSrcPrevPyr Prev-frame's pyramid. 5671bd4fe43Sopenharmony_ci* Must be U8C1 images. 5681bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S astSrcNextPyr Next-frame's pyramid. Same size and 5691bd4fe43Sopenharmony_ci* type with astSrcPrePyr. 5701bd4fe43Sopenharmony_ci* IVE_SRC_MEM_INFO_S *pstPrevPts Intresting points on astSrcPrePyr[0]. 5711bd4fe43Sopenharmony_ci* IVE_MEM_INFO_S *pstNextPts Output points. When bUseInitFlow is 5721bd4fe43Sopenharmony_ci* true, must have the same size of 5731bd4fe43Sopenharmony_ci* pstPrevPts as input. 5741bd4fe43Sopenharmony_ci* IVE_LK_OPTICAL_FLOW_PYR_CTRL_S *pstLkOptiFlowCtrl Control parameters. 5751bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 5761bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 5771bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1280x720 pixels. 5781bd4fe43Sopenharmony_ci* The physical addresses of the input data and output data must be 16-byte-aligned. 5791bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 5801bd4fe43Sopenharmony_ci****************************************************************************/ 5811bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_LKOpticalFlowPyr(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S astSrcPrevPyr[], 5821bd4fe43Sopenharmony_ci IVE_SRC_IMAGE_S astSrcNextPyr[], IVE_SRC_MEM_INFO_S *pstPrevPts, IVE_MEM_INFO_S *pstNextPts, 5831bd4fe43Sopenharmony_ci IVE_DST_MEM_INFO_S *pstStatus, IVE_DST_MEM_INFO_S *pstErr, IVE_LK_OPTICAL_FLOW_PYR_CTRL_S *pstLkOptiFlowPyrCtrl, 5841bd4fe43Sopenharmony_ci HI_BOOL bInstant); 5851bd4fe43Sopenharmony_ci 5861bd4fe43Sopenharmony_ci/***************************************************************************** 5871bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_STCandiCorner 5881bd4fe43Sopenharmony_ci* Description : The first part of corners detection using Shi-Tomasi-like method: calculate 5891bd4fe43Sopenharmony_ci* candidate corners. 5901bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 5911bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc Input source data 5921bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstCandiCorner Output result of eig 5931bd4fe43Sopenharmony_ci* IVE_ST_CANDI_CORNER_CTRL_S *pstStCandiCornerCtrl Control parameter 5941bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 5951bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 5961bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 720x576 pixels. 5971bd4fe43Sopenharmony_ci* The physical addresses of the input data and output data must be 16-byte-aligned. 5981bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 5991bd4fe43Sopenharmony_ci*****************************************************************************/ 6001bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_STCandiCorner(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc, 6011bd4fe43Sopenharmony_ci IVE_DST_IMAGE_S *pstCandiCorner, IVE_ST_CANDI_CORNER_CTRL_S *pstStCandiCornerCtrl, HI_BOOL bInstant); 6021bd4fe43Sopenharmony_ci 6031bd4fe43Sopenharmony_ci/***************************************************************************** 6041bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_STCorner 6051bd4fe43Sopenharmony_ci* Description : The second part of corners detection using Shi-Tomasi-like method: 6061bd4fe43Sopenharmony_ci* select corners by certain rules. 6071bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstCandiCorner Input source data 6081bd4fe43Sopenharmony_ci* IVE_DST_MEM_INFO_S *pstCorner Output result of Corner 6091bd4fe43Sopenharmony_ci* IVE_ST_CORNER_CTRL_S *pstStCornerCtrl Control parameter 6101bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 6111bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 720x576 pixels. 6121bd4fe43Sopenharmony_ci* The physical addresses of the input data and output data must be 16-byte-aligned. 6131bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 6141bd4fe43Sopenharmony_ci*****************************************************************************/ 6151bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_STCorner(IVE_SRC_IMAGE_S *pstCandiCorner, IVE_DST_MEM_INFO_S *pstCorner, 6161bd4fe43Sopenharmony_ci IVE_ST_CORNER_CTRL_S *pstStCornerCtrl); 6171bd4fe43Sopenharmony_ci 6181bd4fe43Sopenharmony_ci/***************************************************************************** 6191bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_GradFg 6201bd4fe43Sopenharmony_ci* Description : 6211bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 6221bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstBgDiffFg Background subtraction foreground image 6231bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstCurGrad Current gradient image, both horizontally and vertically 6241bd4fe43Sopenharmony_ci* graded in accordance with [xyxyxy ...] format 6251bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstBgGrad Background gradient image 6261bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstGradFg Gradient foreground image 6271bd4fe43Sopenharmony_ci* IVE_GRAD_FG_CTRL_S *pstGradFgCtrl Gradient calculation parameters 6281bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 6291bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 6301bd4fe43Sopenharmony_ci* Spec : None 6311bd4fe43Sopenharmony_ci*****************************************************************************/ 6321bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_GradFg(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstBgDiffFg, IVE_SRC_IMAGE_S *pstCurGrad, 6331bd4fe43Sopenharmony_ci IVE_SRC_IMAGE_S *pstBgGrad, IVE_DST_IMAGE_S *pstGradFg, IVE_GRAD_FG_CTRL_S *pstGradFgCtrl, HI_BOOL bInstant); 6341bd4fe43Sopenharmony_ci 6351bd4fe43Sopenharmony_ci/***************************************************************************** 6361bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_MatchBgModel 6371bd4fe43Sopenharmony_ci* Description : 6381bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 6391bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstCurImg Current grayscale image 6401bd4fe43Sopenharmony_ci* IVE_DATA_S *pstBgModel Background model data 6411bd4fe43Sopenharmony_ci* IVE_IMAGE_S *pstFgFlag Foreground status image 6421bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstBgDiffFg Foreground image obtained by background 6431bd4fe43Sopenharmony_ci* matching, the background pixel value 6441bd4fe43Sopenharmony_ci* is 0, the foreground pixel value is 6451bd4fe43Sopenharmony_ci* the gray difference value 6461bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstFrmDiffFg Foreground image obtained by interframe 6471bd4fe43Sopenharmony_ci* difference, the background pixel value 6481bd4fe43Sopenharmony_ci* is 0, the foreground pixel value is 6491bd4fe43Sopenharmony_ci* the gray difference value 6501bd4fe43Sopenharmony_ci* IVE_DST_MEM_INFO_S *pstStatData Result status data 6511bd4fe43Sopenharmony_ci* IVE_MATCH_BG_MODEL_CTRL_S *pstMatchBgModelCtrl Background matching parameters 6521bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 6531bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 6541bd4fe43Sopenharmony_ci* Spec : None 6551bd4fe43Sopenharmony_ci*****************************************************************************/ 6561bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_MatchBgModel(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstCurImg, IVE_DATA_S *pstBgModel, 6571bd4fe43Sopenharmony_ci IVE_IMAGE_S *pstFgFlag, IVE_DST_IMAGE_S *pstBgDiffFg, IVE_DST_IMAGE_S *pstFrmDiffFg, 6581bd4fe43Sopenharmony_ci IVE_DST_MEM_INFO_S *pstStatData, IVE_MATCH_BG_MODEL_CTRL_S *pstMatchBgModelCtrl, HI_BOOL bInstant); 6591bd4fe43Sopenharmony_ci 6601bd4fe43Sopenharmony_ci/***************************************************************************** 6611bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_UpdateBgModel 6621bd4fe43Sopenharmony_ci* Description : 6631bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 6641bd4fe43Sopenharmony_ci* IVE_DATA_S *pstBgModel Background model data 6651bd4fe43Sopenharmony_ci* IVE_IMAGE_S *pstFgFlag Foreground status image 6661bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstBgImg Background grayscale image 6671bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstChgStaImg Change state life image, 6681bd4fe43Sopenharmony_ci* for still detection 6691bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstChgStaFg Change state grayscale image, 6701bd4fe43Sopenharmony_ci* for still detection 6711bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstChgStaLife Change state foreground image, 6721bd4fe43Sopenharmony_ci* for still detection 6731bd4fe43Sopenharmony_ci* IVE_DST_MEM_INFO_S *pstStatData result status data 6741bd4fe43Sopenharmony_ci* IVE_UPDATE_BG_MODEL_CTRL_S *pstUpdateBgModelCtrl Background update parameters 6751bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 6761bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 6771bd4fe43Sopenharmony_ci* Spec : None 6781bd4fe43Sopenharmony_ci*****************************************************************************/ 6791bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_UpdateBgModel(IVE_HANDLE *pIveHandle, IVE_DATA_S *pstBgModel, IVE_IMAGE_S *pstFgFlag, 6801bd4fe43Sopenharmony_ci IVE_DST_IMAGE_S *pstBgImg, IVE_DST_IMAGE_S *pstChgStaImg, IVE_DST_IMAGE_S *pstChgStaFg, 6811bd4fe43Sopenharmony_ci IVE_DST_IMAGE_S *pstChgStaLife, IVE_DST_MEM_INFO_S *pstStatData, IVE_UPDATE_BG_MODEL_CTRL_S *pstUpdateBgModelCtrl, 6821bd4fe43Sopenharmony_ci HI_BOOL bInstant); 6831bd4fe43Sopenharmony_ci 6841bd4fe43Sopenharmony_ci/***************************************************************************** 6851bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_ANN_MLP_LoadModel 6861bd4fe43Sopenharmony_ci* Description : Load ANN_MLP model data from ".bin" file. 6871bd4fe43Sopenharmony_ci* Parameters : HI_CHAR *pchFileName ANN_MLP model file name, must be ".bin" file. 6881bd4fe43Sopenharmony_ci* IVE_ANN_MLP_MODEL_S *pstAnnMlpModel ANN_MLP model data. 6891bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 6901bd4fe43Sopenharmony_ci* Spec : None 6911bd4fe43Sopenharmony_ci*****************************************************************************/ 6921bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_ANN_MLP_LoadModel(const HI_CHAR *pchFileName, IVE_ANN_MLP_MODEL_S *pstAnnMlpModel); 6931bd4fe43Sopenharmony_ci 6941bd4fe43Sopenharmony_ci/***************************************************************************** 6951bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_ANN_MLP_UnloadModel 6961bd4fe43Sopenharmony_ci* Description : Unload ANN_MLP model data. 6971bd4fe43Sopenharmony_ci* Parameters : IVE_ANN_MLP_MODEL_S *pstAnnMlpModel ANN_MLP model data. 6981bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 6991bd4fe43Sopenharmony_ci* Spec : None 7001bd4fe43Sopenharmony_ci*****************************************************************************/ 7011bd4fe43Sopenharmony_ciHI_VOID HI_MPI_IVE_ANN_MLP_UnloadModel(IVE_ANN_MLP_MODEL_S *pstAnnMlpModel); 7021bd4fe43Sopenharmony_ci 7031bd4fe43Sopenharmony_ci/***************************************************************************** 7041bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_ANN_MLP_Predict 7051bd4fe43Sopenharmony_ci* Description : 7061bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 7071bd4fe43Sopenharmony_ci* IVE_SRC_DATA_S *pstSrc Input samples 7081bd4fe43Sopenharmony_ci* IVE_SRC_MEM_INFO_S *pstActivFuncTable Look-up talbe for active function 7091bd4fe43Sopenharmony_ci* IVE_ANN_MLP_MODEL_S *pstAnnMlpModel ANN_MLP model 7101bd4fe43Sopenharmony_ci* IVE_DST_DATA_S *pstDst Output layers of every intput sample 7111bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 7121bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 7131bd4fe43Sopenharmony_ci* Spec : None 7141bd4fe43Sopenharmony_ci*****************************************************************************/ 7151bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_ANN_MLP_Predict(IVE_HANDLE *pIveHandle, IVE_SRC_DATA_S *pstSrc, 7161bd4fe43Sopenharmony_ci IVE_LOOK_UP_TABLE_S *pstActivFuncTab, IVE_ANN_MLP_MODEL_S *pstAnnMlpModel, IVE_DST_DATA_S *pstDst, 7171bd4fe43Sopenharmony_ci HI_BOOL bInstant); 7181bd4fe43Sopenharmony_ci 7191bd4fe43Sopenharmony_ci/***************************************************************************** 7201bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_SVM_LoadModel 7211bd4fe43Sopenharmony_ci* Description : Load SVM model data from ".bin" file. 7221bd4fe43Sopenharmony_ci* Parameters : HI_CHAR *pchFileName SVM model file name, must be ".bin" file. 7231bd4fe43Sopenharmony_ci* IVE_SVM_MODEL_S *pstSvmModel SVM model data. 7241bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 7251bd4fe43Sopenharmony_ci* Spec : None 7261bd4fe43Sopenharmony_ci*****************************************************************************/ 7271bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_SVM_LoadModel(const HI_CHAR *pchFileName, IVE_SVM_MODEL_S *pstSvmModel); 7281bd4fe43Sopenharmony_ci 7291bd4fe43Sopenharmony_ci/***************************************************************************** 7301bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_SVM_UnloadModel 7311bd4fe43Sopenharmony_ci* Description : Unload SVM model data. 7321bd4fe43Sopenharmony_ci* Parameters : IVE_SVM_MODEL_S *pstSvmModel SVM model data. 7331bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 7341bd4fe43Sopenharmony_ci* Spec : None 7351bd4fe43Sopenharmony_ci*****************************************************************************/ 7361bd4fe43Sopenharmony_ciHI_VOID HI_MPI_IVE_SVM_UnloadModel(IVE_SVM_MODEL_S *pstSvmModel); 7371bd4fe43Sopenharmony_ci 7381bd4fe43Sopenharmony_ci/***************************************************************************** 7391bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_SVM_Predict 7401bd4fe43Sopenharmony_ci* Description : 7411bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 7421bd4fe43Sopenharmony_ci* IVE_SRC_DATA_S *pstSrc Input sample 7431bd4fe43Sopenharmony_ci* IVE_SRC_MEM_INFO_S *pstKernelTable Look-up talbe for active function 7441bd4fe43Sopenharmony_ci* IVE_SVM_MODEL_S *pstSvmModel SVM model 7451bd4fe43Sopenharmony_ci* IVE_SRC_DATA_S *pstDstVote Output Votes' array of each class 7461bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 7471bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 7481bd4fe43Sopenharmony_ci* Spec : None 7491bd4fe43Sopenharmony_ci*****************************************************************************/ 7501bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_SVM_Predict(IVE_HANDLE *pIveHandle, IVE_SRC_DATA_S *pstSrc, IVE_LOOK_UP_TABLE_S *pstKernelTab, 7511bd4fe43Sopenharmony_ci IVE_SVM_MODEL_S *pstSvmModel, IVE_DST_DATA_S *pstDstVote, HI_BOOL bInstant); 7521bd4fe43Sopenharmony_ci 7531bd4fe43Sopenharmony_ci/***************************************************************************** 7541bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_SAD 7551bd4fe43Sopenharmony_ci* Description : Sum of absolute differences. 7561bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 7571bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc1 The input source1.Only the U8C1 input format is supported. 7581bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc2 The input source2.Only the U8C1 input format is supported. 7591bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstSad Output result of sad value.Only the U8C1/U16C1 format is 7601bd4fe43Sopenharmony_ci* supported. 7611bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S *pstThr Output result of thresh.Only the U8C1 format is supported. 7621bd4fe43Sopenharmony_ci* IVE_SAD_CTRL_S *pstSadCtrl Control parameter 7631bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 7641bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 7651bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 64x64 pixels to 1920x1080 pixels. 7661bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 7671bd4fe43Sopenharmony_ci* The types, widths, heights of two input sources must be the same. 7681bd4fe43Sopenharmony_ci*****************************************************************************/ 7691bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_SAD(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc1, IVE_SRC_IMAGE_S *pstSrc2, 7701bd4fe43Sopenharmony_ci IVE_DST_IMAGE_S *pstSad, IVE_DST_IMAGE_S *pstThr, IVE_SAD_CTRL_S *pstSadCtrl, HI_BOOL bInstant); 7711bd4fe43Sopenharmony_ci 7721bd4fe43Sopenharmony_ci/***************************************************************************** 7731bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_Resize 7741bd4fe43Sopenharmony_ci* Description : Resize. 7751bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 7761bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S astSrc[] The input source.Only the U8C1/U8C3_PLANAR input format 7771bd4fe43Sopenharmony_ci* is supported. 7781bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S astDst[] Output result.Only the U8C1/U8C3_PLANAR format is 7791bd4fe43Sopenharmony_ci* supported. 7801bd4fe43Sopenharmony_ci* IVE_RESIZE_CTRL_S *pstResizeCtrl Control parameter 7811bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 7821bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 7831bd4fe43Sopenharmony_ci* Spec : The size of the input data ranges from 32x16 pixels to 1920x1080 pixels. 7841bd4fe43Sopenharmony_ci* The stride must be 16-pixel-aligned. 7851bd4fe43Sopenharmony_ci*****************************************************************************/ 7861bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_Resize(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S astSrc[], IVE_DST_IMAGE_S astDst[], 7871bd4fe43Sopenharmony_ci IVE_RESIZE_CTRL_S *pstResizeCtrl, HI_BOOL bInstant); 7881bd4fe43Sopenharmony_ci 7891bd4fe43Sopenharmony_ci/***************************************************************************** 7901bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_CNN_LoadModel 7911bd4fe43Sopenharmony_ci* Description : Load CNN model data from ".bin" file. 7921bd4fe43Sopenharmony_ci* Parameters : HI_CHAR *pchFileName CNN model file name, must be ".bin" file. 7931bd4fe43Sopenharmony_ci* IVE_CNN_MODEL_S *pstCnnModel CNN model data. 7941bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 7951bd4fe43Sopenharmony_ci* Spec : None 7961bd4fe43Sopenharmony_ci*****************************************************************************/ 7971bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_CNN_LoadModel(const HI_CHAR *pchFileName, IVE_CNN_MODEL_S *pstCnnModel); 7981bd4fe43Sopenharmony_ci 7991bd4fe43Sopenharmony_ci/***************************************************************************** 8001bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_CNN_UnloadModel 8011bd4fe43Sopenharmony_ci* Description : Unload CNN model data and release memory. 8021bd4fe43Sopenharmony_ci* Parameters : IVE_CNN_MODEL_S *pstCnnModel CNN model data. 8031bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 8041bd4fe43Sopenharmony_ci* Spec : None 8051bd4fe43Sopenharmony_ci*****************************************************************************/ 8061bd4fe43Sopenharmony_ciHI_VOID HI_MPI_IVE_CNN_UnloadModel(IVE_CNN_MODEL_S *pstCnnModel); 8071bd4fe43Sopenharmony_ci 8081bd4fe43Sopenharmony_ci/***************************************************************************** 8091bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_CNN_Predict 8101bd4fe43Sopenharmony_ci* Description : Perform CNN prediction on input sample(s), and output responses for 8111bd4fe43Sopenharmony_ci* corresponding sample(s) 8121bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 8131bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S astSrc[] Input images array. Only the U8C1 and U8C3_PLANAR input 8141bd4fe43Sopenharmony_ci* are supported 8151bd4fe43Sopenharmony_ci* IVE_CNN_MODEL_S *pstCnnModel CNN model data 8161bd4fe43Sopenharmony_ci* IVE_CNN_CTRL_S *pstCnnCtrl CNN control parameter 8171bd4fe43Sopenharmony_ci* IVE_DST_DATA_S *pstDst Output vectors of CNN_Predict 8181bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 8191bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success; Error codes: Failure. 8201bd4fe43Sopenharmony_ci* Spec : The stride must be 16-pixel-aligned. 8211bd4fe43Sopenharmony_ci* The types, widths, heights and strides of input images must be the same. 8221bd4fe43Sopenharmony_ci*****************************************************************************/ 8231bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_CNN_Predict(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S astSrc[], IVE_CNN_MODEL_S *pstCnnModel, 8241bd4fe43Sopenharmony_ci IVE_DST_DATA_S *pstDst, IVE_CNN_CTRL_S *pstCnnCtrl, HI_BOOL bInstant); 8251bd4fe43Sopenharmony_ci 8261bd4fe43Sopenharmony_ci/***************************************************************************** 8271bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_CNN_GetResult 8281bd4fe43Sopenharmony_ci* Description : Calculate classification and confidence with CNN output by softmax regression. 8291bd4fe43Sopenharmony_ci* Parameters : IVE_SRC_DATA_S *pstSrc The result of CNN_Predict output. 8301bd4fe43Sopenharmony_ci* IVE_DST_MEM_INFO_S *pstDst The prediction about classification label 8311bd4fe43Sopenharmony_ci* index and confidence. 8321bd4fe43Sopenharmony_ci* IVE_CNN_MODEL_S *pstpstCnnModel CNN model data 8331bd4fe43Sopenharmony_ci* IVE_CNN_CTRL_S *pstCnnCtrl CNN control parameter 8341bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 8351bd4fe43Sopenharmony_ci* Spec : None 8361bd4fe43Sopenharmony_ci*****************************************************************************/ 8371bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_CNN_GetResult(IVE_SRC_DATA_S *pstSrc, IVE_DST_MEM_INFO_S *pstDst, 8381bd4fe43Sopenharmony_ci IVE_CNN_MODEL_S *pstCnnModel, IVE_CNN_CTRL_S *pstCnnCtrl); 8391bd4fe43Sopenharmony_ci 8401bd4fe43Sopenharmony_ci/***************************************************************************** 8411bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_PerspTrans 8421bd4fe43Sopenharmony_ci* Description : Perspective transform 8431bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task. 8441bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc The input source.Only the U8C1/YUVSP420 input 8451bd4fe43Sopenharmony_ci* format is supported. 8461bd4fe43Sopenharmony_ci* IVE_RECT_U32_S astRoi[] Roi array. 8471bd4fe43Sopenharmony_ci* IVE_SRC_MEM_INFO_S astPointPair[] Point pair array. 8481bd4fe43Sopenharmony_ci* IVE_DST_IMAGE_S astDst[] Output result.Only the U8C1/YUVSP420/ 8491bd4fe43Sopenharmony_ci* U8C3_PACKAGE format is supported. 8501bd4fe43Sopenharmony_ci* IVE_PERSP_TRANS_CTRL_S *pstPerspTransCtrl PerspTrans control parameter. 8511bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 8521bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 8531bd4fe43Sopenharmony_ci* Spec : The stride must be 16-pixel-aligned. 8541bd4fe43Sopenharmony_ci*****************************************************************************/ 8551bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_PerspTrans(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc, IVE_RECT_U32_S astRoi[], 8561bd4fe43Sopenharmony_ci IVE_SRC_MEM_INFO_S astPointPair[], IVE_DST_IMAGE_S astDst[], IVE_PERSP_TRANS_CTRL_S *pstPerspTransCtrl, 8571bd4fe43Sopenharmony_ci HI_BOOL bInstant); 8581bd4fe43Sopenharmony_ci 8591bd4fe43Sopenharmony_ci/***************************************************************************** 8601bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_KCF_GetMemSize 8611bd4fe43Sopenharmony_ci* Description : KCF get object memory size 8621bd4fe43Sopenharmony_ci* Parameters : HI_U32 u32MaxObjNum The maximum numbers of tracking object. 8631bd4fe43Sopenharmony_ci* HI_U32 *pu32Size memmory size. 8641bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 8651bd4fe43Sopenharmony_ci* Spec : None 8661bd4fe43Sopenharmony_ci*****************************************************************************/ 8671bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_KCF_GetMemSize(HI_U32 u32MaxObjNum, HI_U32 *pu32Size); 8681bd4fe43Sopenharmony_ci 8691bd4fe43Sopenharmony_ci/***************************************************************************** 8701bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_KCF_CreateObjList 8711bd4fe43Sopenharmony_ci* Description : KCF creste object list 8721bd4fe43Sopenharmony_ci* Parameters : IVE_MEM_INFO_S *pstMem The memory of object for object list. 8731bd4fe43Sopenharmony_ci* HI_U32 u32MaxObjNum The maximum numbers of tracking object (list node). 8741bd4fe43Sopenharmony_ci* IVE_KCF_OBJ_LIST_S *pstObjList The object list. 8751bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 8761bd4fe43Sopenharmony_ci* Spec : None 8771bd4fe43Sopenharmony_ci*****************************************************************************/ 8781bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_KCF_CreateObjList(IVE_MEM_INFO_S *pstMem, HI_U32 u32MaxObjNum, 8791bd4fe43Sopenharmony_ci IVE_KCF_OBJ_LIST_S *pstObjList); 8801bd4fe43Sopenharmony_ci 8811bd4fe43Sopenharmony_ci/***************************************************************************** 8821bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_KCF_DestroyObjList 8831bd4fe43Sopenharmony_ci* Description : KCF destroy object list 8841bd4fe43Sopenharmony_ci* Parameters : IVE_KCF_OBJ_LIST_S *pstObjList The object list. 8851bd4fe43Sopenharmony_ci* 8861bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 8871bd4fe43Sopenharmony_ci* Spec : None 8881bd4fe43Sopenharmony_ci*****************************************************************************/ 8891bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_KCF_DestroyObjList(IVE_KCF_OBJ_LIST_S *pstObjList); 8901bd4fe43Sopenharmony_ci 8911bd4fe43Sopenharmony_ci/***************************************************************************** 8921bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_KCF_CreateGaussPeak 8931bd4fe43Sopenharmony_ci* Description : KCF calculate gauss peak 8941bd4fe43Sopenharmony_ci* Parameters : HI_U3Q5 u3q5Padding The multiple of roi rectangle's width and height. 8951bd4fe43Sopenharmony_ci* IVE_DST_MEM_INFO_S *pstGaussPeak The memory of gauss peak. 8961bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 8971bd4fe43Sopenharmony_ci* Spec : None 8981bd4fe43Sopenharmony_ci*****************************************************************************/ 8991bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_KCF_CreateGaussPeak(HI_U3Q5 u3q5Padding, IVE_DST_MEM_INFO_S *pstGaussPeak); 9001bd4fe43Sopenharmony_ci 9011bd4fe43Sopenharmony_ci/***************************************************************************** 9021bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_KCF_CreateCosWin 9031bd4fe43Sopenharmony_ci* Description : KCF calculate cos window x and y. 9041bd4fe43Sopenharmony_ci* Parameters : IVE_DST_MEM_INFO_S *pstCosWinX The memory of cos window x. 9051bd4fe43Sopenharmony_ci* IVE_DST_MEM_INFO_S *pstCosWinY The memory of cos window y. 9061bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 9071bd4fe43Sopenharmony_ci* Spec : None 9081bd4fe43Sopenharmony_ci*****************************************************************************/ 9091bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_KCF_CreateCosWin(IVE_DST_MEM_INFO_S *pstCosWinX, IVE_DST_MEM_INFO_S *pstCosWinY); 9101bd4fe43Sopenharmony_ci 9111bd4fe43Sopenharmony_ci/***************************************************************************** 9121bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_KCF_GetTrainObj 9131bd4fe43Sopenharmony_ci* Description : KCF get train object. 9141bd4fe43Sopenharmony_ci* Parameters : HI_U3Q5 u3q5Padding The multiple of roi rectangle's width and height. 9151bd4fe43Sopenharmony_ci* IVE_ROI_INFO_S astRoiInfo[] The array of roi information. 9161bd4fe43Sopenharmony_ci* HI_U32 u32ObjNum The numbers of RoiInfo and object. 9171bd4fe43Sopenharmony_ci* IVE_MEM_INFO_S *pstCosWinX The memory of cos window x. 9181bd4fe43Sopenharmony_ci* IVE_MEM_INFO_S *pstCosWinY The memory of cos window y. 9191bd4fe43Sopenharmony_ci* IVE_MEM_INFO_S *pstGaussPeak The memory of gauss peak. 9201bd4fe43Sopenharmony_ci* IVE_KCF_OBJ_LIST_S *pstObjList The object list. 9211bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 9221bd4fe43Sopenharmony_ci* Spec : None 9231bd4fe43Sopenharmony_ci*****************************************************************************/ 9241bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_KCF_GetTrainObj(HI_U3Q5 u3q5Padding, IVE_ROI_INFO_S astRoiInfo[], HI_U32 u32ObjNum, 9251bd4fe43Sopenharmony_ci IVE_MEM_INFO_S *pstCosWinX, IVE_MEM_INFO_S *pstCosWinY, IVE_MEM_INFO_S *pstGaussPeak, 9261bd4fe43Sopenharmony_ci IVE_KCF_OBJ_LIST_S *pstObjList); 9271bd4fe43Sopenharmony_ci 9281bd4fe43Sopenharmony_ci/***************************************************************************** 9291bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_KCF_Process 9301bd4fe43Sopenharmony_ci* Description : KCF process. 9311bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task 9321bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc Input source.Only the YUV420SP inpu format is supported. 9331bd4fe43Sopenharmony_ci* IVE_KCF_OBJ_LIST_S *pstObjList The object list. 9341bd4fe43Sopenharmony_ci* IVE_KCF_PRO_CTRL_S *pstKcfProCtrl Control parameter. 9351bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 9361bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 9371bd4fe43Sopenharmony_ci* Spec : None 9381bd4fe43Sopenharmony_ci*****************************************************************************/ 9391bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_KCF_Process(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc, IVE_KCF_OBJ_LIST_S *pstObjList, 9401bd4fe43Sopenharmony_ci IVE_KCF_PRO_CTRL_S *pstKcfProCtrl, HI_BOOL bInstant); 9411bd4fe43Sopenharmony_ci 9421bd4fe43Sopenharmony_ci/***************************************************************************** 9431bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_KCF_GetObjBbox 9441bd4fe43Sopenharmony_ci* Description : KCF get track object bbox information. 9451bd4fe43Sopenharmony_ci* Parameters : IVE_KCF_OBJ_LIST_S *pstObjList The object list. 9461bd4fe43Sopenharmony_ci* IVE_KCF_BBOX_S astBbox The output bbox of object. 9471bd4fe43Sopenharmony_ci* HI_U32 *pu32BboxObjNum The valid numbers of output bbox. 9481bd4fe43Sopenharmony_ci* IVE_KCF_BBOX_CTRL_S *pstKcfBboxCtrl Control parameter. 9491bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 9501bd4fe43Sopenharmony_ci* Spec : None 9511bd4fe43Sopenharmony_ci*****************************************************************************/ 9521bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_KCF_GetObjBbox(IVE_KCF_OBJ_LIST_S *pstObjList, IVE_KCF_BBOX_S astBbox[], 9531bd4fe43Sopenharmony_ci HI_U32 *pu32BboxObjNum, IVE_KCF_BBOX_CTRL_S *pstKcfBboxCtrl); 9541bd4fe43Sopenharmony_ci 9551bd4fe43Sopenharmony_ci/***************************************************************************** 9561bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_KCF_JudgeObjBboxTrackState 9571bd4fe43Sopenharmony_ci* Description : KCF judge object tracking state. 9581bd4fe43Sopenharmony_ci* Parameters : IVE_KCF_OBJ_LIST_S *pstObjList The object list. 9591bd4fe43Sopenharmony_ci* IVE_KCF_BBOX_S *pstBbox The bbox of object. 9601bd4fe43Sopenharmony_ci* HI_BOOL *pbTrackOk The tracking state of object. 9611bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 9621bd4fe43Sopenharmony_ci* Spec : None 9631bd4fe43Sopenharmony_ci*****************************************************************************/ 9641bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_KCF_JudgeObjBboxTrackState(IVE_ROI_INFO_S *pstRoiInfo, IVE_KCF_BBOX_S *pstBbox, 9651bd4fe43Sopenharmony_ci HI_BOOL *pbTrackOk); 9661bd4fe43Sopenharmony_ci 9671bd4fe43Sopenharmony_ci/***************************************************************************** 9681bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_KCF_ObjUpdate 9691bd4fe43Sopenharmony_ci* Description : KCF update object. 9701bd4fe43Sopenharmony_ci* Parameters : IVE_KCF_OBJ_LIST_S *pstObjList The object list. 9711bd4fe43Sopenharmony_ci* IVE_KCF_BBOX_S astBbox The bbox information of update object. 9721bd4fe43Sopenharmony_ci* HI_U32 u32BboxObjNum The update numbers of bbox. 9731bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 9741bd4fe43Sopenharmony_ci* Spec : None 9751bd4fe43Sopenharmony_ci*****************************************************************************/ 9761bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_KCF_ObjUpdate(IVE_KCF_OBJ_LIST_S *pstObjList, IVE_KCF_BBOX_S astBbox[], 9771bd4fe43Sopenharmony_ci HI_U32 u32BboxObjNum); 9781bd4fe43Sopenharmony_ci 9791bd4fe43Sopenharmony_ci/***************************************************************************** 9801bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_Hog 9811bd4fe43Sopenharmony_ci* Description : get Hog feature. 9821bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE *pIveHandle Returned handle ID of a task. 9831bd4fe43Sopenharmony_ci* IVE_SRC_IMAGE_S *pstSrc Input source.Only the YUV420SP inpu format is supported. 9841bd4fe43Sopenharmony_ci* IVE_RECT_U32_S astRoi[] The array of roi. 9851bd4fe43Sopenharmony_ci* IVE_DST_BLOB_S astDst[] The array of Hog feature. 9861bd4fe43Sopenharmony_ci* IVE_HOG_CTRL_S *pstHogCtrl Control parameter. 9871bd4fe43Sopenharmony_ci* HI_BOOL bInstant For details, see HI_MPI_IVE_DMA. 9881bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 9891bd4fe43Sopenharmony_ci* Spec : None 9901bd4fe43Sopenharmony_ci*****************************************************************************/ 9911bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_Hog(IVE_HANDLE *pIveHandle, IVE_SRC_IMAGE_S *pstSrc, IVE_RECT_U32_S astRoi[], 9921bd4fe43Sopenharmony_ci IVE_DST_BLOB_S astDst[], IVE_HOG_CTRL_S *pstHogCtrl, HI_BOOL bInstant); 9931bd4fe43Sopenharmony_ci 9941bd4fe43Sopenharmony_ci/***************************************************************************** 9951bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_Query 9961bd4fe43Sopenharmony_ci* Description : This API is used to query the status of a called function by using the returned 9971bd4fe43Sopenharmony_ci* IveHandle of the function. In block mode, the system waits until the function that 9981bd4fe43Sopenharmony_ci* is being queried is called. In non-block mode, the current status is queried and 9991bd4fe43Sopenharmony_ci* no action is taken. 10001bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE IveHandle IveHandle of a called function. It is entered by users. 10011bd4fe43Sopenharmony_ci* HI_BOOL *pbFinish Returned status 10021bd4fe43Sopenharmony_ci* HI_BOOL bBlock Flag indicating the block mode or non-block mode 10031bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 10041bd4fe43Sopenharmony_ci* Spec : None 10051bd4fe43Sopenharmony_ci*****************************************************************************/ 10061bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_Query(IVE_HANDLE IveHandle, HI_BOOL *pbFinish, HI_BOOL bBlock); 10071bd4fe43Sopenharmony_ci 10081bd4fe43Sopenharmony_ci/***************************************************************************** 10091bd4fe43Sopenharmony_ci* Prototype : HI_MPI_IVE_Query_Timeout 10101bd4fe43Sopenharmony_ci* Description : This API is used to query the status of a called function by using the returned 10111bd4fe43Sopenharmony_ci* IveHandle of the function. The system waits until it is timeout. It is never 10121bd4fe43Sopenharmony_ci* timeout when the s32MilliSec is -1. 10131bd4fe43Sopenharmony_ci* Parameters : IVE_HANDLE IveHandle IveHandle of a called function. It is entered by users. 10141bd4fe43Sopenharmony_ci* HI_S32 s32MilliSec Wait time,millisecond 10151bd4fe43Sopenharmony_ci* HI_BOOL *pbFinish Returned status 10161bd4fe43Sopenharmony_ci* Return Value : HI_SUCCESS: Success;Error codes: Failure. 10171bd4fe43Sopenharmony_ci* Spec : None 10181bd4fe43Sopenharmony_ci*****************************************************************************/ 10191bd4fe43Sopenharmony_ciHI_S32 HI_MPI_IVE_Query_Timeout(IVE_HANDLE IveHandle, HI_S32 s32MilliSec, HI_BOOL *pbFinish); 10201bd4fe43Sopenharmony_ci 10211bd4fe43Sopenharmony_ci#ifdef __cplusplus 10221bd4fe43Sopenharmony_ci#if __cplusplus 10231bd4fe43Sopenharmony_ci} 10241bd4fe43Sopenharmony_ci#endif 10251bd4fe43Sopenharmony_ci#endif 10261bd4fe43Sopenharmony_ci#endif