The novel generalized perturbation (n, M)-fold Darboux transformations (DTs) are reported for the (2 + 1)-dimensional Kadomtsev-Petviashvili (KP) equation and its extension by using the Taylor expansion of the Darboux matrix. The generalized perturbation (1, N - 1) fold DTs are used to find their higher-order rational solitons and rogue wave solutions in terms of determinants. The dynamics behaviors of these rogue waves are discussed in detail for different parameters and time, which display the interesting RW and soliton structures including the triangle, pentagon, heptagon profiles, etc. Moreover, we find that a new phenomenon that the parameter (a) can control the wave structures of the KP equation from the higher-order rogue waves (a not equal 0) into higher-order rational solitons (a = 0) in (x, t)-space with y = const. These results may predict the corresponding dynamical phenomena in the models of fluid mechanics and other physically relevant systems. (C) 2016 Elsevier B.V. All rights reserved.