Programming for DaVis A Basic Guide

Size: px
Start display at page:

Download "Programming for DaVis A Basic Guide"

Transcription

1 Programming for DaVis A Basic Guide Summer 2012 Co op work term report Prepared for Dr. Spinello Under supervision of Dr. Fenech By Frederick Fahim ( )

2 Contents Introduction...1 Support...1 Self Help...1 Macros...2 CL Files...2.set Files...2 Custom Batch Operations...2 Using DLLs...2.Set Files...3 Definition...3 Acquisition Loops Z axis Loop...3 Motivation...3 Implementation...3 Nguyen Batch Processing...4 Motivation...4 Development...5 DLLs...6 Motivation...6 Required Format...6 DaVis/DLL Interface...6 DaVis...6 DLL...6 Language Considerations...7 Interfacing DaVis with Matlab...8 Through the Matlab Engine...8 Through MEX Files...8 MatView...8 Useful DaVis Objects and Functions...11 Buffers...11

3 Dimensions...11 Access...11 Allocation...11 Properties...12 Stage Control...12 Motor Control...12 Moving MiTas Diagonally...13

4 Introduction This guide, the tools developed, the user guides, source code and useful programs are available on LD511 s internal web site under the file name DaVis. The software used is DaVis 7.2, Matlab R2010b and Visual Studio 2010 s compiler. DaVis 7.2 is a program used in PIV and µpiv. Lab D511 makes use of it along with the MiTas stage and a dual pulse YaG laser. Seeing as it is not thoroughly tested commercial software, bugs are not unheard of. If a function s syntax seems to be correct but it does not behave predictably, it may be a good idea to contact LaVision s support team. Support Its producers are German, so any question asked by to its programmers is typically answered overnight if it can at all be answered within 24 hours. For new programming questions it is recommended to call first, as LD511 s support (Richard Prevost) will pinpoint the programmer most intimate with the issue. Phone: service@lavision.com, rprevost@lavisioninc.com Self Help The list of CL attributes, dialogs, subroutines etc. has been provided by LaVision, however please note that it is in no way exhaustive: from within DaVis an immediate window and searchable command list can be accessed by pressing F7 and Ctrl + F7, respectively. If a CL file is being developed, a debugger is available through the Macro menu or through a CL call to SetupDialogDebugger(). 1

5 Macros Macros are files containing a Command Line function defined C style that, when loaded by DaVis, can be called by users if they are public. DaVis makes use of C like syntax in its CL language to provide quite some flexibility and extensibility, as well as an interface between all its working parts. CL Files All macros created can be stored in one or many CL files (e.g. User.CL) to be loaded automatically when DaVis starts. These files are located in the DaVis directory under the folder called cl, and provide most of the undocumented functions mentioned in this guide s introduction..set Files Set files can be loaded by the macro to be used as parameters for various commands involving movies, acquisition, batch operations etc. The CL manual details how these files can be manipulated programmatically. Custom Batch Operations There is an extensive set of predefined batch operations that should provide enough functionality for the typical user but if needed, custom batch operations can be created by following the instructions from the CL manual in Simple mode or using DaVis callback functions (flowchart) in Advanced mode. Using DLLs DLLs can be called by macros to complete various tasks when more functionality or speed is needed. More information can be found in this guide. 2

6 .Set Files Definition Set files are a kind of file used by DaVis to store settings. These files usually have the.set extension. Set files can be used to load custom settings for everything from acquisition to processing, and make use of existing functions (user defined or packaged with DaVis). They may be accessed programmatically to specify how a particular action is to be carried out (e.g. while automating acquisition a set file may be loaded to provide the loop). Acquisition Loops Z axis Loop Motivation Co workers using DaVis and the MiTas stage for µpiv often have to find the stage position at which the camera s focal plane is the channel s mid height, where the flow s velocity is highest. This involves performing PIV at multiple stage heights, which is very tedious to do by hand. Below and linked is the implementation of a simple acquisition loop that will capture a specified number of pictures starting at a certain height, at every step, until a certain height. A user guide can be found linked. Implementation In the acquisition section of the Recording dialog (boxed in red, below), one can see that the procedure is customizable with loops, commands, etc. For any tasks to be performed during acquisition, this is the place operations will be specified. Choosing a MiTas Stage Z Loop from the list of available commands and placing the Image Acquisition command subordinate to it yields the desired results. 3

7 Nguyen Batch Processing Motivation The Nguyen method is used to accelerate batch processing and cross correlation by making averages when PIV is performed by a double pulse camera. The maximum intensity at each pixel across all the first pulse pictures is taken, as is done with the second pulse. One single cross correlation of the two resulting pictures gives averaged velocities while filtering out static particles which may be stuck on the channel, and when applied with a pixel mask (which can be turned on or off in the PIV operation of a batch processing) can cut processing time in half or more. The implementation can be found linked, as well as the user guide and more information on the Nguyen method. 4

8 Development Batch processing operation lists are lists of commonly used processing functions, where the output of each operation is used as input for the next operation. As such, the Nguyen method should be among the first on the list. Because the Nguyen method compiles pictures, the kind of batch operation will be under Statistics. The Nguyen method calls for the maximum intensity of each pixel, so the box to check is Maximum. t should be noted that custom batch operations can be defined but often necessary tools are preexisting. I 5

9 DLLs A Dynamically Linked Library is an executable that cannot run on its own, but rather contains compiled functions callable from running programs. This is a form of modularization that is becoming increasingly popular for plugins and add ons. For communication with other PCs and software (Ex: DaVis, LabView, etc.) DaVis has Remote.DLL, a module which handles network protocols, data transfer and remote commands. There is more information about these operations in the CL manual. A useful tool for the scrutiny and testing of DLLs is called the Dependency Walker, it can be used to see all the functions implemented in the DLL and the style in which they are specified. Motivation As DaVis macros must be interpreted by the software, they may not run as quickly as can be required for certain applications and the user may sometimes require functions not implemented in the software. In these cases, programmers may compile their own DLLs for DaVis to use. Required Format When loading a DLL, DaVis will call an initialization function in the DLL and pass it function handles to many typical DaVis commands, allowing the DLL to control DaVis. To allow this, the DLL must contain the interface file which defines these handles as constants. A call to the function InitDll within the CL_DLL_Interface is made, at the end of which InitDll calls a function MyInitDllExtensions for custom initialization (this call can be commented out, as it is for the programmer s convenience). Note: For functions to be callable by DaVis, the DLL must export them in C style (flat). For the programmer s convenience, CL_DLL_Interface defines a macro extern C <return_type> EXPORT <function_name> which does this independently of the compiler used. DaVis/DLL Interface DaVis Functions in the DLL may be called using the CL commands int CallDll(string DLL_Name, string Function_Name, int/float & Pars) int CallDllEx(string DLL_Name, string Function_Name, int & IntPars, float & FloatPars, string & StringPars) DLL Passing messages is achieved through the standard CL functions 6

10 void InfoText(string Message) void StatusText(string Message) and workarounds for string passing have been detailed by LaVision. Accessing buffer data is achieved with the function Void * GetBufferRowPtr(int buffer, int row); And any CL command can be executed by DaVis with a call to Void ExecuteCommand(char * cmd); Language Considerations While C++ is the first language that should come to mind due to its use in the CL_DLL_Interface, quite some flexibility may be granted through the use of a pre compiled CL_DLL_Interface library and function wrappers. Certain considerations should be made as to which language is used to produce the DLL: If processing speed is an issue (real time or time critical applications), C++ should be used to minimize overhead. If the function is complex, Matlab may be best due to its scientific nature and toolboxes. Also included in this guide is a section for Matlab generated DLLs. It should be mentioned that while Matlab is still quite a fast language, its use during high speed acquisition and such may be questionable. To illustrate, a snapshot of MatView s Dependency Tree is shown below. It can be seen that MatView and its operational core (PLOTTER.DLL), being Matlab generated, depend on Matlab s (MCLMCRRT), Microsoft C s (MSVCR) and Visual C++ s (MSVCP) runtimes. This means that C++ code calling Matlab must first pass through MSVCP, MSVCR and then MCLMCRRT. 7

11 Interfacing DaVis with Matlab The methods detailed below operate at approximately the same speed (details and speed optimizations as well as related considerations may be found on the MathWorks site), which is noticeably slower than C++. Through the Matlab Engine For anything to be done with the Matlab Engine, Matlab must be installed on the computer. DaVis contains a few functions within the MATLAB.CL system file (included for convenience) which allow direct execution of Matlab commands by an Engine instance from within DaVis. Through MEX Files For Matlab generated modules, both Matlab s MCR and Visual C++ s redistributables must be installed on the computer. Matlab can be used to produce executables and libraries which may run on any computer. It should be noted that since the default compiler for Matlab s mbuild command is a C one and the Interface files are C++, Visual C++ s compiler (supported by Matlab) must be used instead. MatView Motivation MatView is an extension of the Z Axis loop developed earlier to permit µpiv users to visualize 3D velocity profiles and export them to Matlab for further analysis. As it shows a 3D profile immediately after batch processing, it allows users to quickly spot the mid channel focal plane. It also serves as a good introduction on interfacing DaVis and Matlab as the Matlab function involved is very basic. Development Matlab Code to C Shared Library The command in Matlab needed to display a 3D surface plot such as the one obtained by combining all of the width velocity profiles obtained through batch processing is the following: Handle = surf(x,y,z) Since this command needs to be compiled into a library it is saved as plot_intensities and now becomes a callable function. To compile it into the library type needed, the proper Matlab command is mcc -B csharedlib:plotter Plotter\plot_intensities.m where Plotter will be the name of the shared library. 8

12 C Shared Library and Matlab in C++ Code Includes Of the files produced by the MCC, one will need to be included in the C++ wrapper: Plotter.h. In the C++ code, the following includes must then be made #include "Plotter.h" #include "CL_DLL_Interface.h" #include "matrix.h" #include <list> Where matrix.h is used to create Matlab matrices. Lists are used to accumulate the data passed to MatView from DaVis during batch processing, so that everything can be processed by MatView afterwards. There seems to be no restrictions regarding whether code is managed or not, using unmanaged code was simply a choice. Matrices Once matrix.h is included, Matlab double precision real matrices may be declared, instanced, mxarray * array_name; array_name = mxcreatedoublematrix(int rows, int cols, mxreal); and initialized using memcpy(mxgetpr(array_name), double * data_ptr, int data_size * sizeof(double)); where data_ptr is a pointer to a pre existing array of doubles, and data_size is the size of this array. It should be noted that Matlab will read a 1D array column wise into a 2D matrix. Compiled Library Application When comes time to invoke the Matlab functions compiled, first a call to initialize a new MCR instance must be made mclinitializeapplication(null, 0); must be made to tell the MCR to initialize a new Matlab application. Then PlotterInitialize(); is called to initialize the Plotter library, after which mlfplot_intensities(mxarray X, mxarray Y, mxarray Z); mclwaitforfigurestodie(null); may be called. Note that the plot_intensities command in Matlab has now become mlfplot_intensities: Matlab commands names are defined in C/C++ such that they begin with mlf and a capital first letter. 9

13 mclwaitforfigurestodie(null) simply tells the Matlab application not to close the figure or terminate until it is closed. When everything that needed doing in Matlab has been done, a call to PlotterTerminate(); mclterminateapplication(); should be made to terminate the Plotter library and the MCR Instance, respectively. Compiling the C++ Wrapper (MatView) To specify which functions in the DLL should be made public,.exports files need to be created for each CPP file involved. Below is CL_DLL_Interface.exports: InitDll and MatView.exports: add_depth add_profile set_verbose process Only the name is stated and the files end with a new line. The wrapper can then be compiled using Matlab s command line: mcc W lib:matview CL_DLL_Interface.cpp MatView.cpp Plotter.lib CL_DLL_Interface.exports MatView.exports CPP files go first, library files next and exports at the end. Matlab will then evoke the compiler and pass on any messages. Finally, a DLL is produced. When migrating it to the target computer, it should be copied with its internal library as well (Plotter.dll in this case) and registered using the command line tool regsvr32. 10

14 Useful DaVis Objects and Functions Buffers Buffers are used by DaVis to hold information about a single instant in time. For pulsed cameras, all the pulses are stored in one buffer with multiple frames: for a double pulse camera taking 100 shots, there will be 100 buffers of two frames each one frame for each pulse and one buffer for each snapshot. Buffers are stored within DaVis global memory, and pointers to them may be passed to commands in CL as integers. Typically buffers 0 and 1 are reserved for the program, and temporary buffers seem to be around 500. More information on buffers and the operations supported can be found in the CL manual. Dimensions They are composed of 5 dimensions, though these dimensions must be accessed through functions. X Y Z Frame Intensity or vector Access Buffers can be designated by the CL statement B[index]; And pixels within the buffer can be designated by Pix[index, x, y]; index being the number of the buffer. When dealing with 3D buffers or vector buffers, voxels will be used instead. Allocation When performing processing on buffers, DaVis will frequently store the results of each operation into the same buffer in an effort to minimize memory usage. This kind of buffer is called a Temporary Buffer, and can be manually allocated with the command int GetTempBuffer(); If, however, a Reserved Buffer which persists until DaVis closes should be allocated, the following command can be used instead int GetReservedBuffer(); Temporary and Reserved buffers can be locked to prevent changes to them and later unlocked : 11

15 void LockBuffer(int buffnum); void UnlockBuffer(int buffnum); Copying Copies of existing buffers can be automatically made and allocated using the command int GetTempBufferCopy(); Deallocation When temporary and reserved buffers are no longer needed, they should be deallocated (to avoid memory leaks) with the following commands, respectively FreeBuffer(int buffer); FreeReservedBuffer(int buffer); Properties Information about buffers can be retrieved through various functions provided by DaVis. A comprehensive list of these attributes may be found linked. Real World Positions It can be useful to know the actual stage position at which a frame was acquired: this can be done through the following command, also available for Y and Z coordinates*. Buffer_GetRealWorldFramePositionX(int thebuffer, int theframe, float& theposition, string& theunit, string& thelabel) *Due to bugs in DaVis 7.2, this command returns nothing useful. LaVision is currently working on a solution. Custom Attributes If a parameter is encoded to the filename during acquisition in the following format ParameterName=ParameterValue, a corresponding attribute with the name ExpPathValue_ParameterName is automatically created. This specific attribute can then be retrieved using: string svalue = GetBufferAttribute(int buffer, char * attribute); Stage Control Motor Control DaVis allows for programmatic control of the MiTas stage through two macros* void RotateSteps(int motor, int steps); void SetStepMotor(int motor, float pos); *for now, RotateSteps() seems to have a bug in it and will not do anything. LaVision is currently working on this. 12

16 For motor control at the software level during the acquisition stage, see the Z Axis Loop example and the manual s acquisition macros section. If it is to happen at the hardware level, consider.acq files. Moving MiTas Diagonally The µpiv machine will be used to track particles (red blood cell aggregations, bubbles etc.) while studying them and the flow surrounding them. To do so the MiTas stage needs to be able to move diagonally sometimes, a function which is not implemented by LaVision in our current software package as motors have to be moved separately. As a remedy, a basic 2D diagonal line function was created using simple loops and integer math. It has been implemented in Matlab to be able to handle any angle and follow a straight line to its destination as closely as possible so that it may be used in combination with a high speed camera. It does occasionally drift away from the true diagonal and could use improvement but if needed, the code can easily be translated to CL and made to handle 3D diagonals. >> GoSteps(10,50) >> GoSteps(-60,31) >> GoSteps(50, -52) >> GoSteps(-50, -29) >> GoSteps(50,0) Yields the following paths and shows more extreme cases of deviation (true paths in red, motor steps in black). 13

17 14

2015 The MathWorks, Inc. 1

2015 The MathWorks, Inc. 1 2015 The MathWorks, Inc. 1 C/C++ 사용자를위한 MATLAB 활용 : 알고리즘개발및검증 이웅재부장 2015 The MathWorks, Inc. 2 Signal Processing Algorithm Design with C/C++ Specification Algorithm Development C/C++ Testing & Debugging

More information

개발과정에서의 MATLAB 과 C 의연동 ( 영상처리분야 )

개발과정에서의 MATLAB 과 C 의연동 ( 영상처리분야 ) 개발과정에서의 MATLAB 과 C 의연동 ( 영상처리분야 ) Application Engineer Caleb Kim 2016 The MathWorks, Inc. 1 Algorithm Development with MATLAB for C/C++ Programmers Objectives Use MATLAB throughout algorithm development

More information

Eliminate Threading Errors to Improve Program Stability

Eliminate Threading Errors to Improve Program Stability Introduction This guide will illustrate how the thread checking capabilities in Intel Parallel Studio XE can be used to find crucial threading defects early in the development cycle. It provides detailed

More information

CS201 - Introduction to Programming Glossary By

CS201 - Introduction to Programming Glossary By CS201 - Introduction to Programming Glossary By #include : The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with

More information

Eliminate Threading Errors to Improve Program Stability

Eliminate Threading Errors to Improve Program Stability Eliminate Threading Errors to Improve Program Stability This guide will illustrate how the thread checking capabilities in Parallel Studio can be used to find crucial threading defects early in the development

More information

ECON 502 INTRODUCTION TO MATLAB Nov 9, 2007 TA: Murat Koyuncu

ECON 502 INTRODUCTION TO MATLAB Nov 9, 2007 TA: Murat Koyuncu ECON 502 INTRODUCTION TO MATLAB Nov 9, 2007 TA: Murat Koyuncu 0. What is MATLAB? 1 MATLAB stands for matrix laboratory and is one of the most popular software for numerical computation. MATLAB s basic

More information

Short Notes of CS201

Short Notes of CS201 #includes: Short Notes of CS201 The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with < and > if the file is a system

More information

Pace University. Fundamental Concepts of CS121 1

Pace University. Fundamental Concepts of CS121 1 Pace University Fundamental Concepts of CS121 1 Dr. Lixin Tao http://csis.pace.edu/~lixin Computer Science Department Pace University October 12, 2005 This document complements my tutorial Introduction

More information

Physics MRI Research Centre UNIFIT VERSION User s Guide

Physics MRI Research Centre UNIFIT VERSION User s Guide Physics MRI Research Centre UNIFIT VERSION 1.24 User s Guide Note: If an error occurs please quit UNIFIT and type:.reset in the IDL command line, and restart UNIFIT. Last Update November 2016 by Katie

More information

Optimizing and Accelerating Your MATLAB Code

Optimizing and Accelerating Your MATLAB Code Optimizing and Accelerating Your MATLAB Code Sofia Mosesson Senior Application Engineer 2016 The MathWorks, Inc. 1 Agenda Optimizing for loops and using vector and matrix operations Indexing in different

More information

Professor Terje Haukaas University of British Columbia, Vancouver C++ Programming

Professor Terje Haukaas University of British Columbia, Vancouver  C++ Programming C++ Programming C++ code is essentially a collection of statements terminated by a semicolon, such as (spaces not needed): a = b + c; Most C++ code is organized into header files and cpp files, i.e., C++

More information

2SKILL. Variables Lesson 6. Remembering numbers (and other stuff)...

2SKILL. Variables Lesson 6. Remembering numbers (and other stuff)... Remembering numbers (and other stuff)... Let s talk about one of the most important things in any programming language. It s called a variable. Don t let the name scare you. What it does is really simple.

More information

Lab1: Use of Word and Excel

Lab1: Use of Word and Excel Dr. Fritz Wilhelm; physics 230 Lab1: Use of Word and Excel Page 1 of 9 Lab partners: Download this page onto your computer. Also download the template file which you can use whenever you start your lab

More information

3.Constructors and Destructors. Develop cpp program to implement constructor and destructor.

3.Constructors and Destructors. Develop cpp program to implement constructor and destructor. 3.Constructors and Destructors Develop cpp program to implement constructor and destructor. Constructors A constructor is a special member function whose task is to initialize the objects of its class.

More information

Declaring Pointers. Declaration of pointers <type> *variable <type> *variable = initial-value Examples:

Declaring Pointers. Declaration of pointers <type> *variable <type> *variable = initial-value Examples: 1 Programming in C Pointer Variable A variable that stores a memory address Allows C programs to simulate call-by-reference Allows a programmer to create and manipulate dynamic data structures Must be

More information

Brook+ Data Types. Basic Data Types

Brook+ Data Types. Basic Data Types Brook+ Data Types Important for all data representations in Brook+ Streams Constants Temporary variables Brook+ Supports Basic Types Short Vector Types User-Defined Types 29 Basic Data Types Basic data

More information

MatLab Just a beginning

MatLab Just a beginning MatLab Just a beginning P.Kanungo Dept. of E & TC, C.V. Raman College of Engineering, Bhubaneswar Introduction MATLAB is a high-performance language for technical computing. MATLAB is an acronym for MATrix

More information

Eliminate Memory Errors to Improve Program Stability

Eliminate Memory Errors to Improve Program Stability Introduction INTEL PARALLEL STUDIO XE EVALUATION GUIDE This guide will illustrate how Intel Parallel Studio XE memory checking capabilities can find crucial memory defects early in the development cycle.

More information

At this time we have all the pieces necessary to allocate memory for an array dynamically. Following our example, we allocate N integers as follows:

At this time we have all the pieces necessary to allocate memory for an array dynamically. Following our example, we allocate N integers as follows: Pointers and Arrays Part II We will continue with our discussion on the relationship between pointers and arrays, and in particular, discuss how arrays with dynamical length can be created at run-time

More information

Algorithms & Data Structures

Algorithms & Data Structures GATE- 2016-17 Postal Correspondence 1 Algorithms & Data Structures Computer Science & Information Technology (CS) 20 Rank under AIR 100 Postal Correspondence Examination Oriented Theory, Practice Set Key

More information

EXCEL SPREADSHEET TUTORIAL

EXCEL SPREADSHEET TUTORIAL EXCEL SPREADSHEET TUTORIAL Note to all 200 level physics students: You will be expected to properly format data tables and graphs in all lab reports, as described in this tutorial. Therefore, you are responsible

More information

How to program with Matlab (PART 1/3)

How to program with Matlab (PART 1/3) Programming course 1 09/12/2013 Martin SZINTE How to program with Matlab (PART 1/3) Plan 0. Setup of Matlab. 1. Matlab: the software interface. - Command window - Command history - Section help - Current

More information

ECE 3793 Matlab Project 1

ECE 3793 Matlab Project 1 ECE 3793 Matlab Project 1 Spring 2017 Dr. Havlicek DUE: 02/04/2017, 11:59 PM Introduction: You will need to use Matlab to complete this assignment. So the first thing you need to do is figure out how you

More information

12- User-Defined Material Model

12- User-Defined Material Model 12- User-Defined Material Model In this version 9.0 of Phase2 (RS 2 ), users can define their own constitutive model and integrate the model into the program by using a dynamic-linking library (dll). The

More information

Lecture 2 Arrays, Searching and Sorting (Arrays, multi-dimensional Arrays)

Lecture 2 Arrays, Searching and Sorting (Arrays, multi-dimensional Arrays) Lecture 2 Arrays, Searching and Sorting (Arrays, multi-dimensional Arrays) In this lecture, you will: Learn about arrays Explore how to declare and manipulate data into arrays Understand the meaning of

More information

Eliminate Memory Errors and Improve Program Stability

Eliminate Memory Errors and Improve Program Stability Eliminate Memory Errors and Improve Program Stability 1 Can running one simple tool make a difference? Yes, in many cases. You can find errors that cause complex, intermittent bugs and improve your confidence

More information

Managing custom montage files Quick montages How custom montage files are applied Markers Adding markers...

Managing custom montage files Quick montages How custom montage files are applied Markers Adding markers... AnyWave Contents What is AnyWave?... 3 AnyWave home directories... 3 Opening a file in AnyWave... 4 Quick re-open a recent file... 4 Viewing the content of a file... 5 Choose what you want to view and

More information

Appendix E: Software

Appendix E: Software Appendix E: Software Video Analysis of Motion Analyzing pictures (movies or videos) is a powerful tool for understanding how objects move. Like most forms of data, video is most easily analyzed using a

More information

Name: Dr. Fritz Wilhelm Lab 1, Presentation of lab reports Page # 1 of 7 5/17/2012 Physics 120 Section: ####

Name: Dr. Fritz Wilhelm Lab 1, Presentation of lab reports Page # 1 of 7 5/17/2012 Physics 120 Section: #### Name: Dr. Fritz Wilhelm Lab 1, Presentation of lab reports Page # 1 of 7 Lab partners: Lab#1 Presentation of lab reports The first thing we do is to create page headers. In Word 2007 do the following:

More information

Developer's Guide. LOXTechnologies

Developer's Guide. LOXTechnologies Developer's Guide LOXTechnologies DEX - Diverse Embedded Control Cross Abstract DEX enables convenient design of user-specific graphic interfaces to simulated and realworld embedded modules with integrated

More information

Exercise #1. MATLAB Environment + Image Processing Toolbox - Introduction

Exercise #1. MATLAB Environment + Image Processing Toolbox - Introduction dr inż. Jacek Jarnicki, dr inż. Marek Woda Institute of Computer Engineering, Control and Robotics Wroclaw University of Technology {jacek.jarnicki, marek.woda}@pwr.wroc.pl Exercise #1 MATLAB Environment

More information

Tutorial - Hello World

Tutorial - Hello World Tutorial - Hello World Spirit Du Ver. 1.1, 25 th September, 2007 Ver. 2.0, 7 th September, 2008 Ver. 2.1, 15 th September, 2014 Contents About This Document... 1 A Hello Message Box... 2 A Hello World

More information

Excel 2016 Basics for Windows

Excel 2016 Basics for Windows Excel 2016 Basics for Windows Excel 2016 Basics for Windows Training Objective To learn the tools and features to get started using Excel 2016 more efficiently and effectively. What you can expect to learn

More information

Tracking Trajectories of Migrating Birds Around a Skyscraper

Tracking Trajectories of Migrating Birds Around a Skyscraper Tracking Trajectories of Migrating Birds Around a Skyscraper Brian Crombie Matt Zivney Project Advisors Dr. Huggins Dr. Stewart Abstract In this project, the trajectories of birds are tracked around tall

More information

Chapter 10. Programming in C

Chapter 10. Programming in C Chapter 10 Programming in C Lesson 05 Functions in C C program Consists of three parts preprocessor directives macros main function functions 3 Function Each has a name (for identity ID) May have the arguments

More information

RSAJ Manual. Compiled by Larry M York, April 4,

RSAJ Manual. Compiled by Larry M York, April 4, RSAJ Manual Compiled by Larry M York, April 4, 2014 larry.york@rootbiologist.com Summary RSAJ is a project for the ObjectJ plugin for ImageJ. RSAJ was developed for the measurement of root system architecture

More information

Lab 7 Macros, Modules, Data Access Pages and Internet Summary Macros: How to Create and Run Modules vs. Macros 1. Jumping to Internet

Lab 7 Macros, Modules, Data Access Pages and Internet Summary Macros: How to Create and Run Modules vs. Macros 1. Jumping to Internet Lab 7 Macros, Modules, Data Access Pages and Internet Summary Macros: How to Create and Run Modules vs. Macros 1. Jumping to Internet 1. Macros 1.1 What is a macro? A macro is a set of one or more actions

More information

CS103L PA4. March 25, 2018

CS103L PA4. March 25, 2018 CS103L PA4 March 25, 2018 1 Introduction In this assignment you will implement a program to read an image and identify different objects in the image and label them using a method called Connected-component

More information

Getting started 7. Setting properties 23

Getting started 7. Setting properties 23 Contents 1 2 3 Getting started 7 Introducing Visual Basic 8 Installing Visual Studio 10 Exploring the IDE 12 Starting a new project 14 Adding a visual control 16 Adding functional code 18 Saving projects

More information

High Performance Computing and Programming, Lecture 3

High Performance Computing and Programming, Lecture 3 High Performance Computing and Programming, Lecture 3 Memory usage and some other things Ali Dorostkar Division of Scientific Computing, Department of Information Technology, Uppsala University, Sweden

More information

An Introduction to MATLAB

An Introduction to MATLAB An Introduction to MATLAB Day 1 Simon Mitchell Simon.Mitchell@ucla.edu High level language Programing language and development environment Built-in development tools Numerical manipulation Plotting of

More information

FRAQCEL USER GUIDE

FRAQCEL USER GUIDE FRAQCEL 2.7.1 USER GUIDE Author: Kevin Orloske Email Address: orloske.1@osu.edu Overview: This document provides user instructions for Fraqcel (pronounced frack-cell). Fraqcel is an open source fractal

More information

Parallel and Distributed Computing with MATLAB Gerardo Hernández Manager, Application Engineer

Parallel and Distributed Computing with MATLAB Gerardo Hernández Manager, Application Engineer Parallel and Distributed Computing with MATLAB Gerardo Hernández Manager, Application Engineer 2018 The MathWorks, Inc. 1 Practical Application of Parallel Computing Why parallel computing? Need faster

More information

The IVI Driver Standards

The IVI Driver Standards The IVI Driver Standards By Joe Mueller, President, IVI Foundation The IVI Foundation exists to define standards that simplify programming test instruments. Although the IVI Foundation is responsible for

More information

Introduction Primitive Data Types Character String Types User-Defined Ordinal Types Array Types. Record Types. Pointer and Reference Types

Introduction Primitive Data Types Character String Types User-Defined Ordinal Types Array Types. Record Types. Pointer and Reference Types Chapter 6 Topics WEEK E FOUR Data Types Introduction Primitive Data Types Character String Types User-Defined Ordinal Types Array Types Associative Arrays Record Types Union Types Pointer and Reference

More information

Testing TargetLink. Models and C Code with Reactis

Testing TargetLink. Models and C Code with Reactis Testing TargetLink R Models and C Code with Reactis R Build better embedded software faster. Generate tests from TargetLink models. Detect runtime errors. Execute and debug models. Track coverage. Back-to-back

More information

SCD - Scorpion Camera Drivers Specification Documentation

SCD - Scorpion Camera Drivers Specification Documentation SCD - Scorpion Camera Drivers Specification Documentation Release XI Tordivel AS Jun 08, 2018 Contents 1 Camera configuration persistance 3 2 New in Scorpion XI port-based configuration 5 3 Camera Properties

More information

Parallel and Distributed Computing with MATLAB The MathWorks, Inc. 1

Parallel and Distributed Computing with MATLAB The MathWorks, Inc. 1 Parallel and Distributed Computing with MATLAB 2018 The MathWorks, Inc. 1 Practical Application of Parallel Computing Why parallel computing? Need faster insight on more complex problems with larger datasets

More information

Excel 2016 Basics for Mac

Excel 2016 Basics for Mac Excel 2016 Basics for Mac Excel 2016 Basics for Mac Training Objective To learn the tools and features to get started using Excel 2016 more efficiently and effectively. What you can expect to learn from

More information

Problem 1. Multiple Choice (choose only one answer)

Problem 1. Multiple Choice (choose only one answer) Practice problems for the Final (Tuesday, May 14 4:30-6:30pm MHP 101). The Final Exam will cover all course material. You will be expected to know the material from the assigned readings in the book, the

More information

CS112 Lecture: Primitive Types, Operators, Strings

CS112 Lecture: Primitive Types, Operators, Strings CS112 Lecture: Primitive Types, Operators, Strings Last revised 1/24/06 Objectives: 1. To explain the fundamental distinction between primitive types and reference types, and to introduce the Java primitive

More information

SmartLCD. Programmer s Guide and Application Notes

SmartLCD. Programmer s Guide and Application Notes SmartLCD Programmer s Guide and Application Notes October 14, 1999 SmartLCD Programmer s Guide And Application Notes The following documentation is supporting material for the SmartLCD sample programs.

More information

Introduction to Matlab/Octave

Introduction to Matlab/Octave Introduction to Matlab/Octave February 28, 2014 This document is designed as a quick introduction for those of you who have never used the Matlab/Octave language, as well as those of you who have used

More information

NOTE: Debug and DebugSingle are the only MPI library configurations that will produce trace output.

NOTE: Debug and DebugSingle are the only MPI library configurations that will produce trace output. Trace Objects Trace Objects Introduction Use the Trace module to selectively produce trace output on a global and/or per-object basis for your application. You can specify the types of trace output when

More information

Introduction to MATLAB

Introduction to MATLAB Chapter 1 Introduction to MATLAB 1.1 Software Philosophy Matrix-based numeric computation MATrix LABoratory built-in support for standard matrix and vector operations High-level programming language Programming

More information

Table of Contents. Getting Started. Automation Technology

Table of Contents. Getting Started. Automation Technology Page 1 of 17 Table of Contents Table of Contents... 1 Getting Started... 1 How to Configure the C3 camera by using example configuration files... 2 How to Configure the C3 camera manually... 2 Getting

More information

Introduction to MATLAB. Simon O Keefe Non-Standard Computation Group

Introduction to MATLAB. Simon O Keefe Non-Standard Computation Group Introduction to MATLAB Simon O Keefe Non-Standard Computation Group sok@cs.york.ac.uk Content n An introduction to MATLAB n The MATLAB interfaces n Variables, vectors and matrices n Using operators n Using

More information

STIPlotDigitizer. User s Manual

STIPlotDigitizer. User s Manual STIPlotDigitizer User s Manual Table of Contents What is STIPlotDigitizer?... 3 Installation Guide... 3 Initializing STIPlotDigitizer... 4 Project GroupBox... 4 Import Image GroupBox... 5 Exit Button...

More information

Image Manipulation in MATLAB Due Monday, July 17 at 5:00 PM

Image Manipulation in MATLAB Due Monday, July 17 at 5:00 PM Image Manipulation in MATLAB Due Monday, July 17 at 5:00 PM 1 Instructions Labs may be done in groups of 2 or 3 (i.e., not alone). You may use any programming language you wish but MATLAB is highly suggested.

More information

INTRODUCTION TO MATLAB, SIMULINK, AND THE COMMUNICATION TOOLBOX

INTRODUCTION TO MATLAB, SIMULINK, AND THE COMMUNICATION TOOLBOX INTRODUCTION TO MATLAB, SIMULINK, AND THE COMMUNICATION TOOLBOX 1) Objective The objective of this lab is to review how to access Matlab, Simulink, and the Communications Toolbox, and to become familiar

More information

Tutorial - Exporting Models to Simulink

Tutorial - Exporting Models to Simulink Tutorial - Exporting Models to Simulink Introduction The Matlab and Simulink tools are widely used for modeling and simulation, especially the fields of control and system engineering. This tutorial will

More information

Graphics Overview ECE2893. Lecture 19. ECE2893 Graphics Overview Spring / 15

Graphics Overview ECE2893. Lecture 19. ECE2893 Graphics Overview Spring / 15 Graphics Overview ECE2893 Lecture 19 ECE2893 Graphics Overview Spring 2011 1 / 15 Graphical Displays 1 Virtually all modern computers use a full color Graphical Display device. 2 It displays images, text,

More information

A Fast Review of C Essentials Part I

A Fast Review of C Essentials Part I A Fast Review of C Essentials Part I Structural Programming by Z. Cihan TAYSI Outline Program development C Essentials Functions Variables & constants Names Formatting Comments Preprocessor Data types

More information

PDF417 Plug-In for 4th Dimension. Introduction. About the PDF417 Symbology

PDF417 Plug-In for 4th Dimension. Introduction. About the PDF417 Symbology PDF417 Plug-In for 4th Dimension 1999-2002 DataCraft, Inc. All rights reserved. Portions 1999 Symbol Technologies, Inc. Introduction The PDF417 Plug-in for 4th Dimension injects the power and versatility

More information

MATLAB 7. The Language of Technical Computing KEY FEATURES

MATLAB 7. The Language of Technical Computing KEY FEATURES MATLAB 7 The Language of Technical Computing MATLAB is a high-level technical computing language and interactive environment for algorithm development, data visualization, data analysis, and numerical

More information

This guide will show you how to use Intel Inspector XE to identify and fix resource leak errors in your programs before they start causing problems.

This guide will show you how to use Intel Inspector XE to identify and fix resource leak errors in your programs before they start causing problems. Introduction A resource leak refers to a type of resource consumption in which the program cannot release resources it has acquired. Typically the result of a bug, common resource issues, such as memory

More information

Meistergram/H2 Controller

Meistergram/H2 Controller 12/13/1997 Note: XGW is shorthand for the Xenetech Graphic Workstation software package. Feature changes and additions for XGW to run Meistergram Laser and Rotary machines This version of the XGW software

More information

MATFOR In Visual C# ANCAD INCORPORATED. TEL: +886(2) FAX: +886(2)

MATFOR In Visual C# ANCAD INCORPORATED. TEL: +886(2) FAX: +886(2) Quick Start t t MATFOR In Visual C# ANCAD INCORPORATED TEL: +886(2) 8923-5411 FAX: +886(2) 2928-9364 support@ancad.com www.ancad.com 2 MATFOR QUICK START Information in this instruction manual is subject

More information

Organization of Programming Languages CS320/520N. Lecture 06. Razvan C. Bunescu School of Electrical Engineering and Computer Science

Organization of Programming Languages CS320/520N. Lecture 06. Razvan C. Bunescu School of Electrical Engineering and Computer Science Organization of Programming Languages CS320/520N Razvan C. Bunescu School of Electrical Engineering and Computer Science bunescu@ohio.edu Data Types A data type defines a collection of data objects and

More information

Visual Profiler. User Guide

Visual Profiler. User Guide Visual Profiler User Guide Version 3.0 Document No. 06-RM-1136 Revision: 4.B February 2008 Visual Profiler User Guide Table of contents Table of contents 1 Introduction................................................

More information

Multi Time Series Rev

Multi Time Series Rev Multi Time Series Rev. 4.0.12 The Multi Time Series program is designed to provide flexible programming of automated time dependent experiments. The basic programming unit is a single Time Series Block

More information

Using Microsoft Excel

Using Microsoft Excel Using Microsoft Excel Introduction This handout briefly outlines most of the basic uses and functions of Excel that we will be using in this course. Although Excel may be used for performing statistical

More information

D-Optimal Designs. Chapter 888. Introduction. D-Optimal Design Overview

D-Optimal Designs. Chapter 888. Introduction. D-Optimal Design Overview Chapter 888 Introduction This procedure generates D-optimal designs for multi-factor experiments with both quantitative and qualitative factors. The factors can have a mixed number of levels. For example,

More information

Rotated earth or when your fantasy world goes up side down

Rotated earth or when your fantasy world goes up side down Rotated earth or when your fantasy world goes up side down A couple of weeks ago there was a discussion started if Fractal Terrain 3 (FT3) can rotate our earth. http://forum.profantasy.com/comments.php?discussionid=4709&page=1

More information

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #33 Pointer Arithmetic

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #33 Pointer Arithmetic Introduction to Programming in C Department of Computer Science and Engineering Lecture No. #33 Pointer Arithmetic In this video let me, so some cool stuff which is pointer arithmetic which helps you to

More information

CMPE 655 Fall 2016 Assignment 2: Parallel Implementation of a Ray Tracer

CMPE 655 Fall 2016 Assignment 2: Parallel Implementation of a Ray Tracer CMPE 655 Fall 2016 Assignment 2: Parallel Implementation of a Ray Tracer Rochester Institute of Technology, Department of Computer Engineering Instructor: Dr. Shaaban (meseec@rit.edu) TAs: Akshay Yembarwar

More information

Objectives. Part 1: forward kinematics. Physical Dimension

Objectives. Part 1: forward kinematics. Physical Dimension ME 446 Laboratory #1 Kinematic Transformations Report is due at the beginning of your lab time the week of February 20 th. One report per group. Lab sessions will be held the weeks of January 23 rd, January

More information

Outline. When we last saw our heros. Language Issues. Announcements: Selecting a Language FORTRAN C MATLAB Java

Outline. When we last saw our heros. Language Issues. Announcements: Selecting a Language FORTRAN C MATLAB Java Language Issues Misunderstimated? Sublimable? Hopefuller? "I know how hard it is for you to put food on your family. "I know the human being and fish can coexist peacefully." Outline Announcements: Selecting

More information

Lecture 14. No in-class files today. Homework 7 (due on Wednesday) and Project 3 (due in 10 days) posted. Questions?

Lecture 14. No in-class files today. Homework 7 (due on Wednesday) and Project 3 (due in 10 days) posted. Questions? Lecture 14 No in-class files today. Homework 7 (due on Wednesday) and Project 3 (due in 10 days) posted. Questions? Friday, February 11 CS 215 Fundamentals of Programming II - Lecture 14 1 Outline Static

More information

Introduction to LabVIEW

Introduction to LabVIEW Introduction to LabVIEW How to Succeed in EE 20 Lab Work as a group of 2 Read the lab guide thoroughly Use help function and help pages in LabVIEW Do the Pre-Lab before you come to the lab Don t do the

More information

Why arrays? To group distinct variables of the same type under a single name.

Why arrays? To group distinct variables of the same type under a single name. Lesson #7 Arrays Why arrays? To group distinct variables of the same type under a single name. Suppose you need 100 temperatures from 100 different weather stations: A simple (but time consuming) solution

More information

Matlab notes Matlab is a matrix-based, high-performance language for technical computing It integrates computation, visualisation and programming usin

Matlab notes Matlab is a matrix-based, high-performance language for technical computing It integrates computation, visualisation and programming usin Matlab notes Matlab is a matrix-based, high-performance language for technical computing It integrates computation, visualisation and programming using familiar mathematical notation The name Matlab stands

More information

IMPORTANT QUESTIONS IN C FOR THE INTERVIEW

IMPORTANT QUESTIONS IN C FOR THE INTERVIEW IMPORTANT QUESTIONS IN C FOR THE INTERVIEW 1. What is a header file? Header file is a simple text file which contains prototypes of all in-built functions, predefined variables and symbolic constants.

More information

BLM2031 Structured Programming. Zeyneb KURT

BLM2031 Structured Programming. Zeyneb KURT BLM2031 Structured Programming Zeyneb KURT 1 Contact Contact info office : D-219 e-mail zeynebkurt@gmail.com, zeyneb@ce.yildiz.edu.tr When to contact e-mail first, take an appointment What to expect help

More information

APPM 2360 Project 2 Due Nov. 3 at 5:00 PM in D2L

APPM 2360 Project 2 Due Nov. 3 at 5:00 PM in D2L APPM 2360 Project 2 Due Nov. 3 at 5:00 PM in D2L 1 Introduction Digital images are stored as matrices of pixels. For color images, the matrix contains an ordered triple giving the RGB color values at each

More information

Programming in C. main. Level 2. Level 2 Level 2. Level 3 Level 3

Programming in C. main. Level 2. Level 2 Level 2. Level 3 Level 3 Programming in C main Level 2 Level 2 Level 2 Level 3 Level 3 1 Programmer-Defined Functions Modularize with building blocks of programs Divide and Conquer Construct a program from smaller pieces or components

More information

IECD Institute for Entrepreneurship and Career Development Bharathidasan University, Tiruchirappalli 23.

IECD Institute for Entrepreneurship and Career Development Bharathidasan University, Tiruchirappalli 23. Subject code - CCP01 Chapt Chapter 1 INTRODUCTION TO C 1. A group of software developed for certain purpose are referred as ---- a. Program b. Variable c. Software d. Data 2. Software is classified into

More information

M4.1-R3: PROGRAMMING AND PROBLEM SOLVING THROUGH C LANGUAGE

M4.1-R3: PROGRAMMING AND PROBLEM SOLVING THROUGH C LANGUAGE M4.1-R3: PROGRAMMING AND PROBLEM SOLVING THROUGH C LANGUAGE NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions. 2. PART ONE is to be

More information

Tutorial No. 2 - Solution (Overview of C)

Tutorial No. 2 - Solution (Overview of C) Tutorial No. 2 - Solution (Overview of C) Computer Programming and Utilization (2110003) 1. Explain the C program development life cycle using flowchart in detail. OR Explain the process of compiling and

More information

2-D Arrays. Of course, to set each grid location to 0, we have to use a loop structure as follows (assume i and j are already defined):

2-D Arrays. Of course, to set each grid location to 0, we have to use a loop structure as follows (assume i and j are already defined): 2-D Arrays We define 2-D arrays similar to 1-D arrays, except that we must specify the size of the second dimension. The following is how we can declare a 5x5 int array: int grid[5][5]; Essentially, this

More information

EW The Source Browser might fail to start data collection properly in large projects until the Source Browser window is opened manually.

EW The Source Browser might fail to start data collection properly in large projects until the Source Browser window is opened manually. EW 25462 The Source Browser might fail to start data collection properly in large projects until the Source Browser window is opened manually. EW 25460 Some objects of a struct/union type defined with

More information

CS149: Elements of Computer Science. Fundamental C++ objects

CS149: Elements of Computer Science. Fundamental C++ objects Fundamental C++ objects 1. Compiler needs to know in advance how to store different data types 2. Variable name + type, e.g. (price, integer) 3. Types: (a) Integers: short, long, signed (b) Floating Points:

More information

Numerical Methods in Scientific Computation

Numerical Methods in Scientific Computation Numerical Methods in Scientific Computation Programming and Software Introduction to error analysis 1 Packages vs. Programming Packages MATLAB Excel Mathematica Maple Packages do the work for you Most

More information

A/D Converter. Sampling. Figure 1.1: Block Diagram of a DSP System

A/D Converter. Sampling. Figure 1.1: Block Diagram of a DSP System CHAPTER 1 INTRODUCTION Digital signal processing (DSP) technology has expanded at a rapid rate to include such diverse applications as CDs, DVDs, MP3 players, ipods, digital cameras, digital light processing

More information

STRUCTURED DATA TYPE ARRAYS IN C++ ONE-DIMENSIONAL ARRAY TWO-DIMENSIONAL ARRAY

STRUCTURED DATA TYPE ARRAYS IN C++ ONE-DIMENSIONAL ARRAY TWO-DIMENSIONAL ARRAY STRUCTURED DATA TYPE ARRAYS IN C++ ONE-DIMENSIONAL ARRAY TWO-DIMENSIONAL ARRAY Objectives Declaration of 1-D and 2-D Arrays Initialization of arrays Inputting array elements Accessing array elements Manipulation

More information

CMSC 150 LECTURE 1 INTRODUCTION TO COURSE COMPUTER SCIENCE HELLO WORLD

CMSC 150 LECTURE 1 INTRODUCTION TO COURSE COMPUTER SCIENCE HELLO WORLD CMSC 150 INTRODUCTION TO COMPUTING ACKNOWLEDGEMENT: THESE SLIDES ARE ADAPTED FROM SLIDES PROVIDED WITH INTRODUCTION TO JAVA PROGRAMMING, LIANG (PEARSON 2014) LECTURE 1 INTRODUCTION TO COURSE COMPUTER SCIENCE

More information

DETAILED INSTRUCTIONS FOR RUNNING BINARY_TRAVERSER

DETAILED INSTRUCTIONS FOR RUNNING BINARY_TRAVERSER DETAILED INSTRUCTIONS FOR RUNNING BINARY_TRAVERSER These instructions are also available at http://www.geo.umass.edu/climate/lewis/analysis/ Install ImageJ from http://rsb.info.nih.gov/ij/download.html.

More information

Supplementary Information for. HybTrack: A hybrid single particle tracking software using manual and automatic detection of dim signals

Supplementary Information for. HybTrack: A hybrid single particle tracking software using manual and automatic detection of dim signals Supplementary Information for HybTrack: A hybrid single particle tracking software using manual and automatic detection of dim signals Byung Hun Lee 1 and Hye Yoon Park 1,2 * Affiliations: 1 Department

More information

Procedural Programming & Fundamentals of Programming

Procedural Programming & Fundamentals of Programming Procedural Programming & Fundamentals of Programming Lecture 3 - Summer Semester 2018 & Joachim Zumbrägel What we know so far... Data type serves to organize data (in the memory), its possible values,

More information

System Block Diagram. Tracking Trajectories of Migrating Birds Around a Skyscraper. Brian Crombie Matt Zivney

System Block Diagram. Tracking Trajectories of Migrating Birds Around a Skyscraper. Brian Crombie Matt Zivney System Block Diagram Tracking Trajectories of Migrating Birds Around a Skyscraper Brian Crombie Matt Zivney Project Advisors Dr. Huggins Dr. Stewart Dr. Malinowski System Level Block Diagram The goal of

More information