Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

This blog is part of 1 Tute Sets.

Vuforia Android implementation
  • How to scan image from cloud database using Vuforia ?

    • 1/1
    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 975
    Comment on it

    Using Vuforia we can scan any label and image from cloud database of Vuforia.

    You need to create free developer account there and then you can create your own application.

    Then you can create your database in develop tab where you  have 2 parts License manager and target manager.

    In target manager you can add images in database and can check client secret and access key, these keys will help us in image recognition.

    Now you can download Vuforia sdk from here :

    https://developer.vuforia.com/downloads/sdk

    and you have to change following lines of code for cloud recognition so go to cloud recognition folder in vuforia sample then set client secret n access key :

    private static final String kAccessKey = "74dc2vvvvvvvvvvvvvvvvvvvvvvvvvvv247";
    private static final String kSecretKey = "89fd022xxxxxxxxxxxxxxxxxxxxxx2f7cd9";

    and in your vuforia update method of class CloudReco you can get particular image detail that you were searching for.

    Example :

    @Override
    public void onVuforiaUpdate(State state)
    {
        // Get the tracker manager:
        TrackerManager trackerManager = TrackerManager.getInstance();
    
        // Get the object tracker:
        ObjectTracker objectTracker = (ObjectTracker) trackerManager
                .getTracker(ObjectTracker.getClassType());
    
        // Get the target finder:
        TargetFinder finder = objectTracker.getTargetFinder();
    
        // Check if there are new results available:
        final int statusCode = finder.updateSearchResults();
    
        // Show a message if we encountered an error:
        if (statusCode < 0)
        {
    
            boolean closeAppAfterError = (
                    statusCode == UPDATE_ERROR_NO_NETWORK_CONNECTION ||
                            statusCode == UPDATE_ERROR_SERVICE_NOT_AVAILABLE);
    
            showErrorMessage(statusCode, state.getFrame().getTimeStamp(), closeAppAfterError);
    
        } else if (statusCode == TargetFinder.UPDATE_RESULTS_AVAILABLE)
        {
            // Process new search results
            if (finder.getResultCount() > 0)
            {
                TargetSearchResult result = finder.getResult(0);
    
                // Check if this target is suitable for tracking:
                if (result.getTrackingRating() > 0)
                {
                    Trackable trackable = finder.enableTracking(result);
    
                    if (mExtendedTracking)
                        trackable.startExtendedTracking();
    
                    Log.e("cloud reco:", result.getUniqueTargetId() + "");
    
                }
            }
        }
    }

    TargetSearchResult will return the matched target id from your cloud database.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: