Hi,
I try to install the FastCV Sample App which I can compile and run and everything is fine. But when I open
the FastCVSample.cpp File I get some errors which only disappers when I close the Project and reopen it.
I've included all the headers, so this shouldn't be the problem. In the following line I get an syntax error warning:
uint32_t FASTCV_ALIGN128( corners[MAX_CORNERS_TO_DETECT*2] );
That's why in the following code the corners field is unknown and leads to compiler errors.
The second error occurs in this line:
memcpy( state.alignedImgBuf, jimgData, w*h*3/2 );
with the the message: Invalid arguments 'Candidates are: void * memcpy(void *, const void *, ?)'
I use the Mac Version of the SDK if that helps...
Thank you in advance,
njaa
Your error looks like because ndk-build couldn't find <fastcv/fastcv.h> at FastCVSample.cpp line 19.
It seems like you forget below steps
https://developer.qualcomm.com/mobile-development/mobile-technologies/computer-vision-fastcv/compiling-and-running-fastcv-sample-app
“Create a directory under the ndk include directory called fastcv.
Copy the contents of inc directory from the installation directory to the new directory you just created under the ndk include directory (e.g <Android-NDK-Root/platforms/<Android API>/arch-arm/usr/include/fastcv)”
No that's not the problem, otherwise there would be much more errors.
I did everything according to the guidance, but these errors do not disappear...
Thx for the answer, but this didn't work as well.
Temporarily I deleted the FASTCV_ALIGN128 part and uncommented memcpy( state.alignedImgBuf, jimgData, w*h*3/2 ).
But this can't be a permanent solution. I really don't understand that...
Edit:
If I follow the inclusion <fastcv/fastcv.h> this document does open: /Android-NDK-Root/platforms/android-9/arch-arm/usr/include/fastcv. Doing the same with the problem line memcpy... opens the ../include/string.h file. Is this correct?
Please take a look at the following post. It may be applicable to your issue.
https://developer.qualcomm.com/forum/qdevnet-forums/computer-vision-fast...
I met the same problem under Windows and Mac!
Basically I did everything that discussed in the forum, however, these methods are not helpful.
The eclipse shows that only the variable "corner" has errors which starts from the line:
uint32_t FASTCV_ALIGN128( corners[MAX_CORNERS_TO_DETECT*2] );
It seems like FASTCV_ALIGN128 has some issues.
So at this moment I simply changed it to:
uint32_t corners[MAX_CORNERS_TO_DETECT*2];
It works fine. But anyone know what's the real problem, or better solution?
You might have some conflict with your compiler setup.
FASTCV_ALIGN128 is defined inside fastcv.h. It has 2 configuration, one for GNUC compiler and the other for Microsoft Visual Studio compiler.
Since you are using eclipse, the compiler you use should be GNUC, but for some reason, your __GNUC__ was undefined and might used the MSVC compiler configuration.
The purpose of FASTCV_ALIGN128 to have memory that is 128 byte aligned to perform better (speed).
the issue is eclipse. you need to modify the compiler warnings under your project.
the issue is eclipse. you need to modify the compiler warnings under your project.