Skip to content
/ CoreAR Public
forked from sonsongithub/CoreAR

AR(Augmented reality) framework for iOS, based on a visual code like ARToolKit

License

Notifications You must be signed in to change notification settings

talesp/CoreAR

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CoreAR.framework

Introduction and information

CoreAR.framework is open source AR framework. You can make an AR application using visual code like ARToolKit using this framework. CoreAR.framework does not depend on the other computer vision library like OpenCV. Considered portability, this framework is written only C or C++. The pixel array of an image is passed to CoreAR.framework and then visual code's identification number, rotation and translation matrix are obtained from the image including a visual code. Image processing speed of this framework is about 15 fps on iPhone4.

Take notice that CoreAR.framework depends on Quartz Help Library and Real time image processing framework for iOS. You have to download these libraries and put on them at the path where CoreAR.framework has been installed.

License

BSD License.

App Store

You can take the sample application "CoreAR" from App Store.

Sample code in C++

To be done.

Sample code in C

// Copy image buffer from camera into "pixel".
int width;
int height;
unsigned char *pixel = (unsigned char*)malloc(sizeof(unsigned char) * width * height);

// codeInfoStorage receives the result of visual code recognition.
CRCodeInfoStorage *codeInfoStorage = CRCreateCodeInfoStorage();

// storage to save visual code templates.
CRCodeImageTemplate *codeImageTemplateStorage = CRCreateCodeImageTemplateStorage();

// make template to recognize visual codes.
int c_width;
int c_height;
unsigned char *c_p = (unsigned char*)malloc(sizeof(unsigned char) * c_width * c_height);

/* read images of visual codes you want to recognize */

CRCodeImageTemplate *template = CRCreateCodeImageTemplate(c_p, c_width, c_height);
template->code = codeNumber;
template->size = codeSize;
CRCodeImageTemplateStorageAddNewTemplate(codeImageTemplateStorage, template);
free(c_p);

// Start extraction
CRChainCodeStorage *storage = CRCreateChainCodeStorageByParsingPixel(pixel, width, height);
CRChainCodeStorageDetectCornerWithLSM(storage);
CRCodeInfoStorageAddCodeInfoByExtractingFromChainCode(codeInfoStorage, storage, valueBuffer, width, height, codeImageTemplateStorage);

// Release
CRReleaseChainCodeStorage(&storage);
CRReleaseCodeInfoStorage(&codeInfoStorage);
free(pixel);

Frequently Asked Questions

  • I can't compile CoreAR.framework...

  • How do I render a 3D model on the code with CoreAR.framework?

    • Ans. CoreAR.framework does not support rendering any 3D model files. You have to write a code to render 3D model files with OpenGLES. Sample program does not render a cube and Utah teapot with 3D model files but with OpenGLES code.

Blog

Dependency

Acknowledgement

DENSO IT Laboratory, Inc. has supported my work. Thank you.

About

AR(Augmented reality) framework for iOS, based on a visual code like ARToolKit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published