Announcement

Collapse
No announcement yet.

Is it possible to identify QR codes and track 3d objects to them? (augmented reality)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Is it possible to identify QR codes and track 3d objects to them? (augmented reality)

    I'm looking to do something like this, https://www.youtube.com/watch?featur...&v=OBDUuyNgPmE.
    I haven't seen anyone try to use 3d tracking of QR codes for augmented reality, or even simply a phone's camera yet.

    #2
    I don't think that UE4 APIs can even get camera input, you would need to implement that
    =========
    My Tutorials:
    Basic knowledge about Classes and UObject environment and stuff like that

    Comment


      #3
      Qualcomm provides an augmented reality SDK known Vuforia: https://www.vuforia.com/

      It seems to only support mobile platforms, but since you specifically mentioned "a phone's camera" that might be suitable for your purposes. They have support for a concept known as "frame markers" which are very similar to QR codes.

      Comment


        #4
        Originally posted by zspace View Post
        I'm looking to do something like this, https://www.youtube.com/watch?featur...&v=OBDUuyNgPmE.
        I haven't seen anyone try to use 3d tracking of QR codes for augmented reality, or even simply a phone's camera yet.
        Definitely possible!

        You will have to create something like a Plugin or Module to accomplish this though. A simple way to do this would be to create a custom UObject or even as an Actor you can place in the scene. If you create a UObject, make sure that it implements FTickableGameObject. In your constructor, create an instance of your webcam using something like OpenCV. In your Tick() method, get the current frame from the webcam, and then pass the image data to a library that can detect if a QR Code is present or not. There are restrictions so when you test, make sure the QR Code has somewhat of a white margin surrounding it as the algorithms need some form of whitespace surrounding the QR Code.

        If you need a hand implementing FTickableGameObject if you choose to go the route of a custom UObject, you can find some sample code I wrote below for you... Good Luck!

        Code:
        UCLASS(Blueprintable, BlueprintType)
        class UQRCodeProcessor: public UObject, public FTickableGameObject
        {
        	GENERATED_UCLASS_BODY()
        
        	virtual void Tick(float DeltaTime) OVERRIDE;
        	virtual bool IsTickable() const OVERRIDE
        	{
        		return true;
        	}
        	virtual bool IsTickableWhenPaused() const OVERRIDE
        	{
        		return true;
        	}
        	virtual TStatId GetStatId() const OVERRIDE
        	{
        		RETURN_QUICK_DECLARE_CYCLE_STAT(UQRCodeProcessor, STATGROUP_Tickables);
        	}
        };
        Last edited by MC Stryker; 05-02-2014, 04:09 PM.

        Comment


          #5
          Hey, did you manage to integrate Vuforia with UE4?

          Comment


            #6
            Sorry, but no. I didn't really try much, so there's still a chance.

            Comment

            Working...
            X