Sample to operate omron HVC-P2 on GR-PEACH.
Dependencies: AsciiFont
STBAPI.c
00001 /*---------------------------------------------------------------------------*/ 00002 /* Copyright(C) 2017 OMRON Corporation */ 00003 /* */ 00004 /* Licensed under the Apache License, Version 2.0 (the "License"); */ 00005 /* you may not use this file except in compliance with the License. */ 00006 /* You may obtain a copy of the License at */ 00007 /* */ 00008 /* http://www.apache.org/licenses/LICENSE-2.0 */ 00009 /* */ 00010 /* Unless required by applicable law or agreed to in writing, software */ 00011 /* distributed under the License is distributed on an "AS IS" BASIS, */ 00012 /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ 00013 /* See the License for the specific language governing permissions and */ 00014 /* limitations under the License. */ 00015 /*---------------------------------------------------------------------------*/ 00016 00017 #include "Interface.h" 00018 #include "STBAPI.h" 00019 00020 00021 /*This layer only defines the API function */ 00022 00023 /*get the version*/ 00024 STB_INT32 STB_GetVersion(STB_INT8* pnMajorVersion, STB_INT8* pnMinorVersion){ 00025 return GetVersion(pnMajorVersion, pnMinorVersion); 00026 } 00027 /*Create/Delete handle*/ 00028 HSTB STB_CreateHandle(STB_UINT32 stbExecFlg){ 00029 return (HSTB)CreateHandle(stbExecFlg); 00030 } 00031 VOID STB_DeleteHandle(HSTB handle){ 00032 DeleteHandle((STBHANDLE)handle); 00033 } 00034 /*set frame information*/ 00035 STB_INT32 STB_SetFrameResult(HSTB handle, const STB_FRAME_RESULT *stbINPUTResult){ 00036 return SetFrameResult((STBHANDLE)handle, stbINPUTResult); 00037 } 00038 STB_INT32 STB_ClearFrameResults(HSTB handle){ 00039 return Clear((STBHANDLE)handle); 00040 } 00041 /*Main process execution*/ 00042 STB_INT32 STB_Execute(HSTB handle){ 00043 return Execute((STBHANDLE)handle); 00044 } 00045 /*get the result*/ 00046 STB_INT32 STB_GetFaces(HSTB handle, STB_UINT32 *face_count, STB_FACE face[35]){ 00047 return GetFaces((STBHANDLE)handle, face_count, face); 00048 } 00049 STB_INT32 STB_GetBodies(HSTB handle, STB_UINT32 *body_count, STB_BODY body[35]){ 00050 return GetBodies((STBHANDLE)handle, body_count, body); 00051 } 00052 00053 /*Setting / Getting Function for tracking*/ 00054 STB_INT32 STB_SetTrRetryCount(HSTB hHandle, STB_INT32 nMaxRetryCount){ 00055 return SetTrackingRetryCount((STBHANDLE)hHandle, nMaxRetryCount); 00056 } 00057 STB_INT32 STB_GetTrRetryCount(HSTB hHandle, STB_INT32 *pnMaxRetryCount){ 00058 return GetTrackingRetryCount((STBHANDLE)hHandle, pnMaxRetryCount); 00059 } 00060 STB_INT32 STB_SetTrSteadinessParam(HSTB hHandle, STB_INT32 nPosSteadinessParam, STB_INT32 nSizeSteadinessParam){ 00061 return SetTrackingSteadinessParam((STBHANDLE)hHandle, nPosSteadinessParam, nSizeSteadinessParam); 00062 } 00063 STB_INT32 STB_GetTrSteadinessParam(HSTB hHandle, STB_INT32 *pnPosSteadinessParam, STB_INT32 *pnSizeSteadinessParam){ 00064 return GetTrackingSteadinessParam((STBHANDLE)hHandle, pnPosSteadinessParam, pnSizeSteadinessParam); 00065 } 00066 00067 /*Setting / Getting Function for property*/ 00068 STB_INT32 STB_SetPeThresholdUse(HSTB hHandle, STB_INT32 nThreshold){ 00069 return SetPropertyThreshold((STBHANDLE)hHandle, nThreshold); 00070 } 00071 STB_INT32 STB_GetPeThresholdUse(HSTB hHandle, STB_INT32 *pnThreshold){ 00072 return GetPropertyThreshold((STBHANDLE)hHandle, pnThreshold); 00073 } 00074 STB_INT32 STB_SetPeAngleUse(HSTB hHandle, STB_INT32 nMinUDAngle, STB_INT32 nMaxUDAngle, STB_INT32 nMinLRAngle, STB_INT32 nMaxLRAngle ){ 00075 return SetPropertyAngle((STBHANDLE)hHandle, nMinUDAngle, nMaxUDAngle, nMinLRAngle, nMaxLRAngle); 00076 } 00077 STB_INT32 STB_GetPeAngleUse(HSTB hHandle, STB_INT32 *pnMinUDAngle, STB_INT32 *pnMaxUDAngle, STB_INT32 *pnMinLRAngle, STB_INT32 *pnMaxLRAngle ){ 00078 return GetPropertyAngle((STBHANDLE)hHandle, pnMinUDAngle, pnMaxUDAngle, pnMinLRAngle, pnMaxLRAngle); 00079 } 00080 STB_INT32 STB_SetPeCompleteFrameCount(HSTB hHandle, STB_INT32 nFrameCount){ 00081 return SetPropertyFrameCount((STBHANDLE)hHandle, nFrameCount); 00082 } 00083 STB_INT32 STB_GetPeCompleteFrameCount(HSTB hHandle, STB_INT32 *pnFrameCount){ 00084 return GetPropertyFrameCount((STBHANDLE)hHandle, pnFrameCount); 00085 } 00086 00087 /*Setting / Getting Function for recognition*/ 00088 STB_INT32 STB_SetFrThresholdUse(HSTB hHandle, STB_INT32 nThreshold){ 00089 return SetRecognitionThreshold((STBHANDLE)hHandle, nThreshold); 00090 } 00091 STB_INT32 STB_GetFrThresholdUse(HSTB hHandle, STB_INT32 *pnThreshold){ 00092 return GetRecognitionThreshold((STBHANDLE)hHandle, pnThreshold); 00093 } 00094 STB_INT32 STB_SetFrAngleUse(HSTB hHandle, STB_INT32 nMinUDAngle, STB_INT32 nMaxUDAngle, STB_INT32 nMinLRAngle, STB_INT32 nMaxLRAngle ){ 00095 return SetRecognitionAngle((STBHANDLE)hHandle, nMinUDAngle, nMaxUDAngle, nMinLRAngle, nMaxLRAngle); 00096 } 00097 STB_INT32 STB_GetFrAngleUse(HSTB hHandle, STB_INT32 *pnMinUDAngle, STB_INT32 *pnMaxUDAngle, STB_INT32 *pnMinLRAngle, STB_INT32 *pnMaxLRAngle ){ 00098 return GetRecognitionAngle((STBHANDLE)hHandle, pnMinUDAngle, pnMaxUDAngle, pnMinLRAngle, pnMaxLRAngle); 00099 } 00100 STB_INT32 STB_SetFrCompleteFrameCount(HSTB hHandle, STB_INT32 nFrameCount){ 00101 return SetRecognitionFrameCount((STBHANDLE)hHandle, nFrameCount); 00102 } 00103 STB_INT32 STB_GetFrCompleteFrameCount(HSTB hHandle, STB_INT32 *pnFrameCount){ 00104 return GetRecognitionFrameCount((STBHANDLE)hHandle, pnFrameCount); 00105 } 00106 STB_INT32 STB_SetFrMinRatio(HSTB hHandle, STB_INT32 nFrameRatio){ 00107 return SetRecognitionRatio((STBHANDLE)hHandle, nFrameRatio); 00108 } 00109 STB_INT32 STB_GetFrMinRatio(HSTB hHandle, STB_INT32 *pnFrameRatio){ 00110 return GetRecognitionRatio((STBHANDLE)hHandle, pnFrameRatio); 00111 } 00112
Generated on Fri Jul 15 2022 01:15:47 by 1.7.2