| Bsoft 2.0.5 Bernard's software package

Classes | Functions | Variables
Bimage_segment.cpp File Reference

Methods for segmentation. More...

`#include <math.h>`
`#include <time.h>`
`#include "Bimage.h"`
`#include "linked_list.h"`
`#include "utilities.h"`

Go to the source code of this file.

## Classes
struct | GSedge
| Graph segmentation edge structure. More...
struct | GSregion
| Graph segmentation region structure. More...

## Functions
int | QsortSmallToLargeEdge (const void *x, const void *y)
long | region_find (GSregion *region, long i)
int | region_join (GSregion *region, long i, long j)
GSregion * | region_setup (Bimage *p, Bimage *pmask)
GSedge * | edge_setup (Bimage *p, Bimage *pmask, int connect_type, long &me, long &ne)
long | region_merging (GSregion *region, GSedge *edge, long nrc, long ne, float threshold)
long | statistical_region_merging (GSregion *region, GSedge *edge, long nr, long ne, double fac)
long | region_merge_small (GSregion *region, GSedge *edge, long nrc, long ne, int min_size)
int | img_update_segment (long i, Bimage *p, Bimage *pmask, vector< long > vstep, double colorweight, vector< Bsuperpixel > &seg)
int | img_assign_pixel (long i, Bimage *p, Bimage *pmask, double wd, vector< Bsuperpixel > &seg)
int | img_assign_segments (Bimage *p, Bimage *pmask, vector< long > vstep, vector< Bsuperpixel > &seg)
int | img_impose_segments (Bimage *p, Bimage *pmask, vector< Bsuperpixel > &seg)
long | segment_lowest_neighbor (vector< Bsuperpixel > &seg, long i, long cc)
int | img_impose_lowest_neighbor (Bimage *p, Bimage *pmask, vector< Bsuperpixel > &seg)
long | segment_highest_neighbor (vector< Bsuperpixel > &seg, long i, long cc)
int | img_impose_highest_neighbor (Bimage *p, Bimage *pmask, vector< Bsuperpixel > &seg)
int | img_impose_difference_from_highest_neighbor (Bimage *p, Bimage *pmask, vector< Bsuperpixel > &seg)
long | segment_setup_neighbors (long i, vector< Bsuperpixel > &seg, double dmax)
long | segments_setup_neighbors (vector< Bsuperpixel > &seg, long step)

## Variables
int | verbose

## Detailed Description

Methods for segmentation.

Author
  Bernard Heymann and Samuel Payne

Date
  Created: 20010516
  Modified: 20190314 (BH)

Definition in file Bimage_segment.cpp.

## Function Documentation

## ◆ edge_setup()

GSedge* edge_setup | ( | Bimage * | p,
|  | Bimage * | pmask,
|  | int | connect_type,
|  | long & | me,
|  | long & | ne
| ) |  |

Definition at line 1223 of file Bimage_segment.cpp.

## ◆ img_assign_pixel()

int img_assign_pixel | ( | long | i,
|  | Bimage * | p,
|  | Bimage * | pmask,
|  | double | wd,
|  | vector< Bsuperpixel > & | seg
| ) |  |

Definition at line 1575 of file Bimage_segment.cpp.

## ◆ img_assign_segments()

int img_assign_segments | ( | Bimage * | p,
|  | Bimage * | pmask,
|  | vector< long > | vstep,
|  | vector< Bsuperpixel > & | seg
| ) |  |

Definition at line 1603 of file Bimage_segment.cpp.

## ◆ img_impose_difference_from_highest_neighbor()

int img_impose_difference_from_highest_neighbor | ( | Bimage * | p,
|  | Bimage * | pmask,
|  | vector< Bsuperpixel > & | seg
| ) |  |

Definition at line 1691 of file Bimage_segment.cpp.

## ◆ img_impose_highest_neighbor()

int img_impose_highest_neighbor | ( | Bimage * | p,
|  | Bimage * | pmask,
|  | vector< Bsuperpixel > & | seg
| ) |  |

Definition at line 1678 of file Bimage_segment.cpp.

## ◆ img_impose_lowest_neighbor()

int img_impose_lowest_neighbor | ( | Bimage * | p,
|  | Bimage * | pmask,
|  | vector< Bsuperpixel > & | seg
| ) |  |

Definition at line 1652 of file Bimage_segment.cpp.

## ◆ img_impose_segments()

int img_impose_segments | ( | Bimage * | p,
|  | Bimage * | pmask,
|  | vector< Bsuperpixel > & | seg
| ) |  |

Definition at line 1628 of file Bimage_segment.cpp.

## ◆ img_update_segment()

int img_update_segment | ( | long | i,
|  | Bimage * | p,
|  | Bimage * | pmask,
|  | vector< long > | vstep,
|  | double | colorweight,
|  | vector< Bsuperpixel > & | seg
| ) |  |

Definition at line 1495 of file Bimage_segment.cpp.

## ◆ QsortSmallToLargeEdge()

int QsortSmallToLargeEdge | ( | const void * | x,
|  | const void * | y
| ) |  |

Definition at line 1156 of file Bimage_segment.cpp.

## ◆ region_find()

long region_find | ( | GSregion * | region,
|  | long | i
| ) |  |

Definition at line 1164 of file Bimage_segment.cpp.

## ◆ region_join()

int region_join | ( | GSregion * | region,
|  | long | i,
|  | long | j
| ) |  |

Definition at line 1172 of file Bimage_segment.cpp.

## ◆ region_merge_small()

long region_merge_small | ( | GSregion * | region,
|  | GSedge * | edge,
|  | long | nrc,
|  | long | ne,
|  | int | min_size
| ) |  |

Definition at line 1341 of file Bimage_segment.cpp.

## ◆ region_merging()

long region_merging | ( | GSregion * | region,
|  | GSedge * | edge,
|  | long | nrc,
|  | long | ne,
|  | float | threshold
| ) |  |

Definition at line 1291 of file Bimage_segment.cpp.

## ◆ region_setup()

GSregion* region_setup | ( | Bimage * | p,
|  | Bimage * | pmask
| ) |  |

Definition at line 1196 of file Bimage_segment.cpp.

## ◆ segment_highest_neighbor()

long segment_highest_neighbor | ( | vector< Bsuperpixel > & | seg,
|  | long | i,
|  | long | cc
| ) |  |

Definition at line 1665 of file Bimage_segment.cpp.

## ◆ segment_lowest_neighbor()

long segment_lowest_neighbor | ( | vector< Bsuperpixel > & | seg,
|  | long | i,
|  | long | cc
| ) |  |

Definition at line 1639 of file Bimage_segment.cpp.

## ◆ segment_setup_neighbors()

long segment_setup_neighbors | ( | long | i,
|  | vector< Bsuperpixel > & | seg,
|  | double | dmax
| ) |  |

Definition at line 1706 of file Bimage_segment.cpp.

## ◆ segments_setup_neighbors()

long segments_setup_neighbors | ( | vector< Bsuperpixel > & | seg,
|  | long | step
| ) |  |

Definition at line 1723 of file Bimage_segment.cpp.

## ◆ statistical_region_merging()

long statistical_region_merging | ( | GSregion * | region,
|  | GSedge * | edge,
|  | long | nr,
|  | long | ne,
|  | double | fac
| ) |  |

Definition at line 1314 of file Bimage_segment.cpp.

## Variable Documentation

## ◆ verbose

int verbose