| PDL :: Image2D. PDL :: Image2D´Â ±âŸ 2D À̹ÌÁö ó¸® ±â´ÉÀ» Æ÷ÇÔÇÏ´Â Perl ¸ðµâÀÔ´Ï´Ù. |
Áö±Ý ´Ù¿î·Îµå |
PDL :: Image2D. ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- Perl Artistic License
- °Ô½ÃÀÚ À̸§:
- Karl Glazebrook
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://pdl.perl.org/
PDL :: Image2D. ű×
PDL :: Image2D. ¼³¸í
PDL :: Image2D´Â ±âŸ 2D À̹ÌÁö ó¸® ±â´ÉÀ» Æ÷ÇÔÇÏ´Â Perl ¸ðµâÀÔ´Ï´Ù. PDL :: Image2D´Â ±âŸ 2D À̹ÌÁö ó¸® ±â´ÉÀ» Æ÷ÇÔÇÏ´Â Perl ¸ðµâÀÔ´Ï´Ù. ´ëÇü Ä¿³ÎÀÇ °æ¿ì, PDL :: FFT¿¡¼ FFTCONVOLVE ()¿Í °°Àº FFT ·çƾÀ» »ç¿ëÇÏ¸é ºü¸£°ÔµË´Ï´Ù. $ new = conv2d $ ¿À·¡µÈ, $ kernel, {¿É¼Ç} $ smoothed = conv2d $ À̹ÌÁö,} °æ°è - Ä¿³ÎÀÌ edge¸¦ Ⱦ´Ü ÇÒ ¶§ À̹ÌÁö¿¡ ´ëÇØ °¡Á¤µÇ´Â °ªÀ» ¾î¶² °ªÀ¸·Î °£ÁÖÇÏ´Â °ªÀ» Á¦¾îÇÕ´Ï´Ù. = > ±âº» - Á¤±âÀû ÀÎ °æ°è Á¶°Ç (Áï, Ãà ÁÖÀ§ÀÇ ·¦) => ¹Ý¿µ - boundary => truncate - boundaryeod¿¡¼ truncate - FFT ·çƾ°ú ´Þ¸® conv2d´Â ³ª»Û °ªÀ» ó¸® ÇÒ ¼ö ÀÖ½À´Ï´Ù. ', handlebad => 1, PARS => 'a (m, n); kern (p, q); b (m, n); ', otherPars =>'int opt; ', pmcode =>'sub pdl :: conv2d {My $ opt; $ OPT = ÆË @_ ref ($ _ eq 'ÇؽÃ' Die 'Usage : Conv2D (A (M, N), kern (p, q), b (m, n), {options})'$ # _ 2; My ($ a, $ kern) = @_; ³» $ C = $ # _ == 2? $ _ : $ a-> nullcreate; PDL :: _ CONV2D_INT ($ a, $ kern, $ c, (Á¤ÀÇ µÈ $ opt°¡ $$ opt {°æ°è})))? 0 : (($$ opt {boundary} EQ "¹Ý¿µ") + 2 * ($ $ OPT {°æ°è} EQ "TRUNCATE")))); $ c¸¦ µ¹·Á º¸³»½Ê½Ã¿À; } ', code => init_vars ({vars => pdl_double tmp;'}). init_map ( "i"). init_map ( "j"). 'threadloop % {(j = 0, jj2) * $ kern (p => i1, q => j1); } / * for : i1 * /} / * if : j2> = 0 * /} / * for : j1 * / $ b (m => i, n => j) = tmp; } / * for : i * /} / * for : j * / %} ¹«·á (mapj + 1-q_size); ¹«·á (MAPI + 1-P_SIZE); ', badcode => init_vars ({vars => pdl_double tmp; int ±ê¹ß,'}). init_map ( "i"). init_map ( "j"). ' threadloop % {(j = 0, jj2)) $ isgood (kern (p => i1, q => j1))) {tmp + = $ a (m => i2, n => j2) * $ kern ( p => i1, q => j1); ±ê¹ß = 1; } / * if : good * /} / * if : i2> = 0 * /} / * for : i1 * /} / * if : j2> = 0 * /} / * for j1 * / if (Ç÷¡±×) {$ b (m => i, n => j) = tmp; } else {$ setbad (b (m => i, n => j)); }} / * for : i * /} / * for : j * / %} ¹«·á (mapj + 1-q_size); ¹«·á (MAPI + 1-P_SIZE); ', ¿ä±¸ »çÇ× : ¡¤ PERL ¿ä±¸ »çÇ× : ¡¤ Perl.
PDL :: Image2D. °ü·Ã ¼ÒÇÁÆ®¿þ¾î