Forums - FastCorner Sample App

10 posts / 0 new
Last post
FastCorner Sample App
njaa
Join Date: 18 Aug 12
Posts: 9
Posted: Sun, 2012-08-19 10:08

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

 

 

  • Up0
  • Down0
ronaldk
Join Date: 21 Aug 12
Posts: 6
Posted: Fri, 2012-08-24 16:29

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)” 

 

  • Up0
  • Down0
njaa
Join Date: 18 Aug 12
Posts: 9
Posted: Mon, 2012-08-27 12:01

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...

  • Up0
  • Down0
njaa
Join Date: 18 Aug 12
Posts: 9
Posted: Tue, 2012-08-28 10:21

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?

 

  • Up0
  • Down0
jeff4s Moderator
Join Date: 14 Mar 12
Posts: 54
Posted: Tue, 2012-08-28 22:57

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...

 

  • Up0
  • Down0
Join Date: 1 Nov 11
Posts: 3
Posted: Mon, 2012-10-08 19:15

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?

 

 

 

 

 

  • Up0
  • Down0
ronaldk
Join Date: 9 Oct 12
Posts: 30
Posted: Tue, 2012-10-09 12:50

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). 

  • Up0
  • Down0
Join Date: 17 Oct 12
Posts: 5
Posted: Wed, 2012-10-17 06:34

the issue is eclipse. you need to modify the compiler warnings under your project. 

  • Up0
  • Down0
Join Date: 17 Oct 12
Posts: 5
Posted: Wed, 2012-10-17 06:34

the issue is eclipse. you need to modify the compiler warnings under your project. 

  • Up0
  • Down0
ina.centaur
Join Date: 11 Sep 10
Posts: 4
Posted: Wed, 2013-01-16 22:21
For the fastcorner app, installs on Android 4 but crashes when I select "Start" button - here is the error log 01-16 22:16:32.959: E/AndroidRuntime(1778): FATAL EXCEPTION: main 01-16 22:16:32.959: E/AndroidRuntime(1778): java.lang.ExceptionInInitializerError 01-16 22:16:32.959: E/AndroidRuntime(1778): at java.lang.Class.newInstanceImpl(Native Method) 01-16 22:16:32.959: E/AndroidRuntime(1778): at java.lang.Class.newInstance(Class.java:1319) 01-16 22:16:32.959: E/AndroidRuntime(1778): at android.app.Instrumentation.newActivity(Instrumentation.java:1023) 01-16 22:16:32.959: E/AndroidRuntime(1778): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1882) 01-16 22:16:32.959: E/AndroidRuntime(1778): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992) 01-16 22:16:32.959: E/AndroidRuntime(1778): at android.app.ActivityThread.access$600(ActivityThread.java:127) 01-16 22:16:32.959: E/AndroidRuntime(1778): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158) 01-16 22:16:32.959: E/AndroidRuntime(1778): at android.os.Handler.dispatchMessage(Handler.java:99) 01-16 22:16:32.959: E/AndroidRuntime(1778): at android.os.Looper.loop(Looper.java:137) 01-16 22:16:32.959: E/AndroidRuntime(1778): at android.app.ActivityThread.main(ActivityThread.java:4441) 01-16 22:16:32.959: E/AndroidRuntime(1778): at java.lang.reflect.Method.invokeNative(Native Method) 01-16 22:16:32.959: E/AndroidRuntime(1778): at java.lang.reflect.Method.invoke(Method.java:511) 01-16 22:16:32.959: E/AndroidRuntime(1778): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:823) 01-16 22:16:32.959: E/AndroidRuntime(1778): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:590) 01-16 22:16:32.959: E/AndroidRuntime(1778): at dalvik.system.NativeStart.main(Native Method) 01-16 22:16:32.959: E/AndroidRuntime(1778): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load fastcvsample: findLibrary returned null 01-16 22:16:32.959: E/AndroidRuntime(1778): at java.lang.Runtime.loadLibrary(Runtime.java:365) 01-16 22:16:32.959: E/AndroidRuntime(1778): at java.lang.System.loadLibrary(System.java:535) 01-16 22:16:32.959: E/AndroidRuntime(1778): at com.qualcomm.fastcorner.FastCVSample.(FastCVSample.java:133) 01-16 22:16:32.959: E/AndroidRuntime(1778): ... 15 more
  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.