A robust algorithm is introduced for detection of large-scale coherent structures in transitional and intermittent flows that feature turbulent/non-turbulent (T/NT) interfaces. The algorithm is applicable the instantaneous flow fields of wall-bounded and free shear flows, and can effectively identify coherent events in the velocity or vorticity fields, or sweep/ejection motions. A database from direct numerical simulation (DNS) of transitional boundary layer is used to develop and demonstrate the capabilities of the algorithm which consists of three steps. The first is identification of the T/NT interface by comparing the normalized vorticity magnitude to a threshold value that is independent of the Reynolds number. The vorticity normalization is specifically designed to be applicable in transitional flows, where regions of the flow can host juxtaposed regions of laminar and turbulent flow. With the definition of the T/NT interface, conditional statistics are computed and perturbation quantities are defined relative to their respective conditional means. Second, the influence of the small-scale turbulence is excluded by applying an anisotropic Gaussian filter. The filter size is determined from the spatial characteristics of the small-scale vortical motions. In the third step, one-dimensional cores and two-dimensional surfaces within the flow structures of interest are identified from local extrema in the fields, and are tracked as Lagrangian objects. Using the algorithm, the population trends and advection speeds of large-scale sweep/ejection events are computed in the transitional boundary layer. Two additional flow configurations are also considered: turbulent jet flow emerging from a circular nozzle and the turbulent flow in a channel with a wavy surface.