{"id":18271387,"url":"https://github.com/sonsongithub/CoreAR","last_synced_at":"2025-04-05T01:31:31.286Z","repository":{"id":66551703,"uuid":"1420617","full_name":"sonsongithub/CoreAR","owner":"sonsongithub","description":"AR(Augmented reality) framework for iOS, based on a visual code like ARToolKit","archived":false,"fork":false,"pushed_at":"2013-06-09T01:43:20.000Z","size":31980,"stargazers_count":251,"open_issues_count":6,"forks_count":40,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-21T20:44:25.203Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://sonson.jp","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sonsongithub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-02-28T07:45:53.000Z","updated_at":"2024-12-18T11:57:34.000Z","dependencies_parsed_at":"2023-02-20T06:31:21.011Z","dependency_job_id":null,"html_url":"https://github.com/sonsongithub/CoreAR","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonsongithub%2FCoreAR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonsongithub%2FCoreAR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonsongithub%2FCoreAR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonsongithub%2FCoreAR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sonsongithub","download_url":"https://codeload.github.com/sonsongithub/CoreAR/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276043,"owners_count":20912286,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T11:39:16.298Z","updated_at":"2025-04-05T01:31:26.275Z","avatar_url":"https://github.com/sonsongithub.png","language":"C","readme":"CoreAR.framework\r\n=======\r\n![](http://sonson.jp/wp/wp-content/uploads/2011/04/coreARSample.png)\r\n\r\nIntroduction and information\r\n=======\r\nCoreAR.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.\r\n\r\nTake 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.\r\n\r\nLicense\r\n=======\r\n[BSD License][].\r\n\r\nApp Store\r\n=======\r\nYou can take a sample application from [App Store][].\r\n\r\nSample code in C++\r\n=======\r\n\r\n\tfloat codeSize = 1;\r\n\tint croppingSize = 64;\r\n\tint threshold = 100;\r\n\tint width = (int)bufferSize.width;\r\n\tint height = (int)bufferSize.height;\r\n\r\n\t// do it\r\n\tif (chaincodeBuff == NULL)\r\n\t\tchaincodeBuff = (unsigned char*)malloc(sizeof(unsigned char) * width * height);\r\n\r\n\t// binarize for chain code\r\n\tfor (int y = 0; y \u003c height; y++)\r\n\t\tfor (int x = 0; x \u003c width; x++)\r\n\t\t\t*(chaincodeBuff + x + y * width) = *(buffer + x + y * width) \u003c threshold ? CRChainCodeFlagUnchecked : CRChainCodeFlagIgnore;\r\n\r\n\t// prepare to parse chain code\r\n\tCRChainCode *chaincode = new CRChainCode();\r\n\tchaincode-\u003eparsePixel(chaincodeBuff, width, height);\r\n\r\n\t// clear previous buffer\r\n\tCRCodeList::iterator it = codeListRef-\u003ebegin();\r\n\twhile(it != codeListRef-\u003eend()) {\r\n\t\tSAFE_DELETE(*it);\r\n\t\t++it;\r\n\t}\r\n\tcodeListRef-\u003eclear();\r\n\r\n\t// reload detected codes\r\n\tif (!chaincode-\u003eblobs-\u003eempty()) {\r\n\t\tstd::list\u003cCRChainCodeBlob*\u003e::iterator blobIterator = chaincode-\u003eblobs-\u003ebegin();\r\n\t\twhile(blobIterator != chaincode-\u003eblobs-\u003eend()) {\r\n\t\t\tif (!(*blobIterator)-\u003eisValid(width, height)) {\r\n\t\t\t\tblobIterator++;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tCRCode *code = (*blobIterator)-\u003ecode();\t\r\n\t\t\tif(code) {\r\n\t\t\t\t// estimate and optimize pose and position\r\n\t\t\t\tcode-\u003enormalizeCornerForImageCoord(width, height, focalLength, focalLength);\r\n\t\t\t\tcode-\u003egetSimpleHomography(codeSize);\r\n\t\t\t\tcode-\u003eoptimizeRTMatrinxWithLevenbergMarquardtMethod();\r\n\t\t\t\t\r\n\t\t\t\t// cropping code image area\r\n\t\t\t\tcode-\u003ecrop(croppingSize, croppingSize, focalLength, focalLength, codeSize, buffer, width, height);\r\n\t\t\t\tcodeListRef-\u003epush_back(code);\r\n\t\t\t}\r\n\t\t\tblobIterator++;\r\n\t\t}\r\n\t}\r\n\r\nSample code in C (depracted)\r\n=======\r\n\r\n\t// Copy image buffer from camera into \"pixel\".\r\n\tint width;\r\n\tint height;\r\n\tunsigned char *pixel = (unsigned char*)malloc(sizeof(unsigned char) * width * height);\r\n\t\r\n\t// codeInfoStorage receives the result of visual code recognition.\r\n\tCRCodeInfoStorage *codeInfoStorage = CRCreateCodeInfoStorage();\r\n\t\r\n\t// storage to save visual code templates.\r\n\tCRCodeImageTemplate *codeImageTemplateStorage = CRCreateCodeImageTemplateStorage();\r\n\t\r\n\t// make template to recognize visual codes.\r\n\tint c_width;\r\n\tint c_height;\r\n\tunsigned char *c_p = (unsigned char*)malloc(sizeof(unsigned char) * c_width * c_height);\r\n\t\r\n\t/* read images of visual codes you want to recognize */\r\n\t\r\n\tCRCodeImageTemplate *template = CRCreateCodeImageTemplate(c_p, c_width, c_height);\r\n\ttemplate-\u003ecode = codeNumber;\r\n\ttemplate-\u003esize = codeSize;\r\n\tCRCodeImageTemplateStorageAddNewTemplate(codeImageTemplateStorage, template);\r\n\tfree(c_p);\r\n\t\r\n\t// Start extraction\r\n\tCRChainCodeStorage *storage = CRCreateChainCodeStorageByParsingPixel(pixel, width, height);\r\n\tCRChainCodeStorageDetectCornerWithLSM(storage);\r\n\tCRCodeInfoStorageAddCodeInfoByExtractingFromChainCode(codeInfoStorage, storage, valueBuffer, width, height, codeImageTemplateStorage);\r\n\t\r\n\t// Release\r\n\tCRReleaseChainCodeStorage(\u0026storage);\r\n\tCRReleaseCodeInfoStorage(\u0026codeInfoStorage);\r\n\tfree(pixel);\r\n\r\nFrequently Asked Questions\r\n=======\r\n * I can't compile CoreAR.framework...\r\n   * Ans. 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.\r\n   \r\n * How do I render a 3D model on the code with CoreAR.framework?\r\n   * 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.\r\n\r\nBlog\r\n=======\r\n * [sonson.jp][]\r\nSorry, Japanese only....\r\n\r\nDependency\r\n=======\r\n * [Quartz Help Library][]\r\n * [Real time image processing framework for iOS][]\r\n \r\nAcknowledgement\r\n=======\r\n * [DENSO IT Laboratory, Inc.][] has supported my work.\r\n * There are some public projects supported by [DENSO IT Laboratory, Inc.][] in [cvlab.jp][].\r\n\r\n[cvlab.jp]: http://cvlab.jp/\r\n[DENSO IT Laboratory, Inc.]: http://www.d-itlab.co.jp/\r\n[App Store]: http://click.linksynergy.com/fs-bin/click?id=he6amglY4cw\u0026subid=\u0026offerid=94348.1\u0026type=10\u0026tmpid=3910\u0026RD_PARM1=http%3A%2F%2Fitunes.apple.com%2Fus%2Fapp%2Fcorear%2Fid428844303%3Fmt%3D8%2526ls%3D1\r\n[sonson.jp]: http://sonson.jp\r\n[BSD License]: http://www.opensource.org/licenses/bsd-license.php\r\n[Quartz Help Library]: https://github.com/sonsongithub/Quartz-Help-Library\r\n[Real time image processing framework for iOS]: https://github.com/sonsongithub/iOSCameraImageProcessing","funding_links":[],"categories":["etc"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonsongithub%2FCoreAR","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonsongithub%2FCoreAR","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonsongithub%2FCoreAR/lists"}