Sie sind auf Seite 1von 7

2008 5th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE 2008)

Bits Planes Technique for Digital Image Processing


Norma Ramírez Hernández1, José Luis Ramos Quirarte2
1
Department of Computational Sciences, CUCEI-Universidad de Guadalajara, Jalisco, México
2
Department of Electronics, CUCEI-Universidad de Guadalajara, Jalisco, México
Phone/Fax: (33) 1378-5900/7728 E-mail: mirandapartida@terra.com.mx; jlrquirarte@yahoo.com.mx

Abstract –– This work presents a technique for digital image In this work a technique based on decomposing an image in
processing. The technique consists on splitting the original its bits planes is presented to do digital image processing.
image with 256 gray levels into its equivalent 8 binary images. II. METHODOLOGY
The method is extended for true RGB color images by working
out each color plane as a gray scale image and applying the
To separate an intensity image into eight bits planes, we
same algorithm development for the former case to convert any
intensity level into a byte of 8 bits. The results shown out to be proceed as shown in Fig. 1. The intensity of each pixel in
useful for some basic applications such as separating the fine the original image is considered to be some value between 0
features of an image. Memory space for storing images is and 255 that is converted in a byte of 8 bits. Depending of
reduced since the images can be written in binary formats. Bits the intensity value of each pixel on the original image, there
planes technique allows for logical operations and after that, will be a bit on one, some or all the bits planes. By scanning
get back to a gray scale image or color image very easily. The the whole image, there will appear eight images that
potential application of this technique is being studied in order correspond to the eight bits planes; from the least
to detect some anomalies in digital mammographies. A script in significative B0 to the most significative B7.
MatLab has been development with some menus to implement
the bits planes technique for different image formats.
To transform the complete image, a simple algorithm was
Keywords –– Bits Planes, Color Bits Planes, Digital Image implemented and it is described in the following steps:
Processing, Gray Scale Image, RGB Color Image
1.- We start with the first pixel on the image: r=[i], c=[j];
I. INTRODUCTION 2.- The intensity level of the pixel is read: Level;
3.- If Level=0, the least significative plane has a zero:
During the last years with the increasing use of the b(0)=0;
computer and its associate software, the digital image 4.- If Level 0, the planes that have ones must be
processing has become a powerful tool. Several methods determine:
and a multitude of algorithms have been development to 5.- While Level 1
perform processing on images and to explore new 6.- The half part of Level is calculated: Half=Level/2;
applications. 7.- Half is rounded towards zero: Rounded;
8.- The difference between Half and Rounded is calculated:
One of the major objectives of digital image processing is Dif=Half-Rounded;
oriented to improve the image appearance. Some techniques 9.- If Dif=0, the plane gets a zero: b(q)=0;
are designed to suppress interferences or noise, to enhance 10.- If Dif 0, the plane gets an one: b(q)=1;
contrast, etc. But also the measurements of some features of 11.- The value of Level is adjusted: Level=Rounded;
the image are important to do automatic processing. The 12.- We move to the next most significative plane: q=q+1;
areas of application of the digital image processing are 13.- Steps 5 to 12 are repeated until Level<1;
growing very fast. For example, in medicine it is used to 14.- Zeros and ones are collocated in the different image
improve X-ray images, to understand with better accuracy planes: If b(0)=0, B0(i,j)=0, if b(0)=1, B0(i,j)=1; if b(1)=0,
the body´s functions, the effects of some drugs by analyzing B1(i,j)=0, … if b(7)=1, B7(i,j)=1.
pictures with colored substances, to investigate the features 15.- Auxiliar variables are reset and the level of the next
and behavior of tumors, etc. In the artistic field, digital pixel is read;
processing is used to restore photographs and famous 16.- Steps 3 to 15 are repeated until the whole image is
pictures that have been deteriorated. Another application is scanned.
in reconstruction and improvement of images send by
spatial missions, photographs of satellites for weather or The images corresponding to the different bits, from the
natural resources applications. Today, an important area that least significative to the most significative, will be
needs more and more image processing are movies and represented by the matrices: B0(i,j), B1(i,j), …B7(i,j),
electronic games industries. Of course there are several respectively.
military applications of digital image processing [1].

IEEE Catalog Number: CFP08827-CDR


ISBN: 978-1-4244-2499-3
Library of Congress: 2008903800 186
978-1-4244-2499-3/08/$25.00 ©2008 IEEE
2008 5th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE 2008)

Fig. 2. Image of Saturn in tiff format, 328X438 pixels in size and 0 to 255
gary scale

In Fig. 3 are presented the eight bits planes obtained when


Fig. 1. Splitting a digital image on eight bits planes from B0 to B7 the bits planes script was used for the image of Fig. 2. The
first image represents the least significative plane (B0) and
the last one correspond to the most significative (B7).
Binary Plane, B0 (the least significative) Binary Plane, B1

III. RESULTS

A. Bits Planes for an Intensity Image

There are many different type of formats for images: images


.tiff (tagged image file format), that can be an indexed color
image, a true RGB color image, or a gray scale image; Binary Plane, B2 Binary Plane, B3

images .jpeg (joint photographic experts group), it can


represents a true RGB color image, or a gray scale image, a
image .pbm (portable bitmap) is very appropriate for binary
images; etc.

Due to the great multiplicity of image formats, during the


development of this work, a script in MatLab was written to Binary Plane, B4 Binary Plane, B5

select throw a menu a desired image among different kind of


image formats. In order to minimize the computer time, if
the image is too big, there is an option to reduce it to an
image of about 500X500 pixels. The image is also converted
to a gray scale image for some applications.

A script in MatLab was also development to implement the Binary Plane, B6 Binary Plane, B7 (the most significative)

algorithm to obtain de bits planes outlined before and some


results are shown in the following.

In order to apply the development algorithm, the image


shown in Fig. 2, that represents an image .tiff of 328X438
pixels in size was chosen and converted to a 0-255 gray
levels.

Fig. 3. Bits planes for the image of Saturn in Fig. 2

IEEE Catalog Number: CFP08827-CDR


ISBN: 978-1-4244-2499-3
Library of Congress: 2008903800 187
978-1-4244-2499-3/08/$25.00 ©2008 IEEE
2008 5th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE 2008)

B. Recovering the original intensity image Sometimes it is convenient to enhance or to show only some
intensities of a mammography for further processing. For
In order to recover the original image, each matrix purposes of time consuming, in Fig. 5 it is shown a reduced
corresponding to each bits plane, has to be multiply by the original mammography and in Figs. 6 and 7, there are
appropriate decimal: the B0 plane has to be multiply by 1, shown images obtained by the use of AND and OR logic
the B1 plane by 2, the B2 plane by 4, … , the B6 plane by operations of some of the bits planes for the image of Fig. 5
64, and the B7 plane by 128. After that, all matrices can be where some relevant characteristics of the mammography
added and the original image is obtained. are enhanced.

Since the bits planes least significative contribute only with Converted image from RGB.jpeg to gray scale

the finest details of the image, the addition of the five most
significative bits planes will give an image that is almost as
good as the original is. This is shown in Fig. 4.

Image of the restored Planes: B7, B6, B5, B4 and B3

Fig. 5. Mammography used for processing

Image of the logic Operation AND: Planes B6 and B5

Fig. 4. Image composed of the five most significative bits planes

One of the most attractive results by splitting the image in


its bits planes is in saving memory space for storing
inasmuch the original is only one and the resulting bits
planes are eight, these are binary images that can be stored
with a convenient format, like for instance .pbm (portable
bitmap) that requires very few memory.
Fig. 6. Logic operation: AND between B5 and B6 planes

C. Logic Operations with Bits Planes Image of the logic Operation OR: Planes B7 and B6

Since the resulting images for the different bits planes are all
them binary images, it allows the direct use of logic
operations between them. During the last few years, the
digital image processing has been used with great success in
medical applications. One of the most promising
applications is the possibility to be able to make diagnoss of
cancerigen tumors during the early faces throw the good use
of digital mammographies [2-6].

Since the fact that tumors appear in the mammographies as


spots of certain intensity, it seems useful to simplify the
original mammography throw logic operations in order to
extract some useful information for further processing. Fig. 7. Logic operation: OR between B6 and B7 planes

IEEE Catalog Number: CFP08827-CDR


ISBN: 978-1-4244-2499-3
Library of Congress: 2008903800 188
978-1-4244-2499-3/08/$25.00 ©2008 IEEE
2008 5th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE 2008)

D. Bits Planes for a RGB True Color Image Color Image: Blue Plane

A RGB Image is stored as a three-dimensional (m-by-n-by-


3) array of integers in the range [0, 255]. The three planes
correspond to the red color, the green color and the blue
color respectively. Fig. 8 shows a RGB image that has been
reduced in size in order to get better computer response.
Throw a computer program made in MatLab, it is possible
to see the three color planes of the color image. These color
planes are shown in Figs. 9, 10 and 11.

RGB color Image .jpg for processing

Fig. 11. Blue plane of the RGB color image of Fig. 8

In order to obtain the bits planes of the RGB color image,


each color plane (red, green and blue) is worked out as a
gray scale image with 0 to 255 levels and using the same
software that implements the development algorithm.
Obviously, in this case it will be 24 bits planes, 8 for each
color plane. In Fig. 12 are presented two bits planes of the
eight corresponding to each color plane.
Color Image: Red Plane; B4 Color Image: Red Plane; B6

Fig. 8. Original RGB color image

Color Image: Red Plane

Color Image: Green Plane; B3 Color Image: Green Plane; B4

Color Image: Blue Plane; B3 Color Image: Blue Plane; B5

Fig. 9. Red plane of the RGB color image of Fig. 8

Color Image: Green Plane

Fig. 12. Examples of bits planes in intensity for each color plane of Figs. 9,
10 and 11

As it was explained before, the bits planes shown in Fig. 12,


correspond to intensity bits planes so if it is desired to obtain
bits color planes, it is necessary to fuse the bits planes of the
three color planes in the appropriate order: B0r+B0g+B0b,
B1r+B1g+B1b, … etc. the software includes this option
allowing us to observe the behavior of the bits color planes.
Fig. 10. Green plane of the RGB color image of Fig. 8

IEEE Catalog Number: CFP08827-CDR


ISBN: 978-1-4244-2499-3
Library of Congress: 2008903800 189
978-1-4244-2499-3/08/$25.00 ©2008 IEEE
2008 5th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE 2008)

The resulting planes for the image of Fig. 8 that also Red Color Image. All the Planes

represents the fusion of the 24 bits planes like the shown in


Fig. 12, are presented in Fig. 13.

Color Image: Color Plane, B0 Color Image: Color Plane, B1

Color Image: Color Plane, B2 Color Image: Color Plane, B3

Fig. 14. Red plane recovered from the bits planes

Green Color Image. All the Planes

Color Image: Color Plane, B4 Color Image: Color Plane, B5

Color Image: Color Plane, B6 Color Image: Color Plane, B7

Fig. 15. Green plane recovered from the bits planes

Blue Color Image. All the Planes

Fig. 13. Bits color planos for a RGB image

E. Recovering of the RGB Image

To recover the original color image, one proceeded in an


analogous way to the case of images in levels of grey.
Nevertheless, due to the own characteristics of the images
RGB, we put in the program two procedures: The first one
consists of adding in a considered way every plane of bits of
every plane of color of an independent way to obtain hereby
three planes of intensity corresponding to every color. The
result obtained for the example of the Fig. 12, it appears in
the Figs. 14, 15 and 16. The image in color is obtained by Fig. 16. Blue plane recovered from the bits planes
merging the three previous planes. The result is showed in
the Fig. 17.

IEEE Catalog Number: CFP08827-CDR


ISBN: 978-1-4244-2499-3
Library of Congress: 2008903800 190
978-1-4244-2499-3/08/$25.00 ©2008 IEEE
2008 5th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE 2008)

Restored Color Image with Restored Planes IV. CONCLUSION

This work has presented a method to separate into its


elements an image in levels of grey to his representation in 8
binary planes and from an image RGB to color in his 24
binary planes or equivalently to his 8 binary planes to color.

The fundamental intention of this work is to present this


technology as one more tool, which allows enhancement the
digital processing of the images. Eliminate some
characteristics, highlight others or stand out certain
information, and inclusive to save space of storage or of
sending of information.

Fig. 17. RGB image recovered from the 24 bits planes


Interesting results have been obtained for both types of
images but it is important to mention that practical
The second procedure incorporated in the program consists applications like the Figs. 5-7 are very promising but the
of the merger of 8 bits color planes. For the example study is in process since a great quantity of cases they have
presented in this work, it corresponds to the planes showed to be analyzed to obtain conclusive results. With regard to
in the Fig. 13. The result as it was of waited, coincides with the use of the logical operations with the planes of bits, it
the image of the Fig. 17 and it is shown in the Fig. 18. allows to eliminate or to extract with facility certain
characteristics of the image, such as its thin details. With the
Color Image: Made of all the Color Planes purpose of enriching this technology, one is employed at the
search of finding correlations with other characteristics.
Example: with the histogram of the image.

REFERENCES

[1] R.C Gonzalez, R.E.Woods “Tratamiento digital de


imágenes” Ed. Addison-Wesley, 1996.
[2] Liyang Wei, Yongyi Yang, Robert M. Nishikawa, Miles N.
Wernick, and Alexandra Edwardsm, ”Relevance Vector
Machine for Automatic Detection of Clustered
Microcalcifications”, IEEE transactions on medical
imaging, vol. 24, no. 10, october 2005, pp. 1278-1285.
[3] Robert A. Brown*, Hongmei Zhu, and J. Ross Mitchell ,
“Correspondence Distributed Vector Processing of a New
Local MultiScale Fourier Transform for Medical Imaging
Applications” IEEE Transactions on medical imaging, vol.
Fig. 18. RGB image recovered from the 8 bits color planes 24, no. 5, may 2005 689 pp.689-691.
[4] Segyeong Joo, Yoon Seok Yang, Woo Kyung Moon, and
Hee Chan Kim*, Member, IEEE, “Computer-Aided
Diagnosis of Solid Breast Nodules: Use of an Artificial
F. Logic Operations with the Bits Color Planes
Neural Network Based on Multiple Sonographic Features”,
IEEE transactions on medical imaging, vol. 23, no. 10,
In the case of the images in levels of grey, binary planes are october 2004, pp. 1292-1300.
obtained. Then it is possible to realize logical operations [5] J. D. Martínez, J. M. Benlloch, J. Cerdá, Ch. W. Lerche, N.
Pavón, and A. Sebastiá “High-Speed Data Acquisition and
with the diverse planes of bits. In this case, it is feasible Digital Signal Processing System for PET Imaging
realize logical operations with planes of bits correspondents Techniques Applied to Mammography”, IEEE transactions
to every plane of color or, to experiment with planes of bits on nuclear science, vol. 51, no. 3, june 2004, pp. 407-412.
of two or of three planes of color depending on what one [6] Norma Ramírez Hernández, “Procesamiento de Imágenes
Médicas”, Tesis de Maestría en Ciencias en Ingeniería
tries to show. The obtained results are very interesting, but Electrónica, CUCEI, U. de G., Diciembre de 2006.
there would be necessary to analyze images with different
characteristics in order to be able to do appropriate
recommendations.

IEEE Catalog Number: CFP08827-CDR


ISBN: 978-1-4244-2499-3
Library of Congress: 2008903800 191
978-1-4244-2499-3/08/$25.00 ©2008 IEEE

Das könnte Ihnen auch gefallen