Log in or register to post comments

Extracting Target Pictures from Dataset DAT File

June 9, 2019 - 9:06am #1

Hi Everyone,

I know that DAT file actually is a ZIP file including:

  • config.feat
  • config.info
  • Target#01.kpts
  • Target#01.tex.jpg
  • Target#02.kpts
  • Target#02.tex.jpg
  • ...

JPG file is a scaled down grayscale version of the original target image.

But in Unity you can see that just after adding "Image Target" object to your scene and importing your Vuforia Dataset to the project, your target image can be seen in RGB format right in the middle of the scene. Although the image will automatically added to "Assets/Editor/Vuforia/ImageTargetTextures/<dataset name>/<target name>_scaled.jpg" path and it is in RGB format.

So I think the RGB format of the target image should be available or extractable somewhere in the DAT file content.

Do you have any clue how I can take out RGB image file from the DAT file?

I want to show the dataset content (Target No, Target Name, Target ID(internal use), Target Image, Binding Content) in my App Web Dashboard and let my user look at his/her AR Dataset fast and simple. I don't want to refer him/her to go to the Vuforia Dev Portal to see whats happening.

Thank you so much.

Extracting Target Pictures from Dataset DAT File

June 11, 2019 - 11:07am #4

Hello,

Glad you figured it out. Unfortunately, our forum software is dated and doesn't provide ways to tag or promote them posts. <sad face> :-(

Good luck!

-Vuforia Engine Support

Extracting Target Pictures from Dataset DAT File

June 11, 2019 - 5:35am #3

Dear #medabit,

Thank you so much for your inspiring reply.

 

So the key to RGB image file is using <dataset file>.unitypackage instead of just using DAT/XML files.

For those who are not familiar with .unitypackage file extension, it is indeed a .tar.gz compressed file (ref.1)(ref.2) including several folders with GUID-like names and each folder includes three files:

  1. asset: payload file itself. it can be a JPG, XML or DAT file.
  2. metaData
  3. pathname: path of the file in Unity project and the payload file name. Here you can find what is the type (file extension) and name of the "asset" file.

 

Folders you will find in .tar.gz file include:

  1. One folder for Vuforia Dataset XML file
  2. One folder for Vuforia Dataset DAT file
  3. Several folders including all of the RGB thumbnails of the Target Images

So folder count is equal to your dataset target images + 2 for DAT and XML files.

Now I can extract the RGB thumbnails of target images I need for our Web Dashboard.

Thanks,

 

P.S: Sorry, I'm new to Vuforia forums. How Can I accept #medabit 's reply as accepted solution and close this thread?

Extracting Target Pictures from Dataset DAT File

June 10, 2019 - 11:58am #2

Hello,

The RGB image you're seeing in the Unity Editor is generated when the device database is created on the Vuforia Engine Target Manager. During import to the Unity Editor, this image is copied into the project as a helpful icon for developers.

Vuforia Engine computer vision algorithms work in grayscale, so there is no need to package the color image for the Vuforia Engine SDK.

Thanks,

Vuforia Engine Support

Log in or register to post comments