My current Project has the following Requirements:
1. Backup the entire contents of the hard disk including Operating System as a bootable Image.
2. In case of System Failure, user should be able to perform a full system-recovery operation using the Backed up Image of the Hard Disk.

I am new to this concept and request any sort of help on how to proceed with this.
Any help will be greatly appreciated..



I think you are looking to make a Ghost / PQDI Disk image programming. Unless you are very strong in your C / C++ coding skills, you are in for a real battle. You are going to need to work at the partition level, and go after hidden files, and assuming you are using Windows, go after the registry and boot sector information.

Personally, you are trying to re-invent the wheel, and are in for some significant development cost. There are off the shelf product already available at a reasonable cost.

You will need to employ error checking, and perhaps partition management in your code, because if you want to restore from the same disk, you will most likely need to use two different partitions. Might find it safer to work from a network, but that requires additional work.


Hii.. all . .
how r u ? .. i think that u must study FO ( File Oranization ) ..
*Image presentation
*.* Visual Perception
When processing images for a human observer, it is important to consider how images are converted into information by the viewer. Understanding visual perception helps during algorithm development.

Image data represents physical quantities such as chromaticity and luminance. Chromaticity is the color quality of light defined by its wavelength. Luminance is the amount of light. To the viewer, these physical quantities may be perceived by such attributes as color and brightness.

How we perceive color image information is classified into three perceptual variables: hue, saturation and lightness. When we use the word color, typically we are referring to hue. Hue distinguishes among colors such as green and yellow. Hues are the color sensations reported by an observer exposed to various wavelengths. It has been shown that the predominant sensation of wavelengths between 430 and 480 nanometers is blue. Green characterizes a broad range of wavelengths from 500 to 550 nanometers. Yellow covers the range from 570 to 600 nanometers and wavelengths over 610 nanometers are categorized as red. Black, gray, and white may be considered colors but not hues.

Saturation is the degree to which a color is undiluted with white light. Saturation decreases as the amount of a neutral color added to a pure hue increases. Saturation is often thought of as how pure a color is. Unsaturated colors appear washed-out or faded, saturated colors are bold and vibrant. Red is highly saturated; pink is unsaturated. A pure color is 100 percent saturated and contains no white light. A mixture of white light and a pure color has a saturation between 0 and 100 percent.

Lightness is the perceived intensity of a reflecting object. It refers to the gamut of colors from white through gray to black; a range often referred to as gray level. A similar term, brightness, refers to the perceived intensity of a self-luminous object such as a CRT. The relationship between brightness, a perceived quantity, and luminous intensity, a measurable quantity, is approximately logarithmic.

Contrast is the range from the darkest regions of the image to the lightest regions. The mathematical representation is

where Imax and Imin are the maximum and minimum intensities of a region or image.

High-contrast images have large regions of dark and light. Images with good contrast have a good representation of all luminance intensities.

As the contrast of an image increases, the viewer perceives an increase in detail. This is purely a perception as the amount of information in the image does not increase. Our perception is sensitive to luminance contrast rather than absolute luminance intensities.

* Color Representation

A color model (or color space) is a way of representing colors and their relationship to each other. Different image processing systems use different color models for different reasons. The color picture publishing industry uses the CMY color model. Color CRT monitors and most computer graphics systems use the RGB color model. Systems that must manipulate hue, saturation, and intensity separately use the HSI color model.

Human perception of color is a function of the response of three types of cones. Because of that, color systems are based on three numbers. These numbers are called tristimulus values. In this course, we will explore the RGB, CMY, HSI, and YCbCr color models.

There are numerous color spaces based on the tristimulus values. The YIQ color space is used in broadcast television. The XYZ space does not correspond to physical primaries but is used as a color standard. It is fairly easy to convert from XYZ to other color spaces with a simple matrix multiplication. Other color models include Lab, YUV, and UVW.

All color space discussions will assume that all colors are normalized (values lie between 0 and 1.0). This is easily accomplished by dividing the color by its maximum value. For example, an 8-bit color is normalized by dividing by 255.


The RGB color space consists of the three additive primaries: red, green, and blue. Spectral components of these colors combine additively to produce a resultant color.

The RGB model is represented by a 3-dimensional cube with red green and blue at the corners on each axis (Figure 1.1). Black is at the origin. White is at the opposite end of the cube. The gray scale follows the line from black to white. In a 24-bit color graphics system with 8 bits per color channel, red is (255,0,0). On the color cube, it is (1,0,0).


Figure 1.1 RGB color cube.

The RGB model simplifies the design of computer graphics systems but is not ideal for all applications. The red, green, and blue color components are highly correlated. This makes it difficult to execute some image processing algorithms. Many processing techniques, such as histogram equalization, work on the intensity component of an image only. These processes are easier implemented using the HSI color model.

Many times it becomes necessary to convert an RGB image into a gray scale image, perhaps for hardcopy on a black and white printer.

To convert an image from RGB color to gray scale, use the following equation:

Gray scale intensity = 0.299R + 0.587G + 0.114B

This equation comes from the NTSC standard for luminance.

Another common conversion from RGB color to gray scale is a simple average:

Gray scale intensity = 0.333R + 0.333G + 0.333B

This is used in many applications. You will soon see that it is used in the RGB to HSI color space conversion.

Because green is such a large component of gray scale, many people use the green component alone as gray scale data. To further reduce the color to black and white, you can set normalized values less than 0.5 to black and all others to white. This is simple but doesn't produce the best quality.


The CMY color space consists of cyan, magenta, and yellow. It is the complement of the RGB color space since cyan, magenta, and yellow are the complements of red, green, and blue respectively. Cyan, magenta, and yellow are known as the subtractive primaries. These primaries are subtracted from white light to produce the desired color. Cyan absorbs red, magenta absorbs green, and yellow absorbs blue. You could then increase the green in an image by increasing the yellow and cyan or by decreasing the magenta (green's complement).

Because RGB and CMY are complements, it is easy to convert between the two color spaces. To go from RGB to CMY, subtract the complement from white:

C = 1.0 – R

M = 1.0 - G

Y = 1.0 - B

and to go from CMY to RGB:

R = 1.0 - C

G = 1.0 - M

B = 1.0 - Y

Most people are familiar with additive primary mixing used in the RGB color space. Children are taught that mixing red and green yield brown. In the RGB color space, red plus green produces yellow. Those who are artistically inclined are quite proficient at creating a desired color from the combination of subtractive primaries. The CMY color space provides a model for subtractive colors.

Figure 1.2 Additive colors and substractive colors

Remember that these equations and color spaces are normalized. All values are between 0.0 and 1.0 inclusive. In a 24-bit color system, cyan would equal 255 - red (Figure 1.2). In the printing industry, a fourth color is added to this model.

The three colors ¾ cyan, magenta, and yellow ¾ plus black are known as the process colors. Another color model is called CMYK. Black (K) is added in the printing process because it is a more pure black than the combination of the other three colors. Pure black provides greater contrast. There is also the added impetus that black ink is cheaper than colored ink.

To make the conversion from CMY to CMYK:

K = min(C, M, Y)

C = C - K

M = M - K

Y = Y - K

To convert from CMYK to CMY, just add the black component to the C, M, and Y components.


Since hue, saturation, and intensity are three properties used to describe color, it seems logical that there be a corresponding color model, HSI. When using the HSI color space, you don't need to know what percentage of blue or green is to produce a color. You simply adjust the hue to get the color you wish. To change a deep red to pink, adjust the saturation. To make it darker or lighter, alter the intensity.

Many applications use the HSI color model. Machine vision uses HSI color space in identifying the color of different objects. Image processing applications ¾ such as histogram operations, intensity transformations, and convolutions ¾ operate on only an image's intensity. These operations are performed much easier on an image in the HSI color space.

For the HSI is modeled with cylindrical coordinates, see Figure 1.3. The hue (H) is represented as the angle 0, varying from 0o to 360o. Saturation (S) corresponds to the radius, varying from 0 to 1. Intensity (I) varies along the z axis with 0 being black and 1 being white.

When S = 0, the color is a gray of intensity 1. When S = 1, the color is on the boundary of top cone base. The greater the saturation, the farther the color is from white/gray/black (depending on the intensity).

Adjusting the hue will vary the color from red at 0o, through green at 120o, blue at 240o, and back to red at 360o. When I = 0, the color is black and therefore H is undefined. When S = 0, the color is grayscale. H is also undefined in this case.

By adjusting 1, a color can be made darker or lighter. By maintaining S = 1 and adjusting I, shades of that color are created.


Figure 1.3 Double cone model of HSI color space.

The following formulas show how to convert from RGB space to HSI:

If B is greater than G, then H = 3600 – H.

To convert from HSI to RGB, the process depends on which color sector H lies in. For the RG sector (00 £ H £ 1200):

For the GB sector (1200 £H £2400):

For the BR sector (2400 £H £ 3600):

The values r, g, and b are normalized values of R, G, and B. To convert them to R, G, and B values use:

R=3Ir, G=3Ig, 100B=3Ib.

Remember that these equations expect all angles to be in degrees. To use the trigonometric functions in C, angles must be converted to radians.


YCbCr is another color space that separates the luminance from the color information. The luminance is encoded in the Y and the blueness and redness encoded in CbCr. It is very easy to convert from RGB to YCbCr

Y = 0.29900R + 0.58700G + 0.11400B

Cb = -0. 16874R - 0.33126G + 0.50000B

Cr = 0.50000R-0.41869G - 0.08131B

and to convert back to RGB

R = 1.00000Y + 1.40200Cr

G = 1.00000Y - 0.34414Cb - 0.71414Cr,

B = 1.00000Y + 1.77200Cb

There are several ways to convert to/from YCbCr. This is the CCIR (International Radi Consultive Committee) recommendation 601-1 and is the typical method used in JPEG compression.
reallt it is too hard but you will know how operating system works ??

Um... I don't think he meant that type of image! I think he meant a file containing the contents of a drive, not a "picture" image!

Interesting read, nonetheless!

This article has been dead for over six months. Start a new discussion instead.