情報詳細Q:アノマリー検出実行後、dev_display_dl_dataによって表示されるカラーのヒートマップのオブジェクトを取得したいです。Windowハンドルからdump_window_imageで取る以外の形でできないでしょうか。A:dev_display_dl_data内にあるプロシージャ[add_colormap_to_image]で作成されておりますのでそちらの記述を抜き取ることで使用可能です。ヒートマップの色設定デフォルトの、良品青→NG赤 のHeatmapColorScheme := 'jet'の際の記述は以下の通りです。 apply_dl_model (DLModelHandle, DLSample, [], DLResult) * アノマリマップからヒートマップを付けたRGB画像を作成 get_dict_object (AnomalyImage, DLResult, 'anomaly_image') get_image_type (AnomalyImage, Type) scale_image_range (AnomalyImage, GrayValueImage, 0, 1) convert_image_type (GrayValueImage, GrayValueImage, 'byte') * X := [0:255] tuple_gen_const (256, 0, Low) tuple_gen_const (256, 255, High)* OffR := 3.0 * 64.0 OffG := 2.0 * 64.0 OffB := 64.0 A1 := -4.0 A0 := 255.0 + 128.0 R := min2(max2(abs(X - OffR) * A1 + A0,Low),High) G := min2(max2(abs(X - OffG) * A1 + A0,Low),High) B := min2(max2(abs(X - OffB) * A1 + A0,Low),High) * * lut_trans (GrayValueImage, ImageR, R) lut_trans (GrayValueImage, ImageG, G) lut_trans (GrayValueImage, ImageB, B) compose3 (ImageR, ImageG, ImageB, RGBValueImage) * get_dict_object (SamlpleImage, DLSample, 'image') image_to_channels (SamlpleImage, Channels) count_channels (SamlpleImage, NumChannels) gen_empty_obj (ChannelsScaled) for ChannelIndex := 1 to NumChannels by 1 select_obj (Channels, Channel, ChannelIndex) min_max_gray (Channel, Channel, 0, ChannelMin, ChannelMax, _) scale_image_range (Channel, ChannelScaled, ChannelMin, ChannelMax) convert_image_type (ChannelScaled, ChannelScaledByte, 'byte') concat_obj (ChannelsScaled, ChannelScaledByte, ChannelsScaled) endfor channels_to_image (ChannelsScaled, ImageByte) count_channels (ImageByte, NumChannels) if (NumChannels != 3) * Just take the first channel and use this to generate * an image with 3 channels for visualization. access_channel (ImageByte, ImageByteR, 1) copy_image (ImageByteR, ImageByteG) copy_image (ImageByteR, ImageByteB) compose3 (ImageByteR, ImageByteG, ImageByteB, ImageByte) endif add_image (ImageByte, RGBValueImage, RGBValueImage, 0.5, 0)添付ファイルAnomaly_MakeHeatMap.hdevタイトルアノマリー検出のヒートマップ画像を作りたいURL 名000007059公開状況公開済み検証状況公開済み