Log in or register to post comments

Query related to QCAR-API

July 20, 2011 - 9:51pm #1

Hi
I had asked u a query related to QCAR-API that:- Can u tell me what is the use Image.h header file in QCAR API. It says that it returns the object of camera device. So can we use this header file and use the object returned by camera device in place of the trackable.

And u had replied :-
Image.h represents the camera image from the camera object, not the camera itself. The State object contains the Frame object, which contains different representations of the camera image (e.g. grayscale, rgb565) for a given frame. You can get the Image object from the Frame and use it for extra image processing, graphical effects, etc.

So wherein would we find this frame if want to use it. Can we use it as a trackable??

Re: Query related to QCAR-API

September 18, 2011 - 10:02pm #13

Hi

Thanks for your reply. It helped me out.

Ash

Re: Query related to QCAR-API

September 15, 2011 - 10:42am #12

http://ar.qualcomm.at/node/2000230

- Kim

Re: Query related to QCAR-API

September 15, 2011 - 5:01am #11

Hi
I would like to know what should i do to increase the tracking performance. The tracker i am using has an 4 star rating in the My trackable section. The png image of the tracker is [ATTACH]71[/ATTACH]. I am drawing a 3d Tie on this Tracker. When i take the camera bit away or move it the Tie flickers a lot.. What is a right solution for this issue?? The devices on which i am testing are HTC Nexus One and HTC Desire..
Reply would be beneficial...

Also i have provided with a Capture button to capture the image when a 3d object is drawn on the tracker. But i want the Capture button to function only when the 3d image is drawn on the Tracker otherwise it should be disabled. At present i am able to capture the image when the tracker is not in front of the Camera even. How would i be able to achieve this???

Re: Query related to QCAR-API

August 2, 2011 - 12:36pm #10

Sorry posted on wrong forum!!!

Re: Query related to QCAR-API

August 1, 2011 - 11:28pm #9

Hi
I got the solution. Actually i needed to load a textured image also in the loadTextures()
method. I was loading only the image of the tie and so it was appearing to be black.

I have one more Query. Actually i want to load more than one 3d image on the same Tracker. That is as the tracker comes in position of the camera i want to show a scroll view with a list of images of the tie. And when a particular Tie is selected then that Tie should be displayed over the Tracker. What should be the approach for this to achieve.
Please let ur vital inputs on this.

Thanks in advance..

Re: Query related to QCAR-API

August 1, 2011 - 3:08pm #8

Does your model have texture coordinates? Are you binding your texture and texture coordinates using OpenGL as shown in the sample applications? Are you using OpenGL ES 1.1 or 2.0? We'll need some more details to help with this issue :)

- Kim

Re: Query related to QCAR-API

August 1, 2011 - 6:06am #7

Hi Kim
I am trying to place a 3d Tie in place of the teapot. But the tie is looking fully black. Whats the problem with my code. Why is the looking fully black.
Thank You.

Re: Query related to QCAR-API

July 28, 2011 - 7:52pm #6

You just need to be sure to call glReadPixels on the GLThread. You can do this from inside a click listener using something like this:

mGlView.queueEvent(new Runnable()
{
   public void run()
   {
       // screen shot code goes here
   }
});

mGlView is a member of the main activity class in the samples.

- Kim

Re: Query related to QCAR-API

July 27, 2011 - 4:02am #5

I tried the code in the link you had provided. I am able to capture the screen. But i dont want to call the SavePNG() method from onDrawFrame(). I want to capture the image when the user himself wants to. So i want to provide the user with a button for capturing the screen image. And when the button is clicked Screen should be captured. Can u provide me with some suggestions.

Re: Query related to QCAR-API

July 26, 2011 - 2:23pm #4

To capture an image containing both the camera and 3D augmentation you might try the OpenGL glReadPixels method. Here's a thread that might be helpful:

http://ar.qualcomm.at/node/2000427

You can call glReadPixels in Java or in native. Then it's up to you to convert the pixels to the correct format for your needs (e.g. creating an image, writing to a file, etc.)

- Kim

Re: Query related to QCAR-API

July 26, 2011 - 4:03am #3

Thanks for your reply.
Can u please provide me with a sample code of how to capture the image along with 3d textured teapot.

Thanks in advance...

Re: Query related to QCAR-API

July 23, 2011 - 3:20pm #2

Take a look at State.h, Frame.h, and Image.h. The State object is returned by this call in the sample applications (e.g. in the renderFrame method of ImageTargets.cpp):

QCAR::State state = QCAR::Renderer::getInstance().begin();

The State object has a getFrame() method, and the Frame object has a getImage() method.

- Kim

Log in or register to post comments