BitmapData#threshold

7月 3, 2012 by · Leave a Comment
Filed under: Coding の素 
Bookmark this on Delicious
[`livedoor` not found]
[`yahoo` not found]

少しでも時間を置くとすぐに忘れてしまう BitmapData#threshold について、いいかげん非効率も甚だしいんで、今ここで備忘録としてエントリー。
書式は以下。

public function threshold(
  sourceBitmapData : BitmapData,
  sourceRect       : Rectangle,
  destPoint        : Point,
  operation        : String,
  threshold        : uint,
  color            : uint    = 0,
  mask             : uint    = 0xFFFFFFFF,
  copySource       : Boolean = false
):uint

threshold() メソッドで押さえとくべきツボは何といっても第7引数 mask。
あと、その第7引数に指定した値によって、第5引数 threshold も若干の注視が必要になるってところでしょうか。
それ以外の引数は取り立てて問題はないですね。

Read more

再び、判別分析法による閾値の自動計算について(2)

1月 20, 2012 by · Leave a Comment
Filed under: AS 
Bookmark this on Delicious
[`livedoor` not found]
[`yahoo` not found]

最近ネットで見つけた「大津の二値化画像」というページに書いてある判別分析法による閾値の自動計算方法が、著しく少ないループ回数で済んでいる、という話の続き。前回はこちら

Read more

再び、判別分析法による閾値の自動計算について(1)

1月 20, 2012 by · Leave a Comment
Filed under: Coding の素 
Bookmark this on Delicious
[`livedoor` not found]
[`yahoo` not found]

以前、画像を二値化するときの閾値の計算で算出する「判別分析法」(またの名を「大津の二値化」)なるものについて学びました

そのとき参考にしたのは「実践画像処理入門」という本で、P69~71に記載された C のコードを ActionScript に移植しました。

Read more

DisplacementMapFilter の計算を実感してみた

8月 11, 2011 by · Leave a Comment
Filed under: AS 
Bookmark this on Delicious
[`livedoor` not found]
[`yahoo` not found]

久しぶりに ActionScript の話題。

Read more

« 前ページへ