Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

ANDROID - org.opencv.android.JavaCameraView not full screen

Hello! I have developed an app that use the org.opencv.android.JavaCameraView. My problem is that if I run the application in Asus P00C (10' ) it works well (the camera view is full screen). If I run the application in a SAMSUNG SM-T713 (8') the camera does not cover the entire display. In this case though, the application works in full screen because a textview compare in the black part of the screen where the camera view does not arrive.

This is the xml code:

* <android.support.constraint.constraintlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:opencv="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="underwater.sapienza.com.markerrecognition.MainActivity">

<org.opencv.android.JavaCameraView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:visibility="visible"
    android:id="@+id/tutorial1_activity_java_surface_view"
    opencv:camera_id="any"
    tools:layout_editor_absoluteY="0dp"
    tools:layout_editor_absoluteX="0dp" />

<linearlayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" tools:layout_editor_absolutey="0dp" tools:layout_editor_absolutex="0dp">

<TextView
    android:id="@+id/textView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Nessun marker!"
    android:textSize="70sp"

     />

<TextView
    android:id="@+id/textView2"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Nessun marker!"
    android:textSize="70sp"

    />

<LinearLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    >

<Button
    android:id="@+id/buttonDiminuisciSoglia"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:onClick="diminuisciSogliaMinima"
    android:text="DIMINUISCI SOGLIA MINIMA" />

<TextView
    android:id="@+id/textViewSogliaMinima"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text=""
    android:textSize="20sp"

    />

<Button
    android:id="@+id/buttonAumentaSoglia"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:onClick="aumentaSogliaMinima"
    android:text="AUMENTA SOGLIA MINIMA" />
    </LinearLayout>

</linearlayout> </android.support.constraint.constraintlayout> *

Can you help me??

Thank you very much!

Best Regards!!

ANDROID - org.opencv.android.JavaCameraView not full screen

Hello! I have developed an app that use the org.opencv.android.JavaCameraView. My problem is that if I run the application in Asus P00C (10' ) it works well (the camera view is full screen). If I run the application in a SAMSUNG SM-T713 (8') the camera does not cover the entire display. In this case though, the application works in full screen because a textview compare in the black part of the screen where the camera view does not arrive.

This is the xml code:

* <android.support.constraint.constraintlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:opencv="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="underwater.sapienza.com.markerrecognition.MainActivity">

<org.opencv.android.JavaCameraView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:visibility="visible"
    android:id="@+id/tutorial1_activity_java_surface_view"
    opencv:camera_id="any"
    tools:layout_editor_absoluteY="0dp"
    tools:layout_editor_absoluteX="0dp" />

<linearlayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" tools:layout_editor_absolutey="0dp" tools:layout_editor_absolutex="0dp">

<linearlayout< p="">

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:orientation="vertical"

tools:layout_editor_absoluteY="0dp"

tools:layout_editor_absoluteX="0dp">


<TextView
    android:id="@+id/textView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Nessun marker!"
    android:textSize="70sp"

     />

<TextView
    android:id="@+id/textView2"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Nessun marker!"
    android:textSize="70sp"

    />

<LinearLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    >

<Button
    android:id="@+id/buttonDiminuisciSoglia"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:onClick="diminuisciSogliaMinima"
    android:text="DIMINUISCI SOGLIA MINIMA" />

<TextView
    android:id="@+id/textViewSogliaMinima"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text=""
    android:textSize="20sp"

    />

<Button
    android:id="@+id/buttonAumentaSoglia"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:onClick="aumentaSogliaMinima"
    android:text="AUMENTA SOGLIA MINIMA" />
    </LinearLayout>

</linearlayout> </android.support.constraint.constraintlayout> *

Can you help me??

Thank you very much!

Best Regards!!

ANDROID - org.opencv.android.JavaCameraView not full screen

Hello! I have developed an app that use the org.opencv.android.JavaCameraView. My problem is that if I run the application in Asus P00C (10' ) it works well (the camera view is full screen). If I run the application in a SAMSUNG SM-T713 (8') the camera does not cover the entire display. In this case though, the application works in full screen because a textview compare in the black part of the screen where the camera view does not arrive.

This is the xml code:

* ** <android.support.constraint.constraintlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:opencv="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="underwater.sapienza.com.markerrecognition.MainActivity">

<org.opencv.android.JavaCameraView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:visibility="visible"
    android:id="@+id/tutorial1_activity_java_surface_view"
    opencv:camera_id="any"
    tools:layout_editor_absoluteY="0dp"
    tools:layout_editor_absoluteX="0dp" />

<linearlayout< p="">

<linearlayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" tools:layout_editor_absolutey="0dp" tools:layout_editor_absolutex="0dp">

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:orientation="vertical"

tools:layout_editor_absoluteY="0dp"

tools:layout_editor_absoluteX="0dp">


<TextView
    android:id="@+id/textView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Nessun marker!"
    android:textSize="70sp"

     />

<TextView
    android:id="@+id/textView2"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Nessun marker!"
    android:textSize="70sp"

    />

<LinearLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    >

<Button
    android:id="@+id/buttonDiminuisciSoglia"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:onClick="diminuisciSogliaMinima"
    android:text="DIMINUISCI SOGLIA MINIMA" />

<TextView
    android:id="@+id/textViewSogliaMinima"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text=""
    android:textSize="20sp"

    />

<Button
    android:id="@+id/buttonAumentaSoglia"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:onClick="aumentaSogliaMinima"
    android:text="AUMENTA SOGLIA MINIMA" />
     </LinearLayout>

</linearlayout> </android.support.constraint.constraintlayout> *</linearlayout>

</android.support.constraint.constraintlayout>

**

Can you help me??

Thank you very much!

Best Regards!!