Log in or register to post comments

Change the tracking

March 22, 2013 - 4:26am #1

Hi,

Looking into the vuforia SDK samples i notice that the tracking of the target is done with feature matching. Since my object doesn't have a good quality of feature,i wonder can i then add a new tracking algorithm? have any one done it before?

Change the tracking

April 24, 2013 - 4:19am #26

you're welcome

Change the tracking

April 24, 2013 - 4:16am #25

ok thank you

Change the tracking

April 23, 2013 - 10:04am #24

There is no "unit of measure", strictly speaking.

The 3D world which is rendered in OpenGL, is a virtual world, so one unit is just one unit (as it is virtual);

then you can imagine that 1 unit in the virtual world is one millimeter, or 1 unit in the virtual world is 1 meter, but that's just an association that you do at application level;

for example, if your virtual world represents a room, and you have measured a real room in meters, suppose your room is 3 meters (depth) by 4 meters (width) by 2 meters (height), it could be convenient to represent that room in the virtual world as a 3D box with size 3 x 4 x 2.

However, nothing would prevent you from creating a virtual room of 3000 x 4000 x 200, provided that every other 3D object in the room (for instance a table, a chair, etc.) are consistent with the same choice.

When it comes to AR (and Vuforia), what defines the "unit" is essentially your target size parameter (which you specify when you create a target with the target Manager);

in the Vuforia samples, this size is in millimiters, assuming that you print the targets on an A4 paper. 

However, nothing would prevent you from using a differnet unit of measure and update the 3D virtual objects coordinates accordingly.

This also applies to the modelview and projection matrix.

I hope this makes sense...

 

Change the tracking

April 23, 2013 - 9:51am #23

Thank you. i have another question :which unit are used for the camera matrix parameters is it  mm? or pixel?

Change the tracking

April 16, 2013 - 11:02am #22

Hi,

the modelview matrix represents the rotation, translation and scaling of the model with respect to the camera;

it is a 16-elements array (which represents a 4x4 matrix); the structure of the matrix is explained in great detail here:

http://www.glprogramming.com/red/chapter03.html

The Vuforia getPose() method returns a 4x3 matrix, which includes position and rotation information; this is explained here:

https://developer.vuforia.com/resources/dev-guide/pose-matrix-explained

 

Change the tracking

April 16, 2013 - 8:51am #21

hi i have read a lot of thread and vuforia API Dev but i 'm  confused about the getpose() function? how does the modelviewmatrix was filled.thank you in advance

Change the tracking

April 1, 2013 - 7:43am #20

I see. If you need to show just 1 model when the 2 targets are found, there is nothing specific in the Vuforia SDK that you need to do,

it's just application logic and a bit of good C++ programming.

 

Change the tracking

April 1, 2013 - 3:01am #19

Thank you ,it's really helpful (i'm using the ImageTarget Sample) but i have now two teapot shown on the screen :one due to the target1 and the other for the target 2. I need to render just one teapot at the same time if target1 or target 2 is detected.The idea is to combine the 2 datatset but since i can't change the dataset i thought to do like the multiTarget sample without using the TargetManager.Is it possible? or i have to use the targetManager?

Change the tracking

March 30, 2013 - 2:18am #18

Hi, 

this line is what you need:

QCAR::setHint(QCAR::HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS, 4);

The other line refers to the 1.5 API, it is no longer supported in 2.0

The line above is located in ImageTargets.cpp.

That's all you need.

Change the tracking

March 29, 2013 - 8:56am #17

I 'm using UDT with the ImageTarget sample. Now i have three image target and i want to enable the rendering of the 3d model  as one of this 3 target is shown on the screen.

 i found in the forum this 2 line :

        QCAR::setHint(QCAR::HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS, 4);
        QCAR::setHint(QCAR::HINT_IMAGE_TARGET_MULTI_FRAME_ENABLED, 1);

but i haven't found where  it is used in the multitarget sample.I don't want to use any TargetManager .i just want to use the multi target in the ImageTarget Sample.Could you please guide me?

Change the tracking

March 27, 2013 - 9:51am #16

Hi, the tracker is enabled (started) in the startCamera() function  (see in ImageTargets.cpp):

JNIEXPORT void JNICALL
Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_startCamera(JNIEnv *,
                                                                         jobject)

then, starting the tracker does not require that you load or activate any dataset; however, if there is no active dataset, you won't be able to detect any target (that's by definition)

 

Change the tracking

March 27, 2013 - 9:45am #15

Hi,

how can i enable the tracker without loading or activating dataSet is that possible?  thank you 

Change the tracking

March 27, 2013 - 3:31am #14

Hi,

my problem is to put the Teapot on the center of my marker not on the center of the screen

As I said, the Image targets sample (if you take it "as is", i.e.  without any modifcations) does exactly that; it renders the teapot in the center of the target (and not in the center of the screen);

the relevant code for your needs (pose matrix,e tc.) is in ImageTargets.cpp, in the renderFrame function.

 

Change the tracking

March 27, 2013 - 3:14am #13

 

thank you for your help. I have done this already my problem is to put the Teapot on the center of my marker not on the center of the screen. Also for the tracking ,i'm using my method not the dataSet as it's mentioned:
state.getNumTrackableResults();

 

if tracking is done then put the teapot in the center of the tracked_target. how can i get the detected_object(for example the marker ) coordinate? where can i find the pose matrix  in the original code of ImageTargetsSplashScreen. guide me please.

Change the tracking

March 26, 2013 - 10:47am #12

Ok, to render the teapot in the center of the target, you can use the ImageTargets code "as is", i.e. without any modifications;

then, if you want to exclude a certain target from being rendered (i.e. "disable" the target) you could introduce some "if-condition" in the renderFrame() function, something like the following:

// Did we find any trackables this frame?
    for(int tIdx = 0; tIdx < state.getNumTrackableResults(); tIdx++)
    {
        // Get the trackable:
        const QCAR::TrackableResult* result = state.getTrackableResult(tIdx);
        const QCAR::Trackable& trackable = result->getTrackable();

        QCAR::Matrix44F modelViewMatrix =
            QCAR::Tool::convertPose2GLMatrix(result->getPose());


        bool trackable_is_bad_target = false; //TODO 
        if ( trackable_is_bad_target ) {
        	break; //skip this trackable
        }
         ...

.

 

Change the tracking

March 26, 2013 - 10:00am #11

i wan to disable the rendrering of the teapot if my target (in my case it is a marker with a bad feature so that i change the tracking method) doesn't exist.

then i should render my object  in the center of the marker. 

Change the tracking

March 26, 2013 - 9:52am #10

Ok, thanks for the details; but what is the effect that you want to achieve in the end ?

 

Change the tracking

March 26, 2013 - 9:49am #9

i have changed this part :


 for(int tIdx = 0; tIdx < state.getNumTrackableResults(); tIdx++)
    {// Get the trackable: 
const QCAR::TrackableResult* result = state.getTrackableResult(tIdx); 
const QCAR::Trackable& trackable = result->getTrackable();
QCAR::Matrix44F modelViewMatrix = QCAR::Tool::convertPose2GLMatrix(result->getPose());
//ect

with 

const Texture* const thisTexture = textures[0];//textureIndex
        QCAR::Matrix44F modelViewMatrix;
               for (int i = 0; i < 16; ++i) modelViewMatrix.data[i] = 0;
               modelViewMatrix.data[0] = 1.0f;
               modelViewMatrix.data[5] = 1.0f;
               modelViewMatrix.data[10] = 1.0f;
               modelViewMatrix.data[15] = 1.0f;

i have seen this done here :https://developer.vuforia.com/forum/android/finding-recognition-part?page=1&sort=2

 

Change the tracking

March 26, 2013 - 9:31am #8

How exactly you want to change the modelview (with respect to what is being done in the Image targets sample) ?

 

Change the tracking

March 26, 2013 - 9:29am #7

thank you ,i have changed the tracking method now i want to render a 3D object as it is done on the original code of ImageTargets sample.so that i changed the render_frame method  exactly in the modelView matrix but i have a fix 3D teapot.it seams to be attached to the mobile screen not to the target detected.do you have any example how to render a 3D object, how to change the modelView matrix? 

Change the tracking

March 24, 2013 - 10:14am #6

No, you can't explicitly put your feature points into a dataset; the Vuforia API does not offer such possibility.

Basically, if you need such low levels functionalities, you will probably need to use some computer vision library and implement you own detec tion and tracking system.

 

 

Change the tracking

March 24, 2013 - 7:52am #5

IS it possible to define my own feature point and added it to the dataset to be tracked later?For example define a model in the begening of the camerastart and fix the points that i want to add to the dataset ,then match this points  for the tracking.really i don't know which algorithm i have to use to replace the existant tracking algorithm.Any help please?

Change the tracking

March 22, 2013 - 12:00pm #4

You cannot obtain the image of the target created via UDT; the API does not expose it.

One thing you can do however is to capture the Camera frame image at the time when the UDT target is built.

To do that, you can use the QCAR::State::getFrame() API.

For a detailed explanation on how to retrieve the camera image you can read this article:

https://developer.vuforia.com/forum/faq/android-how-can-i-access-camera-image

 

Change the tracking

March 22, 2013 - 10:02am #3

i'm using the UserDefinedTarget example.how can i access the target image?i know that the data are stored in a data set but i want the target as an image.

Change the tracking

March 22, 2013 - 4:44am #2

Hi,

yes, if you like to implement your own computer vision and tracking algorithms, nothing prevents you from doing it;

for information, this article explains how you can retrieve the camera image from Vuforia, so that you can process it the way you want:

https://developer.vuforia.com/forum/faq/android-how-can-i-access-camera-image

 

Log in or register to post comments