#include <Neighborhood_System.hpp>
Inheritance diagram for Image_Local_Neighborhood:
Public Member Functions | |
Image_Local_Neighborhood () | |
Default constructor. | |
Image_Local_Neighborhood (uint Nl, uint Nc) | |
Constructor. | |
~Image_Local_Neighborhood () | |
Destructor. | |
void | DeleteAll () |
Free all memory used. | |
void | SetWeights (vector< int > window, vector< double > wghts) |
Set the neighborhood specification. | |
void | GetNeighbors (uint site, vector< Weighted_Neighbor * > &neighs) |
void | ReadFromFile (string filename) |
Read from a text file. | |
void | WriteToFile (string filename) |
Write to a text file. | |
void | DumpAsGeneric () |
Display as a generic neighborhood. | |
void | Info () |
Display some info about the neighborhood system. |
The neighborhood is defined locally and identically around each site.
A site nighbors are supposed to lie within a rectangular window. More precisely , for a given point I=(Ix, Iy) in the image, its neighbors , J=(Jx, Jy) , verify :
dlmin <= Ix - Jx <= dlmax
and
dcmin <= Iy - Jy <= dcmax
A matrix of weights is also given.
There are (Nlines * Ncols) sites. Sites are numbered line by line. The site 0 is located on the top left corner of the image.
|
Default constructor. Empty image, empty neighborhood. |
|
Constructor.
This is a first order local neighborhood. Each site has 4 neighbors (N, E, S, W). weights are all equal to 1.0 |
|
Deletes the object Calls DeleteAll . |
|
Frees all the memory used by the object. |
|
Displays the object as a generic neighborhood. Dumps the full structure of the neighborhood as if it was a generic one. For verification purposes. |
|
The set of neighbors for a given site is computed locally based on the window information and the weights associated. Reimplemented from Neighborhood_System. |
|
Display some info about the neighborhood system. Abstract. to be defined for the derived classes. Reimplemented from Neighborhood_System. |
|
Reads the object definition from a text file.
the first four numbers are the windoiw specification (dlmin, dlmax, dcmin, dcmax). the reamining sequence of numbers gives the weights on the window. a typical ( correctly formatted ) example file is :
-1 1 -1 1 1 0 1 0 0 0.3 0.7 0.6 0.5 Reimplemented from Neighborhood_System. |
|
Set the neighborhood specification.
|
|
Write the neighborhood definition to a text file.
|