#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) |
|
|
|
|
|
Add a segment to the section. Update the sum and mean |
|
Return the sum of pixel in the section : return sum_height |
|
Destroys a section. Does not delete junctions and segments object in the vectors |
|
Return the mean Y coordinate of the section. Used to define a horizontal line associated to this section. |
|
Creates a new section |
|
update junction as the section does not exist any more |
|
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. |