Scale Space (Gaussian Scale Space (GSS)) More...
Go to the source code of this file.
Classes | |
struct | _VlScaleSpaceGeometry |
Geometry of a scale space. More... | |
struct | _VlScaleSpaceOctaveGeometry |
Geometry of one octave of a scale space. More... | |
Typedefs | |
typedef struct _VlScaleSpace | VlScaleSpace |
typedef struct _VlScaleSpaceGeometry | VlScaleSpaceGeometry |
Geometry of a scale space. | |
typedef struct _VlScaleSpaceOctaveGeometry | VlScaleSpaceOctaveGeometry |
Geometry of one octave of a scale space. | |
Functions | |
VL_EXPORT vl_bool | vl_scalespacegeometry_is_equal (VlScaleSpaceGeometry a, VlScaleSpaceGeometry b) |
Check scale space geometries for equality. | |
Create and destroy | |
VL_EXPORT VlScaleSpaceGeometry | vl_scalespace_get_default_geometry (vl_size width, vl_size height) |
Get the default geometry for a given image size. | |
VL_EXPORT VlScaleSpace * | vl_scalespace_new (vl_size width, vl_size height) |
Create a new scale space object. | |
VL_EXPORT VlScaleSpace * | vl_scalespace_new_with_geometry (VlScaleSpaceGeometry geom) |
Create a new scale space with the specified geometry. | |
VL_EXPORT VlScaleSpace * | vl_scalespace_new_copy (VlScaleSpace *src) |
Create a new copy of the object. | |
VL_EXPORT VlScaleSpace * | vl_scalespace_new_shallow_copy (VlScaleSpace *src) |
Create a new shallow copy of the object. | |
VL_EXPORT void | vl_scalespace_delete (VlScaleSpace *self) |
Delete object. | |
Process data | |
VL_EXPORT void | vl_scalespace_put_image (VlScaleSpace *self, float const *image) |
Initialise Scale space with new image. | |
Retrieve data and parameters | |
VL_EXPORT VlScaleSpaceGeometry | vl_scalespace_get_geometry (VlScaleSpace const *self) |
Get the geometry of the scale space. | |
VL_EXPORT VlScaleSpaceOctaveGeometry | vl_scalespace_get_octave_geometry (VlScaleSpace const *self, vl_index o) |
Get the geometry of an octave of the scalespace. | |
VL_EXPORT float * | vl_scalespace_get_level (VlScaleSpace *self, vl_index o, vl_index s) |
Get the data of a scale space level. | |
VL_EXPORT float const * | vl_scalespace_get_level_const (VlScaleSpace const *self, vl_index o, vl_index s) |
Get the data of a scale space level (const) | |
VL_EXPORT double | vl_scalespace_get_level_sigma (VlScaleSpace const *self, vl_index o, vl_index s) |
Get the scale of a given octave and sublevel. |
Scale Space (Gaussian Scale Space (GSS))
$. However, it is often convenient to store a few extra levels per octave (e.g. to compute the local maxima of a function in scale or the Difference of Gaussian cornerness measure). Thus VLFeat scale space structure allows this parameter to vary in an arbitrary range, specified by the parameters `octaveFirstSubdivision` and `octaveLastSubdivision` of VlScaleSpaceGeometry.
Overall the possible values of the indexes `o` and `s` are:
\[ {firstOctave} o {lastOctave}, {octaveFirstSubdivision} s {octaveLastSubdivision}. \]
Note that, depending on these ranges, there could be *redundant pairs* of indexes `o` and `s` that represent the *same* pyramid level at more than one sampling resolution. In practice, the ability to generate such redundant information is very useful in algorithms using scalespaces, as coding multiscale operations using a fixed sampling resolution is far easier. For example, the DoG feature detector computes the scalespace with three redundant levels per octave, as follows:
Given $(x,y,)$, any of a vast number digitial filtering techniques can be used to compute the scale levels. Presently, VLFeat uses a basic FIR implementation of the Gaussian filters.
The FIR implementation is obtained by sampling the Gaussian function and re-normalizing it to have unit norm. This simple construction does not account properly for sampling effect, which may be a problem for very small Gausisan kernels. As a rule of thumb, such filters work sufficiently well for, say, standard deviation $$ at least 1.6 times the sampling step. A work around to apply this basic FIR implementation to very small Gaussian filters is to upsample the image first.
The limitations on the FIR filters have relatively important for the pyramid construction, as the latter is obtained by *incremental smoothing*: each successive level is obtained from the previous one by adding the needed amount of smoothing. In this manner, the size of the FIR filters remains small, which makes them efficient; at the same time, for what discussed, excessively small filters are not represented properly.
Definition in file scalespace.h.
typedef struct _VlScaleSpace VlScaleSpace |
Definition at line 64 of file scalespace.h.
typedef struct _VlScaleSpaceGeometry VlScaleSpaceGeometry |
Geometry of a scale space.
There are a few restrictions on the valid geometrties.
typedef struct _VlScaleSpaceOctaveGeometry VlScaleSpaceOctaveGeometry |
Geometry of one octave of a scale space.
VL_EXPORT void vl_scalespace_delete | ( | VlScaleSpace * | self | ) |
Delete object.
self | object to delete. |
Definition at line 641 of file scalespace.c.
VL_EXPORT VlScaleSpaceGeometry vl_scalespace_get_default_geometry | ( | vl_size | width, |
vl_size | height | ||
) |
Get the default geometry for a given image size.
width | image width. |
height | image height. |
Both width and height must be at least one pixel wide.
Definition at line 306 of file scalespace.c.
VL_EXPORT VlScaleSpaceGeometry vl_scalespace_get_geometry | ( | VlScaleSpace const * | self | ) |
Get the geometry of the scale space.
self | object. |
Definition at line 357 of file scalespace.c.
VL_EXPORT float* vl_scalespace_get_level | ( | VlScaleSpace * | self, |
vl_index | o, | ||
vl_index | s | ||
) |
Get the data of a scale space level.
self | object. |
o | octave index. |
s | level index. |
The octave index o must be in the range firstOctave
to lastOctave
and the scale index s must be in the range octaveFirstSubdivision
to octaveLastSubdivision
.
Definition at line 390 of file scalespace.c.
VL_EXPORT float const* vl_scalespace_get_level_const | ( | VlScaleSpace const * | self, |
vl_index | o, | ||
vl_index | s | ||
) |
Get the data of a scale space level (const)
self | object. |
o | octave index. |
s | level index. |
This function is the same as vl_scalespace_get_level but reutrns a const
pointer to the data.
Definition at line 415 of file scalespace.c.
VL_EXPORT double vl_scalespace_get_level_sigma | ( | VlScaleSpace const * | self, |
vl_index | o, | ||
vl_index | s | ||
) |
Get the scale of a given octave and sublevel.
------------------------------------------------------------------
self | object. |
o | octave index. |
s | sublevel index. |
The function returns the scale $(o,s)$ as a function of the octave index o and sublevel s.
Definition at line 431 of file scalespace.c.
VL_EXPORT VlScaleSpaceOctaveGeometry vl_scalespace_get_octave_geometry | ( | VlScaleSpace const * | self, |
vl_index | o | ||
) |
Get the geometry of an octave of the scalespace.
self | object. |
o | octave index. |
Definition at line 369 of file scalespace.c.
VL_EXPORT VlScaleSpace* vl_scalespace_new | ( | vl_size | width, |
vl_size | height | ||
) |
Create a new scale space object.
width | image width. |
height | image height. |
This function is the same as vl_scalespace_new_with_geometry() but it uses vl_scalespace_get_default_geometry to initialise the geometry of the scale space from the image size.
Definition at line 536 of file scalespace.c.
VL_EXPORT VlScaleSpace* vl_scalespace_new_copy | ( | VlScaleSpace * | self | ) |
Create a new copy of the object.
self | object to copy from. |
The function returns `NULL` if the copy cannot be made due to an out-of-memory condition.
Definition at line 604 of file scalespace.c.
VL_EXPORT VlScaleSpace* vl_scalespace_new_shallow_copy | ( | VlScaleSpace * | self | ) |
Create a new shallow copy of the object.
self | object to copy from. |
The function works like vl_scalespace_new_copy() but only allocates the scale space, without actually copying the data.
Definition at line 629 of file scalespace.c.
VL_EXPORT VlScaleSpace* vl_scalespace_new_with_geometry | ( | VlScaleSpaceGeometry | geom | ) |
Create a new scale space with the specified geometry.
------------------------------------------------------------------
geom | scale space geomerty. |
If the geometry is not valid (see VlScaleSpaceGeometry), the result is unpredictable.
The function returns `NULL` if it was not possible to allocate the object because of an out-of-memory condition.
Definition at line 558 of file scalespace.c.
VL_EXPORT void vl_scalespace_put_image | ( | VlScaleSpace * | self, |
float const * | image | ||
) |
Initialise Scale space with new image.
self | VlScaleSpace object instance. |
image | image to process. |
Compute the data of all the defined octaves and scales of the scale space self.
Definition at line 812 of file scalespace.c.
VL_EXPORT vl_bool vl_scalespacegeometry_is_equal | ( | VlScaleSpaceGeometry | a, |
VlScaleSpaceGeometry | b | ||
) |
Check scale space geometries for equality.
a | first geometry. |
b | second geometry. |
Definition at line 337 of file scalespace.c.