Basic Image AlgorithmS Library
2.8.0
|
Transfer of pixel coordinates for pixel centric reference systems. More...
#include <Filter/RescaleTransfer.hh>
Static Public Member Functions | |
static void | Down (const double &x, const double &y, const double &factor, double &new_x, double &new_y) |
transfer to smaller image if factor > 1. More... | |
static void | Down (const Vector2< double > &src, const double &factor, Vector2< double > &dst) |
transfer to smaller image if factor > 1. More... | |
static void | Down (const HomgPoint2D &src, const double &factor, HomgPoint2D &dst) |
transfer to smaller image if factor > 1. More... | |
static void | Up (const double &x, const double &y, const double &factor, double &new_x, double &new_y) |
transfer to bigger image if factor > 1. More... | |
static void | Up (const Vector2< double > &src, const double &factor, Vector2< double > &dst) |
transfer to bigger image if factor > 1. More... | |
static void | Up (const HomgPoint2D &src, const double &factor, HomgPoint2D &dst) |
transfer to bigger image if factor > 1. More... | |
Transfer of pixel coordinates for pixel centric reference systems.
In the BIAS library the pixel coordinate system has its origin at the physical center of the upper left pixel. I dub this the pixel centric coordinate system. Defining the pixel coordinate system in such a way has the huge advantage, that integer pixel coordinates can directly be mapped to memory adresses, for example the grey value of the pixel at (0,0) directly coincides with the value stored at Image.GetImageData()[0].
The pixel centric reference frame has however also a number of catches:
Matching coordinates between two differently scaled images is not straight forward. This class aims at providing functionality for this task at a single central location. The rescaled image can be seen as captured by an imaginary camera with almost the same "Eigenschaften" as the true camera. Particularily the physical dimensions of the imaging chip remain the same. The only difference the true imaging chip and the imaginary imaging chip is the number and the size of the photo-cells representing a single pixel. Hence the number of pixels on the two imaging chips differ.
This results in the basic fact that the boundaries of the two images are invariant. The coordinates of the upper left corner of the imageing chip in the pixel centric reference frame is given by (-0.5, -0.5), no matter which resolution is chosen. The basic underlying "Forderung" leads to somewhat awkward formula for coordinate transfer between to images with different resolution for the pixel centric coordinate system:
x_new = (x_old-0.5)*factor+0.5; y_new = (y_old-0.5)*factor+0.5;
Refer to RescaleTransfer.pdf to see a sketch of the physical "Zusammenhang" and some examples.
Definition at line 72 of file RescaleTransfer.hh.
|
static |
transfer to smaller image if factor > 1.
factor must not be zero!
Definition at line 144 of file RescaleTransfer.hh.
References BIAS::Equal().
|
static |
transfer to smaller image if factor > 1.
factor must not be zero!
Definition at line 154 of file RescaleTransfer.hh.
References BIAS::Equal().
|
static |
transfer to smaller image if factor > 1.
factor must not be zero!
Sei w=src[2] und dw = dst[2]: Dann gilt für i in {0,1}: (src[i]/w+0.5)/factor-0.5=dst[i]/dw Unter der Vorraussetzung das dst[2] == src[2] oder w==dw gilt dann: (src[i]+0.5*w)/factor-0.5*w = dst[i]
Definition at line 164 of file RescaleTransfer.hh.
References BIAS::Equal().
|
static |
transfer to bigger image if factor > 1.
Definition at line 111 of file RescaleTransfer.hh.
|
static |
transfer to bigger image if factor > 1.
Definition at line 120 of file RescaleTransfer.hh.
|
static |
transfer to bigger image if factor > 1.
Sei w=src[2] und dw = dst[2]: Dann gilt für i in {0,1}: (src[i]/w+0.5)*factor-0.5=dst[i]/dw Unter der Vorraussetzung das dst[2] == src[2] oder w==dw gilt dann: (src[i]+0.5*w)*factor-0.5*w = dst[i]
Definition at line 129 of file RescaleTransfer.hh.