Exercise NMCGJ: Image Processing

Similar documents
Introduction. The Spectral Basis for Color

Review of concepts. What is a variable? Storage space to keep data used in our programs Variables have a name And also a type Example:

Images and Colour COSC342. Lecture 2 2 March 2015

Digital Image Processing. Lecture # 8 Color Processing

Chapter 4. Incorporating Color Techniques

Thursday, May 19, 16. Color Theory

Project One Report. Sonesh Patel Data Structures

Texture Editor. Introduction

Unit 8: Color Image Processing

Additive Color Synthesis

Technology and digital images

Pictures and Arrays. You have been returned to where you were last working. Return to syllabus Edit preferences

Understanding Color Theory Excerpt from Fundamental Photoshop by Adele Droblas Greenberg and Seth Greenberg

Color is the factory default setting. The printer driver is capable of overriding this setting. Adjust the color output on the printed page.

Digital Image Processing

Colors in Images & Video

Using Adobe Photoshop

Wireless Communication

The BIOS in many personal computers stores the date and time in BCD. M-Mushtaq Hussain

LECTURE 07 COLORS IN IMAGES & VIDEO

For a long time I limited myself to one color as a form of discipline. Pablo Picasso. Color Image Processing

Digital Image Processing

Gernot Hoffmann. Sky Blue

Color Image Processing. Gonzales & Woods: Chapter 6

IMAGE PROCESSING >COLOR SPACES UTRECHT UNIVERSITY RONALD POPPE

Implementation of Colored Visual Cryptography for Generating Digital and Physical Shares

Stamp Colors. Towards a Stamp-Oriented Color Guide: Objectifying Classification by Color. John M. Cibulskis, Ph.D. November 18-19, 2015

Dr. Shahanawaj Ahamad. Dr. S.Ahamad, SWE-423, Unit-06

Observing a colour and a spectrum of light mixed by a digital projector

Color Design Color Use in Organizational Systems

CS 565 Computer Vision. Nazar Khan PUCIT Lecture 4: Colour

Introduction to Color Theory

Colour Theory Basics. Your guide to understanding colour in our industry

Introduction to computer vision. Image Color Conversion. CIE Chromaticity Diagram and Color Gamut. Color Models

Brief Introduction to Vision and Images

Image Perception & 2D Images

Lecture 3: Grey and Color Image Processing

EECS490: Digital Image Processing. Lecture #12

This Color Quality guide helps users understand how operations available on the printer can be used to adjust and customize color output.

Human Vision, Color and Basic Image Processing

Color images C1 C2 C3

Introduction to Color Theory

12 Color Models and Color Applications. Chapter 12. Color Models and Color Applications. Department of Computer Science and Engineering 12-1

Figure 1: Energy Distributions for light

Color Theory: Defining Brown

In order to manage and correct color photos, you need to understand a few

Digital Imaging - Photoshop

Computer Graphics: Graphics Output Primitives Primitives Attributes

Color and More. Color basics

Working with the BCC Color Balance Filter

Chapter 3 Part 2 Color image processing

Transparency and blending modes

CSE1710. Big Picture. Reminder

Image Processing. Michael Kazhdan ( /657) HB Ch FvDFH Ch. 13.1

Basics of Colors in Graphics Denbigh Starkey

Color & Graphics. Color & Vision. The complete display system is: We'll talk about: Model Frame Buffer Screen Eye Brain

EFI Fiery Printer Profiler The impact of the black separation settings. Oliver Schorn, Senior Color Management & Research Engineer

UNIT 12 LIGHT and OPTICS

To discuss. Color Science Color Models in image. Computer Graphics 2

Raster (Bitmap) Graphic File Formats & Standards

Applying Colour & Style. Christopher Wesson London Borough of Redbridge

Tutorial: Correcting images

Image Processing for Mechatronics Engineering For senior undergraduate students Academic Year 2017/2018, Winter Semester

Computer Graphics. Si Lu. Fall er_graphics.htm 10/02/2015

Astronomy and Image Processing. Many thanks to Professor Kate Whitaker in the physics department for her help

Color Image Processing

Colour. Why/How do we perceive colours? Electromagnetic Spectrum (1: visible is very small part 2: not all colours are present in the rainbow!

YIQ color model. Used in United States commercial TV broadcasting (NTSC system).

PHOTOSHOP. pixel based image editing software (pixel=picture element) several small dots or pixels make up an image.

Color Image Processing

Color Image Processing

Preview. Light and Reflection Section 1. Section 1 Characteristics of Light. Section 2 Flat Mirrors. Section 3 Curved Mirrors

CONTENT INTRODUCTION BASIC CONCEPTS Creating an element of a black-and white line drawing DRAWING STROKES...

Computers and Imaging

Multimedia Systems Color Space Mahdi Amiri March 2012 Sharif University of Technology

Colour. Electromagnetic Spectrum (1: visible is very small part 2: not all colours are present in the rainbow!) Colour Lecture!

Digital Image Processing. Lecture # 6 Corner Detection & Color Processing

Extended Studies - Intro to Adobe Photoshop

Available Features. For details on the operating procedures for these functions, refer to the User s Guide.

COLOR and the human response to light

9/13/2017. Alpha Channels

Picture Encoding and Manipulation. We perceive light different from how it actually is

Digital Image Processing (DIP)

Sampling Rate = Resolution Quantization Level = Color Depth = Bit Depth = Number of Colors

EGR 111 Image Processing

Photoshop 01. Introduction to Computer Graphics UIC / AA/ AD / AD 205 / F05/ Sauter.../documents/photoshop_01.pdf

Aperture. The lens opening that allows more, or less light onto the sensor formed by a diaphragm inside the actual lens.

A Model of Color Appearance of Printed Textile Materials

Digital Image Processing COSC 6380/4393. Lecture 20 Oct 25 th, 2018 Pranav Mantini

Recovering highlight detail in over exposed NEF images

Index of Command Functions

Hello, welcome to the video lecture series on Digital image processing. (Refer Slide Time: 00:30)

Chapter 2 Fundamentals of Digital Imaging

Flair for After Effects v1.1 manual

CSE1710. Big Picture. Reminder

Mahdi Amiri. March Sharif University of Technology

Working with the BCC Make Alpha Key Filter

How to use advanced color techniques

Objective Explain design concepts used to create digital graphics.

A raster image uses a grid of individual pixels where each pixel can be a different color or shade. Raster images are composed of pixels.

Transcription:

Exercise NMCGJ: Image Processing A digital picture (or image) is internally stored as an array or a matrix of pixels (= picture elements), each of them containing a specific color. This exercise is devoted to perform image processing. Colors In a (8-bit) grayscale image each pixel has an assigned intensity that ranges from 0 to 255. Such an image is what people usually call a black-and-white image, but the name emphasizes that such an image also includes many shades of grey. A true color image usual has 24 bit color depth = 8x8x8 bits = 256x256x256 colors ~ 16 million colors. For science communication, the two main color spaces are RGB and CMYK. RGB The RGB color relates very closely to the way we perceive color with the red (R), green (G) and blue (B) receptors in our retinas in the eyes. RGB uses additive color mixing. It is the basic color model used in television or any other medium that projects color with light. It is also the basic color model used in computers and graphics, but it is not used for print production. The secondary colors of RGB cyan, magenta and yellow are formed by mixing two of the primary colors (red, green or blue) and excluding the third color. Red and green combine to make yellow. Green and blue form cyan; and blue and red form magenta. The combination of red, green and blue in full intensity makes white. A general color in Java can be created as follows: Color color = new Color(red, green, blue); where red, green and blue have to be integer values between 0 and 255. The class Color is part of the package java.awt. It has the methods getred(), getgreen(), and getblue().

CMYK The four-color CMYK color model used in printing works by overlapping layers of varying percentages of transparant cyan (C), magenta (M) and yellow (Y) inks on a white background. In addition, a layer of black (K) ink can be added. The CMYK model uses the subtractive color model because inks subtract brightness from white. Gamut The range, or gamut, of human color perception is quite large. The two color spaces discussed here span only a fraction of the colors we can see. Furthermore, the two spaces do not have the same gamut. This means that converting from one color space to the other may cause problems for colors in the outer regions of the gamuts. Problem The classes Picture and PictureFrame are prepared for visualizing images. The class PictureFrame is a subclass of the class GraphicsFrame, so it provides all the original graphical functionality of this class (see the previous exercise Drawing Fractal Patterns). In addition, it has specific functionality to visualize and manipulate pictures, which is accessible through the menu bar. drawpicture() processpicture(int index) String[] getpictureactionnames() Draws the picture to the graphics panel. Performs picture processing. The index specifies the processing action. Returns a description of all available picture processing actions.

The real work of the picture processing is delegated to the class Picture. The last two methods are designed so that easily new algorithms for picture processing can be added to the menu bar. The class Picture contains internally a matrix of colors: protected Color[][] pixels; The following methods are available in this class. getwidth() getheight() getpixel(int i, int j): Color setpixel(int i, int j, Color color) Gets the width of the picture. Gets the height of the picture. Gets the color of a given pixel. Sets the color of a given pixel. Additional methods should be implemented in the class Picture for performing some picture processing on the internal matrix of colors. Recoloring A first way to manipulate pictures is by modifying the pixel colors. Several basic operations can be done by taking certain linear combinations of the RGB color components of each pixel. Conversion to grayscale Luminance is a measure to describe the perceived brightness of a color. Suppose a pixel is represented by the triple (R, G, B) of intensities for red, green, and blue. The luminance of this pixel is obtained by the formula Y = 0.2126 R + 0.7152 G + 0.0722 B. Conversion of a color image to grayscale is not unique, but in general it replaces each RGB color component by an averaged version. The above formula can be used for this: replace the red, green and blue component by their luminance value. Negative image A negative grayscale image is a totally inversed image, meaning that light areas appear dark and vice versa. A negative color image is additionally color-reversed, with red areas appearing cyan, greens appearing magenta, and blues appearing yellow. This means that each new RGB values is replaced by its complement (255 value). Brightening and darkening Making an image darker or brighter can be simply obtained by multiplying each RGB color component with a constant value less or larger than 1, respectively.

Implementation Write three methods that take care of these functionalities: grayscale() negative() brightness(double factor) Converts the picture to a grayscale picture. Inverts the colors of the picture. Adjusts the brightness of the picture. original grayscale negative brighter (f = 2) darker (f = 1/2)

Flipping A second way to manipulate pictures is by reorganizing the positions of the current pixels. A common manipulation is to flip the picture along the central horizontal or vertical axes. Write two methods that take care of this functionality: fliph() flipv() Flips the picture horizontally (along central vertical axis). Flips the picture vertically (along central horizontal axis). fliph flipv Tiling For the next task, only the result is shown. How to obtain the result, is up to you. This effect is called tiling, and it is sometimes used in television to make a transition to another subject.

Lens effect A (fish-eye) lens effect is created by mapping an image onto the surface of a (part of a) sphere. The surface, however, does not have to be a perfect sphere as long as the effect looks similar: the image is zoomed in the center and shrinked at the border. A simple lens effect can be obtained as follows. Suppose the picture is mapped into the unit box [ 1, 1] x [ 1, 1]. Then, consider any point inside the unit circle, so any point with polar coordinates (r, θ) such that r 1. The color of this point is taken as the color of the picture point with polar coordinates (R, θ) where R=(r+d )/2 d =1 1 r 2 Add a method that takes care of this functionalities: lens() Creates a lens effect (fish eye).