Posts

Showing posts from March, 2011

Raster Image

Image
A  raster graphics   image   is a   data structure epresenting a generally   rectangular   grid of   pixels, or points of   color, viewable via amonitor,   paper, or other display medium. Raster images are stored in   image files   with varying formats . Or a raster image is a class representing a rectangular array of pixels. A Raster encapsulates a DataBuffer that stores the sample values and a SampleModel that describes how to locate a given sample value in a DataBuffer. A Raster defines values for pixels occupying a particular rectangular area of the plane, not necessarily including (0, 0). The rectangle, known as the Raster's bounding rectangle and available by means of the getBounds method, is defined by minX, minY, width, and height values. The minX and minY values define the coordinate of the upper left corner of the Raster. References to pixels outside of the bounding rectangle may result in an exception being thrown, or may result in references to unintended elements of

Image Processing Basics 3 - Image Buffering

Image
Buffered Image :- As the name suggests it is the buffering of image data. java.awt.BufferedImage   is responsible for Buffering of images in Java Actually BuffreedImage is nothing but collection of image data,pixels,RGB Colors etc. BuffredImage basically contains two parst. Raster part and Color part. Color part is responsible for storing color of the image to be buffered. Raster part holds the raw image and their representation. Rater images are stored in image files in different formats.Some of the formats are :-      1)   BitMap :-   a bitmap or pixmap   is a type of   memory   organization or   image file format   used to store   digital images      2)   OpenRaster :- Open Raster is a   file format   proposed for the common exchange of   layered   images between   raster graphics   editors. It is meant as a replacement for later versions of the Adobe PSD format. OpenRaster is still in development and so far is supported by a few programs.The default   file extension   for OpenR

Blurring The Image

Image
Guys let me ask you a question. What happens when your spectacles are lost and you are desperate to read something. You are witnessing a phenomenon known as Blurring. Well guys that brings us to a new topic called Image Blurring.  So guys you might have a question now why to blur the image? Because normally blurring created discomfort. Here is the truth. If you see any sensitive data in the website, normally its blurred. I think you might have got some idea about blurring now. But honestly i feel blurring the sensitive data to hide is a bad form. Because the image blurred can be reverted back. There are many techniques for blurring the image. Most important ones are       1)    Gaussian Blur       2)    Convolve       3)    Motion Blur       4)    Faster Motion Blur etc We will learn about all these topics in detail in following chapters. But an important pre-requisite I feel before starting the blurring chapters is that you must know Buffering the Image. If you know buffering th

Image Processing Basics 2 - Image Scaling

Image
Scaling algorithms are used to scale the image i.e. to change the size of image as per our requirement. Since it involves re-sizing the image normally there is a loss of smoothness and sharpness. Some of the Scaling Methods are :-             Nearest – Neighbour Interpolation :-        In this technique to enlarge the pixel, value of nearest pixel is copied i.e the color of pixel in new image is the color of the  nearest pixel of the original image . If you enlarge the pixel by 400% then each pixel will be enlarged 4x4 therby forming 16 pixels with same color.       Advantage of this technique is that it will not introduce any bias in the image as the image itself is scaled without loss of data        Disadvantage is that it will introduce aliasing and jaggies.      Aliasing :- It refers to an effect which causes the pixel to be aliases i.e. it will be copy of the other. Problem arises because it introduces jaggies which means stairlike lines that appear where there should be smooth

Pixel Representation

Let us study some basic terms before starting with programs. 1) Pixel :-  Its is a smallest unit of a picture that can be represented. The address of a pixel corresponds to its coordinates. Pixels are normally arranged in a two-dimensional grid, and are often represented using dots or squares. In color image pixels are normally represented in RGB or CYMB. Major image file formats are JPEG, EXIF, TIFF, RAW, PNG, GIF, BMP etc. They can also be represented as vector formats like CGM, SVG etc. P ixel in a modern computer image is represented by four unsigned 8-bit bytes of data.  Three of those four bytes represent the colors red, green, and blue.  The fourth byte, often referred to as the alpha byte, represents transparency. In black and white image, black has the value 0 and white 255.   If the value is 0, the pixel is completely transparent regardless of the values of the color bytes.  If the value is 255, the pixel is completely opaque with the color of the pixel being determined ex