图像增强函数我要分享

Image enhancement function

关注次数: 200

下载次数: 1

文件大小: 1.22 kB

代码分类: 其他

开发平台: matlab

下载需要积分: 2积分

版权声明:如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

代码描述

中文说明:使用 MATLAB 构造函数 Filter_1,实现对一张灰度图像的边缘检测操作。要求 Filter_1 的输入包括三个变量:I、Operator、Option。其中 I 为待处理的灰度图像,Operator 包含两个选项:Kirsch 算子和 Sobel 算子,他们的定义如图 1 所示。Option 包含两个选项:取最大和取和,这一操作仅对 sobel 算子有效,代表着算子不同方向分量滤波后的结果是取最大值还是直接求和,即max( , ) f f   。而根据 Kirsch 算子的定义,在八个方向的分量分别滤波后应该是取最大值,即Filter_1 的输出为一幅经过边缘检测后的边缘强度图像(注意输出结果应该是一张灰度图像,不应该直接输出边界的二值图)。


English Description:

Using MATLAB constructor filter_ 1. Realize the edge detection of a gray image. Filter required_ The input of 1 includes three variables: I, operator and option. Where I is the gray image to be processed, and the operator includes two options: Kirsch operator and Sobel operator. Their definitions are shown in Figure 1. Option contains two options: take the maximum sum and take the sum. This operation is only valid for Sobel operator, which means whether the filtering results of different direction components of the operator take the maximum or directly sum, that is, max (,) f . According to the definition of Kirsch operator, after filtering the components in eight directions, it should take the maximum value, namely filter_ 1 is an edge intensity image after edge detection (note that the output result should be a gray image, not a binary image of the boundary).


代码预览

相关推荐