[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libcvd-members] libcvd/cvd image_interpolate.h
From: |
Georg Klein |
Subject: |
[libcvd-members] libcvd/cvd image_interpolate.h |
Date: |
Fri, 18 Jan 2008 20:30:19 +0000 |
CVSROOT: /cvsroot/libcvd
Module name: libcvd
Changes by: Georg Klein <georgklein> 08/01/18 20:30:19
Modified files:
cvd : image_interpolate.h
Log message:
Fix annoying compiler warning about multi-line comment (and also remove
//s
from doc equations)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd/image_interpolate.h?cvsroot=libcvd&r1=1.17&r2=1.18
Patches:
Index: image_interpolate.h
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd/image_interpolate.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- image_interpolate.h 18 Jul 2007 13:48:03 -0000 1.17
+++ image_interpolate.h 18 Jan 2008 20:30:18 -0000 1.18
@@ -14,45 +14,45 @@
///@ingroup gImage
namespace Interpolate
{
- /// This does not interpolate: it uses the nearest neighbour.
- ///
- /// The sub pixel to be accessed is \f$p = (x,y)\f$. The
nearest pixel is
- /// \f$q = ( \operatorname{round}\ x, \operatorname{round}\
y)\f$
- /// The interpolated value, \f$v\f$, is \f$v = I(q)\f$
+ /** This does not interpolate: it uses the nearest neighbour.
+
+ The sub pixel to be accessed is \f$p = (x,y)\f$. The
nearest pixel is
+ \f$q = ( \operatorname{round}\ x, \operatorname{round}\
y)\f$
+ The interpolated value, \f$v\f$, is \f$v = I(q)\f$
+ */
class NearestNeighbour{};
+ /** This class is for bilinear interpolation.
+
+ Define \f$p' = ( \operatorname{floor}\ x,
\operatorname{floor}\ y)\f$ and
+ \f$\delta = p - p'\f$
- /// This class is for bilinear interpolation.
- ///
- /// Define \f$p' = ( \operatorname{floor}\ x,
\operatorname{floor}\ y)\f$ and
- /// \f$\delta = p - p'\f$
- ///
- /// 4 pixels in a square with \f$p'\f$ in the top left corner
are taken:
- /// \f[\begin{array}{rl}
- /// a =& I(p')\\
- /// b =& I(p' + (1,0))\\
- /// c =& I(p' + (0,1))\\
- /// d =& I(p' + (1,1))
- /// \end{array}
- /// \f]
- ///
- /// The interpolated value, \f$v\f$, is
- /// \f[v = (1-\delta_y)((1-\delta_x)a + \delta_xb) +
\delta_y((1-\delta_x)c + \delta_xd)\f]
+ 4 pixels in a square with \f$p'\f$ in the top left corner
are taken:
+ \f[\begin{array}{rl}
+ a =& I(p')\\
+ b =& I(p' + (1,0))\\
+ c =& I(p' + (0,1))\\
+ d =& I(p' + (1,1))
+ \end{array}
+ \f]
+
+ The interpolated value, \f$v\f$, is
+ \f[v = (1-\delta_y)((1-\delta_x)a + \delta_xb) +
\delta_y((1-\delta_x)c + \delta_xd)\f]
+ */
class Bilinear{};
+ /**
+ This class is for bicubic (not bicubic spline) interpolation.
+
+ \f[ v = \sum_{m=-1}^2\sum_{n=-1}^2 I(x' + m, y' + n)r(m -
\delta_x)r(\delta_y-n) \f]
+ where:
+ \f[\begin{array}{rl}
+ r(x) =& \frac{1}{6}\left[ p(x+2)^3 - 4p(x+1)^3 + 6p(x)^3 -
4p(x-1)^3 \right]\\
+ p(x) =& \begin{cases}x&x>0\\0&x \le 0\end{cases}
+ \end{array}\f]
- /// This class is for bicubic (not bicubic spline)
interpolation.
- ///
- /// \f[ v = \sum_{m=-1}^2\sum_{n=-1}^2 I(x' + m, y' + n)r(m -
\delta_x)r(\delta_y-n) \f]
- ///
- /// where:
- ///
- /// \f[\begin{array}{rl}
- /// r(x) =& \frac{1}{6}\left[ p(x+2)^3 - 4p(x+1)^3 + 6p(x)^3 -
4p(x-1)^3 \right]\\
- /// p(x) =& \begin{cases}x&x>0\\0&x \le 0\end{cases}
- /// \end{array}\f]
- ///
- ///This algorithm is described in
http://astronomy.swin.edu.au/~pbourke/colour/bicubic/
+ This algorithm is described in
http://astronomy.swin.edu.au/~pbourke/colour/bicubic/
+ */
class Bicubic{};
};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libcvd-members] libcvd/cvd image_interpolate.h,
Georg Klein <=