Introduction to Computer Vision and Image Processing: A Comprehensive Guide, Exams of Digital Image Processing

A foundational introduction to the field of digital image processing, covering key concepts such as image representation, digitization, and the human visual system. It explores different image types, including binary, grayscale, and color images, and delves into the applications of image processing in various fields, particularly in the medical community. The document also includes illustrative examples and figures to enhance understanding.

Typology: Exams

2024/2025

Uploaded on 04/12/2025

amr-abdaljbar-khmas-whyd
amr-abdaljbar-khmas-whyd 🇮🇶

1 document

1 / 69

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Digital Image processing
1
-Chapter One
Introduction to Computer Vision and Image Processing
1.1. What Is Digital Image Processing?
An image may be defined as a two-dimensional function, f(x, y) ,where x and y
are spatial (plane) coordinates, and the amplitude of f at any pair of coordinates
(x, y) is called the intensity or gray level of the image at that point.
When x, y, and the intensity values of f are all finite, discrete quantities, we call the
image a digital image.
Note that a digital image is a representation of a two-dimensional image as a finite
set of digital values composed of a finite number of elements, each of which has a
particular location and value.These elements are called picture elements, image
elements, and pixels. Pixel is the term used most widely to denote the elements of a
digital image
Note: One picture is worth more than ten thousand words.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45

Partial preview of the text

Download Introduction to Computer Vision and Image Processing: A Comprehensive Guide and more Exams Digital Image Processing in PDF only on Docsity!

- Chapter One

Introduction to Computer Vision and Image Processing

1.1. What Is Digital Image Processing? An image may be defined as a two-dimensional function, f ( x , y ) ,where x and y are spatial (plane) coordinates, and the amplitude of f at any pair of coordinates ( x , y ) is called the intensity or gray level of the image at that point. When x , y , and the intensity values of f are all finite, discrete quantities, we call the image a digital image. Note that a digital image is a representation of a two-dimensional image as a finite set of digital values composed of a finite number of elements, each of which has a particular location and value.These elements are called picture elements , image elements , and pixels. Pixel is the term used most widely to denote the elements of a digital image Note: One picture is worth more than ten thousand words.

1.2 The Human Visual System The Human Visual System (HVS) has two primary components:

  • Eye.
  • Brian. The structure that we know the most about is the image receiving sensors (the human eye). The brain can be thought as being an information-processing unit analogous to the computer in our computer imaging system. These two are connected by the optic nerve, which is really a bundle of nerves that contains the pathways for visual information to travel from the receiving sensor (the eye) to the processor (the brain). FIGURE 1.1 An example of the human image acquisition process.

The image can now be accessed as a two-dimension array of data , where each data point is referred to a pixel (picture element).for digital images we will use the following notation : I(r,c) = The brightness of image at the point (r,c) Where r= row and c= column. “When we have the data in digital form, we can use the software to process the data”. The digital image is 2D- array as: In above image matrix, the image size is (N×N) [matrix dimension] then: Ng= 2 m^. Where Ng denotes the number of gray levels m, where m is the no. of bits contains in digital image matrix. Example : If we have (6 bit) in 128 * 128 image .Find the |No. of gray levels to represent it ,then find the no. of bit in this image? Solution: Ng= 2^6 =64 Gray Level Nb= 128 * 128* 6 = 9.8304 * 10^4 bit Image processing is a method to perform some operations on an image, in order to get an enhanced image or to extract some useful information from it. It is a type of signal processing in which input is an image and output may be image or characteristics/features associated with that image. Nowadays, image processing is among rapidly growing technologies. It forms core research area within engineering and computer science disciplines too.

1.4. Image Representation We have seen that the H uman V isual S ystem (HVS) receives an input image as a collection of spatially distributed light energy; this is form is called an optical image. Optical images are the type we deal with every day – cameras captures them, monitors display them, and we see them [we know that these optical images are represented as video information in the form of analog electrical signals and have seen how these are sampled to generate the digital image I(r , c). The digital image I (r, c) is represented as a two- dimensional array of data, where each pixel value corresponds to the brightness of the image at the point (r, c). in linear algebra terms , a two-dimensional array like our image model I( r, c ) is referred to as a matrix , and one row ( or column) is called a vector. The image types we will consider are: 1.4.1. Binary Image Binary images are the simplest type of images and can take on two values, typically black and white, or ‘0’ and ‘1’. A binary image is referred to as a 1 bit/pixel image because it takes only 1 binary digit to represent each pixel. These types of images are most frequently in computer vision application where the only information required for the task is general shapes, or outlines information. For example, to position a robotics gripper to grasp an object or in optical character recognition (OCR). Binary images are often created from gray-scale images via a threshold value is, those values above it are turned white (‘1’), and those below it are turned black (‘0’).

1.4.3. Color image Color image can be modeled as three band monochrome image data, where each band of the data corresponds to a different color. The actual information stored in the digital image data is brightness information in each spectral band. When the image is displayed, the corresponding brightness information is displayed on the screen by picture elements that emit light energy corresponding to that particular color. Typical color images are represented as red, green, and blue or RGB images. Using the 8-bit monochrome standard as a model, the corresponding color image would have 24 bit/pixel – 8 bit for each color bands (red, green and blue). The following figure we see a representation of a typical RGB color image. IR(r,c) IG(r,c) IB(r,c). The following figure illustrate that in addition to referring to arrow or column as a vector, we can refer to a single pixel red ,green, and blue values as a color pixel vector – (R,G,B ). Figure (1.6): a color pixel vector consists of the red, green and blue pixel values (R, G, B) at one given row/column pixel coordinate (r,c).

The RGB color model used in color CRT monitor, in this model ,Red,Grren and Blue are added together to get the resultant color White. Red Green Blue Color 0 0 0 Black 0 0 1 Blue 0 1 0 Green 1 0 0 Red 0 1 1 Cyan 1 0 1 Magenta 1 1 0 Yellow 1 1 1 White For many applications, RGB color information is transformed into mathematical space that decouples the brightness information from the color information. The lightness is the brightness of the color, and the hue is what we normally think of as “color” and the hue (ex: green, blue, red, and orange). The saturation is a measure of how much white is in the color (ex: Pink is red with more white, so it is less saturated than a pure red). Most people relate to this method for describing color. Example : “a deep, bright orange” would have a large intensity (“bright”), a hue of “orange”, and a high value of saturation (“deep”).we can picture this color in our minds, but if we defined this color in terms of its RGB components, R=245, G= and B=20, most people have no idea how this color appears. Modeling the color information creates a more people oriented way of describing the colors.

2. Computer – Aided Design(CAD), which uses tools from image processing and computer graphics, allows the user to design a new building or spacecraft and explore it from the inside out. 3. Virtual Reality is one application that exemplifies ( يمثل ) future possibilities 4. Machine/Robot vision: Make robot able to see things , identify them , identify the hurdles. 1.6 Computer Imaging Systems Computer imaging systems are comprised of two primary components types, hardware and software. The hard ware components can be divided into image acquiring sub system (computer, scanner, and camera) and display devices (monitor, printer).The software allows us to manipulate the image and perform any desired processing on the image data. 1.7. Image Resolution Pixels are the building blocks of every digital image. Clearly defined squares of light and color data are stacked up (مكدسة ) next to one another both horizontally and vertically. Each picture element (pixel for short) has a dark to light value from 0 (solid black) to 255 (pure white). That is, there are 256 defined values. A gradient (ميل, نسبة االنحدار) is the gradual transition from one value to another in sequence. The resolution has to do with ability to separate two adjacent pixels as being separate, and then we can say that we can resolve the two. The concept of resolution is closely tied to the concepts of spatial frequency. There are three types of image resolution: 1 - Vertical resolution : the number of M rows in the image (image scan line).

2 - Horizontal resolution : the number of N columns in the image. 3 - Spatial frequency resolution : It is represent by the multiplication (M x N) and its closely tied to the concept of spatial frequency that refers to how rapidly the signal is changing in space, and the signal has two values for brightness 0 and maximum. If we use this signal for one line (row) of an image and then repeat the line down the entire image, we get an image of vertical stripes. If we increase this frequency the strips get closer and closer together, until they finally blend together as shown in figure below, note that the higher the resolution the more details (high frequency). Figure (1.8) Resolution and Spatial frequency. In computers, resolution is the number of pixels (individual points of color) contained on a display monitor, expressed in terms of the number of pixels on the horizontal axis and the number on the vertical axis. The sharpness of the image on a display depends on the resolution and the size of the monitor. The same pixel resolution will be sharper on a smaller monitor and gradually lose sharpness on larger monitors because the same numbers of pixels are being spread out over a larger number of inches. Display resolution is not measured in dots per inch as it usually is with printers ( We measure resolution in pixels per inch or more commonly, dots per inch (dpi)).

1.8. Computer Imaging Can be defined a acquisition and processing of visual information by computer. Computer representation of an image requires the equivalent of many thousands of words of data, so the massive amount of data required for image is a primary reason for the development of many sub areas with field of computer imaging, such as image compression and segmentation .Another important aspect of computer imaging involves the ultimate “receiver” of visual information in some case the human visual system and in some cases the human visual system and in others the computer itself. Computer imaging can be separate into two primary categories:

  1. Computer Vision. 2. Image Processing. (In computer vision application the processed images output for use by a computer, whereas in image processing applications the output images are for human consumption). These two categories are not totally separate and distinct. The boundaries that separate the two are fuzzy, but this definition allows us to explore the differences between the two and to explore the difference between the two and to understand how they fit together (Figure 1.1). Computer imaging can be separated into two different but overlapping areas. Figure (1. 9 ) : Image Resolution.

Figure (1.10): Computer Imaging. Historically, the field of image processing grew from electrical engineering as an extension of the signal processing branch, whereas are the computer science discipline was largely responsible for developments in computer vision. 1.8.1. Computer Vision Computer vision emulate human vision, that’s mean: understanding the scene based on image data. One of the major topics within this field of computer vision is image analysis. Image Analysis: involves the examination of the image data to facilitate solving vision problem. The image analysis process involves two other topics:

  • Feature Extraction: is the process of acquiring higher level image information, such as shape or color information.
  • Pattern Classification: is the act of taking this higher – level information and identifying objects within the image. Computer vision systems are used in many and various types of environments, such as: 1. Manufacturing Systems: computer vision is often used for quality control, where the computer vision system will scan manufactured items for defects, and provide control signals to a robotics manipulator to remove detective part automatically. Computer Vision Image Processing

a. Image with distortion b. Restored image Figure (1.10) Image Restoration 1.8.4. Image Enhancement Involves taking an image and improving it visually, typically by taking advantages of human Visual Systems responses. One of the simplest enhancement techniques is to simply stretch the contrast of an image. Enhancement methods tend to be problem specific. For example, a method that is used to enhance satellite images may not suitable for enhancing medical images. Although enhancement and restoration are similar in aim, to make an image look better. Restoration method attempt to model the distortion to the image and reverse the degradation, where enhancement methods use knowledge of the human visual systems responses to improve an image visually. a. image with poor contrast (^) b. Image enhancement by contrast stretching Figure (1.11) Image Enhancement

1.8.5. Image Compression Involves reducing the typically massive amount of data needed to represent an image. This done by eliminating data that are visually unnecessary and by taking advantage of the redundancy that is inherent in most images. Image data can be reduced 10 to 50 times, and motion image data (video) can be reduced by factors of 100 or even 200. a. Image before compression. b. Image after compression. 92KB 6.59 KB 1.9. Digital Image File Format Why do we need so many different types of image file format?

  • The short answer is that there are many different types of images and application with varying requirements.
  • A more complete answer , also considers market share proprietary information, and a lack of coordination within the imaging industry. Many image types can be converted to one of other type by easily available image conversion software. Field related to computer imaging is that computer graphics.

Image file formats are standardized means of organizing and storing digital images. Image files are composed of digital data in one of these formats that can be rasterized for use on a computer display or printer. An image file format may store data in uncompressed, compressed, or vector formats. Once rasterized, an image becomes a grid of pixels, each of which has a number of bits to designate its color equal to the color depth of the device displaying it. Many image types can be converted to one of other type by easily available image conversion software. Field related to computer imaging is that computer graphics. The most the type of file format falls into category of bitmap images. In general, these types of images contain both header information and the raw pixel data. The header information contains information regarding:

  1. The number of rows (height) 2. The number of columns (Width)
  2. The number of bands.
  3. The number of bit per pixel.
  4. The file type.
  5. Additionally, with some of the more complex file formats, the header may contain information about the type of compression used and other necessary parameters to create the image, I(r, c).

1.9.2 Image File Format:

1. BMP format: It’s a compressed format and the data of image are located in the field of data while there are two fields : One for header (54 byte) that contains the image information such as (height ,width , no. of bits per pixel, no of bands , the file type). The second field is the color map or color palette for gray level image, where its length is 0-255. The BMP file format , also known as bitmap image file or device independent bitmap (DIB) file format or simply a bitmap , is a raster graphics image file format used to store bitmap digital images, independently of the display device (such as a graphics adapter), especially on Microsoft Windows and OS/2 operating systems. The BMP file format is capable of storing 2D digital images of arbitrary width, height, and resolution, both monochrome and color, in various color depths, and optionally with data compression, alpha channels, and color profiles. BMP files are an historic (but still commonly used) file format for the operating system called "Windows". BMP images can range from black and white (1 bit per pixel) up to 24bit color (16.7 million colors). While the images can be compressed, this is rarely used in practice and will not be discussed in detail here.