Gravity inversion is inherently nonunique. Minimum-structure inversion has proved effective at dealing with this nonuniqueness. However, such an inversion approach, which involves a large number of unknown parameters, is computationally expensive. To improve efficiency while retaining the advantages of a minimum-structure-style inversion, we have developed a new method, based on edge detection and center detection of geologic bodies, to help to focus the spatial extent of meshing for gravity inversion. The chosen method of edge detection, normalized vertical derivative of the total horizontal derivative, helps to outline areas to be meshed by approximating the edges of key geophysical bodies. Next, the method of center detection, normalized vertical derivative of the analytic signal amplitude, helps to confirm the center of the areas to be meshed, then a binary mesh flag is generated. In this paper, the binary mesh flag, restricting the spatial extent of meshing, is first undertaken using the two methods, and it is shown to dramatically reduce the number of grid cells from 574,992 for the whole research volume to 170,544 for the localized mesh by the same size of cell, which is decreased by almost 70%. Second, gravity inversion is performed using the spatially restricted mesh. The recovered model constructed using the binary mesh flag is similar to the model obtained using the mesh spanning the whole volume and saves approximately 80% of the CPU time. Finally, a real gravity data example from Olympic Dam in Australia is successfully used to test the validity and practicability of this proposed method. The geologic source bodies are resolved between 250 and 750 m depth. Overall, the combination of edge detection and center detection, and our binary mesh flag, succeed in reducing the number of cells and saving the CPU time and computer storage required for gravity inversion.