*OpenCV/Patch to support WebP format on OpenCV 2.2 [#j53a5298]
#multilang(ja){{
**概要 [#ufc49a56]
OpenCV 2.2でWebP形式のフォーマットを扱えるようにするパッチです.&br;
※[[こちら:http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.2/]]で配布されているOpenCV-2.2.0-win.zipを対象としたパッチです.
**ダウンロード [#q861d79e]
|Version|Filename|Size|Date|Type|Download|
|BGCOLOR(white):1.0|BGCOLOR(white):opencv2.2_webp_enable_patch_20110420.zip|BGCOLOR(white):12.4 KB|BGCOLOR(white):20110420|BGCOLOR(white):zip|BGCOLOR(white):[[http://www.atinfinity.info/img/download.gif:http://www.atinfinity.info/opencv/extension/opencv2.2_webp_enable_patch_20110420.zip]]|
|BGCOLOR(white):1.1|BGCOLOR(white):opencv2.2_webp_enable_patch_20110423.zip|BGCOLOR(white):12.5 KB|BGCOLOR(white):20110423|BGCOLOR(white):zip|BGCOLOR(white):[[http://www.atinfinity.info/img/download.gif:http://www.atinfinity.info/opencv/extension/opencv2.2_webp_enable_patch_20110423.zip]]|

**変更履歴 [#db4f1264]
|Version|Date|変更内容|
|BGCOLOR(white):1.0|BGCOLOR(white):20110420|BGCOLOR(white):新規作成|
|BGCOLOR(white):1.1|BGCOLOR(white):20110423|BGCOLOR(white):Linuxでビルドできない問題に対応|

**使い方 [#n51b2068]
+上記リンクからopencv2.2_webp_enable_patch_20110423.zipをダウンロードして展開します.
+展開したmodulesディレクトリをOpenCVのmodulesディレクトリに上書きします.
+[[こちら:http://code.google.com/intl/ja/speed/webp/download.html]]から''Precompiled WebP utilities and library''をダウンロードします.
※執筆時の最新版はlibwebp-0.1.2-windows.zip
+libwebp-0.1.2-windows.zipを展開します.
+dev\Libにある''libwebp_a.lib''を下記ディレクトリにコピーします.
 3rdparty\lib
+dev\Includeにあるwebpディレクトリを下記ディレクトリにコピーします.
 3rdparty\include
+OpenCVをCMakeを用いてビルドします.

&br;Linux,Macに適用する場合には,パッチ(下記ファイル)の改行コードをあらかじめnkfコマンド等でLFに変換して下さい.
-opencv2.2_webp_enable_patch_20110423\modules\highgui\include\opencv2\highguihighgui_c.h
-opencv2.2_webp_enable_patch_20110423\modules\highgui\include\opencv2\highgui\highgui_c.h
-opencv2.2_webp_enable_patch_20110423\modules\highgui\src\grfmt_webp.cpp
-opencv2.2_webp_enable_patch_20110423\modules\highgui\src\grfmt_webp.hpp
-opencv2.2_webp_enable_patch_20110423\modules\highgui\src\grfmts.hpp
-opencv2.2_webp_enable_patch_20110423\modules\highgui\src\loadsave.cpp

**おまけ [#s6bb0a4d]
下記のような設定をすることで圧縮時のquality(0~100)を指定できます.
※例では最大の100を指定.

 int param[2];
 param[0] = CV_IMWRITE_WEBP_QUALITY;
 param[1] = 100;
 cvSaveImage("img.webp", img, &param[0]);

**制限事項 [#j0d18270]
-Windows 32bit,Linux 32bit,Mac OS X 10.6 64bitのみで検証.
-保存対象画像となるdepthは8Uのみです
-64bitのビルド済みWebPライブラリは配布されていないため自身でビルドが必要です
--[[ソース:http://code.google.com/p/webp/downloads/detail?name=libwebp-0.1.2.tar.gz]]
--[[ビルド方法:http://code.google.com/intl/ja/speed/webp/docs/compiling.html]]
}}
#multilang(en){{
**Abstract
This page describes the method to use WebP format on OpenCV 2.2.&br;
This patch is intended for OpenCV-2.2.0-win.zip in [[Official Release:http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.2/]].

**Download
|Version|Filename|Size|Date|Type|Download|
|BGCOLOR(white):1.0|BGCOLOR(white):opencv2.2_webp_enable_patch_20110420.zip|BGCOLOR(white):12.4 KB|BGCOLOR(white):20110420|BGCOLOR(white):zip|BGCOLOR(white):[[http://www.atinfinity.info/img/download.gif:http://www.atinfinity.info/opencv/extension/opencv2.2_webp_enable_patch_20110420.zip]]|
|BGCOLOR(white):1.1|BGCOLOR(white):opencv2.2_webp_enable_patch_20110423.zip|BGCOLOR(white):12.5 KB|BGCOLOR(white):20110423|BGCOLOR(white):zip|BGCOLOR(white):[[http://www.atinfinity.info/img/download.gif:http://www.atinfinity.info/opencv/extension/opencv2.2_webp_enable_patch_20110423.zip]]|

**ChangeLog
|Version|Date|Changes|
|BGCOLOR(white):1.0|BGCOLOR(white):20110420|BGCOLOR(white):First Release|
|BGCOLOR(white):1.1|BGCOLOR(white):20110423|BGCOLOR(white):Fixed the problem to build on Linux|

**Usage
+Please download opencv2.2_webp_enable_patch_20110423.zip. And,extract this file.
+Please overwrite the patch's modules directory to OpenCV/modules.
+Please download ''Precompiled WebP utilities and library'' from [[Official page:http://code.google.com/intl/ja/speed/webp/download.html]].
When I described this page, latest WebP Library is libwebp-0.1.2-windows.zip.
+Please extract libwebp-0.1.2-windows.zip.
+Please copy to the following directory from ''libwebp_a.lib'' in dev\Lib.
 3rdparty\lib
+Please copy to the following directory from ''webp directory'' in dev\Include.
 3rdparty\include
+Please build OpenCV using CMake

&br;If you want to apply this patch to OpenCV-2.2.0.tar.bz2(Linux or Mac), please convert newline character of these file to LF from CRLF.

-opencv2.2_webp_enable_patch_20110423\modules\highgui\include\opencv2\highguihighgui_c.h
-opencv2.2_webp_enable_patch_20110423\modules\highgui\include\opencv2\highgui\highgui_c.h
-opencv2.2_webp_enable_patch_20110423\modules\highgui\src\grfmt_webp.cpp
-opencv2.2_webp_enable_patch_20110423\modules\highgui\src\grfmt_webp.hpp
-opencv2.2_webp_enable_patch_20110423\modules\highgui\src\grfmts.hpp
-opencv2.2_webp_enable_patch_20110423\modules\highgui\src\loadsave.cpp

**Tips
You can specify the compression quality(min:0, max:100) by the following settings.

 int param[2];
 param[0] = CV_IMWRITE_WEBP_QUALITY;
 param[1] = 100;
 cvSaveImage("img.webp", img, &param[0]);

**Limitation
-I have only tested this environment.
--Windows 32bit
--Linux 32bit
--Mac OS X 10.6 64bit
-Save image depth supports 8U only.
-If your environment is 64bit, you need to build WebP library yourself.
--[[source:http://code.google.com/p/webp/downloads/detail?name=libwebp-0.1.2.tar.gz]]
--[[build method:http://code.google.com/intl/ja/speed/webp/docs/compiling.html]]

}}

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS