frei_dir frei_dir FreiDir FreiDir frei_dir (算子)
名称
frei_dir frei_dir FreiDir FreiDir frei_dir — 使用弗雷陈(Frei-Chen)算子检测边缘(振幅和方向)。
签名
def frei_dir (image : HObject) -> Tuple[HObject, HObject]
描述
frei_dir frei_dir FreiDir FreiDir FreiDir frei_dir calculates an approximation of the first
derivative of the image data and is used as an edge detector. The
filter is based on the following filter masks:
The result image contains the maximum response of the masks A and
B. The edge directions are returned in ImageEdgeDir ImageEdgeDir ImageEdgeDir ImageEdgeDir imageEdgeDir image_edge_dir ,
and are stored in 2-degree steps, i.e., an edge direction of
x degrees in mathematically positive sense and
with respect to the horizontal axis is stored as
x / 2 in the edge direction image. Furthermore, the
direction of the change of intensity is taken into account. Let
denote the image gradient. Then the
following edge directions are returned as r/2:
Points with edge amplitude 0 are assigned the edge direction 255
(undefined direction).
注意
请注意,若使用域缩减后的图像作为输入,滤波器算子可能会返回意外结果。请参阅 滤波器 一章
执行信息
多线程类型:可重入(与非独占算子并行运行)。
多线程作用域:全局(可从任何线程调用)。
在元组级别上自动并行化。
在通道级别上自动并行化。
在域级别上自动并行化。
参数
Image Image Image Image image image (输入对象) (multichannel-)image(-array) → object HImage HObject HImage Hobject (byte / int2 / uint2)
输入图像。
ImageEdgeAmp ImageEdgeAmp ImageEdgeAmp ImageEdgeAmp imageEdgeAmp image_edge_amp (输出对象) (multichannel-)image(-array) → object HImage HObject HImage Hobject * (byte / int2 / uint2)
Edge amplitude (gradient magnitude) image.
ImageEdgeDir ImageEdgeDir ImageEdgeDir ImageEdgeDir imageEdgeDir image_edge_dir (输出对象) (multichannel-)image(-array) → object HImage HObject HImage Hobject * (direction)
Edge direction image.
示例(HDevelop)
read_image(Image,'fabrik')
frei_dir(Image,Frei_dirA,Frei_dirD)
threshold(Frei_dirA,Res,128,255)
示例(C)
read_image(&Image,"fabrik");
frei_dir(Image,&Frei_dirA,&Frei_dirD);
threshold(Frei_dirA,&Res,128,255);
示例(HDevelop)
read_image(Image,'fabrik')
frei_dir(Image,Frei_dirA,Frei_dirD)
threshold(Frei_dirA,Res,128,255)
示例(HDevelop)
read_image(Image,'fabrik')
frei_dir(Image,Frei_dirA,Frei_dirD)
threshold(Frei_dirA,Res,128,255)
示例(HDevelop)
read_image(Image,'fabrik')
frei_dir(Image,Frei_dirA,Frei_dirD)
threshold(Frei_dirA,Res,128,255)
结果
frei_dir frei_dir FreiDir FreiDir FreiDir frei_dir 始终返回 2 ( H_MSG_TRUE )。 如果输入为空则可设置行为通过 set_system('no_object_result',<Result>) set_system("no_object_result",<Result>) SetSystem("no_object_result",<Result>) SetSystem("no_object_result",<Result>) SetSystem("no_object_result",<Result>) set_system("no_object_result",<Result>) 。如有必要,则抛出异常。
可能的前趋
binomial_filter binomial_filter BinomialFilter BinomialFilter BinomialFilter binomial_filter ,
gauss_filter gauss_filter GaussFilter GaussFilter GaussFilter gauss_filter ,
sigma_image sigma_image SigmaImage SigmaImage SigmaImage sigma_image ,
median_image median_image MedianImage MedianImage MedianImage median_image ,
smooth_image smooth_image SmoothImage SmoothImage SmoothImage smooth_image
可能的后继
hysteresis_threshold hysteresis_threshold HysteresisThreshold HysteresisThreshold HysteresisThreshold hysteresis_threshold ,
threshold threshold Threshold Threshold Threshold threshold ,
gray_skeleton gray_skeleton GraySkeleton GraySkeleton GraySkeleton gray_skeleton ,
nonmax_suppression_dir nonmax_suppression_dir NonmaxSuppressionDir NonmaxSuppressionDir NonmaxSuppressionDir nonmax_suppression_dir ,
close_edges close_edges CloseEdges CloseEdges CloseEdges close_edges ,
close_edges_length close_edges_length CloseEdgesLength CloseEdgesLength CloseEdgesLength close_edges_length
替代
edges_image edges_image EdgesImage EdgesImage EdgesImage edges_image ,
sobel_dir sobel_dir SobelDir SobelDir SobelDir sobel_dir ,
robinson_dir robinson_dir RobinsonDir RobinsonDir RobinsonDir robinson_dir ,
prewitt_dir prewitt_dir PrewittDir PrewittDir PrewittDir prewitt_dir ,
kirsch_dir kirsch_dir KirschDir KirschDir KirschDir kirsch_dir
另见
bandpass_image bandpass_image BandpassImage BandpassImage BandpassImage bandpass_image ,
laplace_of_gauss laplace_of_gauss LaplaceOfGauss LaplaceOfGauss LaplaceOfGauss laplace_of_gauss
模块
基础