welcome to linkAR technical documentation

next previous

Add Images

3.1.- Adding images data drom the .dat file

Generate data files at: http://developers.arlab.com/immtraining

The image will be converted and you will receive an email with the image in processed format. You can add those files to the libary.

NSNumber* res = [_imageTracker addImageFromData:[NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"ARLab@29_Wheel500jpgdetector_data" ofType:@"dat"]]];
NSLog(@"*** Image named %@, with id %d %@ ***", @"ARLab@29_Wheel500jpgdetector_data.data", 
      [res intValue], [res intValue] != -1 ? @"ADDED":@"NOT ADDED");

3.2.- Adding images to overlay

To use the overlay image feature the following function applies:

NSString* trackImageName=@"Wheel500Overlay.png";
[_imageTracker setTrackedImageOverlay:trackImageName forImageId:res];

Where res is an NSNumber containing the ID of an already added image. This will place the image over the image to track.

NOTE: Adding a lot of images to the pool may cause a memory warning so we recommend to control it using the method didReceiveMemoryWarning. Check out this blog post: http://www.arlab.com/blog/fingerprint-extraction-for-matching-tracking/

next previous