FastCV Sample Application  1.7.1
FastCVUtil.h
00001 /*
00002  * Copyright (c) 2012 Qualcomm Technologies Incorporated. All Rights Reserved.
00003  * Qualcomm Technologies Proprietary and Confidential.
00004  *
00005  *
00006  * @file Definition of FastCV Utility.
00007  *
00008  */
00009 
00010 #ifndef FASTCVUTIL_H_
00011 #define FASTCVUTIL_H_
00012 
00013 #include <jni.h>
00014 #include <android/log.h>
00015 #include "FPSCounter.h"
00016 #include "fastcv/fastcv.h"
00017 
00018 #define LOG_TAG    "FastCVDemoJNI"
00019 #define DPRINTF(...)  __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__)
00020 #define IPRINTF(...)  __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__)
00021 #define EPRINTF(...)  __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__)
00022 
00023 class FastCVUtil{
00024 private:
00025     FPSCounter camFPSCounter;
00026     float timeFilteredMs;
00027   
00028 public:
00029     float getProcessTime();
00030     void setProcessTime(float);
00031     float getCameraFPS();
00032     void CameraTick();
00033     uint64_t getTimeMicroSeconds();
00034 };
00035 
00036 extern FastCVUtil util;
00037 
00038 #ifdef __cplusplus
00039 extern "C"
00040 {
00041 #endif
00042 
00043 //---------------------------------------------------------------------------
00046 //---------------------------------------------------------------------------
00047 JNIEXPORT void JNICALL Java_com_qualcomm_fastcvdemo_utils_FastCVUtil_init
00048 (
00049    JNIEnv* env,
00050    jobject obj
00051 );
00052 
00053 //------------------------------------------------------------------------------
00056 //------------------------------------------------------------------------------
00057 JNIEXPORT void JNICALL Java_com_qualcomm_fastcvdemo_utils_FastCVUtil_cameraFrameTick
00058 (
00059    JNIEnv*  env,
00060    jobject  obj
00061 );
00062 
00063 //------------------------------------------------------------------------------
00067 //------------------------------------------------------------------------------
00068 JNIEXPORT jfloat JNICALL Java_com_qualcomm_fastcvdemo_utils_FastCVUtil_getCameraFPS
00069 (
00070    JNIEnv*  env,
00071    jobject  obj
00072 );
00073 
00074 //------------------------------------------------------------------------------
00078 //------------------------------------------------------------------------------
00079 JNIEXPORT jfloat JNICALL Java_com_qualcomm_fastcvdemo_utils_FastCVUtil_getFastCVProcessTime
00080 (
00081    JNIEnv*  env,
00082    jobject  obj
00083 );
00084 
00085 #ifdef __cplusplus
00086 }
00087 #endif
00088 
00089 #endif /* FASTCVUTIL_H_ */
 All Data Structures Functions Variables