目次
Table of Contents |
---|
...
MathWorksアカウント画面へ
MATLAB(Individual)の右の下矢印を押してダウンロード画面へ
※この際に画面左のリリースを選択からR2022aを選択します。{Windows, Mac, Linux}用ダウンロードを押してMATLAB R2022aのダウンロードを開始します。
...
input_img.pngをC:\Users\ユーザー名\Documents\MATLABに移す。MATLABに保存する。
移動したファイルが画像左の現在のフォルダーに表示されていれば成功。保存したファイルが画像左の現在のフォルダーに表示されていれば成功。
...
並列処理ありの場合
Code Block tic % Start stopwatch timer % Input image input_img = "input_img.jpg"; % Add image path % Initialize Edge detection function fun = @(block_struct) edge(block_struct.data,"canny"); % Covert source image from RGB to GRAY input_image= rgb2gray(imread(input_img)); % Perform Parallel Block Process result = blockproc(input_image,[25 25],fun, ... 'UseParallel',true); toc % Terminate stopwatch timer % Show ouput image imshow(result)
並列処理なしの場合
Code Block tic % Start stopwatch timer % Input image input_img = "input_img.jpg"; % Add image path % Initialize Edge detection function fun = @(block_struct) edge(block_struct.data,"canny"); % Covert source image from RGB to GRAY input_image= rgb2gray(imread(input_img)); % Perform Parallel Block Process result = blockproc(input_image,[25 25],fun, ... 'UseParallel',false); toc % Terminate stopwatch timer % Show ouput image imshow(result)
処理時間の比較(単位:秒)
...