Log in or register to post comments

Problem (issue) with the Direction of scanlines

February 4, 2013 - 7:51pm #1

Hi i have the older one SDK of vuforia in my application i have just updated it by migrating to newer SDK https://developer.vuforia.com/resources/dev-guide/migrating-your-ios-sdk-project

all works fine but when i start scanning the video is coming in perfect in portrait mode but the scan lines are coming in landscape mode. i dont know why this happening. i have changed the scanlines color and points color from here https://developer.vuforia.com/forum/android/deletion-scanlines-and-feature-points

can anybody can guide me what the issue with this.

Hi can you please let me know how can i change scanlines direction for iOS application. in my application whenever i start scan at that time it starts from left-right direction it is not responding to auto rotation. by the way i dont need autorotation i just need that scanline pattern always come from up-down side.

Problem (issue) with the Direction of scanlines

February 6, 2013 - 1:13am #4

I think that perhaps a good staring point would be the CloudReco sample and to experiment with the different rotations and see if the scan lines work as you are expecting.

This way you can try out the various orientations, rotations and auto-rotation features.

If this does what you expect it is simply a case of tracking down where exactly your sample is different, and searching through the code for "orientation" and "rotation" will help you to progress.

HTH

N

Problem (issue) with the Direction of scanlines

February 5, 2013 - 9:01pm #3

Hi NainS

I have tried like the above code but its not working for my application. but when i have commented the orientation code EAGLView.mm file within the CloudReco sample file at

that time the scan lines are coming from upside to downward sides only the scanline direction are not going to change..

i think this code is not going to affect the scan lines direction. and while commenting that code i have just seen difference is only the video size is going to change nothing more happens.

Problem (issue) with the Direction of scanlines

February 5, 2013 - 3:29am #2

Hi KCS_Mobile,

The video feed simply feeds the display rectangle regardless of any orientation i.e. the rotation should have no effect.

If the scan lines are in the wrong orientation then it's probably worth comparing against the Cloud Reco sample.  Chances are that the code might be missing the QCAR::setRotation(); code which the scanlines use to understand the current orientation.

If you look at the function below in the EAGLView.mm file within the CloudReco sample, then it will help to explain how it is used.

HTH

N

 

 

// *** QCAR will call this method on a single background thread ***

- (void)renderFrameQCAR

{

    [framebufferLock lock];

    [self setFramebuffer];

    

    if (qUtils.orientationChanged)

    {

        UIWindow* window = [UIApplication sharedApplication].keyWindow;

        

        QCAR::Vec2F screenSize;

        if (qUtils.orientation == UIInterfaceOrientationPortrait)

        {

            screenSize.data[0] = window.frame.size.width;

            screenSize.data[1] = window.frame.size.height;

            QCAR::onSurfaceChanged(qUtils.viewSize.width, qUtils.viewSize.height);

            QCAR::setRotation(QCAR::ROTATE_IOS_90);

            

            isActivityInPortraitMode = YES;

        }

        else if (qUtils.orientation == UIInterfaceOrientationPortraitUpsideDown)

        {

            screenSize.data[0] = window.frame.size.width;

            screenSize.data[1] = window.frame.size.height;

            QCAR::onSurfaceChanged(qUtils.viewSize.width, qUtils.viewSize.height);

            QCAR::setRotation(QCAR::ROTATE_IOS_270);

            

            isActivityInPortraitMode = YES;

        }

        else if (qUtils.orientation == UIInterfaceOrientationLandscapeLeft)

        {

            screenSize.data[0] = window.frame.size.height;

            screenSize.data[1] = window.frame.size.width;

            QCAR::onSurfaceChanged(qUtils.viewSize.height, qUtils.viewSize.width);

            QCAR::setRotation(QCAR::ROTATE_IOS_180);

            

            isActivityInPortraitMode = NO;

        }

        else if (qUtils.orientation == UIInterfaceOrientationLandscapeRight)

        {

            screenSize.data[0] = window.frame.size.height;

            screenSize.data[1] = window.frame.size.width;

            QCAR::onSurfaceChanged(qUtils.viewSize.height, qUtils.viewSize.width);

            QCAR::setRotation(1);

            

            isActivityInPortraitMode = NO;

        }

 

 

 

Log in or register to post comments