1 Chính phủ điện tử TS. Phạm Văn Tính Khoa CNTT, ĐH Nông Lâm TP.HCM [email protected].
Example of Digital image F 01 - Khoa CNTT-HVKTQS
Transcript of Example of Digital image F 01 - Khoa CNTT-HVKTQS
![Page 1: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/1.jpg)
Image Processing
Example of Digital image
Fine name: F_01.JPGType of file: JPEG Image
Width: 512
Height: 768
Resolution: 96
Bit Depth: 24
Size: 46,744 bytes
![Page 2: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/2.jpg)
Image Processing
Application Fields: Medicine
![Page 3: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/3.jpg)
Image Processing
Application Fields: Geology
![Page 4: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/4.jpg)
Image Processing
Application Fields: Image Enhancement
![Page 5: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/5.jpg)
Image Processing
Application Fields: Entertainment
![Page 6: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/6.jpg)
Image Processing
![Page 7: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/7.jpg)
Image Processing
![Page 8: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/8.jpg)
Image Processing
![Page 9: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/9.jpg)
Image Processing
![Page 10: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/10.jpg)
Image Processing
f(x,y) – color value of pixel at (x,y)
Digital image is set {f(x,y), for all pixels (x,y)}
or { f(x,y), 1≤x ≤W, 1≤y≤H }
x
y
![Page 11: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/11.jpg)
Image Processing
![Page 12: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/12.jpg)
Image Processing
![Page 13: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/13.jpg)
Image Processing
![Page 14: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/14.jpg)
Image Processing
![Page 15: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/15.jpg)
Image Processing
![Page 16: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/16.jpg)
Image Processing
![Page 17: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/17.jpg)
Image Processing
![Page 18: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/18.jpg)
Image Processing
Gray scale
The intensity of a monochrome image at any point (x,y) is called gray level of the image at the point (x,y) :
ℓ = f(x, y)
The range [Lmin, Lmax], where Lmin ≤ ℓ ≤ Lmax, is called
the gray scale.
![Page 19: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/19.jpg)
Image Processing
Neighbors of a Pixel Let P is a pixel at coordinate (x, y).Then, P has •two horizontal and •two vertical neighbors at
(x+1, y), (x-1, y), (x, y-1), (x, y+1) (1)
The set (1) is called The set (1) is called 44--neighbors of P.neighbors of P.
P(x,yP(x,y))
![Page 20: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/20.jpg)
Image Processing
Neighbors of a Pixel Let P is a pixel at coordinate (x, y). The 4 diagonal neighbors of P:(x-1, y-1), (x-1, y+1), (x+1, y-1), (x+1, y+1) (2)
The set (1)&(2), The set (1)&(2), denoted by N8(P), is denoted by N8(P), is called 8called 8--neighbors of P.neighbors of P.
P(x,y)
![Page 21: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/21.jpg)
Image Processing
Color Model Color Fundamentals
![Page 22: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/22.jpg)
Image Processing
Color Model Color Fundamentals
![Page 23: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/23.jpg)
Image Processing
Color ModelTotal of 6-7.000.000 cones in the human eye. They are divided into 3 principal sensing categories, corresponding to red, green, blue light.
Approximately, Approximately, 65% of all 65% of all cones are cones are sensitive to RED sensitive to RED lightlight
Approximately, 33% Approximately, 33% are sensitive to are sensitive to GREEN lightGREEN light
And, approximately, 2% are And, approximately, 2% are sensitive to BLUE light (but the sensitive to BLUE light (but the blue cones are the most blue cones are the most sensitive)sensitive)
![Page 24: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/24.jpg)
Image Processing
Color ModelThe International Commission on Illumination designated (1931) the following specific wavelength values to the three primary colors:
BLUE = 435.8 nm,BLUE = 435.8 nm,
GREEN = 546.1 nm, GREEN = 546.1 nm,
RED = 700 nm RED = 700 nm
CIE standards CIE standards
![Page 25: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/25.jpg)
Image Processing
Color Model
![Page 26: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/26.jpg)
Image Processing
Color Model
![Page 27: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/27.jpg)
Image Processing
Color Model
Mỗi mô hình màu gồm ba màu, ví dụ: {red, green, blue}, hoặc {cyan, magenta, yellow}
Ảnh xám:Mỗi điểm ảnh có các thành phầnmàu bằng nhau{red = a, green = a, blue= a},a – mức xám
![Page 28: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/28.jpg)
Image Processing
Color Model
![Page 29: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/29.jpg)
Image Processing
Pixels Let P(x, y) is some (discrete) point in the image, and f(P) is vector value of point P, eg.,
f(P) = [R(P), G(P), B(P)] if I is the color image and, f(P) is called intensity or gray level if I is dark-gray image (image have dark gray-level distributions)
The pair P & f(P)
is called a pixel (stand for picture element). Usually, used note f(x, y) to sign a pixel, where x, y are spatial coordinates.
![Page 30: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/30.jpg)
Image Processing
Pixels Let P(x, y) is some (discrete) point in the image, and f(P) is vector value of point P, eg.,
f(P) = [R(P), G(P), B(P)] if I is the color image and, f(P) is called intensity or gray level if I is dark-gray image (image have dark gray-level distributions)
The pair P & f(P)
is called a pixel (stand for picture element). Usually, used note f(x, y) to sign a pixel, where x, y are spatial coordinates.
![Page 31: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/31.jpg)
Một số phép toán xử lý ảnh
Nén dữ liệu ảnh
Size of Image file D.JPG is 4,781 bytes.Size of Image file D.BMP is 65,322 bytes.
Lọc nhiễu
![Page 32: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/32.jpg)
Một số phép toán xử lý ảnh
Phân đoạn ảnh
![Page 33: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/33.jpg)
Một số phép toán xử lý ảnh
Thủy ấn (Watermarking)
An image with visible An image with visible
digital watermarking. The digital watermarking. The
text text
""Brian Brian KellKell 20062006" "
can be seen across the can be seen across the
center of the image.center of the image.
![Page 34: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/34.jpg)
Một số phép toán xử lý ảnh
Nhận dạng
Who?Who?
![Page 35: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/35.jpg)
Một số phép toán xử lý ảnh
Origin image
Histogram equalization
--brightnessbrightness +brightness+brightness
+contrast -contrast
γγγγγγγγ=1.25=1.25 γγγγγγγγ=0.9=0.9
negativenegativebitbit--plan 5plan 5
Biến đổi điểm ảnh
![Page 36: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/36.jpg)
Image Processing
How to practice and what is more reading?A typical BMP file usually contains the following blocks of data:
BMP File Header Stores general information BMP File Header Stores general information about the BMP file.about the BMP file.
Bitmap Information (DIB Bitmap Information (DIB header)Storesheader)Stores detailed detailed information about the bitmap image.information about the bitmap image.
Color Color PaletteStoresPaletteStores the definition of the colors the definition of the colors being used for indexed color bitmaps.being used for indexed color bitmaps.
Bitmap Data Stores the actual image, pixel by Bitmap Data Stores the actual image, pixel by pixel.pixel.
![Page 37: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/37.jpg)
Image Processing
How to practice and what is more reading?
start size name stdvalue Purpose
1 2 bfType 19778 must always be set to 'BM' to declare that
this is a .bmp-file.
3 4 bfSize ?? specifies the size of the file in bytes.
7 2 bfReserved1 0 must always be set to zero.
9 2 bfReserved2 0 must always be set to zero.
11 4 bfOffBits 1078 specifies the offset from the beginning of
the file to the bitmap data.
![Page 38: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/38.jpg)
Image Processing
start size name stdvalue Purpose
15 4 biSize 40
specifies the size of the
BITMAPINFOHEADER structure, in
bytes.
19 4 biWidth 100 specifies the width of the image, in
pixels.
23 4 biHeight 100 specifies the height of the image, in
pixels.
27 2 biPlanes 1 specifies the number of planes of the
target device, must be set to zero.
29 2 biBitCount 8 specifies the number of bits per pixel.
31 4 biCompression 0 Specifies the type of compression,
usually set to zero (no compression).
35 4 biSizeImage 0
specifies the size of the image data, in
bytes. If there is no compression, it is
valid to set this member to zero.
39 4 biXPelsPerMeter 0
specifies the the horizontal pixels per
meter on the designated targer device,
usually set to zero.
43 4 biYPelsPerMeter 0
specifies the the vertical pixels per
meter on the designated targer device,
usually set to zero.
47 4 biClrUsed 0
specifies the number of colors used in
the bitmap, if set to zero the number
of colors is calculated using the
biBitCount member.
51 4 biClrImportant 0
specifies the number of color that are
'important' for the bitmap, if set to
zero, all colors are important.
How to practice and what is more reading?How to practice and what is more reading?
![Page 39: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/39.jpg)
Image Processing
Note:biBitCount actually specifies the color resolution of the bitmap. The possible values are:
1 (black/white); 4 (16 colors); 8 (256 colors); 24 (16.7 million colors).
The biBitCount data element also decides if there is a color table in the file and how it looks like:
In 1-bit mode the color table has to contain 2 entries (white, black).In 4-bit mode the color table must contain 16 colors.In 8-bit mode the color table contains 256 entries. In 24-bit mode, the palette is omitted.
![Page 40: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/40.jpg)
Image Processing
The color paletteThe color palette
start size name stdvalue purpose
1 1 rgbBlue - specifies the blue part of the color.
2 1 rgbGreen - specifies the green part of the color.
3 1 rgbRed - specifies the red part of the color.
4 1 rgbReserved - must always be set to zero.
![Page 41: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/41.jpg)
Image Processing
Bitmap data:
It depens on the BMP File Header structure how the pixel data is to be interpreted.
Another important thing is that the number of bytes in one row must always be adjusted to fit into the border of a multiple of four.
![Page 42: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/42.jpg)
Image Processing
Bitmap data:
In 1-bit mode every byte in the image data represents eight pixels. They are arranged from higher to lower bit for pixels from left to right.
In 4-bit mode every byte in the image data represents two pixels. The byte is split into the higher 4 bits and the lower 4 bits and each value of them points to a palette entry.
In 8-bit mode every byte represents a pixel. The value points to an entry in the color table.
In 24-bit mode, three bytes represent one pixel. The first byte represents the red part, the second the green and the third the blue part. No Color
Table
![Page 43: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/43.jpg)
Image Processing
Ôn tập, tự học, thực hành:
1. Khái niệm ảnh số. Mô tả ảnh xám, ảnh màu.
2. Một số bài toán trong xử lý ảnh số.
3. Một số ứng dụng của xử lý ảnh số.
4. Các bước chính trong một hệ thống xử lý ảnh.
5. Sự hình thành ảnh trong mắt người. Quá trình thu nhậnảnh. Số hóa ảnh.
6. Mô hình màu RGB, HSI và công thức chuyển đổi giữachúng.
7. Viết chương trình hiển thị ảnh, thay đổi màu của mộtsố điểm ảnh.
8. Viết chương trình biến đổi từ ảnh màu (đa sắc) sang ảnh xám (và ngược lại?).
![Page 44: Example of Digital image F 01 - Khoa CNTT-HVKTQS](https://reader031.fdocuments.net/reader031/viewer/2022022615/6218f40b0cf3e40ec2078e24/html5/thumbnails/44.jpg)
Image Processing
http://fit.mta.edu.vn/~tinhdt/cuorsesdetail-8-75.aspx
Nguồn tài liệu học tập: