トリミングした部分を​別の背景に元画像と同​じ座標に張り付けたい

3 visualizaciones (últimos 30 días)
takai
takai el 18 de Dic. de 2023
Respondida: COVAO el 13 de En. de 2024
コンクリートの床版画像を細かく分割して、分割したすべての画像をセマンティックセグメンテーションを用いてひび割れ部分を抽出するAIモデルにかけ、ひび割れ部分を抽出する。その後にひび割れ部分に色がついている分割された画像を黒の背景画像に元画像を同じ座標に張りつけて1枚の「ひび割れ部分(色付きの線)」「ひび割れがない部分(黒)」になっている画像を作成したい。AIモデルと元画像を分割しトリミングするところまでのスクリプトは完成しているが、トリミングした分割画像を黒背景に元の座標に張り付ける関数、スクリプトが分からないので教えてほしいです。

Respuestas (1)

COVAO
COVAO el 13 de En. de 2024
イメージデータの透明度AlphaDataを設定すると、画像を重ねて表示することができます。
下記に例があります。
MATLAB標準関数で、透明度を設定した画像表示の例です。
earth = imread('landOcean.jpg');
image(earth)
axis image
clouds = imread('cloudCombined.jpg');
image(clouds);
image(earth);
axis image;
hold on;
im = image(clouds);
alpha = 255*uint8( (clouds(:,:,1)+clouds(:,:,2)+clouds(:,:,3))/3 > 50 ); %Caluculate alpha data
im.AlphaData = alpha;
hold off;

Categorías

Más información sobre Read, Write, and Modify Image en Help Center y File Exchange.

Productos


Versión

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!