COS 126 Atomic Theory of Matter

Similar documents
COS 126 Atomic Theory of Matter

ELEC 204 Digital Systems Design

Lecture 4: Frequency Reuse Concepts

Roberto s Notes on Infinite Series Chapter 1: Series Section 2. Infinite series

Density Slicing Reference Manual

PROJECT #2 GENERIC ROBOT SIMULATOR

Wavelet Transform. CSEP 590 Data Compression Autumn Wavelet Transformed Barbara (Enhanced) Wavelet Transformed Barbara (Actual)

EECE 301 Signals & Systems Prof. Mark Fowler

X-Bar and S-Squared Charts

(2) The MOSFET. Review of. Learning Outcome. (Metal-Oxide-Semiconductor Field Effect Transistor) 2.0) Field Effect Transistor (FET)

Unit 5: Estimating with Confidence

Chapter 3 Digital Logic Structures

Fingerprint Classification Based on Directional Image Constructed Using Wavelet Transform Domains

GENERATE AND MEASURE STANDING SOUND WAVES IN KUNDT S TUBE.

Laboratory Exercise 3: Dynamic System Response Laboratory Handout AME 250: Fundamentals of Measurements and Data Analysis

Methods to Reduce Arc-Flash Hazards

lecture notes September 2, Sequential Choice

HOW BAD RECEIVER COORDINATES CAN AFFECT GPS TIMING

Name Class. Date Section. Test Form A Chapter Chapter 9 Infinite Series. 1 n 1 2 n 3n 1, n 1, 2, 3, Find the fourth term of the sequence

A SELECTIVE POINTER FORWARDING STRATEGY FOR LOCATION TRACKING IN PERSONAL COMMUNICATION SYSTEMS

Data Mining the Online Encyclopedia of Integer Sequences for New Identities Hieu Nguyen

E X P E R I M E N T 13

Zonerich AB-T88. MINI Thermal Printer COMMAND SPECIFICATION. Zonerich Computer Equipments Co.,Ltd MANUAL REVISION EN 1.

Alignment in linear space

PV210. Solar PV tester and I-V curve tracer

Application of Improved Genetic Algorithm to Two-side Assembly Line Balancing

Introduction to OSPF

Combinatorics. Chapter Permutations. Reading questions. Counting Problems. Counting Technique: The Product Rule

Logarithms APPENDIX IV. 265 Appendix

CHAPTER 5 A NEAR-LOSSLESS RUN-LENGTH CODER

Introduction to Statistical Simulation

CCD Image Processing: Issues & Solutions

A study on the efficient compression algorithm of the voice/data integrated multiplexer

HB860H 2-phase Hybrid Servo Drive

The Institute of Chartered Accountants of Sri Lanka

PV200. Solar PV tester and I-V curve tracer

Outline. Supply system EM, IR, di/dt issues (2-34) - Topologies. - Area pads - Decoupling Caps - Circuit failures - Can CAD help?

Lab 2: Common Source Amplifier.

Intermediate Information Structures

ELEC 350 Electronics I Fall 2014

Compression Programs. Compression Outline. Multimedia. Lossless vs. Lossy. Encoding/Decoding. Analysis of Algorithms

Department of Electrical and Computer Engineering, Cornell University. ECE 3150: Microelectronics. Spring Due on April 26, 2018 at 7:00 PM

TMCM BLDC MODULE. Reference and Programming Manual

Permutation Enumeration

CP 405/EC 422 MODEL TEST PAPER - 1 PULSE & DIGITAL CIRCUITS. Time: Three Hours Maximum Marks: 100

ON THE FUNDAMENTAL RELATIONSHIP BETWEEN THE ACHIEVABLE CAPACITY AND DELAY IN MOBILE WIRELESS NETWORKS

Ch 9 Sequences, Series, and Probability

ASample of an XML stream is:

APPLICATION NOTE UNDERSTANDING EFFECTIVE BITS

202 Chapter 9 n Go Bot. Hint

The Fundamental Capacity-Delay Tradeoff in Large Mobile Ad Hoc Networks

Open Two Radio Switching Protocol (OTRSP)

Indicator No mark Single preset Dual preset DIN W144 H72mm DIN W48 H96mm No mark DIN W72 H72mm (4 digit) (6 digit) Counter/Timer

Using Color Histograms to Recognize People in Real Time Visual Surveillance

Tehrani N Journal of Scientific and Engineering Research, 2018, 5(7):1-7

Math 140 Introductory Statistics

COMBINATORICS 2. Recall, in the previous lesson, we looked at Taxicabs machines, which always took the shortest path home

Optimal Arrangement of Buoys Observable by Means of Radar

7. Counting Measure. Definitions and Basic Properties

H2 Mathematics Pure Mathematics Section A Comprehensive Checklist of Concepts and Skills by Mr Wee Wen Shih. Visit: wenshih.wordpress.

Making sure metrics are meaningful

x 1 + x x n n = x 1 x 2 + x x n n = x 2 x 3 + x x n n = x 3 x 5 + x x n = x n

4. INTERSYMBOL INTERFERENCE

IEC Robot Control. Familiar programming opens up future possibilities. yaskawa.com. When the background color is black or dark color

Objectives. Some Basic Terms. Analog and Digital Signals. Analog-to-digital conversion. Parameters of ADC process: Related terms

ECE 2201 PRELAB 4A MOSFET SWITCHING APPLICATIONS. Digital CMOS Logic Inverter

SMT servo.c Program. Tom Sargent

Voice Command Recognition System Based on MFCC and VQ Algorithms

Displacement estimation

arxiv: v2 [math.co] 15 Oct 2018

Model Display digit Size Output Power supply 24VAC 50/60Hz, 24-48VDC 9999 (4-digit) 1-stage setting

AC : USING ELLIPTIC INTEGRALS AND FUNCTIONS TO STUDY LARGE-AMPLITUDE OSCILLATIONS OF A PENDULUM

Radar emitter recognition method based on AdaBoost and decision tree Tang Xiaojing1, a, Chen Weigao1 and Zhu Weigang1 1

x y z HD(x, y) + HD(y, z) HD(x, z)

IEC Robot Control TM. Familiar programming opens up future possibilities. yaskawa.com

Yuletide Glitz Linens

15 min/ Fall in New England

NOISE IN A SPECTRUM ANALYZER. Carlo F.M. Carobbi and Fabio Ferrini Department of Information Engineering University of Florence, Italy

CS 111: Program Design I Lecture 13: Supreme Court Basics, Files

5 Quick Steps to Social Media Marketing

CS 111: Program Design I Lecture 22: CS: Network Analysis, Degree distribution, Profiling

General Model :Algorithms in the Real World. Applications. Block Codes

The Detection of Abrupt Changes in Fatigue Data by Using Cumulative Sum (CUSUM) Method

Exploring Patterns. IWORKSHEET 11 Name. For each pattern, follow these instructions: Function. step 10. units: units: units:

After completing this chapter you will learn

}, how many different strings of length n 1 exist? }, how many different strings of length n 2 exist that contain at least one a 1

OPTIMIZATION OF RNS FIR FILTERS FOR 6-INPUTS LUT BASED FPGAS

ICM7213. One Second/One Minute Timebase Generator. Features. Description. Ordering Information. Pinout. August 1997

McStas. An introdution to. Kim Lefmann, Peter Willendrup. Kim Lefmann, Peter Willendrup, DTU-RISØ August 28th, 2007

Grade 6 Math Review Unit 3(Chapter 1) Answer Key

1. How many possible ways are there to form five-letter words using only the letters A H? How many such words consist of five distinct letters?

ONDURA-9. 9-Corrugation Asphalt Roofing Sheets I N S T A L L A T I O N I N S T R U C T I O N S

Procedia - Social and Behavioral Sciences 128 ( 2014 ) EPC-TKS 2013

PRACTICAL FILTER DESIGN & IMPLEMENTATION LAB

Compound Controller for DC Motor Servo System Based on Inner-Loop Extended State Observer

4.3 COLLEGE ALGEBRA. Logarithms. Logarithms. Logarithms 11/5/2015. Logarithmic Functions

Technical Explanation for Counters

A study on traffic accident measures in municipal roads by using GIS

Data Acquisition System for Electric Vehicle s Driving Motor Test Bench Based on VC++ *

Massachusetts Institute of Technology Dept. of Electrical Engineering and Computer Science Fall Semester, Introduction to EECS 2.

Transcription:

COS 126 Atomic Theory of Matter 1

Goal of the Assigmet Video Calculate Avogadro s umber Usig Eistei s equatios Usig fluorescet imagig Iput data Output Frames Blobs/Beads Estimate of Avogadro s umber 7.1833 4.7932 2.1693 5.5287 5.4292... Displacemets 2

Overview Four Classes Blob BeadFider Maximal set of coected light pixels cliet of Fid all blobs i a JPEG image List all the big blobs (aka beads) cliet of video data Avogadro BeadTracker Boltzma Avogadro Data aalysis to estimate Avogadro s umber from the motio of beads displacemet data Track beads from oe image to the ext Pictures (frames) Commad lie args 3

Atomic Theory Overview Browia Motio Radom collisio of molecules Displacemet over time fits a Gaussia distributio 4

Atomic Theory Overview Avogadro s Number Number of atoms eeded to equal substace s atomic mass i grams N A atoms of Carbo-12 = 12 grams N A == 6.0221367 x 10 +23 Ca calculate from Browia Motio Variace of Gaussia distributio is a fuctio of resistace i water, umber of molecules 5

Blob.java API for represetig particles (blobs) i water public Blob() costructor public void add(it i, it j) add pixel at i,j to Blob public it mass() umber of pixels i Blob public double distaceto(blob b) Euclidea distace betwee the ceter of masses betwee Blobs public Strig tostrig() a strig represetatio of this Blob public static void mai(strig[] args) uit tests all methods i the Blob data type Ceter of mass, ad # of pixels 6

Blob.java Ceter of mass Oly eed three istace variables Do ot store the positios of every pixel i the blob Two alteratives: umber of poits, x-coordiate ceter of mass, ad y- coordiate ceter of mass) or umber of poits, sum of x-coordiates, ad sum of y- coordiates) eeded to compute the ceter-of-mass Ceter of mass, ad # of pixels Ceter is ot iteger values! 7

Blob Challeges Format umbers i a ice way Strig.format("%2d (%8.4f, %8.4f)", mass, cx, cy); (Use same format i System.out.pritf()) E.g., "%6.3f" -> _2.354 E.g., "%10.4e" -> 1.2535e-23 Thoroughly test Create a simple mai() Test ALL methods 8

BeadFider.java Locate all blobs i a give image API Ad idetify large blobs (called beads) public BeadFider(Picture picture, double threshold) Calculate lumiace (see Lumiace.java, 3.1) Iclude pixels with a lumiace >= threshold Fid blobs with DFS (see Percolatio.java, 2.4) The hard part, ext slide public Blob[] getbeads(it misize) Returs all beads with at least misize pixels Array must be of size equal to umber of beads 9

BeadFider - Depth First Search Use boolea[][] array to mark visited Traverse image pixel by pixel Dark pixel Mark as visited, cotiue Light pixel Create ew blob, call DFS DFS algorithm Base case: simply retur if Pixel out-of-bouds Pixel has bee visited Pixel is dark (ad mark as visited) Add pixel to curret blob, mark as visited Recursively visit up, dow, left, ad right eighbors 10

BeadFider - Depth First Search Use boolea[][] array to mark visited Traverse image pixel by pixel Dark pixel Mark as visited, cotiue Light pixel Create ew blob, call DFS DFS algorithm Base case: simply retur if Pixel out-of-bouds Pixel has bee visited Pixel is dark (ad mark as visited) Add pixel to curret blob, mark as visited Recursively visit up, dow, left, ad right eighbors 11

BeadFider - Depth First Search Use boolea[][] array to mark visited Traverse image pixel by pixel Dark pixel Mark as visited, cotiue Light pixel Create ew blob, call DFS DFS algorithm Base case: simply retur if Pixel out-of-bouds Pixel has bee visited Pixel is dark (ad mark as visited) Add pixel to curret blob, mark as visited Recursively visit up, dow, left, ad right eighbors 12

BeadFider - Depth First Search Use boolea[][] array to mark visited Traverse image pixel by pixel Dark pixel Mark as visited, cotiue Light pixel Create ew blob, call DFS DFS algorithm Base case: simply retur if Pixel out-of-bouds Pixel has bee visited Pixel is dark (ad mark as visited) Add pixel to curret blob, mark as visited Recursively visit up, dow, left, ad right eighbors 13

BeadFider - Depth First Search Use boolea[][] array to mark visited Traverse image pixel by pixel Dark pixel Mark as visited, cotiue Light pixel Create ew blob, call DFS DFS algorithm Base case: simply retur if Pixel out-of-bouds Pixel has bee visited Pixel is dark (ad mark as visited) Add pixel to curret blob, mark as visited Recursively visit up, dow, left, ad right eighbors 14

BeadFider - Depth First Search Use boolea[][] array to mark visited Traverse image pixel by pixel Dark pixel Mark as visited, cotiue Light pixel Create ew blob, call DFS DFS algorithm Base case: simply retur if Pixel out-of-bouds Pixel has bee visited Pixel is dark (ad mark as visited) Add pixel to curret blob, mark as visited Recursively visit up, dow, left, ad right eighbors 15

BeadFider Challeges Data structure for the collectio of blobs Store them ay way you like But be aware of memory use ad timig 16

BeadFider Challeges Data structure for the collectio of blobs Store them ay way you like But be aware of memory use ad timig Array of blobs? But how big should the array be? Liked list of blobs? Memory efficiet, but harder to implemet Avoid traversig whole list to add a blob! Aythig else? Submit your (extra) object classes if ot i 4.3 17

BeadTracker.java Track beads betwee successive images Sigle mai fuctio Take i a series of images Output distace traversed by all beads for each time-step For each bead foud at time t+1, fid closest bead at time t ad calculate distace Not the other way aroud! Do t iclude if distace > 25 pixels (ew bead) 18

BeadTracker Challeges Readig multiple iput files java-itrocs BeadTracker ru_1/*.jpg Expads files i alphabetical order Ed up as args[0], args[1], Avoidig ruig out of memory How? Recompilig Recompile if Blob or BeadFider chage 19

BeadTracker Challeges Readig multiple iput files java-itrocs BeadTracker ru_1/*.jpg Expads files i alphabetical order Ed up as args[0], args[1], Avoidig ruig out of memory Do ot ope all picture files at same time Various ways to do this Recompilig Recompile if Blob or BeadFider chage 20

BeadTracker Challeges Avoid ruig out of memory (1) File cotaiig frame t 0 File cotaiig frame t 1 File cotaiig frame t 2 File cotaiig frame t beads t 0 beads t 1 radial displacemet 0 Oly eed two ope at a time. 21

BeadTracker Challeges Avoid ruig out of memory (1) File cotaiig frame t 0 File cotaiig frame t 1 File cotaiig frame t 2 File cotaiig frame t beads t 1 beads t 2 radial displacemet 1 Oly eed two ope at a time. 22

BeadTracker Challeges Avoid ruig out of memory (2) File cotaiig frame t 0 File cotaiig frame t 1 File cotaiig frame t 2 File cotaiig frame t beads t 0 beads t 1 beads t 2 radial displacemet 0 radial displacemet 1 No eed to re-fid beads use the beads t 1 foud i radial displacemet 0 computatio i the computatio of radial displacemet 1 23

Avogadro.java Aalyze Browia motio of all calculated displacemets Itricate formulas, all give Be careful about uits i the math, covert pixels to meters, etc. Ca test without the other parts workig We provide sample iput files Ca work o it while waitig for help 24

Coclusio: Fial Tips Avoidig subtle bugs i BeadFider Double check what happes at corer cases (e.g., at boudary pixels, or whe lumiace == tau, or mass == cutoff) Commo errors i BeadFider NullPoiterExceptio StackOverflowError (e.g., if o base case) No output (eed to add prits) Look at checklist Q&A 25

Coclusio: Fial Tips Testig with a mai() Blob Test all methods BeadFider, BeadTracker, ad Avogadro Must have a mai() that ca hadle I/O described i Testig sectio of checklist Timig aalysis Look at feedback from earlier assigmets N == umber of pixels (ot frames) How ca you ru 100 frames? 26