CMPS1371 Introduction to Computing for Engineers IMAGES.

Slides:



Advertisements
Similar presentations
1 A L L A H. Command-Window Workspace & Directory Command- History The Matlab Command window - Finding your way around.
Advertisements

Image Data Representations and Standards
MATLAB Image Processing Toolbox. Introduction  Collection of functions (MATLAB files) that supports a wide range of image processing operations  Documentation.
Chapter 4 Systems of Linear Equations; Matrices Section 2 Systems of Linear Equations and Augmented Matrics.
Numbers in Images GCNU 1025 Numbers Save the Day.
Picture Manipulation The manipulation of (already created) pictures. May be applied to vector graphics or bitmaps. We will consider bitmaps and introduce.
Bit Depth and Spatial Resolution SIMG-201 Survey of Imaging Science © 2002 CIS/RIT.
Introduction to MATLAB and image processing. MATLAB and images The help in MATLAB is very good, use it! An image in MATLAB is treated as a matrix Every.
Matrices. Special Matrices Matrix Addition and Subtraction Example.
Solving systems using matrices
Insight Through Computing 22. Working with Image Files imread, imwrite, imshow, uint8, rgb2gray.
Lecture 6 Sept 15, 09 Goals: two-dimensional arrays matrix operations circuit analysis using Matlab image processing – simple examples.
First Bytes - LabVIEW. Today’s Session Introduction to LabVIEW Colors and computers Lab to create a color picker Lab to manipulate an image Visual ProgrammingImage.
Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row.
1 JPEG Compression CSC361/661 Burg/Wong. 2 Fact about JPEG Compression JPEG stands for Joint Photographic Experts Group JPEG compression is used with.jpg.
Trevor McCasland Arch Kelley.  Goal: reduce the size of stored files and data while retaining all necessary perceptual information  Used to create an.
1 1.1 © 2012 Pearson Education, Inc. Linear Equations in Linear Algebra SYSTEMS OF LINEAR EQUATIONS.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall.
Introduction to MATLAB adapted from Dr. Rolf Lakaemper.
Matrix Arithmetic. A matrix M is an array of cell entries (m row,column ) and it must have rectangular dimensions (Rows x Columns). Example: 3x x.
ManipulatingPictures-part11 Manipulating Pictures, Arrays, and Loops part 1 Barb Ericson Georgia Institute of Technology Nov 2009.
Image Arithmetic Image arithmetic is the implementation of standard arithmetic operations, such as addition, subtraction, multiplication, and division,
infinity-project.org Engineering education for today’s classroom 2 Outline How Can We Use Digital Images? A Digital Image is a Matrix Manipulating Images.
CS112 Scientific Computation Department of Computer Science Wellesley College Numb3rs Number and image types.
The Rendering Pipeline CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Engineering Computation with MATLAB Second Edition by David M. Smith.
Introduction to MATLAB adapted from Dr. Rolf Lakaemper.
Digital Image Processing Lecture4: Fundamentals. Digital Image Representation An image can be defined as a two- dimensional function, f(x,y), where x.
Picture Lab. Manipulating Pictures Discussion and activities with java.awt.Color introduce students to megapixels, pixels, the RGB color model, binary.
DIGITAL IMAGE. Basic Image Concepts An image is a spatial representation of an object An image can be thought of as a function with resulting values of.
4.5 Inverse of a Square Matrix
June 14, ‘99 COLORS IN MATLAB.
L23. Working with Image Files imread, imwrite, imshow, uint8, rgb2gray.
CIS 601 Fall 2003 Introduction to MATLAB Longin Jan Latecki Based on the lectures of Rolf Lakaemper and David Young.
8 Graphics Digital Media I. What is a graphic? A graphic can be a:  Chart  Drawing  Painting  Photograph  Logo  Navigation button  Diagram.
Introduction to JPEG m Akram Ben Ahmed
Digital Image Processing
MA/CS 375 Fall MA/CS 375 Fall 2002 Lecture 23.
Table of Contents Matrices - Definition and Notation A matrix is a rectangular array of numbers. Consider the following matrix: Matrix B has 3 rows and.
Textures – Basic Principles Lecture 29 Fri, Nov 14, 2003.
MA/CS375 Fall MA/CS 375 Fall 2002 Lecture 5.
การใช้งานโปรแกรม MATLAB ดร. อำนาจ ขาวเน. BASIC ELEMENTS OF MATLAB MATLAB Desktop MATLAB Editor Help System MATLAB (MATrix LABoratory)
A rectangular array of numeric or algebraic quantities subject to mathematical operations. The regular formation of elements into columns and rows.
Red Green Blue (RGB) Colour conversions Y and RGB Link In the images, the lighter the colour intensity (Red, Green, Blue), the more the contribution.
COMPUTER GRAPHICS AND LINEAR ALGEBRA AN INTRODUCTION.
Computer Application in Engineering Design
(Project) by:- ROHAN HIMANSHU ANUP 70282
12-1 Organizing Data Using Matrices
Multiplying Matrices.
ECE 1304 Introduction to Electrical and Computer Engineering
Matrix Operations Free powerpoints at
Matrix Operations.
Matrix Operations Free powerpoints at
Matrix Operations.
Matrix Operations Free powerpoints at
CS320n –Visual Programming
Introduction to MATLAB
CS 1674: Intro to Computer Vision Linear Algebra Review
Simulation And Modeling
Digital Image Processing using MATLAB
a = imread(‘picture.jpg’); imshow(a);
D2 Indices and matrices Matrix representation in computer systems:
Fourth Year – Software Engineering
REDUCING MATRICES.
Digital Image Processing
3.5 Perform Basic Matrix Operations
Fundamentals of Image Processing Digital Image Representation
Matrices.
Chapter 4 Matrices & Determinants
Presentation transcript:

CMPS1371 Introduction to Computing for Engineers IMAGES

Images Images are considered as matrices whose elements are the pixel values of the image

Images Matlab has two main ways to represent an image that consists of M x N pixels: RGB or “true color” image: uses an MxNx3 array where the third index contains the RGB components Indexed color image: uses an MxN array containing integers that are the row entries in a “colormap” that defines the actual color.

RGB Color Image RGB: MxNx3 8-bit integer array M rows N columns RED BLUE GREEN Each in range 0→255 [215, 43, 62] Divide by 255 => [0.842, 0.175, 0.246]

Indexed Color Image Indexed Color: MxN array with values that index into an NCx3 colormap array that contains the actual RGB colors. M rows N columns3 256 rows 143 RED BLUE GREEN [0.142, 0.375, 0.846]

Reading Image Files Matlab can read and write data in most common image file formats: jpeg, tif, bmp, png, etc… A = imread(filename, fmt); reads file into an RGB image [A,map] = imread(filename, fmt); reads file into an indexed image

Loading an Image >> a = imread(‘picture.jpg’); >> imshow(a);

Image Characteristics Image (=matrix) size: size(a): R G B

RED plane A(:,:,[2 3]) = 0; imshow(a);

GREEN plane A(:,:,[1 3]) = 0; imshow(a);

BLUE plane A(:,:,[1 2]) = 0; imshow(a);

Geometric Manipulation of Images Let’s rearrange the pixels in the image: << Left/right = a(:end:-1:1,:); << image(Left/right) Reversing the rows Original

Geometric Manipulation of Images Let’s rearrange the pixels to be upside down: << updown = a(end:-1:1,:,:); << image(updown) Original Reversing the columns

Geometric Manipulation of Images Suppose we split an image into left and right halves and then replace one half with a mirror image of the other Original

Splitting Code function Anew = splitMirror(A)‏ % ANEW = splitMirror(A)‏ % Splits an image in half and % creates a mirror of the left half [Nr,Nc]=size(A); Anew=A; c2=round(Nc/2); % find midpoint for row=1:Nr for col=(c2+1):Nc cx=Nc+1-col; Anew(row,col)=A(row,cx); end

Cute Dog Picture

Lake Scene

Collage Design

Collage

Image Arithmetic Adding ‘imadd’: Brighten an image Subtracting ‘imsubtract’ Multiplying ‘immultiply’: Multiply two images multiply image by constant: brightens > 1, darkens < 1 Dividing ‘imdivide’

Spatial Transformations Resizing ‘imresize’: changes the size of the image Rotation ‘imrotate’: rotates the image by given angle Cropping ‘imcrop’: Extract a rectangular part of the image