PIC - Picture Lab Overview

APCompSci_OverviewBanner.png

Picture Lab

Introduction

During this lab we will be applying what we have learned about arrays and 2D arrays to work with pictures. Many of you are aware that pictures can be edited, but we will be looking at how pictures are edited. Through this unit we will be creating methods to have specific effects on the pictures like that of the popular program Photoshop. We will start this lab by looking at what comprises a picture. Pictures are made up of smaller individual units called pixels. A picture is a 2D array comprised of many, many pixels. Each pixel is comprised of a color and these colors can be changed and enhanced to create a larger effect on the entire picture.

Key Terms

abstract method – A method that is NOT allowed to have a body. We use the keyword abstract in the header.

attributes – Instance or class variables.

binary numbers – A base 2 number system consisting of 0s and 1s. The computer uses this system to represent values.

bit – A single binary digit, which can be either 0 or 1.

byte – A group of 8 bits.

implement – Classes are said to implement an interface if they provide method bodies for the abstract methods.

interface – Most often only has public abstract methods.

packages – Groups of related classes in Java.

pixel – An abbreviation for a picture element.

pixilation – Displaying a picture so magnified that the individual pixels look like small squares.

UML – A class diagram shows classes and the relationship between the classes.

Module Lessons Preview

In this module, we will study the following topics:

Introduction to Digital Pictures and Color: In this lab we will explore how digital pictures are represented on a computer. We will explore the following concepts: megapixels, pixels, the RGB color model, binary numbers, bit and byte.

Picking a Color: In this lab we will practice making different colors using combinations of red, green, and blue light. We will also learn about packages and the java.awt.Color class.

Modifying a Picture: In this lab we will learn about UML class diagrams and the classes DigitalPicture, SimplePicture, Picture, Pixel and Color. We will be introduced to interfaces, abstract methods, constants, and inheritance. We will write methods to modify all the pixels in a picture.

Mirroring Pictures: In this lab we will write methods that loop through part of a two-dimensional array. This activity introduces the concept of an algorithm and the problem-solving technique of simplifying a problem to make it easier to solve.

Simple Edge Detection: In this lab we will finish up the Picture class methods and work on the final lab project.

APCompSci_OverviewBottom.png  IMAGES CREATED BY GAVS