GpuCV: GPU-accelerated Computer Vision のメモ

ファイル入手と展開

  • まず本家らしいサイトから入手する
    • 私の環境ではアクセス時,証明書エラーが発生した.証明書を取得し,今回だけ許可してやるぜって設定で接続した
  • 2007年10月22日付 v0.4.1 rev 175 beta の Windows binary を入手した.ファイル名は GPUCV_v0.4.1_rev175_bin_win32.exe
    • MD5 は a32d5a8d7661da07c472a59c74ab2c61 だった
  • Windows Vista にインストールする.D:\Develop\GPUCV に展開させた
    • Finish 画面の Run ... をチェックした場合,展開先をエクスプローラで開く.こうなるのなんてわかんねーよ.Open by explorer とか書けよ
    • D:\Develop\GPUCV\Uninstall.exe でアンインストールできるだろう

動かしてみる

  • D:\Develop\GPUCV\runGpuCVConsole.bat を管理者権限で実行してみる
  • 入力待ちになったところで,add だとか avg だとか打ち込んでやる
  • 画像が表示されたりするが,cvWaitkey() で待っているみたい.any key を押すとコンソールに戻る
  • 実行後,結果が表示される.出てくる数字はミリ秒の処理時間なんだろうか.GPU > CV なんだけど,GPU 遅えええええって読んでいいのだろうか?
D:\Develop\GPUCV>echo off
======================================
Starting GpuCV
==============
Major version:  0.4
Minor revision:         172
Release date:   2007/10/23 16:51:16
Web URL:        https://picoforge.int-evry.fr/cgi-bin/twiki/view/Gpucv/Web/WebHo
me
======================================
Ready for GLSL
Unable to set
FrameBufferObject init : Ok
FrameBufferObjects are compatible...

OpenGL compatible extensions :
        1       GLEW_ARB_pbuffer
        1       GLEW_EXT_framebuffer_object
        1       GLEW_EXT_pixel_buffer_object
        1       GL_ARB_vertex_buffer_object
        1       GLEW_ARB_texture_rectangle
        1       GLEW_ARB_texture_non_power_of_two
        1       WGL_NV_render_depth_texture
        1       GL_ARB_fragment_shader
        1       GL_ARB_vertex_shader
        1       GL_ARB_occlusion_query
        1       GL_ARB_draw_buffers(MultipleRenderTarget)
        8       MultipleRenderTarget max target.
        0       WGL_NV_gpu_affinity.
        1       GLEW_SGIS_texture_lod.
        1       WGL_ATI_render_texture_rectangle
        1       WGL_ATI_pixel_format_float

InitDone

loading default Images...
done!
GpuCVConsole Application: enter 'h' to get the list of available commands.

>h


-------- Welcome to the cvGPU sample testing interface ---------
List of available cvgxxxx operators for testing :
===<cvCore.h> operators ========
 'convertscale'  : cvgConvertScale()
 'add'   : cvgAdd()
 'addscale'      : cvgScaleAdd()
 'adds'  : cvgAddS()
 'addsmask'      : cvgAddS()
 'avg'   : cvgAvg()
 'clone'         : cvgClone()
 'copy'  : cvgCopy()
 'copymask'      : cvgCopy()
 'div #float'    : cvgDiv(float factor)
 'matmul #float'         : cvgMatMul(float factor)
 'matmuladd #float #float'       : cvgMatMulAdd(float factor1, float factor2)
 'max'   : cvgMax()
 'maxs'  : cvgMaxs()
 'min'   : cvgMin()
 'mins'  : cvgMinS()
 'mul #float'    : cvgMul(float factor)
 'pow #double'   : cvgPow(double factor)
 'split'         : cvgSplit()==cvgCvtPixToPlane()
 'sum'   : cvgSum()
 'sub'   : cvgSub()
 'subs'  : cvgSubS()
 'subrs'         : cvgSubS()
 'subsmask'      : cvgSubS()
 'subrsmask'     : cvgSubS()
===============================
===<cv.h> operators========
 'cvtcolor #code[1-?]'   : cvgCvtColor()
 'dilate'        : dilate()
 'erode'         : erode()
 'resize ()'     : Test cvgResize operator()
 'resizefct ()'  : Test cvgResizeGLSLFct operator()
 'threshold #threshold_value #max_value #type(1-5)'      : threshold()
 'dist'  : distance transform cvgDistTransform()
 'histo'         : cvgHisto()
===============================
===other operators========
 'avg'   : cvgAvg()
 'isdiff'        : cvgIsDiff()
 'tocpu'         : cvgSetLocation(CPU)
 'togpu'         : cvgSetLocation(GPU)
 'stats'         : Calculate image stats like Min/Max/Average
=== global command========


List of action for benchmarking:
 'loopnbr #loop'         : define the loop number for benchmark
 'load #ImgId(1-2) #ImgFileName'         : load a new source image()
 'resizeimg #width #height'      : resize both source image to width and height(
)
 'benchmode'     : switch GpuCV to benchmarking mode, disabling error/warning/de
bug output and internal profiling.
 'runbench #loopnbr'     : Run a benchmark with all the operators()
 'clearbench'    : Clear all the profiling data already recorded
 'savebench'     : Save profiling data to HTML and TXT files
 'showsrc'       : show the 2 source images()
 'gpucvstats'    : show GpuCV statistics
=== global settings========
 'disable/enable %       enable/disable special flag
         'warning' => GpuCVSettings::GPUCV_SETTINGS_GLOBAL_WARNING
         'error' => GpuCVSettings::GPUCV_SETTINGS_GLOBAL_ERROR
         'debug' => GpuCVSettings::GPUCV_SETTINGS_GLOBAL_DEBUG
         'notice' => GpuCVSettings::GPUCV_SETTINGS_GLOBAL_NOTICE
         'useopencv' => GpuCVSettings::GPUCV_SETTINGS_USE_OPENCV
         'internprofilling' => GpuCVSettings::GPUCV_SETTINGS_PROFILING
         'errorexception' => GpuCVSettings::GPUCV_SETTINGS_GL_ERROR_RISE_EXCEPTI
ON
         'errorcheck' => GpuCVSettings::GPUCV_SETTINGS_GL_ERROR_CHECK
 'q' to quit...
 'h' or '?' to show this guide...

>

>clone

==========RESULTS (clone), average on 1 times=======================
in microS       GlutTimer
CV:              1000
GPU:             3000
CV x 3.000000 faster...
==========RESULTS (clone)=============================================
>

これから

これから削除して,ソースを展開して,ビルドする.