Ask Your Question

seismic's profile - activity

2020-10-27 21:28:06 -0600 received badge  Notable Question (source)
2015-12-20 08:23:58 -0600 received badge  Popular Question (source)
2015-02-18 02:28:41 -0600 received badge  Famous Question (source)
2014-03-18 08:31:29 -0600 received badge  Notable Question (source)
2014-01-31 12:35:30 -0600 received badge  Notable Question (source)
2013-10-17 19:36:58 -0600 received badge  Popular Question (source)
2013-06-05 02:50:48 -0600 received badge  Popular Question (source)
2013-04-10 09:29:42 -0600 commented answer Invalid arguments for standard function calls

Thanks! I disabled the syntax check in eclipse. Now I don't have syntax check for most errors but at least I can compile now.

2013-04-03 09:49:37 -0600 commented answer Invalid arguments for standard function calls

I'm desperate now, I don't get this error fixed and really need a solution. I installed everything on Mac, migrated to ndk8e, opencv 2.4.3.2 and cdt 8.1.2 and it doesn't work. Has it anything to do with my Toolchain settings (No Toolchain, GnuBuilder)? Do you get errors when you copy these two lines of code into the appropriate tutorial project? std::string str="We think in generalities, but we live in details."; std::string str2 = str.substr (12,12);

2013-02-14 12:06:53 -0600 commented answer Invalid arguments for standard function calls

It even happens when I post the code into the tutorial 4's jni folder (see http://i956.photobucket.com/albums/ae49/realnetzonk/screenshot_zpsbcebad58.png). Without the substr. function call, the tutorial compiles and runs just finde. STL and CDT Settings should be ok, I guess. But I just saw that I'm using old 8.0.3 version of cdt. I updated to 8.1.1 now. But this is also not the reason.

2013-02-14 11:46:29 -0600 received badge  Editor (source)
2013-02-11 13:12:07 -0600 asked a question Invalid arguments for standard function calls

*Update: I need to mention that this error only occurs when I open the cpp file. When I close the file and close and open the project, the errors disappear (till I open the file again)*


I want to reuse my native c++ files in a android project. When I paste the files into the jni folder the compiler gives me invalid argument errors for functions like substr or fwrite.

The example:

#include <string>
#include <vector>
using namespace std;
using namespace cv;
...
std::string str="We think in generalities, but we live in details.";   
std::string str2 = str.substr (12,12);   // "generalities"

image description does the compiler quit with:


Invalid arguments ' Candidates are: std::basic_string<char,std::char_traits<char>,std::allocator<char>> 
 substr(?, ?) '

I obviously missed something general! I'm using OpenCV 2.4.3.2 for Android and C/C++ Dev. Tools 8.0 for Eclipse.

My Application.mk:

APP_STL := gnustl_static
APP_CPPFLAGS := -frtti -fexceptions
APP_ABI := armeabi-v7a
APP_PLATFORM := android-8

Android.mk:

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
include ../../sdk/native/jni/OpenCV.mk
LOCAL_MODULE    := native_sample
LOCAL_SRC_FILES := jni_part.cpp
LOCAL_LDLIBS +=  -llog -ldl
include $(BUILD_SHARED_LIBRARY)

image description

2013-02-11 11:44:59 -0600 received badge  Supporter (source)
2013-02-08 12:26:42 -0600 commented answer Mirror Image on Android Front Camera

Flipping the image and giving it back in onCameraFrame doesn't work. I think input and output image have to be of the same resolution.

2013-02-08 11:55:04 -0600 commented question Mirror Image on Android Front Camera

I used a workaround now. 1. I put screenOrientation to "reverseLandscape" what lets the view appear "mirrorlike". 2. In "onCameraFrame" method I can flip the image for opencv with Core. flip(src,dst,orientation) to archive face detection A side effect of this workaround is that the options bar remains on the devices right side and the software buttons(back, home etc.) on my nexus4 are on top. I have to correct that manually.

2013-02-08 11:35:51 -0600 commented answer Mirror Image on Android Front Camera

I couldn't find out where the BaseView is or where to implement this. Seems BaseView is not used anymore under 2.4.3.2?

2013-02-08 09:11:04 -0600 asked a question Mirror Image on Android Front Camera

I want to get OpenCV 2.4.3.2 Sample "FaceDetection" to work just like a mirror.

  1. I changed Display Orientation in the Android Manifest to

    screenOrientation="portrait"

  2. I say to the layout to use front camera:

<LinearLayout 
android:layout_height="match_parent" 
android:layout_width="match_parent" 
xmlns:tools="http://schemas.android.com/tools"

xmlns:opencv="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android">


<org.opencv.android.JavaCameraView 
    android:layout_height="fill_parent" 
    android:layout_width="fill_parent" 
    android:id="@+id/fd_activity_surface_view"
    opencv:camera_id="front"/> 
</LinearLayout>

Now the Screen is rotated to portrait, but the drawn image remains in landscape. how it looks now Does anyone know how to flip the image? I already tried to call the method setDisplayOrientation(90) but it doesn't work.

JavaCameraView.java:
protected boolean initializeCamera(int width, int height) 

....

AllocateCache();

mCamera.setDisplayOrientation(90);

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
    mSurfaceTexture = new SurfaceTexture(MAGIC_TEXTURE_ID);
    getHolder().setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
    mCamera.setPreviewTexture(mSurfaceTexture);
} else
   mCamera.setPreviewDisplay(null);     

mCamera.startPreview();
...

}

2012-11-15 15:20:16 -0600 commented answer Build Errors after OpenCV Library Import

thats it! Thanks!

2012-11-15 15:19:58 -0600 received badge  Scholar (source)
2012-11-15 08:06:53 -0600 received badge  Student (source)
2012-11-15 05:34:14 -0600 asked a question Build Errors after OpenCV Library Import

I use Win 8, jdk7, Eclipse 4.2, Andoird SDK (ADT) Rev 21, OpenCV 2.4.3, C/C++ Dev. Tools 8.1.1. Installed are all Android Targets since API Level 8. As described in: http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/android_dev_intro.html#android-dev-intro

After importing the library and sample projects from OpenCV Folder I receive following errors in the File OpenCVEngineInterface.java. Same happens to me in mac os. Has somebody an idea?

Description Resource    Path    Location    Type 
The method asBinder() of type OpenCVEngineInterface.Stub must override a superclass method  OpenCVEngineInterface.java  /OpenCV Library -
2.4.3/gen/org/opencv/engine line 35 Java Problem 
The method asBinder() of type OpenCVEngineInterface.Stub.Proxy must override a superclass method    OpenCVEngineInterface.java  /OpenCV Library -
            2.4.3/gen/org/opencv/engine line 96 Java Problem 
The method getEngineVersion() of type OpenCVEngineInterface.Stub.Proxy must override a superclass method    OpenCVEngineInterface.java  /OpenCV Library - 2.4.3/gen/org/opencv/engine   line 107    Java Problem 
    The method getLibPathByVersion(String) of type OpenCVEngineInterface.Stub.Proxy must override a superclass method   OpenCVEngineInterface.java  /OpenCV Library - 2.4.3/gen/org/opencv/engine   line 129    Java Problem 
    The method installVersion(String) of type OpenCVEngineInterface.Stub.Proxy must override a superclass method    OpenCVEngineInterface.java  /OpenCV Library - 2.4.3/gen/org/opencv/engine   line 152    Java Problem 
    The method getLibraryList(String) of type OpenCVEngineInterface.Stub.Proxy must override a superclass method    OpenCVEngineInterface.java  /OpenCV Library - 2.4.3/gen/org/opencv/engine   line 175    Java Problem