A novel image analysis‐based technique applied to unmanned aerial vehicle (UAV) survey data is described to detect and locate individual free‐ranging sharks within aggregations. The method allows rapid collection of data and quantification of fine‐scale swimming and collective patterns of sharks. We demonstrate the usefulness of this technique in a small‐scale case study exploring the shoaling tendencies of blacktip reef sharks Carcharhinus melanopterus in a large lagoon within Moorea, French Polynesia. Using our approach, we found that C. melanopterus displayed increased alignment with shoal companions when distributed over a sandflat where they are regularly fed for ecotourism purposes as compared with when they shoaled in a deeper adjacent channel. Our case study highlights the potential of a relatively low‐cost method that combines UAV survey data and image analysis to detect differences in shoaling patterns of free‐ranging sharks in shallow habitats. This approach offers an alternative to current techniques commonly used in controlled settings that require time‐consuming post‐processing effort.