6th Lecture – Rectangles and Regions, and intro to Bitmap Images

Slides:



Advertisements
Similar presentations
Pixels and Digital Images Yrd. Doc. Dr. Ahmet Sayar Kocaeli Universitesi Bilgisayar Muhendisligi Ileri Bilgisayar Grafikleri.
Advertisements

Lecture 2 Concepts, Terms and Definitions. Display Devices They are divided into a lot of small squares called pixels (“PICture ELements”). Each pixel.
Information Representation
Raster graphics. Colour depth 01 1 bit pr pixel = 2 combinations (2 1 ): 2 bits pr pixel = 4 combinations (2 2 ): bits pr pixel = 16 combinations(2.
Graphics CS 121 Concepts of Computing II. What is a graphic? n A rectangular image. n Stored in a file of its own, or … … embedded in another data file.
Vector vs. Bitmap SciVis V
Manipulating Images Image A visual representation of something that is seen in real life. It can be two-dimensional or three-dimensional A visual representation.
V Obtained from a summer workshop in Guildford County July, 2014
Graphics.
1 Bitmap Graphics It is represented by a dot pattern in which each dot is called a pixel. Each pixel can be in any one of the colors available and the.
COMP Bitmapped and Vector Graphics Pages Using Qwizdom.
Simple Graphics. Graphics Used in PowerPoint, Web pages and others Basic Knowledge drawing change of colour, shape and others acquiring, video camera,
XP Practical PC, 3e Chapter 13 1 Working with Graphics.
Presentation Design: Graphics. More About Color “Bit depth” of colors -- This is based on the smallest unit of information that a computer understands.
Foundations of Web Design I Photoshop CS5 Michael Daniel
Digital Image: Representation & Processing (2/2) Lecture-3
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 5 Working with Images Starting Out with Games & Graphics in.
Image Representation. Objectives  Bitmaps: resolution, colour depth and simple bitmap file calculations.  Vector graphics: drawing list – objects and.
Information Processes and Technology Multimedia: Graphics.
GRAPHICS. Topic Outline What is graphic. Resolution. Types of graphics. Using graphic in multimedia applications.
Chapter 14 Working with Graphics. 2Practical PC 5 th Edition Chapter 14 Getting Started In this Chapter, you will learn: − About different graphics you.
Laboratory Exercise # 9 – Inserting Graphics to Documents Office Productivity Tools 1 Laboratory Exercise # 9 Inserting Graphics to Documents Objectives:
CS- 375 Graphics and Human Computer Interaction Lecture 1: 12/4/1435 Fundamental Techniques in Graphics Lecturer: Kawther Abas.
© Anthony J. Nowakowski, Ph.D. GRAPHICAL MEDIA EDC 601 Instructional Technologies © Anthony J. Nowakowski, Ph.D. “Graphics help to display and to clarify.
Photoshop Photoshop works with bitmapped, digitized images (that is, continuous-tone images that have been converted into a series of small squares, or.
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
Quiz # 1 Chapters 1,2, & 3.
Chapter 2 File Format Objectives (1 of 2) Identify the difference between vector based graphics and bitmap-based graphics Clarify 3 types of vector programs.
A BCDE.
Digital Imaging Fundamentals Ms. Hema C.R. School of Mechatronic Engineering.
Raster Graphics 2.01 Investigate graphic image design.
Image File Formats By Dr. Rajeev Srivastava 1. Image File Formats Header and Image data. A typical image file format contains two fields namely Dr. Rajeev.
Digital Graphics Vocabulary Texas State University CI5363 Florence Yang.
Graphics and Image Data Representations 1. Q1 How images are represented in a computer system? 2.
Guilford County SciVis V104.03
Mohammed AM Dwikat CIS Department Digital Image.
Vector vs. Bitmap. Vector Images Vector images (also called outline images) are images made with lines, text, and shapes. Test type is considered to be.
Chapter 14 Working with Graphics
Images and Graphics.
8th Lecture – Intro to Bitmap or Raster Images
BITMAPPED IMAGES & VECTOR DRAWN GRAPHICS
2.01 Understand Digital Raster Graphics
2.01 Understand Digital Raster Graphics
Graphics and image data representation
Chapter 13 Working with Graphics
OVERVIEW Objectives Follow a design document to prepare images for inclusion in a Web page Run a batch process to prepare multiple images in one step Use.
Vector vs. Bitmap.
Inserting and Working with Images
2.01 Understand Digital Raster Graphics
Lecture Week 4 Images.
2.01 Investigate graphic image design.
Bitmap vs. Vector.
Chapter I Digital Imaging Fundamentals
Enhancing a Document Part 1
Chapter 3:- Graphics Eyad Alshareef Eyad Alshareef.
LET’S LEARN ABOUT GRAPHICS!
Chapter 5 Working with Images
1.01 Investigate graphic types and file formats.
Graphics Basic Concepts.
Enhancing a Document Part 1
Computer Graphics Using “Adobe Photoshop”
2.01 Understand Digital Raster Graphics
Terms 1 Terms 2 Terms 3 Terms 4 Terms 5 1pt 1 pt 1 pt 1pt 1 pt 2 pt
2.01 Investigate graphic image design.
2.01 Understand Digital Raster Graphics
Desktop Publishing Features
Multimedia System Image
2.01 Investigate graphic image design.
"Digital Media Primer" Yue-Ling Wong, Copyright (c)2013 by Pearson Education, Inc. All rights reserved.
2.01 Investigate graphic image design.
Presentation transcript:

6th Lecture – Rectangles and Regions, and intro to Bitmap Images CPT 450 Computer Graphics 6th Lecture – Rectangles and Regions, and intro to Bitmap Images

Rectangles The Rectangle structure stores the top left starting point (x, y) and the width and height. The Rectangle can be constructed with new Rectangle (point, size) or new Rectangle (x, y, w, h) Notes: A (2D) point object contains an x and y coordinate A size object contains a width and height. There are integer and a floating point (single precision) versions of these objects. The floating point versions end in the letter F.

More on Rectangles It has methods to return the left, top, right, and bottom coordinates. Where Left = x Top = y Right = x + w Bottom = y + h Also has round, truncate, inflate, ceiling, intersect and union methods. The “contains” method can be used to test if the user clicks inside a rectangle, i.e. left < point.x < right AND top < point.y < bottom

Region Class A region describes the interior of a closed graphics shape or form. A form has 2 regions Client area, the area where the user can draw Non client area, such as the title bar, the scroll bars, etc.. Contructor has overloaded versions which take rectangles, graphicsPath or region data. No properties The graphics object g has a fill method, i.e. g.fillRegion to shade the region

Region Methods Many methods. See documentation. For combining regions, Compliment Exclude Union Intersect Xor Regions can be used for clipping. Author’s sample creates non-rectangular forms. (used by Music/Video players)

Graphics Path You can combine many vector drawing methods into a graphics path. Then you can use the path to draw a shape. Example If you draw lots of a particular pattern in your program, then you can create a graphics path and use it to draw each shape (like a subroutine).

Intro to Bitmap or Raster Images

What is the difference between bitmap and vector graphics? A bitmap or raster image is a collection of pixels (picture element), each with it’s own independent color. A vector image is made up of vector graphics instructions such as drawLine or drawEllipse. Converting from one type to another From vector to raster – this is called scan conversion From raster to vector – this is called pattern recognition or OCR

Where do they come from? Digital Cameras (now in cell phones) Optical Scanners Video Fax Medical Imaging (X-ray, CAT Scan, MRI) Satellite data Generated by scan converting vector graphics instructions Internet (google)

How are bitmap or raster images stored? Generally, the images are rectangular and can be represented in matrix form (row, column), as a table of colors. In the file, they are store sequentially. Could be either (row, column) or (column, row) In the old days, the pixels on the screen were directly mapped to the video memory, hence the word “map”. Video memory could be addressed directly by the programmer. This was fast and convenient but very dangerous. The image files can contain a header and footer. This can contain the width and height of the image, the color depth, and other info about the image.

Some Image File formats File types File extensions Bitmap bmp Icon Ico Cursor cur Windows meta file wmf GIF gif JPEG jpg or jpeg TIFF tif or tiff

Grayscale images Gray scale images only require 1 intensity per pixel (remember R=G=B), instead of 3 for color (excluding transparency) 8 bits/pixel can display 256 shades of gray. 1 bit/pixel can display only two shades, black or white Using dithering, newpapers can create shades of grade, by varying the size of the dots in the picture.

Dithering Dithering – used to create the appearance of a new color by combining different sized dots of different colors. See the comics in the Sunday newspaper!

The Art of Roy Lichtenstein (an example of dithering)