PImage. Let’s look at the PImage class in ProcessingPImage –What are the fields (i.e., variables)? –What methods are available? –What about the constructor---how.

Slides:



Advertisements
Similar presentations
Playing with pixels Programming For Artists Learning objectives:
Advertisements

Image Processing … computing with and about data, … where "data" includes the values and relative locations of the colors that make up an image.
Processing the Danger Shield Everything you wanted to know about Processing but were afraid to ask By Ben Leduc-Mills.
A Quick Introduction to Processing
Images. PImage class PImage is a class for loading and displaying an image in Processing. Declare a PImage type: PImage img; Make a new instance by loading.
Data: Programming Design and Modularization IS 101Y/CMSC 101 Computational Thinking and Design Thursday, September 26, 2013 Marie desJardins University.
Asteroids Games and Simulations O-O Programming in Java The Walker School The Walker School – Games and Simulations
Lecture 8: Objects and Classes, cont’d discuss hw2 assign h3 Review the main points of objects/classes This Pass-by-value A new example: our Date class.
Overloaded Constructors constructors can be overloaded, like other methods – i.e., a class can define several constructors all constructors must have the.
Classes we can write our own classes – to represent and define our objects e.g. class for Complex objects represents a complex number defines its properties.
What is a class? a class definition is a blueprint to build objects its like you use the blueprint for a house to build many houses in the same way you.
1 Advanced Computer Programming Concurrency Multithreaded Programs Copyright © Texas Education Agency, 2013.
Applets Java API.
Image Buffer Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.
G RAPHICS P ROGRAMMING Lecture 3 - Simple Animation - Simple 3D Drawing.
Creating Web Documents Wk 2: HTML & PSP basics Discuss sites HTML, PSP lesson Assignment: first Web page due Day class: 1/23; Night class 1/28.
Java Spring PImage Let’s look at the PImage class in ProcessingPImage –What are the fields (i.e., variables)? –What methods are available? –What.
Object-Oriented Programming (OOP). Implementing an OOD in Java Each class is stored in a separate file. All files must be stored in the same package.
Extending HTML CPSC 120 Principles of Computer Science April 9, 2012.
Introduction to XNA Graphics Programming Asst. Prof. Rujchai Ung-arunyawee COE, KKU.
Javadoc Comments.  Java API has a documentation tool called javadoc  The javadoc tool is used on the source code embedded with javadoc-style comments.
Georgia Institute of Technology Manipulating Pictures, Arrays, and Loops Barb Ericson Georgia Institute of Technology August 2005.
Documentation javadoc. Documentation not a programmer's first love lives in a separate file somewhere usually a deliverable on the schedule often not.
Processing can load images, display them on the screen, and change their size, position, opacity, and tint. You can load gif, png and jpg images in processing.
Introduction to Image processing using processing.
Topic 1 Object Oriented Programming. 1-2 Objectives To review the concepts and terminology of object-oriented programming To discuss some features of.
Microsoft Access is a database program to manage sort retrieve group filter for certain records.
Introduction Copyright © Software Carpentry This work is licensed under the Creative Commons Attribution License See
Javadoc. Purpose of javadoc javadoc is a program that reads your Java program and produces great-looking documentation in HTML format Without any help,
Images. Digital Images Rectangular arrays of pixel data Pixel - picture element, smallest addressable part of the frame buffer. Color depth - the depth.
Test 2 Review. General Info. All tests are comprehensive. You are still responsible for the material covered prior to the first exam. You will be tested.
LCC 6310 Computation as an Expressive Medium Lecture 8.
Georgia Institute of Technology Creating Classes part 4 Barb Ericson Georgia Institute of Technology May 2006.
CreatingClasses-SlideShow-part41 Creating Classes part 4 Barb Ericson Georgia Institute of Technology Dec 2009.
GoodOO Programming Practice in Java © Allan C. Milne v
Page 1 – Autumn 2009Steffen Vissing Andersen SDJ I1, Autumn 2009 Agenda: Java API Documentation Code Documenting (in javadoc format) Debugging.
Computer Science I Classes and objects Classwork/Homework: Examine and modify my examples. Make your own.
Computer Science I Recap: variables & functions. Images. Pseudo-random processing.
 Implementing a class ◦ Implementing an interface ◦ Using documented stubs before coding ◦ Writing JUnit tests before coding ◦ Using fields CSSE 220 Object-Oriented.
Processing TYWu. Where can I download? 2.0b9 Windows 32-bit.
Document Object Model Nasrullah. DOM When a page is loaded,browser creates a Document Object Model of the Page.
B. RAMAMURTHY Processing and Programming cse
SourceAnatomy1 Java Source Anatomy Barb Ericson Georgia Institute of Technology July 2008.
Chapter 2 – The Little Crab Program:. Little Crab Scenario Inheritance: The Arrows Denote Hierarchy Crab is an Animal Animal is an Actor Therefore, It.
IAT 265 Images in Processing PImage. Jun 27, 2014IAT 2652 Outline  Programming concepts –Classes –PImage –PFont.
Review Random numbers mouseX, mouseY setup() & draw() frameRate(), loop(), noLoop() Mouse and Keyboard interaction Arcs, curves, bézier curves, custom.
Computer Science I Looking at code: "Where did Prof. Shablinsky go" Classwork/homework: midterm projects.
Computer Science I More class examples. Paths. Jigsaw. Tolerance. Classwork/homework: Your class project. Post proposal for midterm project.
CS/ENGRD 2110 FALL 2013 Lecture 3: Fields, getters and setters, constructors, testing 1.
Mike Mulhearn & Drew Hobbs IMAGE ICON.  Paints icons from images  Images can be JPEG, JPG, GIF, PNG, BMP, WBMP  Images may also be created from a URL,
Execution ways of program References: www. en.wikipedia.org/wiki/Integrated_development_environment  You can execute or run a simple java program with.
1. Import Menu 2. Drag & Drop 3. Import from Mobile 4. Import Zipped 5. Import Exercise [DELETE THIS TEXT: Modify the number of tabs and text for your.
Java Spring PImage Let’s look at the PImage class in ProcessingPImage –What are the fields (i.e., variables)? –What methods are available? –What.
1 Sections 5.1 – 5.2 Digital Image Processing Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
2020 Company Confidential. GSV Global Styles Validations.
數位影像處理 Digital Image Processing 吳育龍老師. Read image data Screen Resolution : 1024 X
David Meredith Aalborg University
More Sophisticated Behavior
Kyoungju Park Computer Graphics Kyoungju Park
JavaDoc CECS277 Mimi Opkins.
25 GUI Example.
Chapter 15, Images …a few points
Some Tips for Using Eclipse
An Introduction to Java – Part II
For Net Art Lecture 2 J Parker
Manipulating Pictures, Arrays, and Loops part 3
Chapter 15, Images …a few points
Programming for Art: Images
The Image The pixels in the image The mask The resulting image 255 X
JavaScript 101 Lesson 8: Loops.
Presentation transcript:

PImage

Let’s look at the PImage class in ProcessingPImage –What are the fields (i.e., variables)? –What methods are available? –What about the constructor---how many parameters does it have? There are 4 constructors each with a different number of parameters

Using PImage’s filter() Method PImage img; void setup() { size(100,200); img = loadImage("forest.jpg"); image(img, 0, 0); img.filter(INVERT); image(img, 0, 100); } Here are the images that you need as a zip fileimages that you need as a zip file

PImage’s mask() Method background(255); PImage img = loadImage("airport.jpg"); PImage maskImg = loadImage("airportmask.jpg"); img.mask(maskImg); image(img, 0, 0);

Modifying Pixels and HW 6 Processing program to change Pixels Image for the program HW6 –Have your program do the following Load a png or jpg image Using a mouse event, read and modify several pixels of the image Using a keyboard event, modify the entire image You must use a for loop in your program –Grading 10% Aesthetics 20% documentation and comments 20% for loop 25% reading pixels from an array 25% modifying pixels within an array

PImage Revisited Here’s an alternative way of looking at the documentation for PImagePImage This documentation is produced by Javadoc Javadoc Processing is implemented as a set of Java classes that accompany those normally provided with Java Can you find the line() method?