MATLAB ヘルプ センター
2-D convolution for HVX
Since R2026a
conv2DOut = QHVXIPCV.conv2d(Input,Mask)
conv2DOut = QHVXIPCV.conv2d(Input,Mask) performs a 2-D convolution of the input matrix Input with the structuring element Mask for Hexagon® Vector eXtension.
conv2DOut
Input
Mask
example
collapse all
This example uses:
Create a unit8 matrix. Specify the width of the input matrix as a multiple of 128.
unit8
H = 128; W = 128; A = uint8(rand(H, W));
Create the mask with kernel sizes 3, 5, and 7.
mask3x3 = int8([ 1 2 1;0 0 0;-1 -2 -1 ]); mask5x5 = int8([1 2 3 2 1;... 2 4 5 4 2;... 3 5 6 5 3;... 2 4 5 4 2;... 1 2 3 2 1]); mask7x7 = int8([0 0 1 2 1 0 0;... 0 1 2 3 2 1 0;... 1 2 3 4 3 2 1;... 2 3 4 5 4 3 2;... 1 2 3 4 3 2 1;... 0 1 2 3 2 1 0;... 0 0 0 1 2 1 0]);
Perform convolution of the input matrix and the masks.
out3 = QHVXIPCV.conv2d(A, mask3x3); out5 = QHVXIPCV.conv2d(A, mask5x5); out7 = QHVXIPCV.conv2d(A, mask7x7);
2-D input, specified as a matrix whose width is a multiple of 128. The height of the matrix must be greater than or equal to the mask size.
Data Types: uint8
uint8
Structuring element, specified as a 2-D square matrix of size 3, 5, or 7.
Data Types: int8
int8
Convolution output of the input matrix and the mask, returned as a matrix.
Introduced in R2026a
HVX Conv2D
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
ヨーロッパ
アジア太平洋地域
最寄りの営業オフィスへのお問い合わせ