(self, direction=DIRECTION_VERTICAL, around_rel_position=0.5,
                                  clustering_method=None, **clustering_kwargs)
return cluster_centers[sep_idx]
Try to find a separator line on double pages. After line detection, find a line in direction <direction> around
        <around_rel_position>.
        Return the 1D line position if a separator line was found, else None.
Try to find a separator line on double pages. After line detection, find a line in direction <direction> around
        <around_rel_position>.
        Return the 1D line position if a separator line was found, else None.
Try to find a separator line on double pages . After line detection find a line in direction <direction > around <around_rel_position > . Return the 1D line position if a separator line was found else None .
def find_pages_separator_line(self, direction=DIRECTION_VERTICAL, around_rel_position=0.5,
                                  clustering_method=None, **clustering_kwargs):
        """
        Try to find a separator line on double pages. After line detection, find a line in direction <direction> around
        <around_rel_position>.
        Return the 1D line position if a separator line was found, else None.
        """
        
        if direction not in (DIRECTION_HORIZONTAL, DIRECTION_VERTICAL):
            raise ValueError("invalid value for 'direction': '%s'" % direction)
        
        if not 0 <= around_rel_position <= 1:
            raise ValueError("invalid value for 'around_rel_position' (must be in [0, 1]): %d" % around_rel_position)
        
        line_clusters = self.find_clusters(direction, clustering_method or find_clusters_1d_break_dist,
                                           **clustering_kwargs)

        if not line_clusters:
            return None

        cluster_centers = np.array(calc_cluster_centers_1d(line_clusters))
        
        img_dim = self.img_w if direction == DIRECTION_VERTICAL else self.img_h
        around_pos = img_dim * around_rel_position
        
        sep_idx = np.argmin(np.abs(cluster_centers - around_pos))
        
        return cluster_centers[sep_idx]
def find_pages_separator_line ( self , direction = DIRECTION_VERTICAL , around_rel_position = 0.5 , clustering_method = None , * * clustering_kwargs ) : if direction not in ( DIRECTION_HORIZONTAL , DIRECTION_VERTICAL ) : raise ValueError ( "invalid value for 'direction': '%s'" % direction ) if not 0 <= around_rel_position <= 1 : raise ValueError ( "invalid value for 'around_rel_position' (must be in [0, 1]): %d" % around_rel_position ) line_clusters = self . find_clusters ( direction , clustering_method or find_clusters_1d_break_dist , * * clustering_kwargs ) if not line_clusters : return None cluster_centers = np . array ( calc_cluster_centers_1d ( line_clusters ) ) img_dim = self . img_w if direction == DIRECTION_VERTICAL else self . img_h around_pos = img_dim * around_rel_position sep_idx = np . argmin ( np . abs ( cluster_centers - around_pos ) ) return cluster_centers [ sep_idx ]