Log in or register to post comments

cameraDevice.getVideoMode returning 0,0

November 7, 2013 - 3:22am #1

Hi.

I ahve been using Vuforia for a month or so and have found it great on a few phones, but recently started testing on two three tablets.

On a Nexus 7 it is fine, but on a Galaxy Note and Sony Tablet S the video size returned from

cameraDevice.getVideoMode(QCAR::CameraDevice::MODE_DEFAULT);

 is 0,0 within configureVideoBackground, therefore several things downstream fail.

I've tried using the following code

QCAR::State state = QCAR::Renderer::getInstance().begin();
QCAR::Frame frame = state.getFrame();
const QCAR::Image image = frame.getImage( 0 );
int videoWidth = image->getWidth(); 
int videoHeight = image->getHeight();

as suggested in another post but I'm getting a compilation error.

Thanks.

 

cameraDevice.getVideoMode returning 0,0

November 12, 2013 - 9:41am #12

Glad to hear that the issue is solved.

I'm not sure of what in your code may have broken this functionality, perhaps  a threading issue.

cameraDevice.getVideoMode returning 0,0

November 12, 2013 - 9:22am #11

Okay, have just re-imported the ImageTargets sample to Eclipse, run it and am now getting a video size!

It appears that something in the programme flow is messing with the initilisation then - I apologise for the miss-direction.

Is there anything in perticular I should be looking for in terms of differences - i.e. What would cause the video size to return 0,0 ?

Thanks.

cameraDevice.getVideoMode returning 0,0

November 12, 2013 - 9:11am #10

Thanks for the info:

the message:

Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1)" in the log.

usually indicates an issue caused by a Threading error. This could be caused by a specific call flow in the App code, but I would tend to exclude this can happen in the Image Targets samplem "as is", unless you have modified some code.

Are you sure you have tested on an unmodififed Image Targets sample ?

 

cameraDevice.getVideoMode returning 0,0

November 11, 2013 - 3:02am #9

Hi

The Sony is 'Sony Talbet S', build TISU0033410, Android 4.0.3, OpenGL ES 2.0 14.01002

Samsung Galaxy Note 10.1 (GT-N8000)-  Android 4.1.2

Nexus 7 – Android 4.3

Incidentally, when the crash happens, it is proceeded by the error " A/libc(3600): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1)" in the log.

 
HTH

cameraDevice.getVideoMode returning 0,0

November 11, 2013 - 2:40am #8

Thanks for the info;

could you also provide these info:

- exact Device Model number (ideally for both the the Sony and the Galaxy Note); you can find the Model number in the Device Settings (usually under "About Phone" or similar)

Also, one very last thing: do you see the issue regardless of the orientation with which you start the sample ? i.e. if you start the sample holding the phone/tablet  in landscape or in portrait, does it make any difference ?

 

cameraDevice.getVideoMode returning 0,0

November 11, 2013 - 1:11am #7

Yes...

Either the black screen persists and the application stays open, or it crashes after further initilisation steps.

 

cameraDevice.getVideoMode returning 0,0

November 10, 2013 - 11:22am #6

Thanks for doing this test; 

so when you run the unmodified Image Targets sample you get (0,0).. what do you observe on screen ? do you see a black screen or similar issue ?

 

cameraDevice.getVideoMode returning 0,0

November 7, 2013 - 8:30am #5

Unfortunately not. An unmolested ImageTargets produces the below logcat for 'QCAR';

11-07 16:30:58.960: D/QCAR(10699): ImageTargets::onCreate
11-07 16:30:59.090: I/QCAR(10699): Activity is in LANDSCAPE
11-07 16:30:59.090: D/QCAR(10699): ImageTargets::onResume
11-07 16:30:59.340: D/QCAR(10699): InitQCARTask::onPostExecute: QCAR initialization successful
11-07 16:30:59.340: I/QCAR(10699): Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_initTracker
11-07 16:30:59.360: I/QCAR(10699): Successfully initialized ImageTracker.
11-07 16:30:59.360: I/QCAR(10699): Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_initApplicationNative
11-07 16:30:59.360: I/QCAR(10699): Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_initApplicationNative finished
11-07 16:30:59.360: I/QCAR(10699): Using OpenGL ES 2.0
11-07 16:30:59.360: I/QCAR(10699): Using opaque GLView, depth buffer size: 16, stencil size: 0
11-07 16:30:59.370: I/QCAR(10699): Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_loadTrackerData
11-07 16:31:00.710: I/QCAR(10699): Successfully loaded and activated data set.
11-07 16:31:00.710: D/QCAR(10699): LoadTrackerTask::onPostExecute: execution successful
11-07 16:31:00.730: I/QCAR(10699): Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_startCamera
11-07 16:31:03.330: I/QCAR(10699): Creating OpenGL ES 2.0 context
11-07 16:31:03.340: D/QCAR(10699): GLRenderer::onSurfaceCreated
11-07 16:31:03.340: I/QCAR(10699): Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargetsRenderer_initRendering
11-07 16:31:03.340: D/QCAR(10699): GLRenderer::onSurfaceChanged
11-07 16:31:03.340: I/QCAR(10699): Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargetsRenderer_updateRendering
11-07 16:31:03.340: I/QCAR(10699): Correcting rendering background size to handle missmatch between screen and video aspect ratios.
11-07 16:31:03.340: I/QCAR(10699): Configure Video Background : Video (0,0), Screen (1280,752), mSize (0,752)
11-07 16:31:03.340: D/QCAR(10699): ImageTargets::updateRenderView
11-07 16:31:03.340: I/QCAR(10699): Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargetsRenderer_updateRendering
11-07 16:31:03.340: I/QCAR(10699): Correcting rendering background size to handle missmatch between screen and video aspect ratios.
11-07 16:31:03.340: I/QCAR(10699): Configure Video Background : Video (0,0), Screen (1280,752), mSize (0,752)
11-07 16:31:03.350: I/QCAR(10699): Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_setProjectionMatrix

Within the app logcat there is an additional;

11-07 16:31:03.340: E/AR(10699): VideoBackgroundConfig with screen size of zero received, skipping config step

This is on the Sony tablet S - I don't have the Galaxy note with me today.

 

Forgot to mention this is Android 4.0.3 compiled with 4.1.2

 

Thanks

cameraDevice.getVideoMode returning 0,0

November 7, 2013 - 8:20am #4

The samples invoke the configureVideoBackground() function in the startCamera (which is called when the App is resumed) and in the updateRendering() which is called when the screen changes.

Do the original samples show the correct behaviour and values (without code modifications) ?

 

cameraDevice.getVideoMode returning 0,0

November 7, 2013 - 8:00am #3

I don't believe it is used in a special way; the only exception is that I'm getting the FOC from QCAR and returning it to Java for use in the renderer.

I've just tried the ImageTargetsBuilder sample and it also crashed; The logcat output is;

Native library libQCAR.so loaded
RefFreeFrameGL Ctor
Native library libUserDefinedTargets.so loaded
UserDefinedTargets::onCreate
Activity is in LANDSCAPE
UserDefinedTargets::onResume
InitQCARTask::onPostExecute: QCAR initialization successful
Java_com_qualcomm_QCARSamples_UserDefinedTargets_UserDefinedTargets_initTracker
Successfully initialized ImageTracker.
Using OpenGL ES 2.0
Using opaque GLView, depth buffer size: 16, stencil size: 0
Successfully loaded and activated data set.
LoadTrackerTask::onPostExecute: execution successful
Statring camera
Creating OpenGL ES 2.0 context
GLRenderer::onSurfaceCreated
GLRenderer::onSurfaceChanged
Ipdate rendering
Correcting rendering background size to handle mismatch between screen and video aspect ratios.
Configure Video Background : Video (0,0), Screen (1280,752), mSize (0,752)
Viewfinder Size NaN NaN
UserDefinedTargets::updateRenderView
Ipdate rendering
Correcting rendering background size to handle mismatch between screen and video aspect ratios.
Configure Video Background : Video (0,0), Screen (1280,752), mSize (0,752)
Viewfinder Size NaN NaN
Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_setProjectionMatrix

 

 

cameraDevice.getVideoMode returning 0,0

November 7, 2013 - 6:30am #2

Hi, are you using that code in a special way ?

are the samples working on Nexus 7 and Sony Tablet S ?

 

Log in or register to post comments