멀티미디어 시스템 – Chapter 3. Introduction to Computer graphics

Computer graphics : This Chapter introduce computer graphics
computer graphics


Contents of Introduction computer graphics

  1. Human Eye Characteristics
  2. Computer graphics
  3. Image application
  4. File format and editing SW

1. Human Eye Characteristics

  1. How to Recognize Color?

    1. Definition of wavelength (λ ) of light signal

      wavelength of light signal

    2. Human visible light in term of wavelength

      Human visible light in term of wavelength

      1. Visible light – wavelength of 380nm ~780nm
        1. If λ > λvl , then IR, If λ < λvl , then UV
        2. Human eye is most sensitive to Red, Green, Blue and recognize color as a mix of RGB
    3. Human Eye Characteristics

      1. Simultaneous contrast
        1. Human eye is more sensitive to the light difference than light strength
        2. Which looks more clear to you?
          Human eye is more sensitive to the light difference than light strength
      2. Mach band effect
        1. When the light brightness changes gradually in step,
          human eye is sensitive to the changing edge
          Mach band effect
      3. Logarithmic sensitivity
        1. Human eye sense the light brightness proportional to log function
          1. Even the light brightness is small, human eye is very sensitive to small change of brightness
          2. With high light brightness, human eye is not much sensitive even with large amount of change in brightness
            log function
    4. How to recognize scene or image?

      Frequency spectrum concept

      1. Human brain recognize scene or image through analysis of spatial frequency
        1. Background – low frequency component
        2. Edge – high frequency component
      2. Frequency spectrum concept again!
    5. Image and Graphic

      1. Natural image exist in analog form
      2. How to get digital image?
        1. Digitize printed image with a scanner
        2. Capture image from digital camera
        3. Grab frame from video camera
      3. How to get graphic?
        1. Naturally born in digital
      4. Image – naturally generated in analog form and converted into digital
        1. Digital Photo, Satellite Image, X-ray image
      5. Graphics – artificially created by computer, so digital in nature
        1. Animation, 3-D graphics
      6. Combined form
        1. Medical image, X-ray, MRI scan, 3D volume rendering
          CT : Computed Tomography
          CT Compupted Tomography
      7. Image Baisc
        1. Basic Element
          1. Pixel, Resolution, Color Mode (later in Chap 5!)
        2. Pixel
          1. Pixel = Picture Element or Pel
          2. Smallest image element
          3. Pixel based image is stored as Bitmap format
        3. Image and pixel
          pixel zoom about image
      8. Color mode and bits
        1. B/W
          1. Monochrome : 1bit/pixel, ex) Fax
          2. Gray-level image : 8 bit/pixel, 0(B) ~ 255(W) Express 256 level brightness
        2. Color
          1. True color format : Represent R, G, B by 8bits respectively, 24 bit/pixel
          2. Hi Color format : Represent R,G,B in total of 16bit/pixel
    6. Resolution

      1. A measure of how finely a device approximates continuous images using finite pixels
        1. Scanner and printer – pixel density (dots per inch, dpi)
        2. Video frames and computer monitors – pixel dimensions (width X height)
        3. Digital still camera – total number of pixels in the largest image it can record
          Resolution and pixel dimensions
    7. Image Display on Monitor

      1. Image is displayed on monitor as array of pixels
        1. Rectangular (usually square) dots of color
      2. To display image on the monitor
        1. Program (e.g. Web browser) sets pixels to an appropriate color to produce desired image
        2. Set pixel value by graphics library that communicate with display hardware such as monitor

2. Computer graphics

  1. Production of graphics

    1. Artificially created animation or 2D, 3D graphics by computer
      1. Two steps : Modeling – Rendering
    2. Modeling
      1. Generate model in geometric form to produce desired graphic
    3. Rendering
      1. Convert model in 2D image by calling functions from a graphic library
  2. Bitmap and Vector

    1. Bitmap image

      1. Image is modeled as an array of pixel values
      2. Stored as bitmap format
    2. Vector graphic

      1. Graphic is modeled and rendered as mathematical description of curves, shapes, lines drawing - So, represented as vector
      2. Before display on monitor, need to convert vector values to pixels
      3. Stored as vector format
        A vector drawing and a digital photograph
        Simple bitmapped image representation
    3. Vector Graphic Example

      1. Pen-Plotter Model
        1. Drawing Function
          1. moveto(x,y);
          2. lineto(x,y);
            Example Vector
            moveto(0,0);
            lineto(1,0);
            lineto(1,1);
            lineto(0,1);
            lineto(0,0);
    4. Memory Requirement

      1. Bitmappedbitmapped
        1. Any picture of w * h pixels, using c bytes per pixel occupies w*h*c bytes
      2. Vectors
        1. Require memory space depends on complexity of picture (how many shapes, segments of path, lines, etc.)
        2. Usually vector graphics < bitmapped image
      3. Ex) Comparing memory requirement for bitmap and vector format
        1. 128 pixel square with red square inside
          bitmapped memory
        2. Compare memory requirements
          1. Bitmap image
            1. Using 24 bits (3bytes) per pixel (True color)
              ⇒ 128 x 128 x 3 = 48kbytes
          2. Vector graphic in SVG format (W3C)
            vector size

            1. 86 Bytes + some SVG header = 284 bytes
    5. Comparing Bitmap and Vector

      Vector Graphic Bitmap Image
      Expression Mathematical description of geometry - shapes, lines,… Pixels
      Advantage - Less memory
      - Easy and no quality loss for zoom in, transformation
      - Good for gradual color change representation
      - Fast display speed on monitor
      Disadvantage - Slow display speed on monitor
      - Poor for gradual color change representation
      - Large memory
      - Complicate and low quality for zoom in, transformation
    6. Transformation

      Vector transform

    7. Scaling (Zoom In)

      1. Vectors
        1. Scaling is a simple mathematical operation on stored description
        2. Curves and lines can remain smooth at all sizes
      2. Bitmaps
        1. Interpolate pixel values - More or less sophisticated algorithm
        2. Produces loss of quality, blurring, jaggedness (들쓱날쓱한)
      3. Scaling by 8 times
        Vector or bitmap
    8. Transform Vectors & Bitmaps

      1. Rasterize : Vector → Bitmap
        1. Lose all vector properties
        2. Apply complex strokes to vectors to approximatebitmapped appearance
      2. Tracing : Bitmap → Vector
        1. Sometimes called Vectorization
        2. Difficult and can only produce an approximation
    9. Vectorization (Tracing)

      Vectorization

    10. Layer Concept

      1. Especially useful in bitmap image
        1. Permits separation and manipulation of different parts of a bitmapped image
        2. Layer - digital version of clear sheets of acetate  (투명필름) stacked on each other
        3. Compositing – combine layers using different blending modes
          → digital collage (배합법)
      2. Layer Example
        Layer Example
    11. Image Digitization

      1. Natural Image is analog, so, it must converted to digital
        1. Digitizer : Image scanner, Digital camera
      2. Digitization method (two steps)
        1. Sampling : (X,Y) 2D sampling → pixel
        2. Quantization : Binary allocations to each pixel
      3. image sampling
        1. (X, Y) 2D sampling to pixel
        2. Direct relationship with image Resolution
          1. Same image but different resolution
            image sampling
    12. Image Quantization

      1. Bit allocation to each pixel of image
        1. Represent pixel brightness (B/W) or color depth
        2. Monochrome : 1bit/pixel, ex) FAX
        3. Gray-level image: 8bit/pixel, 0(B) ~ 255(W)
        4. True Color (24bit/pixel), High Color (16bit/pixel)
      2. Quantization for gray-level image
        Quantization for gray-level image

3. Image application

  1. FAX (1 bit monochrome)

    fax monochrome

  2. Analog and Digital Camera

    Analog and Digital Camera


4. File format and editing SW

  1. File Format

    1. Many different image and graphic file formats

      1. Depending on different ways of encoding image data
    2. For bitmap image

      1. Tells different compression methods
      2. Lossless – image can be reconstructed exactly from compressed version
      3. Lossy – some information discarded, image can only be reconstructed approximately
    3. Bitmapped formats

      1. GIF (Compuserve Graphics Interchange Format)
        1. Lossless, 256 colors (indexed)
        2. Patent by Unisys, used by Compuserve
          Patent by Unisys, used by Compuserve
      2. JPEG (Joint Picture Experts Group)
        1. ISO/IEC JTC 1, SC29 - WG1
        2. Lossy compression
      3. PNG (Portable Network Graphics)
        1. W3C standard
        2. Lossless, variable number of colors, but not used widely
      4. Vector Formats
        1. SVG (Scalable Vector Graphics)
          1. W3C standard, not presently widely used
          2. 2-D vector graphics
        2. SWF (Small Web Format, Shockwave Flash)
          1. Primarily for vector animation, but can be used for still vector graphics; de facto standard
        3. EPS (Encapsulated PostScript)
          1. Primarily for printer, superseded by PDF
  2. Image and Graphic Editing SW

    1. Vectors – drawing programs
      1. Select individual graphic objects (shapes, paths, lines, etc.)
      2. Able to transform and changing attributes
      3. Ex) Visio, Adobe Illustrator
    2. Bitmaps – painting programs
    3. Select areas of pixels to apply for effects and filters
    4. Ex) PhotoShop, PaintBrush