Image view disappears during tracking

asked 2016-09-11 05:37:32 -0500

elish gravatar image

Hi,

I am working on an augmented reality app in android,
I have an imageView overlayed on opencv camera and i am moving it according to the average movement of the phone.
The problem is, that when its moved lower then its height it starts disappearing.
I can not understand why.

this is the xml:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
xmlns:opencv="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.example.benzy.image.MainActivity"
tools:showIn="@layout/activity_main"
android:id="@+id/camera_preview">

<org.opencv.android.JavaCameraView
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:visibility="gone"
    android:id="@+id/tutorial1_activity_java_surface_view"
    opencv:show_fps="true"
    opencv:camera_id="any" />
<ImageView
    android:layout_width="120dp"
    android:layout_height="120dp"
    android:id="@+id/iv"
    android:alpha=".5"/>

</RelativeLayout>

Can any one help me figure it out? Tank you!!

edit retag flag offensive close merge delete