spateo.digitization.utils_old¶
Written by @Jinerhal, adapted by @Xiaojieqiu.
Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Identify four boundary lines according to given corner points. |
|
Add equal weight boundary to op_field. |
|
Add growing weight boundary to op_field. |
|
Calculate effective L2 error between two fields. |
|
Calculate op_field (weights) for given boundary weights. |
Module Contents¶
- spateo.digitization.utils_old.fill_grid_label(adata, spatial_key, seg_grid_img, bdl_seg_coor_x, bdl_seg_coor_y, curr_layer, curr_sign, layer_label_key: str = 'layer_label', column_label_key: str = 'column_label', init: bool = False)[source]¶
- spateo.digitization.utils_old.draw_seg_grid(boundary_line_img, bdl_seg_coor_x, bdl_seg_coor_y, gridline_width=1, mode='grid')[source]¶
- spateo.digitization.utils_old.extend_layer(boundary_line_img, boundary_line_list, extend_width=10)[source]¶
- spateo.digitization.utils_old.field_contours(contour, pnt_xy, pnt_Xy, pnt_xY, pnt_XY)[source]¶
Identify four boundary lines according to given corner points.
- Parameters:
- contour _type_
_description_
- pnt_xy _type_
_description_
- pnt_Xy _type_
_description_
- pnt_xY _type_
_description_
- pnt_XY _type_
_description_
- Returns:
_description_
- Return type:
_type_
- spateo.digitization.utils_old.add_ep_boundary(op_field, op_line, value)[source]¶
Add equal weight boundary to op_field.
- Parameters:
- op_field _type_
_description_
- op_line _type_
_description_
- value _type_
_description_
- Returns:
_description_
- Return type:
_type_
- spateo.digitization.utils_old.add_gp_boundary(op_field, op_line, value_s, value_e)[source]¶
Add growing weight boundary to op_field.
- Parameters:
- op_field _type_
_description_
- op_line _type_
_description_
- value_s _type_
_description_
- value_e _type_
_description_
- Returns:
_description_
- Return type:
_type_
- spateo.digitization.utils_old.effective_L2_error(op_field_i, op_field_j, field_mask)[source]¶
Calculate effective L2 error between two fields.
- Parameters:
- op_field_i _type_
_description_
- op_field_j _type_
_description_
- field_mask _type_
_description_
- Returns:
_description_
- Return type:
_type_
- spateo.digitization.utils_old.calc_op_field(op_field, min_line, max_line, edge_line_a, edge_line_b, field_border, field_mask, max_err=1e-05, max_itr=100000.0, lp=1, hp=100)[source]¶
Calculate op_field (weights) for given boundary weights.
- Parameters:
- op_field _type_
_description_
- min_line _type_
_description_
- max_line _type_
_description_
- edge_line_a _type_
_description_
- edge_line_b _type_
_description_
- field_border _type_
_description_
- field_mask _type_
_description_
- max_err _type_, optional
_description_. Defaults to 1e-5.
- max_itr _type_, optional
_description_. Defaults to 1e5.
- lp int, optional
_description_. Defaults to 1.
- hp int, optional
_description_. Defaults to 100.
- Returns:
_description_
- Return type:
_type_