1、Digital Image Processing,Tianjin University of Technology and Education School of Electronic Engineering 2017,Synopsis,The contents of the eight weeks are as follows: The first、second chapter is the introduction and the basic concept of image processing. The third, fourth chapter is space domain and
2、 frequency domain transform The fifth, eighth chapter is image enhancement and image restoration.,The sixth chapter is image coding The seventh, ninth chapter is image segmentation and morphology The tenth chapter, other,The first chapter is introduction,1.1 From image to image engineering Image and
3、 digital image Image technology and image engineering Related disciplines and fields.1.2 Image processing and analysis Image processing and analysis system Image acquisition, display, storage, communication, processing and analysis module,image processing,image analysis,Image understanding,Abstract
4、degree,Data quantity,Image foundation,1.1.1 Image and digital image What is an image?An image is a visual representation of pictures, animations, etc The difference between graphics and computer graphics is that computer graphics are from building mathematical models to generating graphics, and imag
5、es usually refer to graphs generated from outside.The objective world is a three-dimensional space, but the general image is two-dimensional. Two dimensional images inevitably lose part of the information in the process of reflecting the three-dimensional world. Even recorded information can be dist
6、orted and even difficult to recognize objects. Therefore, it is necessary to recover and reconstruct information from images, and to analyze and extract mathematical models of images so that people can have a correct and profound understanding of what is recorded in the image. This process becomes t
7、he process of image processing.,1.1 From image to image engineering,Why do you need digital images?Ordinary images contain enormous amounts of information and require the use of computers to process images. Therefore, it is necessary to transform ordinary images into digital images that the computer
8、 can process. Todays digital cameras can directly convert visual images into digital images. A digital image, similar to raster graphics, consisting of finite rows and finite columns. Each basic unit is called a pixel. The voxel of a three-dimensional image is also called voxel. The two-dimensional
9、digital image usually is a rectangle, you can use a two-dimensional array of I (x, y) to said, where x, y coordinates in a two-dimensional space is a coordinate system, I (x, y) said in the image gray value at the point and other properties. Color can be prepared three RGB monochromatic gray value.
10、Generally speaking, these coordinates and gray values are real numbers, not only depend on the selection of coordinate system, but also depend on the measurement unit of gray value. However, a digital computer can only represent finite numbers of finite word lengths. Therefore, the gray value must b
11、e discretized. Simply put, a digital image is equivalent to a finite matrix of integer values. Digital image is the object of digital image processing and analysis.,The image on the left is the image processing technique . Used to test computer algorithms A standard image of actual effects . The nam
12、e of this image is lenna . It is made up of a set of numbers. Original image The width and height are 256 pixels each .There are eight bits in pixels. It is in BMP form at About 66K bytes in size.,A brief history of digital image processingThe generation of digital pictures is far ahead of the compu
13、ter. The first digital image transmitted by telegraph. In six and 70s, with the development of computer hardware and the discovery of fast Fu Liye transform algorithm, it was possible to use computer to process images. Since 80s, three dimensional images have been processed. Since 90s, with the impr
14、ovement of computer performance and extensive use, image processing technology has been involved in every corner of society. The image has gradually dominated the media and produced many new industries and new opportunities. The future development of the image processing is limitless. Digital image
15、processing belongs to computer science, but 90% of it relies on mathematics. From this point of view, the digital image processing technology is a very ideal direction for the students of this specialty.,1.1.2 Image technology and image engineering,Which belongs to image technology? Image technology
16、 is a general term for the technology concerned with images. It is a kind of comprehensive technical engineering. It includes image acquisition, acquisition, encoding, storage and transmission, image generation, display and output, image transformation, enhancement, restoration and reconstruction, i
17、mage segmentation, target detection, expression and description, feature extraction, image classification, image recognition, modeling and matching, image and scene understanding.Narrow sense digital image processing refers to the enhancement, restoration and reconstruction of an image. The object o
18、f operation is the pixel of an image, and the output is an image.,What is image engineering? (generalized digital image processing)It is composed of three systems: image processing, image analysis and image understanding. Image processing includes image acquisition and transformation from image to i
19、mage, so as to improve the subjective visual effect and to do preliminary processing for image analysis and image understanding. Image analysis is to extract the data of interest from the image to describe the characteristics of the target in the image. Image understanding is based on image analysis
20、 to study the nature and relationship of each object, in order to get the understanding of the content of the image and explain the original scene. Image processing, image analysis and image understanding are three different abstract processes from low to high. This course focuses on image processin
21、g and analysis systems.,image processing,image understanding,image analysis,Abstract degree,Data quantity,Image,Data,Symbol,1.1.3 Related disciplines and fields,Image engineering is a systematic study of various image theories, techniques and applications.From the research method, and mathematics, p
22、hysics, psychology, biology, electronics, computer science can learn from each other, from the scope of it, and pattern recognition, computer vision, computer graphics and other disciplines.,1.2 Image processing and analysis,1.2.1 Image processing and analysis systemThe image processing and analysis
23、 system includes the following modules: image acquisition module, image display module, image storage module, image communication module and image processing and analysis module. 1.2.2 Modular Image acquisition module Image display module Image storage module Image communication module Image process
24、ing and analysis module,1.2.1 The data structure of an image file,The basic functions of a complete image processing program are: open image files, display images, image files for the specified processing, storage of image files. Since image files are large, they usually need to be compressed before
25、 storage. So opening and storing image files involves the format of the file.Format of image fileThe image file refers to the file containing the image data. In addition to the image data itself, the document generally has the image description information for the image to read and display. Represen
26、ts a vector or raster form of an image.In vector form, the image is represented by a series of line segments or line segments, and the gray levels of the segments can be different. Each part of the composite body can be filled with different gray levels. A vector form file has a series of commands a
27、nd data, and the result is an image.,Image data file is mainly raster form, that is, the image is a collection of image points, more suitable for complex images change. Its main drawback is the lack of links between objects and pixels, and changes in the image during the expansion of the image. For
28、example, common image file types are BMP, JPG, and so on. The image processing program must consider the format of the image file, otherwise it is not possible to open and save the image file properly.Pgm formatMany universities in the United States use pgm format to avoid using compressed file form
29、ats, which is very convenient for beginners. Here is an image of this format.,This is a color picture in pgm format,This is the pgm format, color photos, 16 part system code. The original code is not a string of branches. Its written in the form of a branch (attention: LF= SP= newline; space; #= com
30、ment line): 0x50 0x35 0x0A expressP5 (LF); 0x23 0x20 0x20 0x49 0x0A expess #(SP)(SP)I(LF) ; 0x36 0x34 0x30 0x20 0x34 0x38 0x30 0x0Aexpress 640(SP)480(LF); 0x32 0x35 0x35 0x0Aexpess 255(LF) 0x27 0x27 express 23, 23,(Pixel gray value), ,The decoding of this image file:,P5 # Imported from SUN image: LE
31、GGO_HOUSE_1.0.intensity 640 480 255 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x26 0x27 0x27 0x27 0x28 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x270x27 0x27 0x26 0x27 0x26 0x27 0x28 0x27 0x27 0x26 0x270x27 0x27 0x28 0x27 0x27 0x27 0x27 0x27 0x27 0
32、x28 0x280x27 0x28 0x29 0x28 0x27 0x28 0x28 0x28 0x27 0x27 0x270x27 0x27 0x27 0x27 0x28 0x27 0x28 0x28 0x28 0x28 0x280x28 0x28 0x28 0x28 0x29 0x29 0x29 0x28 0x28 0x28 0x28 .,PGM format digital image file is a common form of image processing, teaching and research in American computer science. Althoug
33、h the volume of files is relatively large, the pixel is directly related to the number, so it is easy to check and modify. It consists of two parts: 1、 the first part is the file head, which consists of several rows: The first line illustrates the type of file, for example, P2 (for black and white i
34、mages) or P5 (for color images); Then is to # at the beginning of the annotation, the comment line does not perform in the software when the image is opened, can not comment, or how to # at the beginning of the comment line; The first line after the comment line specifies the size of the digital ima
35、ge, for example, 640480 (640 pixels wide, 480 pixels high, with a space in the middle); The next line specifies the gray scale of the image, for example, 255. There are no punctuation marks at the end of each line. 2、The 2 and second parts are bitmap arrays that are no longer segmented. For example,
36、 in the 256 gray scale, the P2 type is one pixel, one byte (8 bits), and the P5 type is one pixel, three bytes (R, G, B, 8 bits each).,The second chapter is about image and vision,2.1 Introduction and review The foundation includes three parts: vision base, imaging base and image foundation: Visual
37、basis (human eyes and brightness, vision, color, vision) Imaging Fundamentals (model, geometry, and sampling quantization) Image basis (inter pixel relation, image operation and image coordinate transformation) Be careful: Visual: refers to the stimulation of light to the senses and the sense of the
38、 visual system. Visual perception: how to form an image of the external world through vision.,2.2 Human eye and brightness vision,2.2.1 Human eye imageThe human eye is a complex visual organ. The front of the eye has a lens, the lens of a camera. The posterior part of the eyeball has the retina. The
39、re are two photoreceptors on the surface of the retina: cones and column cells. There are six and seven million cone cells in the eye, which are sensitive to bright light and color. The eye divides the details with the aid of cones, because each cone is connected to the nerve ending. The vision of c
40、ones is called light vision. There are 750 thousand to 1 million 500 thousand column cells in the eye. They are large, and several column cells are attached to one nerve end. Low resolution, mainly providing overall visual impression. Although they are not sensitive to color, they are sensitive to w
41、eak light. The vision of cylindrical cells is called dark vision.The center of the retina is the fovea, an area of about 1.5 1.5mm2 long, the cone cell density reached 150000 /mm2, is the most sensitive eye area.,Human eye structure,人眼成像,Density and distribution of cones and column cells,2.2.2 Brigh
42、tness adaptation and differentiation,Subjective brightness and subjective adaptability, because the digital image displays the image with objective brightness, the human eye gets the vision with subjective brightness, so the brightness adaptability of human eye affects the result of image processing
43、. The visual system of the human eye can adapt to the brightness level of the light, from visible darkness to glare, the difference can reach 1010 levels. But the human eye does not see objects in such a large range at the same time, and can only adapt to a small range of brightness changes at the s
44、ame time (level 106).,Under certain conditions, the current sensitivity of a visual system is called the brightness adaptation level. The sensitivity is verified by experiments. In the experiment, gradually increase the light intensity of I, change a lot for I, to achieve a number of observers can p
45、erceive, when people perceived half of the increase in the I/I Weber ratio has become a lot, as the sensitivity of the current visual system. In very strong light, it is necessary to change the intensity of the light to allow multiple observers to perceive; on the contrary, in a certain intensity of
46、 light, the slight changes in light intensity will make people perceive.,The subjective brightness of the human eye is nonlinear, for example, the Mach band,Optical illusions of human eyes,2.3 color vision,According to the structure of the human eye, all colors are different combinations of three ba
47、sic colors,All colors can be regarded as the superposition of three basic colors, can be seen as the three color (a color removal from white) superposition,Three basic features of color: gray, hue and saturation, and the latter are called chromaticity. The gray scale is proportional to the reflectiv
48、ity of the object; the hue is related to the main spectrum in the light; the saturation is related to the purity of the hue. The three stimuli that make up the color C are X, Y, Z, and the percentages are x, y, ZX = X/ (X+Y+Z), y = Y/ (X+Y+Z), z = 1 - X - Y.,2.5 imaging transformation,Let W (X, Y, Z
49、) be the coordinates of any point in the 3D space, Z =According to the properties of similar triangles,x/ = X/(-Z), y/ = Y/(-Z), x = X/(-Z), y = Y/(-Z) Make use of point wh homogeneous coordinates (kX, kY, kZ, K) 1 0 0 0P= 0 1 0 00 0 1 00 0 -1/ 1 ch = Pwh = P(kX, kY, kZ, k) =(kX, kY, kZ, -(k/)Z+k)=
50、(x,y,z,1) x = kX/(-k/Z+k)=X/(-Z), the same way to get y and Z,x,Z,(X,Y,Z),0,wh = P-1ch1 0 0 0P-1= 0 1 0 00 0 1 00 0 1/ 1 wh = P-1 (x,y,0,1) = (x,y,0,1). There is no coordinate component Z, so the point of 3D cannot be representedIf additional depth information Z is known, then the point of 3D can be represented, (X,Y,Z,1) = wh = P-1(x,y,z,1) = (x,y,z, z/+1). 其中, X = x/(+z), Y = y/(+z), Z = z/(+z),