Scala Native Documentation Release 0.1

Total Page:16

File Type:pdf, Size:1020Kb

Scala Native Documentation Release 0.1 Scala Native Documentation Release 0.1 Denys Shabalin Mar 14, 2017 Contents 1 Community 3 2 Documentation 5 2.1 User’s Guide...............................................5 2.2 Libraries................................................. 12 2.3 Contributor’s Guide........................................... 21 2.4 FAQ.................................................... 37 i ii Scala Native Documentation, Release 0.1 Scala Native is an optimizing ahead-of-time compiler and lightweight managed runtime designed specifically for Scala. It features: • Low-level primitives. type Vec = CStruct3[Double, Double, Double] val vec = stackalloc[Vec] // allocate c struct on stack !vec._1 = 10.0 // initialize fields !vec._2 = 20.0 !vec._3 = 30.0 length(vec) // pass by reference Pointers, structs, you name it. Low-level primitives let you hand-tune your application to make it work exactly as you want it to. You’re in control. • Seamless interop with native code. @extern object stdlib { def malloc(size: CSize): Ptr[Byte] = extern } val ptr = stdlib.malloc(32) Calling C code has never been easier. With the help of extern objects you can seamlessly call native code without any runtime overhead. • Instant startup time. > time hello-native hello, native! real 0m0.005s user 0m0.002s sys 0m0.002s Scala Native is compiled ahead-of-time via LLVM. This means that there is no sluggish warm-up phase that’s common for just-in-time compilers. Your code is immediately fast and ready for action. Contents 1 Scala Native Documentation, Release 0.1 2 Contents CHAPTER 1 Community • Want to follow project updates? Follow us on twitter. • Want to chat? Join our Gitter chat channel. • Have a question? Ask it on Stack Overflow with tag scala-native. • Found a bug or want to propose a new feature? Open an issue on Github. 3 Scala Native Documentation, Release 0.1 4 Chapter 1. Community CHAPTER 2 Documentation This documentation is divided into different parts. It’s recommended to go through the User’s Guide to get familiar with Scala Native. Libraries will walk you through all the known libraries that are currently available. Contributor’s Guide contains valuable information for people who want to eithercontribute to the project or learn more about the internals and the development process behind the project. User’s Guide Environment setup This is what you will be doing, in a nutshell: • installation of SBT • installation of LLVM and Clang • installation of Boehm GC Installing SBT Please refer to this link for instructions for your OS. Installing LLVM, Clang and Boehm GC Boehm GC and LLVM (that includes Clang) are Scala Native’s only external dependencies. Here are install instruc- tions for a number of operating systems Scala Native has been used with: Ubuntu: $ sudo apt-get install clang libgc-dev libunwind-dev macOS: 5 Scala Native Documentation, Release 0.1 $ brew install llvm bdw-gc FreeBSD: $ pkg install llvm38 boehm-gc libunwind nix/nixOS: $ wget https://raw.githubusercontent.com/scala-native/scala-native/master/bin/scala- ,!native.nix $ nix-shell scala-native.nix -A clangEnv Continue to Building projects with SBT. Building projects with SBT If you have reached this section you probably have a system that is now able to compile and run Scala Native programs. Minimal sbt project Start within a new folder, and create a file project/plugins.sbt as follows: addSbtPlugin("org.scala-native"%"sbt-scala-native"%"0.1.0") Create a file project/build.properties to define the sbt version as follows: sbt.version= 0.13.13 define a new build.sbt: enablePlugins(ScalaNativePlugin) scalaVersion :="2.11.8" and now you can write your first application in ./src/main/scala/HelloWorld.scala: package example object Main { def main(args: Array[String]): Unit= println("Hello, world!") } now simply run sbt run to get everything compiled and have the expected output! Sbt settings Name Type Description nativeClang File Path to clang command nativeClangPP File Path to clang++ command nativeCompileOptions Seq[String] Extra options passed to clang verbatim nativeMode String Either "debug" or "release" (1) See Compilation modes for details. 6 Chapter 2. Documentation Scala Native Documentation, Release 0.1 Sbt tasks Name Description compile Compile Scala code to NIR nativeLink Link NIR and generate native binary run Compile, link and run the generated binary package Similar to standard package with addition of NIR publish Similar to standard publish with addition of NIR (1) See Publishing for details. Compilation modes Scala Native supports two distinct linking modes: 1. debug. Default mode. Optimized for shortest compilation time. Runs fewer optimizations and is much more suited for iterative development workflow. Similar to clang’s -O0. 2. release. Optimized for best runtime performance at expense of longer compilation time. Similar to clang’s -O2 with addition of link-time optimisation over the whole application code. Publishing Scala Native supports sbt’s standard workflow for the package distribution: 1. Compile your code. 2. Generate a jar with all of the classfiles and NIR files. 3. Publish the jar to sonatype, bintray or any other 3rd party hosting service. Once the jar has been published, it can be resolved through sbt’s standard package resolution system. Cross compilation between JS, JVM and Native We created sbt-crossproject to be a drop-in replacement of Scala.js’ crossProject. Please refer to its documentation in the README. Continue to Language semantics. Language semantics In general, the semantics of the Scala Native language are the same as Scala on the JVM. However, a few differences exist, which we mention here. Interop extensions Annotations and types defined scala.scalanative.native may modify semantics of the language for sake of interoperability with C libraries, read more about those in Native code interoperability section. 2.1. User’s Guide 7 Scala Native Documentation, Release 0.1 Multithreading Scala Native doesn’t yet provide libraries for parallel multi-threaded programming and assumes single-threaded exe- cution by default. It’s possible to use C libraries to get access to multi-threading and synchronization primitives but this is not officially supported at the moment. Undefined behavior A number of error conditions which are well-defined on JVM are undefined behavior: 1. Dereferencing null. 2. Division by zero. 3. Stack overflows. Those typically crash application with a segfault on the supported architectures. Continue to Native code interoperability. Native code interoperability Scala Native provides an interop layer that makes it easy to interact with foreign native code. This includes C and other languages that can expose APIs via C ABI (e.g. C++, D, Rust etc.) All of the interop APIs discussed here are defined in scala.scalanative.native package. For brevity, we’re going to refer to that namespace as just native. Extern objects Extern objects are simple wrapper objects that demarcate scopes where methods are treated as their native C ABI- friendly counterparts. They are roughly analogous to header files with top-level function declarations in C. For example to call C’s malloc one might declare it as following: @native.extern object libc { def malloc(size: native.CSize): native.Ptr[Byte] = native.extern } native.extern on the right hand side of the method definition signifies that the body of the method is defined elsewhere in a native library that is available on the library path (see Linking with native libraries.) Signature of the extern function must match the signature of the original C function (see Finding the right signature.) Finding the right signature To find a correct signature for a given C function one must provide an equivalent Scala type for each of the arguments: 8 Chapter 2. Documentation Scala Native Documentation, Release 0.1 C Type Scala Type void Unit bool native.CBool char, signed char native.CChar unsigned char native.CUnsignedChar (1) short native.CShort unsigned short native.CUnsignedShort (1) int native.CInt unsigned int native.CUnsignedInt (1) long native.CLong unsigned long native.CUnsignedLong (1) long long native.CLongLong unsigned long long native.CUnsignedLongLong (1) size_t native.CSize wchar_t native.CWideChar char16_t native.CChar16 char32_t native.CChar32 float native.CFloat double native.CDouble void* native.Ptr[Byte] (2) int* native.Ptr[native.CInt] (2) char* native.CString (2) (3) int (*)(int) native.CFunctionPtr1[native.CInt, native.CInt] (2) (4) struct { int x, y; }* native.Ptr[native.CStruct2[native.CInt, native.CInt]] (2) (5) struct { int x, y; } Not supported 1. See Unsigned integer types. 2. See Pointer types. 3. See Byte strings. 4. See ‘Function pointers‘_. 5. See Memory layout types. Linking with native libraries In C/C++ one has to typically pass an additional -l mylib flag to dynamically link with a library. In Scala Native one can annotate libraries to link with using @native.link annotation: @native.link("mylib") @native.extern object mylib { ... } Whenever any of the members of mylib object are reachable, the Scala Native linker will automatically link with the corresponding native library. Variadic functions One can declare variadic functions like printf using native.CVararg auxiliary type: 2.1. User’s Guide 9 Scala Native Documentation, Release 0.1 @native.extern object stdio { def printf(format: native.CString, args: native.CVararg*): native.CInt = native.extern } Pointer types Scala Native provides a built-in equivalent of C’s pointers via native.Ptr[T] data type. Under the hood pointers are implemented using unmanaged machine pointers. Operations on pointers are closely related to their C counterparts and are compiled into equivalent machine code: Operation C syntax Scala Syntax Load value *ptr !ptr Store value *ptr = value !ptr = value Pointer to index ptr + i, &ptr[i] ptr + i Load at index ptr[i] ptr(i) Store at index ptr[i] = value ptr(i) = value Pointer to field &ptr->name ptr._N Load a field ptr->name !ptr._N Store a field ptr->name = value !ptr._N = value Where N is the index of the field name in the struct.
Recommended publications
  • Neuron C Reference Guide Iii • Introduction to the LONWORKS Platform (078-0391-01A)
    Neuron C Provides reference info for writing programs using the Reference Guide Neuron C programming language. 078-0140-01G Echelon, LONWORKS, LONMARK, NodeBuilder, LonTalk, Neuron, 3120, 3150, ShortStack, LonMaker, and the Echelon logo are trademarks of Echelon Corporation that may be registered in the United States and other countries. Other brand and product names are trademarks or registered trademarks of their respective holders. Neuron Chips and other OEM Products were not designed for use in equipment or systems, which involve danger to human health or safety, or a risk of property damage and Echelon assumes no responsibility or liability for use of the Neuron Chips in such applications. Parts manufactured by vendors other than Echelon and referenced in this document have been described for illustrative purposes only, and may not have been tested by Echelon. It is the responsibility of the customer to determine the suitability of these parts for each application. ECHELON MAKES AND YOU RECEIVE NO WARRANTIES OR CONDITIONS, EXPRESS, IMPLIED, STATUTORY OR IN ANY COMMUNICATION WITH YOU, AND ECHELON SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of Echelon Corporation. Printed in the United States of America. Copyright © 2006, 2014 Echelon Corporation. Echelon Corporation www.echelon.com Welcome This manual describes the Neuron® C Version 2.3 programming language. It is a companion piece to the Neuron C Programmer's Guide.
    [Show full text]
  • Navigation Techniques in Augmented and Mixed Reality: Crossing the Virtuality Continuum
    Chapter 20 NAVIGATION TECHNIQUES IN AUGMENTED AND MIXED REALITY: CROSSING THE VIRTUALITY CONTINUUM Raphael Grasset 1,2, Alessandro Mulloni 2, Mark Billinghurst 1 and Dieter Schmalstieg 2 1 HIT Lab NZ University of Canterbury, New Zealand 2 Institute for Computer Graphics and Vision Graz University of Technology, Austria 1. Introduction Exploring and surveying the world has been an important goal of humankind for thousands of years. Entering the 21st century, the Earth has almost been fully digitally mapped. Widespread deployment of GIS (Geographic Information Systems) technology and a tremendous increase of both satellite and street-level mapping over the last decade enables the public to view large portions of the 1 2 world using computer applications such as Bing Maps or Google Earth . Mobile context-aware applications further enhance the exploration of spatial information, as users have now access to it while on the move. These applications can present a view of the spatial information that is personalised to the user’s current context (context-aware), such as their physical location and personal interests. For example, a person visiting an unknown city can open a map application on her smartphone to instantly obtain a view of the surrounding points of interest. Augmented Reality (AR) is one increasingly popular technology that supports the exploration of spatial information. AR merges virtual and real spaces and offers new tools for exploring and navigating through space [1]. AR navigation aims to enhance navigation in the real world or to provide techniques for viewpoint control for other tasks within an AR system. AR navigation can be naively thought to have a high degree of similarity with real world navigation.
    [Show full text]
  • Parallel Range, Segment and Rectangle Queries with Augmented Maps
    Parallel Range, Segment and Rectangle Queries with Augmented Maps Yihan Sun Guy E. Blelloch Carnegie Mellon University Carnegie Mellon University [email protected] [email protected] Abstract The range, segment and rectangle query problems are fundamental problems in computational geometry, and have extensive applications in many domains. Despite the significant theoretical work on these problems, efficient implementations can be complicated. We know of very few practical implementations of the algorithms in parallel, and most implementations do not have tight theoretical bounds. In this paper, we focus on simple and efficient parallel algorithms and implementations for range, segment and rectangle queries, which have tight worst-case bound in theory and good parallel performance in practice. We propose to use a simple framework (the augmented map) to model the problem. Based on the augmented map interface, we develop both multi-level tree structures and sweepline algorithms supporting range, segment and rectangle queries in two dimensions. For the sweepline algorithms, we also propose a parallel paradigm and show corresponding cost bounds. All of our data structures are work-efficient to build in theory (O(n log n) sequential work) and achieve a low parallel depth (polylogarithmic for the multi-level tree structures, and O(n) for sweepline algorithms). The query time is almost linear to the output size. We have implemented all the data structures described in the paper using a parallel augmented map library. Based on the library each data structure only requires about 100 lines of C++ code. We test their performance on large data sets (up to 108 elements) and a machine with 72-cores (144 hyperthreads).
    [Show full text]
  • Handwritten Digit Classication Using 8-Bit Floating Point Based Convolutional Neural Networks
    Downloaded from orbit.dtu.dk on: Apr 10, 2018 Handwritten Digit Classication using 8-bit Floating Point based Convolutional Neural Networks Gallus, Michal; Nannarelli, Alberto Publication date: 2018 Document Version Publisher's PDF, also known as Version of record Link back to DTU Orbit Citation (APA): Gallus, M., & Nannarelli, A. (2018). Handwritten Digit Classication using 8-bit Floating Point based Convolutional Neural Networks. DTU Compute. (DTU Compute Technical Report-2018, Vol. 01). General rights Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights. • Users may download and print one copy of any publication from the public portal for the purpose of private study or research. • You may not further distribute the material or use it for any profit-making activity or commercial gain • You may freely distribute the URL identifying the publication in the public portal If you believe that this document breaches copyright please contact us providing details, and we will remove access to the work immediately and investigate your claim. Handwritten Digit Classification using 8-bit Floating Point based Convolutional Neural Networks Michal Gallus and Alberto Nannarelli (supervisor) Danmarks Tekniske Universitet Lyngby, Denmark [email protected] Abstract—Training of deep neural networks is often con- In order to address this problem, this paper proposes usage strained by the available memory and computational power. of 8-bit floating point instead of single precision floating point This often causes it to run for weeks even when the underlying which allows to save 75% space for all trainable parameters, platform is employed with multiple GPUs.
    [Show full text]
  • High Dynamic Range Video
    High Dynamic Range Video Karol Myszkowski, Rafał Mantiuk, Grzegorz Krawczyk Contents 1 Introduction 5 1.1 Low vs. High Dynamic Range Imaging . 5 1.2 Device- and Scene-referred Image Representations . ...... 7 1.3 HDRRevolution ............................ 9 1.4 OrganizationoftheBook . 10 1.4.1 WhyHDRVideo? ....................... 11 1.4.2 ChapterOverview ....................... 12 2 Representation of an HDR Image 13 2.1 Light................................... 13 2.2 Color .................................. 15 2.3 DynamicRange............................. 18 3 HDR Image and Video Acquisition 21 3.1 Capture Techniques Capable of HDR . 21 3.1.1 Temporal Exposure Change . 22 3.1.2 Spatial Exposure Change . 23 3.1.3 MultipleSensorswithBeamSplitters . 24 3.1.4 SolidStateSensors . 24 3.2 Photometric Calibration of HDR Cameras . 25 3.2.1 Camera Response to Light . 25 3.2.2 Mathematical Framework for Response Estimation . 26 3.2.3 Procedure for Photometric Calibration . 29 3.2.4 Example Calibration of HDR Video Cameras . 30 3.2.5 Quality of Luminance Measurement . 33 3.2.6 Alternative Response Estimation Methods . 33 3.2.7 Discussion ........................... 34 4 HDR Image Quality 39 4.1 VisualMetricClassification. 39 4.2 A Visual Difference Predictor for HDR Images . 41 4.2.1 Implementation......................... 43 5 HDR Image, Video and Texture Compression 45 1 2 CONTENTS 5.1 HDR Pixel Formats and Color Spaces . 46 5.1.1 Minifloat: 16-bit Floating Point Numbers . 47 5.1.2 RGBE: Common Exponent . 47 5.1.3 LogLuv: Logarithmic encoding . 48 5.1.4 RGB Scale: low-complexity RGBE coding . 49 5.1.5 LogYuv: low-complexity LogLuv . 50 5.1.6 JND steps: Perceptually uniform encoding .
    [Show full text]
  • Supporting Technology for Augmented Reality Game-Based Learning
    DOCTORAL THESIS Supporting Technology for Augmented Reality Game-Based Learning Hendrys Fabián Tobar Muñoz 2017 Doctorate in Technology Supervised by: PhD. Ramon Fabregat PhD. Silvia Baldiris Presented in partial fulfillment of the requirements for a doctoral degree from the University of Girona The research reported in this thesis was partially sponsored by: The financial support by COLCIENCIAS – Colombia’s Administrative Department of Science Technology and Innovation within the program of doctoral scholarships. The research reported in this thesis was carried out as part of the following projects: ARreLS project, funded by Spanish Economy and Competitiveness Ministry(TIN2011-23930) Open Co-Creation Project, funded by the Spanish Economy and Competitiveness Ministry (TIN2014-53082-R) The research reports in this thesis was developed within the research lines of the Communications and Distributed Systems research group (BCDS, ref GRCT40) which is part of the DURSI consolidated research group COMUNICACIONS I SISTEMES INTEL·LIGENTS. © Hendrys Fabián Tobar Muñoz, Girona, Catalonia, Spain, 2017 All Rights Reserved. No part of this book may be reproduced in any form by any electronic or mechanical means (including photocopying, recording, or information storage and retrieval) without written permission granted by the author. Gracias a Dios Todopoderoso y a Su Divina Providencia. Este trabajo está dedicado a mi Reina Omaira que es lo más hermoso de este mundo. ______________________________________________________________________________________________________________________ Thanks to God Almighty and His Divine Providence. This work is dedicated to my Queen Omaira who is the most beautiful of this world (I swear, this sounds better in Spanish) ACKNOWLEDGEMENTS I have always liked games and digital technologies and I have always believed in their educational potential.
    [Show full text]
  • On the Automated Derivation of Domain-Specific UML Profiles
    Schriften aus der Fakultät Wirtschaftsinformatik und 37 Angewandte Informatik der Otto-Friedrich-Universität Bamberg On the Automated Derivation of Domain-Specifc UML Profles Alexander Kraas 37 Schriften aus der Fakultät Wirtschaftsinformatik und Angewandte Informatik der Otto-Friedrich- Universität Bamberg Contributions of the Faculty Information Systems and Applied Computer Sciences of the Otto-Friedrich-University Bamberg Schriften aus der Fakultät Wirtschaftsinformatik und Angewandte Informatik der Otto-Friedrich- Universität Bamberg Contributions of the Faculty Information Systems and Applied Computer Sciences of the Otto-Friedrich-University Bamberg Band 37 2019 On the Automated Derivation of Domain-Specifc UML Profles Alexander Kraas 2019 Bibliographische Information der Deutschen Nationalbibliothek Die Deutsche Nationalbibliothek verzeichnet diese Publikation in der Deutschen Nationalbibliographie; detaillierte bibliographische Informationen sind im Internet über http://dnb.d-nb.de/ abrufbar. Diese Arbeit hat der Fakultät Wirtschaftsinformatik und Angewandte Informatik der Otto-Friedrich-Universität Bamberg als Dissertation vorgelegen. 1. Gutachter: Prof. Dr. Gerald Lüttgen, Otto-Friedrich-University Bamberg, Germany 2. Gutachter: Prof. Dr. Richard Paige, McMaster University, Canada Tag der mündlichen Prüfung: 13.05.2019 Dieses Werk ist als freie Onlineversion über den Publikationsserver (OPUS; http://www. opus-bayern.de/uni-bamberg/) der Universität Bamberg erreichbar. Das Werk – ausge- nommen Cover, Zitate und Abbildungen –
    [Show full text]
  • PAM: Parallel Augmented Maps
    PAM: Parallel Augmented Maps Yihan Sun Daniel Ferizovic Guy E. Belloch Carnegie Mellon University Karlsruhe Institute of Technology Carnegie Mellon University [email protected] [email protected] [email protected] Abstract 1 Introduction Ordered (key-value) maps are an important and widely-used The map data type (also called key-value store, dictionary, data type for large-scale data processing frameworks. Beyond table, or associative array) is one of the most important da- simple search, insertion and deletion, more advanced oper- ta types in modern large-scale data analysis, as is indicated ations such as range extraction, filtering, and bulk updates by systems such as F1 [60], Flurry [5], RocksDB [57], Or- form a critical part of these frameworks. acle NoSQL [50], LevelDB [41]. As such, there has been We describe an interface for ordered maps that is augment- significant interest in developing high-performance paral- ed to support fast range queries and sums, and introduce a lel and concurrent algorithms and implementations of maps parallel and concurrent library called PAM (Parallel Augment- (e.g., see Section 2). Beyond simple insertion, deletion, and ed Maps) that implements the interface. The interface includes search, this work has considered “bulk” functions over or- a wide variety of functions on augmented maps ranging from dered maps, such as unions [11, 20, 33], bulk-insertion and basic insertion and deletion to more interesting functions such bulk-deletion [6, 24, 26], and range extraction [7, 14, 55]. as union, intersection, filtering, extracting ranges, splitting, One particularly useful function is to take a “sum” over a and range-sums.
    [Show full text]
  • Distributed Cognitions GENERAL EDITORS: ROY PEA Psychological and Educational JOHN SEELY BROWN Considerations
    Learning in doing: Social, cognitive, and computational perspectives Distributed cognitions GENERAL EDITORS: ROY PEA Psychological and educational JOHN SEELY BROWN considerations The construction zone: Working for cognitive change in school Denis Newman, Peg Grrfin, and Michael Cole Plans and situated actions: The problem of human-machine Edited by interaction Lucy Suchman GAVRIEL SALOMON Situated learning: Legitimate peripheral participation University of Ha$, Israel Jean Lave and Etienne Wenger Street mathematics and school mathematics Terezinha Nunes, Anahria Dim Schliemann, and David William Carraher Understanding practice: Perspectives on activity and context Seth Chaiklin andJean Lave (editors) I943 CAMBRIDGE UNIVERSITY PRESS Published by the Press Syndicate of the University of Cambridge The Pin Building, Trumpington Street, Cambridge CB2 1RI' 40 West 20th Street, New York, NY 10011-4211, USA Contents 10 Stamford Road, Oakleigh, Melbourne 3166, Australia 0 Cambridge Universify Press 1993 First phlished 1993 Printed in the United States of America Library of Conqcsr Catalo@n~-in-PublicdionData Disaibuted cognitions : psychological and educational considerations I / edited by Gavriel Salomon. List of contribufon page vii I p. cm. - (Learning in doing) Includes index. Series foreword ix ISBN 0-521-41406-7 (hard) xi 1. Cognition and culture. 2. Knowledge, Sociology of. 3. Cognition - Social aspects. 4. Learning. Psychology of - Social aswcts. I. Salomon. Gavriel. 11. Series. 1 A cultural-historical approach to distributed 92-41220 cognition CIP MICHAEL COLE AND YRJO ENGESTR~M A catalog record for this book is available from the British Library. 2 Practices of distributed intelligence and designs for education ISBN 0-521-41406-7 hardback ROY D. PEA 3 Person-plus: a distributed view of thinking and learning D.
    [Show full text]
  • Towards Bendable Augmented Maps
    15-3 MVA2011 IAPR Conference on Machine Vision Applications, June 13-15, 2011, Nara, JAPAN Towards Bendable Augmented Maps Sandy Martedi∗ and Hideo Saito † Graduate School of Science and Technology Keio University, Japan Abstract Three different kinds assumptions are often used for representing the shape of a paper:rigid, foldable and nonrigid. Nonrigid surface detection is intensively ex- plored as challenging topics which addresses two prob- lems: recovering the paper shape and estimating the camera pose. The state-of-the-art researches try to (a) (b) solve both problems robustly for real time purpose. We Figure 1. Application overview. (a). An aug- propose an augmented reality application that use a mented map (b). Bendable augmented map. The nonrigid detection method to recover the shape of the 3D building model is overlaid on top of bended bendable paper using dots as keypoints and estimate paper map. the camera pose simultaneously. Our approach recov- ers the multi-planarity of the paper as the initial shape and iteratively approximates the surface shape. The multi-planarity is estimated by using the tracking by we use multiple planes as the initial shape of the op- descriptor update method that uses the correspondence timization. We then optimize our shape by applying between captured and reference keypoints. We then op- the progressive finite newton optimization [22]. We timize the shape using the progressive finite newton op- then overlay the 3D building model onto the regular- timization method. ized map using the piecewise homography computation as shown in Fig. 1. 1 Introduction We design the setup of our application using a monocular camera and a display.
    [Show full text]
  • 1.3. Thesis Guide
    Understanding How to Translate from Children’s Tangible Learning Apps to Mobile Augmented Reality through Technical Development Research by Shubhra Sarker B.Sc. in Computer Science, Khulna University, 2016 Thesis Submitted in Partial Fulfillment of the Requirements for the Degree of Master of Science in the School of Interactive Arts and Technology Faculty of Communication, Arts and Technology © Shubhra Sarker 2019 SIMON FRASER UNIVERSITY Fall 2019 Copyright in this work rests with the author. Please ensure that any reproduction or re-use is done in accordance with the relevant national copyright legislation. Approval Name: Shubhra Sarker Degree: Master of Science Title: Understanding How to Translate from Children’s Tangible Learning Apps to Mobile Augmented Reality through Technical Development Research Examining Committee: Chair: Marek Hatala Professor Alissa Antle Senior Supervisor Professor Bernhard Riecke Supervisor Associate Professor Steve Dipaola External Examiner Professor Date Defended/Approved: December 17, 2019 ii Abstract In this thesis, I discuss the design and development of two Augmented Reality (AR) applications derived from two tangible systems. In this technology development research, I explore if it is feasible to port tangible systems to mobile (tablet-based) AR systems so that these systems can be more widely deployed as research prototypes and eventually as products. I use two existing tangible systems (Youtopia, PhonoBlocks), which have been validated empirically, as case studies. To do this, I begin by determining the key requirements that each AR system must have – those known through theoretical design guidance or shown in previous studies to be important for the effectiveness of the tangible system. I designed and implemented design and technical AR solutions for each requirement.
    [Show full text]
  • Map Generation from Large Scale Incomplete and Inaccurate Data
    Map Generation from Large Scale Incomplete and Inaccurate Data Labels Rui Zhang Conrad Albrecht Wei Zhang [email protected] [email protected] [email protected] IBM T.J. Watson Research Center IBM T.J. Watson Research Center IBM T.J. Watson Research Center Yorktown Heights, New York Yorktown Heights, New York Yorktown Heights, New York Xiaodong Cui Ulrich Finkler David Kung [email protected] [email protected] [email protected] IBM T.J. Watson Research Center IBM T.J. Watson Research Center IBM T.J. Watson Research Center Yorktown Heights, New York Yorktown Heights, New York Yorktown Heights, New York Siyuan Lu [email protected] IBM T.J. Watson Research Center Yorktown Heights, New York Figure 1: Houses (red semi-transparent boxes) and roads (white semi-transparent lines) generated from aerial imagery (background). ABSTRACT and map data, both of which cover the contiguous United States Accurately and globally mapping human infrastructure is an impor- (CONUS). We approach the technical challenge of inaccurate and tant and challenging task with applications in routing, regulation incomplete training data adopting state-of-the-art convolutional compliance monitoring, and natural disaster response management neural network architectures such as the U-Net and the CycleGAN arXiv:2005.10053v1 [cs.CV] 20 May 2020 etc.. In this paper we present progress in developing an algorithmic to incrementally generate maps with increasingly more accurate pipeline and distributed compute system that automates the process and more complete labels of man-made infrastructure such as roads of map creation using high resolution aerial images.
    [Show full text]