8.51. 境界の平均色...

8.51.1. 概観

図16.221 境界の平均色フィルターの使用例

「境界の平均色」フィルターの使用例

元画像

「境界の平均色」フィルターの使用例

Foreground color in the Toolbox after applying the Border Average filter


This plug-in calculates the most often used color in a specified border of the active layer or selection. It can gather similar colors together so that they become predominant. The calculated color becomes the foreground color in the Toolbox. This filter is interesting when you have to find a Web page color background that differs as little as possible from your image border. The action of this filter is not registered in Undo History and can't be undone with Ctrl+Z: it doesn't modify the image.

[注記] 注記

This command only works on RGB images. If the image is Grayscale or Indexed, the menu entry is disabled.

8.51.2. Activating the Filter

This filter is found in the main menu under ColorsInfoBorder Average….

8.51.3. オプション

図16.222 Options of the Border Average filter

Options of the 「Border Average」 filter

境界サイズ

The border Thickness in pixels.

色数

バケツサイズ は合算の対象となる同系色の色数に上限を設ける際に参考にされます。 バケツサイズ値が低い (つまりバケツの数が多い) ときは平均的な色を適度な精密さで算出できます。 ちなみに適度な精密さといっても良好な結果に必ずしも結びつきません。 (つぎの例をご覧ください。)

8.51.4. 境界の平均色フィルターの性質が現れる例

図16.223 元画像

元画像

平均色抽出に供される例図。 使用された色は純赤 (255,0,0)、 純青 (0,0,255)、 ならびに緑系の 4 色 (0,255,0)、 (63,240,63)、 (48,224,47)、 (0,192,38)。


図16.224 バケツサイズ値を 8 に設定

「バケツサイズ値」を 8 に設定

結果として赤 (254,2,2) を得る


The bucket size is low. So the bucket number is high. All color shades can be stored in different buckets. Here, the bucket containing red is the most filled. The resulting color is a nearly pure Red (254,2,2) and becomes the foreground color in the Toolbox.

図16.225 バケツサイズ値を 64 に設定

「バケツサイズ値」を 64 に設定

結果として緑 (32,224,32) を得る


バケツサイズ値が高くなったのでバケツの総数は減りました。 似た色 (ここでは緑) は同じバケツに入ります。 すなわち緑系の色を収めたバケツが最もかさ高くなります。 このバケツ内の色はいずれも 8 ビットコードで見ると (00******,11******,00******) のようにはじめの 2 ビットが同じです。 残りの 6 ビットはどのチャンネルでも 000000 から 111111 (0から64) までの範囲があります。 つまりこのバケツ内では赤のチャンネルなら 0 から 63 の範囲、 緑のチャンネルなら 192 から 255 の範囲、 青のチャンネルなら 0 か 63 の範囲の値がありえます。 このようなチャンネル値の下限と上限の平均を求め、 赤 (63 + 0)/2、 緑 (255 + 192)/2、 青 (63 + 0)/2 から得た緑 (32,224,32) が答えとなります。