图像处理实验指导书(英文)

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

实验一数字图像的基本认识

Experiment 1 Introduction of Digital Image

I. experimental purpose.

1. Be familiar with the file structure of different types of images, and master the reading and writing process of image files.

2. Master the calculation methods of various statistical indicators of images.

II. Experimental principle.

1. Basic types of images.

In the computer, the image can be divided into binary image, grayscale image and true color RGB image according to the color and grayscale.

2. Discrete convolution

For discrete sequences, convolution can be obtained by a similar method to continuous functions. Therefore, the convolution formula of two sequences with two lengths m and n is:

The above formula gives an output sequence of length. Discrete convolution and continuous convolution in digital image have almost corresponding properties, which can be described by continuous convolution.

3. Gray histogram.

Gray histogram is a function of grayscale, describes the image with the number of pixel grayscale the abscissa is grayscale, ordinate is the frequencies of the gray scale (the number of pixels). It is worth noting that the histogram only reflects the frequency of different grayscale values in the image, and does not reflect the location of a gray value pixel. Different images may have the same histogram; The sum of the histogram of each subregion of an image is equal to the histogram of the graph.

预备知识:

读取图像:F=imread(’e:\图片.jpg’)

显示图像:imshow(f)

返回指定点的坐标和颜色值:[c r p]=impixel(f)

RGB彩色图像转换为灰度图像:rgb2gray(x)

灰度图像转换为二值图像:im2bw(x)

图像滤波(图像与模板卷积):imfilter(x1,w,'replicate'),或用P填充边界

获得图像直方图:imhist(f)

三、实验题目

1. 编制一个程序,读取位图并显示在屏幕上,将图像数据化并显示结果,学会如何返回指定点的像素坐标。

2. 编制一个程序,将RGB彩色图像转换为灰度图像,将灰度图像转换为二值图像。

3. 编制一个程序,实现二维离散卷积,用于对图像滤波。

4. 编制一个程序,对任意图像统计灰度值,并在屏幕上绘出直方图。

四、实验步骤

1.编写程序。

2.调试程序。

3.写出程序运行结果。

五、实验要求

1. 提交题目1、2的源程序清单、程序流程图及代码各部分的详细说明。

2. 提交题目3的原始图像和直方图结果。

实验二数字图像的基本运算

Experiment 2 Operation of Digital Image

I. experimental purpose.

1. Understand the concepts of point operation, algebraic operation and geometric operation.

2. Grasp the basic methods of grayscale transformation, gradient amplitude and geometric transformation.

II. Experimental principle.

1. The point of operation

In image processing, point arithmetic is a simple but important class of technology that allows users to change the gray scale of image data. For an input image, an output image is generated by the point operation, and the grayscale value of each pixel in the output image is determined only by the corresponding input pixel value. Point, therefore, operation is not possible to change the image spatial relations, operation point is sometimes referred to as contrast enhancement or gray-scale transformation, image is digital software and an important part of the image display software. The application of point operation is very wide, which can be used for contrast enhancement, photometric calibration, display calibration and cropping.

2. Algebraic operation

Algebraic operation is the operation of the output image by adding, subtracting, multiplying and dividing the two input images. The mathematical expressions of the four image processing algebraic operations are as follows:

)

,

(

)

,

(

)

,

(y

x

B

y

x

A

y

x

C+

=

)

,

(

)

,

(

)

,

(y

x

B

y

x

A

y

x

C-

=

)

,

(

)

,

(

)

,

(y

x

B

y

x

A

y

x

C⨯

=

)

,

(

)

,

(

)

,

(y

x

B

y

x

A

y

x

=

Where

)

,

(y

x

A and)

,

(y

x

B are input images, and)

,

(y

x

C is the output image.

The image gradient function can be obtained by subtracting the image. Gradient is a vector function, and the gradient range can be obtained from the following approximation:

|)

)1

,

(

)

,

(

||,)

,1

(

)

,

(

max(|

|)

,

(

|+

-

+

-

∇y

x

f

y

x

f

y

x

f

y

x

f

y

x

f

In other words, the gradient is the largest of the absolute value of the difference between adjacent pixels in the horizontal direction and the absolute value of the difference between the adjacent pixels in the vertical direction.

3. Geometric operation

Geometrical operation can change the spatial position relation between objects in the image, which can be regarded as moving objects in the image.

A geometric operation requires two separate algorithms. First, an algorithm is needed to define the spatial transform itself, which describes how each pixel moves from its initial position to the termination position, namely the motion of each pixel. At the same time, an algorithm is needed for the gray level interpolation. This is because, in general, the position coordinates of the input image are integers, and the position coordinates of the output image are not integers, and vice versa.

The control point method is to determine the coefficient of the coordinate transformation equation by determining the displacement of certain coordinate points. If known input images and output images corresponding points on displacement of (that is, the control points of), can use these known control points of the coordinate transformation equation coefficient, and to determine the relations of coordinate transformation.

一、实验题目

相关文档
最新文档