ISP-pipeline-hdrplus icon indicating copy to clipboard operation
ISP-pipeline-hdrplus copied to clipboard

How to integrate this algo to Android platfrom?

Open fuxp90 opened this issue 2 years ago • 0 comments

Hi sir, I want to integrate the HDR algo to my Camera App on the Android,but I dnot know how to complie this project and what parameters needed? how to use the configure file ? I trying to run ndk-build command at folder: ISP-pipeline-hdrplus/Mat/Android/jni$ ls Android.mk Application.mk build.cmd ISP-pipeline-hdrplus/Mat/Android/jni$ ndk-build

but there are many error:

/home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/Android.mk:19: "TARGET_ARCH_ABI = arm64-v8a" [arm64-v8a] Compile++ : Mat <= MathFunction.cpp [arm64-v8a] Compile++ : Mat <= Common.cpp In file included from /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/Common.cpp:1: In file included from /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/Common.h:4: /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/SubFunction.h:268:11: error: called object type 'float' is not a function or function pointer tmp = min(R, G); ~~~^ /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/SubFunction.h:269:11: error: called object type 'float' is not a function or function pointer min = min(tmp, B); ~~~^ /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/SubFunction.h:270:11: error: called object type 'float' is not a function or function pointer tmp = max(R, G); ~~~^ /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/SubFunction.h:271:11: error: called object type 'float' is not a function or function pointer max = max(tmp, B); ~~~^ /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/Common.cpp:2619:43: error: use of undeclared identifier 'k' *(pOutLine++) = (pIn[0][0] + pIn[6][0])*k[0] + (pIn[1][0] + pIn[5][0]) *k[1] + (pIn[2][0] + pIn[4][0]) *k[2] + pIn[3][0] * k[3]; ^ /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/Common.cpp:2619:75: error: use of undeclared identifier 'k' *(pOutLine++) = (pIn[0][0] + pIn[6][0])*k[0] + (pIn[1][0] + pIn[5][0]) *k[1] + (pIn[2][0] + pIn[4][0]) *k[2] + pIn[3][0] * k[3]; ^ /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/Common.cpp:2619:107: error: use of undeclared identifier 'k' *(pOutLine++) = (pIn[0][0] + pIn[6][0])*k[0] + (pIn[1][0] + pIn[5][0]) *k[1] + (pIn[2][0] + pIn[4][0]) *k[2] + pIn[3][0] * k[3]; ^ /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/Common.cpp:2619:126: error: use of undeclared identifier 'k' *(pOutLine++) = (pIn[0][0] + pIn[6][0])*k[0] + (pIn[1][0] + pIn[5][0]) *k[1] + (pIn[2][0] + pIn[4][0]) *k[2] + pIn[3][0] * k[3]; ^ /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/Common.cpp:2620:43: error: use of undeclared identifier 'k' *(pOutLine++) = (pIn[0][1] + pIn[6][1])*k[0] + (pIn[1][1] + pIn[5][1]) *k[1] + (pIn[2][1] + pIn[4][1]) *k[2] + pIn[3][1] * k[3]; ^ /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/Common.cpp:2620:75: error: use of undeclared identifier 'k' *(pOutLine++) = (pIn[0][1] + pIn[6][1])*k[0] + (pIn[1][1] + pIn[5][1]) *k[1] + (pIn[2][1] + pIn[4][1]) *k[2] + pIn[3][1] * k[3]; ^ /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/Common.cpp:2620:107: error: use of undeclared identifier 'k' *(pOutLine++) = (pIn[0][1] + pIn[6][1])*k[0] + (pIn[1][1] + pIn[5][1]) *k[1] + (pIn[2][1] + pIn[4][1]) *k[2] + pIn[3][1] * k[3]; ^ /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/Common.cpp:2620:126: error: use of undeclared identifier 'k' *(pOutLine++) = (pIn[0][1] + pIn[6][1])*k[0] + (pIn[1][1] + pIn[5][1]) *k[1] + (pIn[2][1] + pIn[4][1]) *k[2] + pIn[3][1] * k[3]; ^ /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/Common.cpp:2621:43: error: use of undeclared identifier 'k' *(pOutLine++) = (pIn[0][2] + pIn[6][2])*k[0] + (pIn[1][2] + pIn[5][2]) *k[1] + (pIn[2][2] + pIn[4][2]) *k[2] + pIn[3][2] * k[3]; ^ /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/Common.cpp:2621:75: error: use of undeclared identifier 'k' *(pOutLine++) = (pIn[0][2] + pIn[6][2])*k[0] + (pIn[1][2] + pIn[5][2]) *k[1] + (pIn[2][2] + pIn[4][2]) *k[2] + pIn[3][2] * k[3]; ^ /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/Common.cpp:2621:107: error: use of undeclared identifier 'k' *(pOutLine++) = (pIn[0][2] + pIn[6][2])*k[0] + (pIn[1][2] + pIn[5][2]) *k[1] + (pIn[2][2] + pIn[4][2]) *k[2] + pIn[3][2] * k[3]; ^ /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/Common.cpp:2621:126: error: use of undeclared identifier 'k' *(pOutLine++) = (pIn[0][2] + pIn[6][2])*k[0] + (pIn[1][2] + pIn[5][2]) *k[1] + (pIn[2][2] + pIn[4][2]) *k[2] + pIn[3][2] * k[3]; ^ /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/Common.cpp:2622:43: error: use of undeclared identifier 'k' *(pOutLine++) = (pIn[0][3] + pIn[6][3])*k[0] + (pIn[1][3] + pIn[5][3]) *k[1] + (pIn[2][3] + pIn[4][3]) *k[2] + pIn[3][3] * k[3]; ^ /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/Common.cpp:2622:75: error: use of undeclared identifier 'k' *(pOutLine++) = (pIn[0][3] + pIn[6][3])*k[0] + (pIn[1][3] + pIn[5][3]) *k[1] + (pIn[2][3] + pIn[4][3]) *k[2] + pIn[3][3] * k[3]; ^ /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/Common.cpp:2622:107: error: use of undeclared identifier 'k' *(pOutLine++) = (pIn[0][3] + pIn[6][3])*k[0] + (pIn[1][3] + pIn[5][3]) *k[1] + (pIn[2][3] + pIn[4][3]) *k[2] + pIn[3][3] * k[3]; ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make: *** [/home/fup/dsoft/sdk/ndk/21.4.7075529/build/core/build-binary.mk:478: /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/obj/local/arm64-v8a/objs/Mat/__/__/__/Mat/Common.o] Error 1 make: *** Waiting for unfinished jobs.... [arm64-v8a] Compile++ : Mat <= MultiUcharImage.cpp In file included from /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/MultiUcharImage.cpp:1: In file included from /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/MultiUcharImage.h:3: In file included from /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/Mat.h:3: /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/SubFunction.h:268:11: error: called object type 'float' is not a function or function pointer tmp = min(R, G); ~~~^ /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/SubFunction.h:269:11: error: called object type 'float' is not a function or function pointer min = min(tmp, B); ~~~^ /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/SubFunction.h:270:11: error: called object type 'float' is not a function or function pointer tmp = max(R, G); ~~~^ /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/SubFunction.h:271:11: error: called object type 'float' is not a function or function pointer max = max(tmp, B); ~~~^ In file included from /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/MultiUcharImage.cpp:1: In file included from /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/MultiUcharImage.h:3: /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/Mat.h:683:18: error: declaration of 'T' shadows template parameter template <class T> ^ /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/Mat.h:680:17: note: template parameter is declared here template <class T> ^ /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/Mat.h:686:19: error: declaration of 'T' shadows template parameter template <class T> ^ /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/Mat.h:683:18: note: template parameter is declared here template <class T> ^ /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/MultiUcharImage.cpp:155:4: error: no matching function for call to 'RGBToHSVf' RGBToHSVf((float)RGB[0], (float)RGB[1], (float)RGB[2], (float)tmpHSV[0], (float)tmpHSV[1], (float)tmpHSV[2]); ^~~~~~~~~ /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/SubFunction.h:262:13: note: candidate function not viable: expects an l-value for 4th argument inline void RGBToHSVf(float R, float G, float B, float& H, float& S, float&V) ^ /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/MultiUcharImage.cpp:186:4: error: no matching function for call to 'RGBToHSVf' RGBToHSVf((float)RGB[0], (float)RGB[1], (float)RGB[2], (float)tmpHSV[0], (float)tmpHSV[1], (float)tmpHSV[2]); ^~~~~~~~~ /home/fup/data/workspace/ISP-pipeline-hdrplus/Mat/Android/jni/../../../Mat/SubFunction.h:262:13: note: candidate function not viable: expects an l-value for 4th argument inline void RGBToHSVf(float R, float G, float B, float& H, float& S, float&V)

Can you help me? Thanks.

fuxp90 avatar Sep 29 '22 01:09 fuxp90