CDS 301 Fall, 2008 Data Representation Chap. 3 September 2, 2008 Jie Zhang Copyright ©

Slides:



Advertisements
Similar presentations
Visualization Data Representation Ray Gasser SCV Visualization Workshop – Fall 2008.
Advertisements

3D Graphics Rendering and Terrain Modeling
CDS 301 Fall, 2009 Image Visualization Chap. 9 November 5, 2009 Jie Zhang Copyright ©
Image Processing IB Paper 8 – Part A Ognjen Arandjelović Ognjen Arandjelović
Aalborg University Copenhagen
Sheng Bin Data Representation Chapter 3. Continuous Data Sampled Data Discrete Datasets Cell Types vertex, line, triangle, quad, tetrahedron, hexahedron.
CDS 301 Fall, 2009 Scalar Visualization Chap. 5 September 24, 2009 Jie Zhang Copyright ©
Informationsteknologi Monday, October 29, 2007Computer Graphics - Class 21 Today’s class Graphics programming Color.
School of Computing Science Simon Fraser University
Sep 21, Fall 2005ITCS4010/ Computer Graphics Overview Color Displays Drawing Pipeline.
© 2002 by Yu Hen Hu 1 ECE533 Digital Image Processing Color Imaging.
Introduction to Volume Visualization Mengxia Zhu Fall 2007.
Scientific Visualization Data Modelling for Scientific Visualization CS 5630 / 6630 August 28, 2007.
Sep 21, Fall 2006IAT 4101 Computer Graphics Overview Color Displays Drawing Pipeline.
IAT 3551 Computer Graphics Overview Color Displays Drawing Pipeline.
ITUppsala universitet Data representation and fundamental algorithms Filip Malmberg
Scientific Data Representation and Mapping
CS 485/685 Computer Vision Face Recognition Using Principal Components Analysis (PCA) M. Turk, A. Pentland, "Eigenfaces for Recognition", Journal of Cognitive.
Digital Image Processing Colour Image Processing.
Laplacian Surface Editing
2001 by Jim X. Chen: 1 The purpose of a color model is to allow convenient specification of colors within some color gamut.
Image Processing Lecture 2 - Gaurav Gupta - Shobhit Niranjan.
Scalar Visualization Chap. 5 September 23, 2008 Jie Zhang Copyright ©
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
VTK: Data Shroeder et al. Chapter 5 University of Texas – Pan American CSCI 6361, Spring 2014 After Taku Komura and other lecture sets
Human Eye and Color Rays of light enter the pupil and strike the back of the eye (retina) – signals go to the optic nerve and eventually to the brain Retina.
Color Image Processing A spectrum of possibilities…
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Light and Color Graphics Systems / Computer.
CDS 301 Fall, 2009 Data Representation Chap. 3 September 10, 2009 Jie Zhang Copyright ©
I-1 Steps of Image Generation –Create a model of the objects –Create a model for the illumination of the objects –Create an image (render) the result I.
Graphics Graphics Korea University cgvr.korea.ac.kr Raster Graphics 고려대학교 컴퓨터 그래픽스 연구실.
Computer Science 631 Lecture 7: Colorspace, local operations
CDS 301 Fall, 2009 Vector Visualization Chap. 6 October 7, 2009 Jie Zhang Copyright ©
Color. Contents Light and color The visible light spectrum Primary and secondary colors Color spaces –RGB, CMY, YIQ, HLS, CIE –CIE XYZ, CIE xyY and CIE.
Week 6 Colour. 2 Overview By the end of this lecture you will be familiar with: –Human visual system –Foundations of light and colour –HSV and user-oriented.
©College of Computer and Information Science, Northeastern UniversityMay 27, CS 4300 Computer Graphics Prof. Harriet Fell Fall 2012 Lecture 4 – September.
Advanced Computer Graphics Advanced Shaders CO2409 Computer Graphics Week 16.
INT 840E Computer graphics Introduction & Graphic’s Architecture.
Computer Graphics Chapter 6 Andreas Savva. 2 Interactive Graphics Graphics provides one of the most natural means of communicating with a computer. Interactive.
Vector Graphics Digital Multimedia Chap 이병희
CSE554ContouringSlide 1 CSE 554 Lecture 4: Contouring Fall 2015.
Introduction to Computer Graphics
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
CDS Fall, 2010 Computing for Scientists Visualization (Oct. 28, 2010 – Nov. 09, 2010) Jie Zhang Copyright ©
CHAPTER 5 CONTOURING. 5.3 CONTOURING Fig 5.7. Relationship between color banding and contouring Contour line (isoline): the same scalar value, or isovalue.
CDS 301 Fall, 2008 Image Visualization Chap. 9 November 11, 2008 Jie Zhang Copyright ©
Data Visualization Fall The Data as a Quantity Quantities can be classified in two categories: Intrinsically continuous (scientific visualization,
CDS 301 Fall, 2008 From Graphics to Visualization Chap. 2 Sep. 3, 2009 Jie Zhang Copyright ©
CDS 301 Fall, 2008 Domain-Modeling Techniques Chap. 8 November 04, 2008 Jie Zhang Copyright ©
3D Object Representations 2009, Fall. Introduction What is CG?  Imaging : Representing 2D images  Modeling : Representing 3D objects  Rendering : Constructing.
Graphics Graphics Korea University kucg.korea.ac.kr Geometric Primitives 고려대학교 컴퓨터 그래픽스 연구실.
Computer Graphics: Achromatic and Coloured Light.
1 of 32 Computer Graphics Color. 2 of 32 Basics Of Color elements of color:
Color Models Light property Color models.
Computer Graphics Overview
Half Toning Dithering RGB CMYK Models
VTK: The Visualization Toolkit
Color Image Processing
Color Image Processing
Color Image Processing
3D Graphics Rendering PPT By Ricardo Veguilla.
3D Object Representations
Computer Vision Lecture 4: Color
Domain-Modeling Techniques
Color Image Processing
Information Visualization
Color and Shading Lecture 9 Mon, Sep 26, 2005.
Computer Graphics Module Overview
Color Image Processing
Color Model By : Mustafa Salam.
Presentation transcript:

CDS 301 Fall, 2008 Data Representation Chap. 3 September 2, 2008 Jie Zhang Copyright ©

Outline 3.1. Continuous Data Dataset 3.2. Sampled Data Sampling and Reconstruction 3.3. Discrete Datasets 3.4. Cell Types vertex, line, triangle, quad, tetrahedron, hexahedron 3.5. Grid Types Uniform, rectlinear, structures, Unstructured 3.6. Attributes Scalar, Vector, Color, Tensor, Non-numerical 3.7. Computing Derivatives of Sampled Data 3.8. Implementation 3.9. Advanced Data Representation

Continuous Data versus Discrete Data (Intrinsically) Continuous Data Most scientific quantities are continuous in nature Scientific Visualization, or scivis (Intrinsically) Discrete Data E.g., text, images and others that can not be interpolated or scaled Information Visualization, or infovis Continuous data, when representation by computer, are always in discrete form They are called “sampled data” Originated from continuous data Intended to approximate the continuous quantity through visualization

Continuous Data a: discontinuous function b: first-order continuous function c: high-order continuous function

Continuous Data f is a d-dimension, c-valued function D: function domain C: function co-domain Continuous data can be modeled as:

Continuous Data Cauchy criterion of continuity Graphically, a function is continuous if the graph of the function is a connected surface without “holes” or “jumps” A function is continuous of order k if the function itself and all its derivative up to order k are also continuous In words, small changes in the input result in small changes in the output

Continuous Dataset Geometric dimension: d the space into which the function domain D is embedded It is always 3 in the usual Euclidean space: d=3 Topological dimension: s The function domain D itself A line or curve: s=1, d=3 A plane or curved surface: s=2, d=3 Dataset dimension refers to the topological dimension Function values in the co-domain are called dataset attributes Attribute dimension: dimension of the function co-domain 1.Function domain 2.Function co-domain 3.Function itself

(continued) Data Representation Chap. 3 September 4, 2008

Sampling and Reconstruction To prepare the visualization of the continuous dataset: 1.Sampling Given continuous data, produce sampled dataset as an input to computer 2.Reconstruction Given sampled dataset, recover an approximate version of the original continuous data Turn sampled data into 3-D geometric data for rendering

Sampling and Reconstruction

Sampling A signal domain is discretized in a grid that contains a set of cells defined by the sample points Point, Cell, Grid

Sampling Point Cell grid

Sampling Discrete dataset Continuous dataset

Reconstruction or interpolation function N: number of vertices per cell Piecewise fitting: one cell one time

Reconstruction 1-D example: sinuous function 10 points sampling Cell type: line segment Cell vertices: two vertices per cell staircase

Reconstruction 1-D example: Basis function: linear Actual cell

Basis Function Constant basis function It has virtually no computational cost, but provide a poor, staircase like approximation of the original funciton

Basis Function Linear basis function For 1-D line P1P2 0 r 1 reference cell

Basis Function Linear basis function For 2-D quad

(continued) Data Representation Chap. 3 September 16, 2008

Coordinate Transformation of BF cell=(p1,p2,p3,p4) D: (x,y,z) cell=(v1,v2,v3,v4) D: (r,s,t) and t=0

Coordinate Transformation Basis function is defined in reference cell Reference cell: axis-aligned unit cell, e.g., unit square in 2-D, unit line in 1-D Data are sampled at actual (world) cells Mapping between actual cell and reference cell

Cell Types

Vertex d=0

Line d=1

Line (cont.) Actual line d=1 Actual line d=2

Triangle d=2

Quad d=2

Tetrahedron d=3

Hexahedron d=3

Hexahedron (cont.) d=3

Effect of Reconstruction Geometry: Constant Geometry: Linear Lighting: Constant Staircase shading Flat Shading Lighting: Linear Smooth (Gauraud) shading

Effect of Reconstruction (cont.) Staircase Shading Flat Shading Smooth Shading

(continued) Data Representation Chap. 3 September 18, 2008

Grid Types Grid is the pattern of cells in the data domain Grid is also called mesh Uniform grid Rectilinear grid Structured grid Unstructured grid

Uniform Grid 2-D3-D

Uniform Grid The simplest grid type Domain D is usually an axis-aligned box Line segment for d=1 Rectangle for d=2 parallelepiped for d=3 Sample points are equally distributed on every axis Structured coordinates: the position of the sample points in the data domain are simply indicated by d integer coordinates (n 1,..n d ) Simple to implement Efficient to run (storage, memory and CPU)

Uniform Grid Data points are simply stored in the increasing order of the indices Lexicographic order

Rectilinear Grid 2-D3-D

Rectilinear Grid Domain D is also an axis-aligned box However, the sampling step is not equal It is not as simple or as efficient as the uniform grid However, improving modeling power

Structured Grid Further relaxing the constraint, a structured grid can be seen as the free deformation of a uniform or rectilinear grid The data domain can be non-rectangular It allows explicit placement of every sample points The matrix-like ordering of the sampling points are preserved Topology is preserved But, the geometry has changed

Structured Grid Circular domain Curved Surface 3D volume

Unstructured Grid It is allowed to define both sample points and cells explicitly The most general and flexible grid type However, it needs to store The coordinates of all sample points p i For each cell, the set of vertex indices ci={v i1,…v iCi ), and for all cells {c1,c2…}

Unstructured Grid

Attributes Attribute data is the set of sample values of a sampled dataset Attribute = {f i } Sampled dataset

Attribute Types Scalar Attribute Vector Attribute Color Attribute: c=3 Tensor Attributes Non-Numerical Attributes

Scalar Attributes E.g., temperature, density,

Vector Attributes E.g., Normal Force velocity A vector has a magnitude and orientation

Tensor Attributes A high-dimensional generalization of vectors Tensor Vector Scalar A tensor describes physical quantities that depend on direction Vector and scalar describes physical quantities that depend on position only

Tensor Attributes E.g. curvature of a 2-D surface E.g., diffusivity, conductivity, stress Tensor

Non-numerical Attributes E.g. text, image, voice, and video Data can not be interpolated Therefore, the dataset has no basis function Domain of information of visualization (infovis)

Color Attributes A special type of vector attributes with dimension c=3 RGB system: convenient for hardware and implementation R: red G: green B: blue HSV system: intuitive for human user H: Hue S: Saturation V: Value

RGB System Every color is represented as a mix of “pure” red, green and blue colors in different amount Equal amounts of the three colors determines gray shades RGB cube’s main diagonal line connecting the points (0,0,0) and (1,1,1) is the locus of all the grayscale value (0,0,0) (1,1,1) (0.5,0.5,0.5) (1,0,0) (0,1,0) (1,1,0) (1,0,1) (0,1,1)

RGB Cube R G B yellow magenta Cyan

HSV System Hue: distinguish between different colors of different wavelengths, from red to blue Saturation: represent the color of “purity”, or how much hue is diluted with white S=1, pure, undiluted color S=0, white Value: represent the brightness, or luminance V=0, always dark V=1, brightest color for a given H and S

HSV System HSV Color Wheel S=0 S=1

Color, Light, Electromagnetic Radiation

RGB to HSV All values are in [0,1] max=max(R,G,B) min=min(R,G,B) diff=max-min V = max largest RGB component S = diff/max For hue H, different cases H = (G-B)/diff if R=max H =2+(B-R)/diff if G=max H =4+(R-G)/diff if B=max then H=H/6 H=H+1 if H < 0 Exp: Full Green Color (R,G,B)=(0,1,0)  (H,S,V)=(1/3, 1,1) Exp: Yellow Color (R,G,B)=(1,1,0)  (H,S,V)=(1/6, 1, 1)

HSV to RGB huecase = {int} (h*6) frac = 6*h – huecase lx= v*(1-s) ly= v*(1-s*frac) lz= v*(1-s(1-frac)) huecase =6 (0<h<1/6): r=v, g=lz, b=lx huecase =1 (1/6<h<2/6): r=ly, g=v, b=lx huecase =2 (2/6<h<3/6): r=lx, g=v, b=lz huecase =3 (3/6<h<4/6): r=lx, g=ly, b=v huecase =4 (4/6<h<5/6): r=lz, g=lx, b=v huecase =5 (5/6<h<1): r=v, g=lx, b=ly Exp: Full Green Color (H,S,V)=(1/3,1,1)  (R,G,B)=(0,1,0) Exp: Yellow Color (H,S,V)=(1/6,1,1)  (R,G,B)=(1,1,0)

Demo IDL: “gaussian_2d.pro” Using interactive “isurface” procedure Rendering: rotation, translation, zooming Rendering: flat shading and smooth shading Rendering: lighting effect

End of Chap. 3 Note: The class has covered from section 3.1 to 3.6. For now, we have skipped section 3.7, 3.8, and 3.9. You may want to read these sections for your own enrichment.