Main Page | Data Structures | File List | Data Fields | Globals

mr_lag_section.c File Reference

#include "mr_lag_section.h"
#include "mr_error.h"
#include "mr_lag_segment.h"
#include "mr_lag_junction.h"
#include <stdlib.h>
#include <assert.h>
#include <stdio.h>

Defines

#define FACTOR_SECTION_SEGMENT   2.5

Functions

MrLagSection * mr_lag_section_new ()
void mr_lag_section_free (void *p)
unsigned int mr_lag_section_area (MrLagSection *section)
unsigned int mr_lag_section_mean_Y (MrLagSection *section)
void mr_lag_section_add_segment (MrLagSection *section, void *s)
static void merge_sections (MrLagSection *left_section, MrLagSection *right_section)
static void mr_lag_section_remove_junction_and_update (MrLagSection *section, MrLagJunction *junction_to_remove, short int left)
void mr_lag_section_remove (MrLagSection *section)

Define Documentation

#define FACTOR_SECTION_SEGMENT   2.5
 


Function Documentation

static void merge_sections (  MrLagSection *  left_section,
MrLagSection *  right_section
)  [static]
 

void mr_lag_section_add_segment (  MrLagSection *  section,
void *  segment
) 
 

Add a segment to the section. Update the sum and mean

unsigned int mr_lag_section_area (  MrLagSection *  section  ) 
 

Return the sum of pixel in the section : return sum_height

void mr_lag_section_free (  void *  p  ) 
 

Destroys a section. Does not delete junctions and segments object in the vectors

unsigned int mr_lag_section_mean_Y (  MrLagSection *  section  ) 
 

Return the mean Y coordinate of the section. Used to define a horizontal line associated to this section.

MrLagSection* mr_lag_section_new (   ) 
 

Creates a new section

void mr_lag_section_remove (  MrLagSection *  section  ) 
 

update junction as the section does not exist any more

static void mr_lag_section_remove_junction_and_update (  MrLagSection *  section,
MrLagJunction *  junction_to_remove,
short int  left
)  [static]
 

remove a junction in a section left = 1 : left junction else right junction And update the LAG structure by merging section if there is only one junction.


Generated on Sun Apr 9 17:29:41 2006 for MusicReco by  doxygen 1.4.4