Micono RbImageFilterUtil v0.9.0b1
for REALbasic 2 plugin

プラグインは1999/12/28にアップロードしました。

[ダウンロード]


RbImageFilterUtilについて

画像処理のためのメソッドをまとめたREALbasic 2用のpluginです。
  • インバート、スレッシュホールド、コントラスト&ブライトネス、トーンカーブを用いたコントラスト変換、ポスタリゼーション、輝度演算、画像演算などの変換処理
  • スムージング、シャープ、エッジ、シャドウなど、約25種類のフィルタ処理

変更点(->0.9.0b1)

  • GrayscaleのPictureを得るメソッドを追加


使い方

インバート

g.mic_Invert( TargetColor as Integer ) as Integer

g: Graphics
戻り値: 0以外はエラー

 

スレッシュホールド

g.mic_Threshold( LowThresh as Integer, HiThresh as Integer, obscure as Integer, TargetColor as Integer ) as Integer

g: Graphics
戻り値: 0以外はエラー

コントラスト&ブライトネス

g.mic_ChangeContrast( a as Double, b as Double, TargetColor as Integer ) as Integer

g: Graphics
戻り値: 0以外はエラー

使い方:
pic.graphics.mic_ChangeContrast a, b, c

y=ax+bで輝度を変換します(X:入力、Y:出力)。
例えば、a=-1, b=255の場合、画像の輝度が反転します。
赤と青だけのコントラストを変える場合の例:c = &h1 + &h4

トーンカーブを用いたコントラスト変換

g.mic_CurveMapping( CurveMap as String, TargetColor as Integer ) as Integer

g: Graphics
戻り値: 0以外はエラー

CurveMap:1文字目〜256文字目の値が、入力0〜255に対する出力に相当します。

グレースケールの画像を得る

g.mic_Grayscale as Picture

g: Graphics

ポスタリゼーション

g.mic_Posterization( Resolution as Integer, TargetColor as Integer ) as Integer

g: Graphics
戻り値: 0以外はエラー

輝度演算

g.mic_ImageArithmetic( Operator as Integer, value as Double, TargetColor as Integer ) as Integer

g: Graphics
戻り値: 0以外はエラー

Operator:

0: Add

1: Minus

2: Multiple

3: Division

画像演算 ※グローバルメソッド

mic_ImageMath( ImageA as Graphics, ChnannelA as Integer, Operator as Integer, ImageB as Graphics, ChnannelB as Integer ) as Picture

Operator:

0: Add

1: Minus

2: Multiple

3: Division

スムージング、シャープ、エッジ、シャドウなどのフィルタ処理

g.mic_ImageFilter( FilterType as Integer, Weight as Double, TargetColor as Integer ) as Integer

g: Graphics
戻り値: 0以外はエラー

FilterType:

FindEdges (conventionalType) = 0

Roberts FindEdges = 1

Sobel FindEdges = 2

Laplacian1 FindEdges = 3

Laplacian2FindEdges = 4

Laplacian3FindEdges = 5

Reduce Noise = 6

MinRankFilter = 7

MaxRankFilter = 8

WeightedAvg = 9

Dither = 10

Sharpen (conventional) = 11

Roberts Sharpen = 12

Sobel Sharpen = 13

Laplacian1 Sharpen = 14

Laplacian2 Sharpen = 15

Laplacian3 Sharpen = 16

f Sharpen = 17

Shadow North = 18

Shadow Northeast = 19

Shadow East = 20

Shadow Southeast = 21

Shadow South = 22

Shadow Southwest = 22

Shadow West = 23

Shadow Northwest = 24

targetColor, ChnannelA, ChnannelB

赤:

&h1

緑:

&h2

青:

&h4

例:赤と青

&h1+&h4 = 5


免責と著作

 


サポート


Copyright 1999, Micono Utilities. All rights reserved.