Skip to content
Branch: master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.

Readme.md

OpticsCompensation_s

Packagist

※ このエフェクトはOpenCLを使用しているため、対応しているデバイスをお持ちでない場合は動作しません。

ビルド

cmake_batch.shのcmake_install_pathにDLLとスクリプトをインストールしたいディレクトリ、lua_include_dirlua_library_dirにそれぞれLuaのヘッダとライブラリのディレクトリをそれぞれ指定し、

$ mkdir build
$ cd build
$ ../cmake_batch.sh msvc

でビルド用のプロジェクトを生成できます。
MSBuild.exeがあるディレクトリをPATHに追加済みの場合は、Visual Studioを起動しなくても、

$ ../msvc_build.sh install

でビルドとインストールができます。

スクリプト内での呼び出し

このDLLの関数は、事前にobj.putpixeldata()の呼び出し等の前準備を必要としません。画像の取得などの下準備から処理後のデータの仕上げまですべてDLL内で完結しています。
実際の呼び出しは、

require("OpticsCompensation_s")
OpticsCompensation_s.OpticsCompensation(amount, anti_aliasing, offset_x, offset_y)

のようになります。らくちん。

関数

このDLLモジュールに含まれている関数です。

OpticsCompensation(amount, anti_aliasing, offset_x, offset_y)

OpticsCompensationのメインの関数です。これを呼び出すとレンズ補正のエフェクトがかかった状態になります

引数

  • amount : float
    レンズ補正の変化量 +の時は樽型
    -の時は糸巻き型
  • anti_aliasing : bool
    trueにすると樽型時にアンチエイリアスが有効になる
  • offset_x : float
    中心点のX方向のオフセット
  • offset_y : float
    中心点のY方向のオフセット

About

No description, website, or topics provided.

Resources

License

You can’t perform that action at this time.