Creating your own image data files. Simple file output in C# using System.IO; … StreamWriter file = new StreamWriter( "c:\\out.txt" ); file.WriteLine(

Slides:



Advertisements
Similar presentations
Input and Output READ WRITE OPEN. FORMAT statement Format statements allow you to control how data are read or written. Some simple examples: Int=2; real=
Advertisements

1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Programming Project 1 Truth Table Lecture 03, file P1 Due January.
Chapter 2 Programming by Example. A Holistic Perspective Three sections separated by blank lines. Program comment File: FileName.java
Computer Vision Chapter 6 Color.
Picture Manipulation The manipulation of (already created) pictures. May be applied to vector graphics or bitmaps. We will consider bitmaps and introduce.
CSE 803 Using images in C++ Computing with images Applications & Methods 2D arrays in C++ Programming project 4.
2311: Algorithmic Architecture Basics of Algorithms Data IO.
Image File Format Only focused in TIFF-Tag Image File Format Grayscale 8 bit Purpose-interchange of digital image data Goals: Extensibility-capable to.
CS31: Introduction to Computer Science I Discussion 1A 4/2/2010 Sungwon Yang
Eleven colors and rasters. Color objects Meta represents colors with color objects You can create a color by saying: [color r g b] r: amount of red (0-255)
Eleven colors and rasters. Color objects Meta represents colors with color objects You can create a color by saying: [color r g b] r: amount of red (0-255)
IAT 800 Lecture 8. Oct 13, Fall 2006IAT 8002 Outline  Programming concepts –BImage BFont –Creating XImage –Typography.
Chapter 6 Color Image Processing Chapter 6 Color Image Processing.
Unit 2 Present Progressive and Simple Present. Unit 2 Present Progressive and Simple Present 2 Present Progressive.
Basics of HTML. Example Code Hello World Hello World This is a web page.
© GCSE Computing Candidates should be able to:  explain the representation of an image as a series of pixels represented in binary  explain the need.
XHTML Images. Images are important Purpose: to enhance your web site. Add only when they complement or add additional impact to your message.
Informatics Computer School CS114 Web Publishing HTML Lesson 2.
PYTHON. Python is a high-level, interpreted, interactive and object- oriented scripting language. Python was designed to be highly readable which uses.
Creating With Code.
1 k Jarek Rossignac,  2008 Processing  Install Processing  Learn how to edit, run, save, export, post programs  Understand.
1 JavaScript 1. 2 Java vs. JavaScript Java –Is a high level programming language –Is platform independent –Runs on a standardized virtual machine.
Practice 1 Seoul National University Graphics & Media Lab.
Document Management System. Introduction How to use the Document Management System.
Number Representations What all the numbers can mean.
HTML Extras. Adding a button   This is what it would look like:  Add color to your button: 
Creating your own image data files. Simple ASCII file output in Java import java.io.FileOutputStream; import java.io.PrintWriter; … PrintWriter out =
HTML (Hypertext Markup Language) – Class 3 Recap: HTML Special Characters (ex: ©). Including Images – using the tag. Lists – Ordered and Unordered.
SE-1021 Software Engineering II Week 8, Class 1 Return Exam Producing UML diagrams automatically in EA Poll Everywhere Files Tomorrow Week 6 HW due (if.
PHP - 1h. How it works Client requests document Server loads document in memory Server processes document with relevant module (PHP) Server sends XHTML.
HTML: Images and Links Many Thanks to “Joe,” at index.html, from whom I got these lessons!
Web Design (8) Images (2). My Holiday Photos An exercise in adding and linking images. Create a new website folder calling it ‘My Holiday Photos’. In.
CS Class 03 Topics  Sequence statements Input Output Assignment  Expressions Read pages Read pages 40 – 49 for next time.
Introduction to Image Processing Our first look at image processing will be through the use of Paint Shop Pro, a bitmap editing program available as shareware.
CS 325 Introduction to Computer Graphics 04 / 12 / 2010 Instructor: Michael Eckmann.
HTML IMAGES. CONTENTS IMG Tag Alt Attribute Setting Width and Height Of An Image Summary Exercise.
Images. Intro What is it? Getting your image Inserting Moving Resizing Cropping.
©College of Computer and Information Science, Northeastern UniversityFebruary 21, CS U540 Computer Graphics Prof. Harriet Fell Spring 2009 Lecture.
IAT 265 Images in Processing PImage. Jun 27, 2014IAT 2652 Outline  Programming concepts –Classes –PImage –PFont.
Simple Console Output. What we will briefly discuss System.out.println( … ) System.out.print( … ) System.out.printf( … )
Simple Console Output CS 21a. What we will briefly discuss System.out.println( … ) System.out.print( … ) System.out.printf( … )
Using Desktop Recap to work through Exam revision questions.
Update on Enhanced-V Algorithm Development 30 March 2007 Telecon.
1 Sections 5.1 – 5.2 Digital Image Processing Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Basic Image Manipulation CHAPTER 5. Topics 5.1Storage 5.2Reading and writing images in Java 5.3Display 5.4Printing 5.5Manipulation of pixel data.
Hello Educational presentation.
Representation of image data
Beginning of Class (lined paper)
Reading Netpbm Images.
PHP Image Manipulation
Computer Programming Methodology File Input
Invitation to Computer Science, Java Version, Third Edition
EEL 3705 / 3705L Digital Logic Design
Chapter 15, Images …a few points
Images in Binary.
Terrains Creating an Island.
Assignment #1: Application Interface (for iPhone)
Plan Attendance Files Posted on Campus Cruiser Homework Reminder
Digital Encodings.
Enhancing the Enlargement of Images
Chapter 15, Images …a few points
Color Image Processing
CSC1401 Viewing a picture as a 2D image - 2
PROGRAM AT RUNTIME Subject code: CSCI-620
The Image The pixels in the image The mask The resulting image 255 X
Photoshop: Image size and resolution
Agenda for Unit 5: Control Structures
PPM file format CSE 681.
Agenda for Unit 4: Graphics
Java-Assignment #4 (Due, April. 9, 2004)
Presentation transcript:

Creating your own image data files

Simple file output in C# using System.IO; … StreamWriter file = new StreamWriter( "c:\\out.txt" ); file.WriteLine( "hello, world." ); … file.close(); Note from Microslip: Any similarities between the C# StreamWriter class and Java’s PrintWriter class are purely coincidental.

P2 = ASCII grey PGM Each pixel has one integer (grey) value. P2 w h maxval v 1 v 2 v 3 … v w*h

P3 = ASCII color PPM Each pixel’s color is represented as three consecutive values,. P3 w h maxval v 1 r v 1 g v 1 b v 2 r v 2 g v 2 b v w*h r v w*h g v w*h b

Write a simple C# program that creates an image of the sin function. – file format:pgm (P2 / grey) – file name:out.pgm – sin function: width/domain/x: [0..2Pi] y: real numbers [ ] – image: width: 500 pixels ({0,..,499}) height: 250 pixels (repeat values from sin 250 times) pixel values: integers {0,…,255} Exercise

Load result into your CSImageviewer; send a screen capture to me. your code (that produced the image data file) to me. The subject must be CV sin assignment. Exercise Same values across each line repeated over and over and over for every line.