1
INTRODUCTION Computer Graphics 1 INTRODUCTION: THE OUTLINE I. - - PowerPoint PPT Presentation
INTRODUCTION Computer Graphics 1 INTRODUCTION: THE OUTLINE I. - - PowerPoint PPT Presentation
INTRODUCTION Computer Graphics 1 INTRODUCTION: THE OUTLINE I. Image Processing / Computer Graphics II. Advantages III. Representative Uses IV. Classification of Applications V. History VI. Conceptual Framework VII. Our First Assignment 2
INTRODUCTION: THE OUTLINE
2
- I. Image Processing / Computer Graphics
- II. Advantages
- III. Representative Uses
- IV. Classification of Applications
- V. History
- VI. Conceptual Framework
- VII. Our First Assignment
- I. IMAGE PROCESSING / COMPUTER GRAPHICS
3
- Image Processing:
- Analysis and reconstruction of existing images
- Sub-Areas:
- Image Enhancement
- Pattern Detection and Recognition
- Scene Analysis
- Computer Vision
- I. IMAGE PROCESSING
4
IMAGE ENHANCEMENT
5
Apex Sharpening of Andromeda Galaxy Image http://math.nist.gov/mcsd/highlights/carasso-spie06.html
PATTERN DETECTION AND RECOGNITION
6
Body parts detection for people tracking using trees of Histogram of Oriented Gradient descriptors, http://hal.inria.fr/INRIA/inria-00496980/en/
SCENE ANALYSIS
7
The Vision and Mobile Robotics Laboratory, http://www.cs.cmu.edu/~vmr/jobs/jobs.html
COMPUTER VISION
8
Software That Evaluates Facial Expressions , http://www.sciencedaily.com/videos/computers_math/internet/5/
- I. IMAGE PROCESSING / COMPUTER GRAPHICS
9
- Computer Graphics:
- Synthesis of new images
- Overlap between the two is
growing
- William Latham,
Evolutionary Art
- II. ADVANTAGES
10
- Communication between user and computer
- Interactive graphics
- Creation of abstract, synthetic objects
- Not confined to static images: animation
- User controlled dynamics
- III. REPRESENTATIVE USES
11
- User Interfaces
- Interactive Data Plotting
- Office Automation / Electronic
Publishing
- Computer-Aided Drafting and
Design
http://www.warmelin.com/cad-cam.html
- III. REPRESENTATIVE USES
12
- Simulation and Animation
- Scientific
- Entertainment
- Art and Commerce
- Process Control
- Cartography
- IV. CLASSIFICATION OF APPLICATIONS
13
- Dimensionality
- Kind of Picture
- Type of Interaction
- Role of the Image / Graphic
- Relationship between Objects and Pictures
- Logical
- Temporal
DIMENSIONALITY: 2D AND 3D
14
http://www.media-freaks.com/articles/3d-animation-studios-what-goes-on-behind-those-closed-doors
KIND OF PICTURE: LINE DRAWING / WIREFRAME
15
Grand Designs 3D Software
KIND OF IMAGE: COLOR / GRAYSCALE
16
TYPE OF INTERACTION
17
- Offline Plotting
- Interactive Plotting
- User Moves Around (or within) Object
- Interactive Object Design
ROLE OF THE IMAGE / GRAPHIC
18
- Picture as End Product
- Cartography
- Drafting
- Artwork
- Animation
- Picture as Means to an End
- CAD/CAM
- V. HISTORY
19
- Beginnings
- Crude Plotting
- Sutherland 1963
- Sketchpad
- V. HISTORY
20
- Output Technology
- Vector Display
- Oscilloscopes were some of the 1st computer displays
- Computation results used to drive the vertical and horizontal axis (X-Y)
- Intensity could also be controlled (Z-axis)
- Used mostly for line drawings
- Display list had to be constantly updated
(except for storage tubes)
- Raster Display
- V. HISTORY
21
- Output Technology
- Vector Display
- Raster Display
Raster
- V. HISTORY
22
- Input Technology
- Light Pens
- Mouse, Tablet, Touch Screen, Audio
- Kinect
- V. HISTORY
23
- Software
- Device Dependent – Device Independent
- Program Portability
- Programmer Portability
- Standards
- Core
- GKS and GKS-3D
- PHIGS and PHIGS+
- Industry Standards (as opposed to official standards)
- OpenGL (SGI)
- Java-2D and Java-3D (Sun)
- DirectX (Microsoft)
- X-Windows (MIT/Unix/Linux)
- …
- VI. CONCEPTUAL FRAMEWORK
24
Graphics System/ GPU Application Model/data base
Software Hardware
Application program Graphics Library
- VI. CONCEPTUAL FRAMEWORK
25
- Application Model
- Application Database
- Property Information
- Created by:
- Application Program
- User Interaction
- VI. CONCEPTUAL FRAMEWORK
26
- Application Program
- Translation of the Model to Graphics Commands
- Database Traversal
- Translation to Geometric Primitives
- User Interaction Handling
- Sampling vs. Event Driven
- Event Loop Model
- State and Screen Update vs. State, Screen and
Database Update
- VI. CONCEPTUAL FRAMEWORK
27
- Application Program
- Two Basic Paradigms: Sample-Based and Geometry-Based
- Sample-based graphics: discrete samples are used to describe visual
information
- pixels can be created by digitizing images, using a sample-based
“painting” program, etc.
- often some aspect of the physical world is sampled for visualization, e.g.,
temperature across the US
- example programs: Adobe Photoshop™, GIMP™ , Adobe AfterEffects™
- Images are made up of grid of discrete
pixels, for 2D “picture elements”
- Pixels are point locations with
associated sample values, usually of light intensities/colors, transparency, and
- ther control information
- Samples created directly in paint-type
program, or as sampling of continuous (analog) visual materials
- Sample values can also be input
numerically
- Once an image is defined as pixel-
array, it can be manipulated via:
- Image editing
- Image processing
SAMPLE-BASED GRAPHICS
28
SAMPLE-BASED GRAPHICS
29
- Advantages:
- Once image is defined in terms of colors at (x, y)
locations on grid, can change image easily by altering location or color values
- Pixel information from one image can be copied
and pasted into another, replacing or combining with previously stored pixels
- Disadvantages:
- WYSIAYG (What You See Is All You Get):
- no depth information
- can’t examine scene from different point of view
- at most can play with the individual pixels or
groups of pixels to change colors, enhance contrast, find edges, etc.
GEOMETRY-BASED GRAPHICS
30
- Geometry-based graphics (also called scalable vector
graphics or object-oriented graphics)
- Store mathematical descriptions, or “models,” of geometric
elements (lines, polygons, polyhedrons…) and associated attributes (e.g., color, material properties).
- Images created as pixel arrays (via sampling of geometry) for
viewing, but not stored as part of model. Images of many different views are generated from same model
- Users cannot usually work directly with individual pixels in
geometry-based programs; as user manipulates geometric elements, program resamples and redisplays elements
GEOMETRY-BASED GRAPHICS
31
- Modeling
- Create models
- Apply materials to models
- Place models around scene
- Place lights in scene
- Place the camera
MODELING VS. RENDERING
- Rendering
- Take “picture” with camera
- Both can be done with commercial software:
- Autodesk MayaTM,3D Studio MaxTM,
BlenderTM, etc.
Directional Light Ambient Light Point Light Spot Light
- VI. CONCEPTUAL FRAMEWORK
32
- Graphics Library
- Graphics Subroutine Library or Package
- Intermediary between Application and Display Hardware
- Examples: OpenGL™, DirectX™, Windows Presentation Foundation™ (WPF),
RenderMan™
- Primitives (characters, lines, polygons, meshes,…)
- Attributes
- Color, line style, material properties for 3D
- Lights
- Transformations
- Immediate mode vs. retained mode
- VI. CONCEPTUAL FRAMEWORK
33
- Graphics System / GPU
- Logical Display Device
- User Interaction
- Modification of Model and/or Image
OUR FIRST ASSIGNMENT
34
THE CODE
35
import static com.jogamp.opengl.GL4.*; import java.nio.FloatBuffer; import javax.swing.JFrame; import com.jogamp.common.nio.Buffers; import com.jogamp.opengl.*; import com.jogamp.opengl.awt.*; @SuppressWarnings("serial") public class Code extends JFrame implements GLEventListener { private GLCanvas myCanvas; public Code() { setTitle("Chapter2 - program1"); setSize(600,400); setLocation(200,200); myCanvas = new GLCanvas(); myCanvas.addGLEventListener(this); getContentPane().add(myCanvas); setVisible(true); } public void display(GLAutoDrawable drawable) { GL4 gl = (GL4) GLContext.getCurrentGL(); float bkg[] = { 1.0f, 1.0f, 0.0f, 1.0f }; FloatBuffer bkgBuffer = Buffers.newDirectFloatBuffer(bkg); gl.glClearBufferfv(GL_COLOR, 0, bkgBuffer); } public static void main(String[] args) { new Code(); } public void init(GLAutoDrawable drawable) {} public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {} public void dispose(GLAutoDrawable drawable) {} }
SUMMARY
36
- I. Image Processing / Computer Graphics
- II. Advantages
- III. Representative Uses
- IV. Classification of Applications
- V. History
- VI. Conceptual Framework
- VII. Our First Assignment