Scale Space - Definition. More...
#include "scalespace.h"
#include "mathop.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdio.h>
Functions | |
VlScaleSpaceGeometry | vl_scalespace_get_geometry (VlScaleSpace const *self) |
Get the geometry of the scale space. | |
VlScaleSpaceOctaveGeometry | vl_scalespace_get_octave_geometry (VlScaleSpace const *self, vl_index o) |
Get the geometry of an octave of the scalespace. | |
float * | vl_scalespace_get_level (VlScaleSpace const *self, vl_index o, vl_index s) |
Get the const data of a scale space level. | |
static void | copy_and_upsample (float *destination, float const *source, vl_size width, vl_size height) |
Upsample the rows and take the transpose. | |
static void | copy_and_downsample (float *destination, float const *source, vl_size width, vl_size height, vl_size numOctaves) |
Downsample. | |
VlScaleSpace * | vl_scalespace_new (vl_size width, vl_size height, vl_index numOctaves, vl_index firstOctave, vl_size octaveResolution, vl_index octaveFirstSubdivision, vl_index octaveLastSubdivision) |
Creates a new VlScaleSpace object. | |
void | vl_scalespace_delete (VlScaleSpace *self) |
Delete a VlScaleSpace object. | |
VlScaleSpace * | vl_scalespace_clone (VlScaleSpace *self) |
Clone the scale space with all its data. | |
VlScaleSpace * | vl_scalespace_clone_structure (VlScaleSpace *self) |
Clone the object but do not copy the data. | |
void | _vl_scalespace_fill_octave (VlScaleSpace *self, vl_index o) |
Fill octave startinf from first level. | |
static void | _vl_scalespace_start_octave_from_image (VlScaleSpace *self, float const *image, vl_index o) |
Initialize the first level of an octave from an image. | |
static void | _vl_scalespace_start_octave_from_previous_octave (VlScaleSpace *self, vl_index o) |
Initialize the first level of an octave from the previous octave. | |
void | vl_scalespace_put_image (VlScaleSpace *self, float const *image) |
Initialise Scale space with new image. |
Detailed Description
Function Documentation
void _vl_scalespace_fill_octave | ( | VlScaleSpace * | self, |
vl_index | o | ||
) |
- Parameters:
-
self VlScaleSpace object instance. o octave to process.
The function takes the first level of octave o and iteratively smoothes it to obtain the other octave levels.
|
static |
- Parameters:
-
self VlScaleSpace object instance. image image data. o octave to start.
The function initializes the first level of octave o from image image. The dimensions of the image are the ones set during the creation of the VlScaleSpace object instance.
|
static |
- Parameters:
-
VlScaleSpace objet instance. o octave to initialize.
The function initializes the first level of octave o from the content of octave o - 1
.
|
static |
- Parameters:
-
destination output imgae buffer. source input image buffer. width input image width. height input image height. numOctaves octaves (non negative).
The function downsamples the image d times, reducing it to 1/2^d
of its original size. The parameters width and height are the size of the input image. The destination image dst is assumed to be floor(width/2^d)
pixels wide and floor(height/2^d)
pixels high.
|
static |
- Parameters:
-
destination output image. source input image. width input image width. height input image height.
The output image has dimensions height by 2 width (so the destination buffer must be at least as big as two times the input buffer).
Upsampling is performed by linear interpolation.
VlScaleSpace* vl_scalespace_clone | ( | VlScaleSpace * | self | ) |
Performs deep copy of the scale space.
- Parameters:
-
self Scale space which should be cloned.
VlScaleSpace* vl_scalespace_clone_structure | ( | VlScaleSpace * | self | ) |
- Parameters:
-
self VlScaleSpace object instance.
- Returns:
- the object copy, or
NULL
.
The function can fail if the memory is insufficient to hold the object copy. In this case, the function returns NULL
.
void vl_scalespace_delete | ( | VlScaleSpace * | self | ) |
- Parameters:
-
self object to delete.
- See also:
- vl_scalespace_new
VlScaleSpaceGeometry vl_scalespace_get_geometry | ( | VlScaleSpace const * | self | ) |
- Parameters:
-
object.
- Returns:
- the scale space geometry.
float* vl_scalespace_get_level | ( | VlScaleSpace const * | self, |
vl_index | o, | ||
vl_index | s | ||
) |
- Parameters:
-
self object. o octave index. s level index.
- Returns:
- pointer to the data for octave o, level s.
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
.
VlScaleSpaceOctaveGeometry vl_scalespace_get_octave_geometry | ( | VlScaleSpace const * | self, |
vl_index | o | ||
) |
- Parameters:
-
object. o octave index.
- Returns:
- the geometry of the specified octave.
VlScaleSpace* vl_scalespace_new | ( | vl_size | width, |
vl_size | height, | ||
vl_index | numOctaves, | ||
vl_index | firstOctave, | ||
vl_size | octaveResolution, | ||
vl_index | octaveFirstSubdivision, | ||
vl_index | octaveLastSubdivision | ||
) |
- Parameters:
-
width image width. height image height. numOctaves number of octaves. firstOctave index of the first octave. numLevels numeber of levels per octave. firstLevel index of the first level. lastLevel index of the last level.
- Returns:
- the new scale space.
The function allocates and returns a new VlScaleSpace object of the specified geometry.
If numOctaves is a negative number, the number of octaves is selected to the maximum possible given the size of the image.
Parameters firstLevel and lastLevel allow to define additional levels on top or bottom of the scale-space although the scale-space would be calculated with parameters based on numLevels. This is for example used when we need to compute additional levels for local extrema localisation when e.g.:
would create scale space with 5 levels indexed as:
- See also:
- vl_scalespace_delete().
void vl_scalespace_put_image | ( | VlScaleSpace * | self, |
float const * | image | ||
) |
- Parameters:
-
self VlScaleSpace object instance. image image to process.
Compute the data of all the defined octaves and scales of the scale space self.