flagflag  If you want to see English page, please click "English" Button at Left.

different_proc anchor.png

DIFFERENT_API MSGraph<sWord>* different_proc(MSGraph<sWord>* vp)
{
   MSGraph<sWord>* xp = NULL;
   
   /////////////////////////////////////////
   // 以下に処理コードを書く
   //        入力 vp, 出力 xp
   /////////////////////////////////////////

   /**///////////////////////////////////////////////////////////////////////////////
   //
   xp = new MSGraph<sWord>(vp->xs, vp->ys, vp->zs);

   for (int j=1; j<vp->ys-1; j++) {
       for (int i=1; i<vp->xs-1; i++) {
           xp->point(i, j) = (vp->point(i+1, j) - vp->point(i-1, j))/2;
       }
   }


   /*////////////////////////////////////////////////////////////////////////////////
   // フィルターによる計算
   sWord mask[] = {  0,  0,  0,
                    -1,  0,  1,
                     0,  0,  0  };
   // Filterの作成
   MSGraph<sWord>* filter = new MSGraph<sWord>(3, 3);    // フィルターのサイズを正確に指定する
   filter->set_array(mask);                              // フィルターへコピー
   filter->norm = 2.0;                                   // 規格化の係数
 
   xp  = new MSGraph<sWord>();
   *xp = MSMaskFilter(*vp, *filter);

   // Filterの開放
   filter->free();
   delete(filter);
   /**/


   /**/////////////////////////////////////////////////////////////////////////////// 
   // 絶対値の計算
   for (int j=0; j<vp->ys; j++) {
       for (int i=0; i<vp->xs; i++) {
           if (xp->point(i, j)<0) xp->point(i, j) = - xp->point(i, j);
       }
   }
   /**/

   /////////////////////////////////////////
   // 処理コードはここまで
   /////////////////////////////////////////

   return xp;
}

トップ   凍結 差分 バックアップ 複製 名前変更 リロード   新規 ページ一覧 単語検索 最終更新   ヘルプ   最終更新のRSS 1.0 最終更新のRSS 2.0 最終更新のRSS Atom
Counter: 1276, today: 1, yesterday: 0
最終更新: 2011-07-30 (土) 23:16:57 (JST) (4652d) by iseki

サイト内 検索

ログイン

ユーザー名:

パスワード:


パスワード紛失
新規登録

サブ メニュー

ミニカレンダー

前月2024年 4月翌月
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
<今日>

オンライン状況

104 人のユーザが現在オンラインです。 (8 人のユーザが xpwiki を参照しています。)

登録ユーザ: 0
ゲスト: 104

もっと...

アクセスカウンタ

今日 : 1117111171111711117111171
昨日 : 9457945794579457
総計 : 2333812823338128233381282333812823338128233381282333812823338128
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com