GithubHelp home page GithubHelp logo

danilovdorin / arucoaugmentedreality Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 6.01 MB

Trying to make augmented reality with Aruco and SceneKit

Objective-C 0.16% Swift 0.99% C++ 98.00% Objective-C++ 0.85%

arucoaugmentedreality's Introduction

ArucoAugmentedReality

Sample programs for OpenCV and Swift and iOS . I'm trying to make augmented reality demo project with simple 3d object in center of marker.

without success.

Screenshot on iOS

video on youtube with problem: https://www.youtube.com/watch?v=DF9JPv35XzE

OpenCV

Those projects uses OpenCV version 3.4.0. However, OpenCV binary isn't include in those projects. You can get OpenCV binary by following steps.

OpenCV for iOS

A binary version is available as it is.

  1. Download opencv-3.4.0-ios-framework.zip from https://sourceforge.net/projects/opencvlibrary/files/opencv-ios/3.4.0/opencv-3.4.0-ios-framework.zip/download.
  2. Unpack the file.
  3. Copy opencv2.framework into ArucoAugmentedReality directory.

arucoaugmentedreality's People

Contributors

danilovdorin avatar

Stargazers

 avatar Arda Ege Ünlü avatar  avatar

Watchers

Andy W avatar  avatar  avatar

arucoaugmentedreality's Issues

attempt to fix the 3d model position

Hi!
Great work for the sample code project. it helped me a lot in my project. Thanks a lot!
I have looked into the code and played around the numbers in the opencvwrapper. It might be the solution but i ain't sure if there is some real science explanation behind all these. What i did is to change the numbers in TransformModel method like below:
intrinMat.at<double>(0,0) = 1662.49; intrinMat.at<double>(1,0) = 0.0; intrinMat.at<double>(2,0) = 0.0; intrinMat.at<double>(0,1) = 0.0; intrinMat.at<double>(1,1) = 1662.49; intrinMat.at<double>(2,1) = 0.0; intrinMat.at<double>(0,2) = 840.0 / 3; intrinMat.at<double>(1,2) = 950.0 / 3 ; intrinMat.at<double>(2,2) = 0.0;
Notice the 2nd and 3rd line from the bottom got changed to 840 / 3 and 950 / 3.. Besides that I reversed the coordinates in this code block and the block you put in the bottom of the wrapper. From my iphone cam the white box seems to be centred!
I literally just played around all the numbers and it seems like you got some coordinates, math mistakes in the code. well, I am not sure why it is 840 or 950 anyway. the number was guessed based on many tries on my device.
BTW, do you have any idea how to merge this work with ARKit? I tried switching the sceneView to ARSCNview but thing doesn't work. seems like arkit only allows you to use its own arcamera?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.