prewitt_dir prewitt_dir PrewittDir PrewittDir prewitt_dir (算子名称)
名称
prewitt_dir prewitt_dir PrewittDir PrewittDir prewitt_dir — Detect edges (amplitude and direction) using the Prewitt operator.
参数签名
def prewitt_dir (image : HObject) -> Tuple[HObject, HObject]
描述
prewitt_dir prewitt_dir PrewittDir PrewittDir PrewittDir prewitt_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:
A =
1 1 1
0 0 0
-1 -1 -1
B =
1 0 -1
1 0 -1
1 0 -1
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 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).
注意
Note that filter operators may return unexpected results if
an image with a reduced domain is used as input. Please refer to the
chapter 过滤器 .
运行信息
多线程类型:可重入(与非独占操作符并行运行)。
多线程作用域:全局(可以从任何线程调用)。
在元组级别自动并行化。
在图像通道级别自动并行化。
Automatically parallelized on domain level.
参数表
Image Image Image Image image image (input_object) (multichannel-)image(-array) → object HImage HObject HImage Hobject (byte / int2 / uint2)
Input image.
ImageEdgeAmp ImageEdgeAmp ImageEdgeAmp ImageEdgeAmp imageEdgeAmp image_edge_amp (output_object) (multichannel-)image(-array) → object HImage HObject HImage Hobject * (byte / int2 / uint2)
Edge amplitude (gradient magnitude) image.
ImageEdgeDir ImageEdgeDir ImageEdgeDir ImageEdgeDir imageEdgeDir image_edge_dir (output_object) (multichannel-)image(-array) → object HImage HObject HImage Hobject * (direction)
Edge direction image.
例程 (HDevelop)
read_image(Image,'fabrik')
prewitt_dir(Image,PrewittA,PrewittD)
threshold(PrewittA,Edges,128,255)
例程 (C)
read_image(&Image,"fabrik");
prewitt_dir(Image,&PrewittA,&PrewittD);
threshold(PrewittA,&Edges,128,255);
例程 (HDevelop)
read_image(Image,'fabrik')
prewitt_dir(Image,PrewittA,PrewittD)
threshold(PrewittA,Edges,128,255)
例程 (HDevelop)
read_image(Image,'fabrik')
prewitt_dir(Image,PrewittA,PrewittD)
threshold(PrewittA,Edges,128,255)
例程 (HDevelop)
read_image(Image,'fabrik')
prewitt_dir(Image,PrewittA,PrewittD)
threshold(PrewittA,Edges,128,255)
结果
prewitt_dir prewitt_dir PrewittDir PrewittDir PrewittDir prewitt_dir always returns 2 (
H_MSG_TRUE )
. If the input is empty
the behavior can be set via
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 ,
frei_dir frei_dir FreiDir FreiDir FreiDir frei_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
模块
Foundation