Individual tree detection for urban forests in subtropical environments remains a great challenge due to the various types of forest structures, high canopy closures, and the mixture of evergreen and deciduous broadleaved trees. Existing treetop detection methods based on the canopy-height model (CHM) from UAV images cannot resolve commission errors in heterogeneous urban forests with multiple trunks or strong lateral branches. In this study, we improved the traditional local-maximum (LM) algorithm using a dual Gaussian filter, variable window size, and local normalized correlation coefficient (NCC). Specifically, we adapted a crown model of maximum/minimum tree-crown radii and an angle strategy to detect treetops. We then removed and merged the pending tree vertices. Our results showed that our improved LM algorithm had an average user accuracy (UA) of 87.3, an average producer accuracy (PA) of 82.8, and an overall accuracy of 93.3 for sample plots with canopy closures less than 0.5. As for the sample plots with canopy closures from 0.5 to 1, the accuracies were 78.6, 73.8, and 68.1, respectively. The tree-height estimation accuracy reached more than 0.96, with an average RMSE of 0.61 m. Our results show that the UAV-image-derived CHM can be used to accurately detect individual trees in mixed forests in subtropical cities like Shanghai, China, to provide vital tree-structure parameters for precise and sustainable forest management.