Log in or register to post comments

Orientation of "Image" extracted from "Frame" object, how to change it?

August 19, 2012 - 4:07pm #1

Hi

Since I cant change the rendering code of the application, I need to extract "Image" from the "Frame" object in function "renderFrameQCAR" and use it. Problem I have is I can't find any way to control the orientation of this image. I always get (on iPad) 640 * 480 landscape image (Image looks correct only in landscape right orientation).

I initially got excited when I saw function QCAR::setRotation() but it turned out it is available only with Unity version of iOS library. What options do I have? Or do I need to rotate and rescale the image myself?

Thanks 

S

Orientation of "Image" extracted from "Frame" object, how to

August 24, 2012 - 3:02am #7

HI STKSTK,

After discussing with a few developers this is used mainly by the Unity plug-in at the OpenGL texture level i.e. a stage beyond the camera feed.

So it will not provide the results that you are after.  None of the samples use this function.

HTH

N

Orientation of "Image" extracted from "Frame" object

August 22, 2012 - 7:06am #6

I am referring to following function (https://ar.qualcomm.at/sites/default/files/docs/qcarsdk/namespace_q_c_a_r.html) -

void QCAR_API QCAR::setRotation ( int rotation )  

Sets the current rotation to be applied to the projection and background.

iOS: Called to set any rotation on the QCAR rendered video background and projection matrix applied to an augmentation after an auto rotation. This is used for integration of QCAR with Unity on iOS. See sample apps for how to handle auto-rotation on non-Unity apps.

-S

Orientation of "Image" extracted from "Frame" object, how to?

August 22, 2012 - 3:00am #5

Sorry, which setRotation() in Unity are you referring to in Unity?

N

Orientation of "Image" extracted from "Frame" object

August 21, 2012 - 10:55am #4

Thanks N, I will take a look at handleARViewRotation to transform the image myself. Is there any reason why setRotation() is offered in Unity version of library but not in regular iOS? Would you consider this enhancement for future release?

Thanks

S

Orientation of "Image" extracted from "Frame" object?

August 21, 2012 - 7:16am #3

Hi STKSTK,

Yes the camera frame will always come through in Landscape mode i.e. wider than it is tall, so you will need to rotate it for your needs, and then scale if required.

You can check how it sets/deals with the current orientation in handleARViewRotation() in ARViewController.mm in order to determne the transformation you need to make. 

HTH

N

Orientation of "Image" extracted from "Frame" object

August 21, 2012 - 6:54am #2

Has anyone stumbled across this issue? I am kind of stuck right now, not sure if only solution is to actually rotate and scale the image from the frame in my code?

Any help is appreciated.

Thanks

Log in or register to post comments