This article mainly explores meshing and segmentation techniques for microarray image analysis. The term "grid" refers to dividing an image into subgrids of dots and then dividing them into point detection. Most of the existing methods depend on input parameters such as the number of rows / columns, the number of points in each row / column, the size of the subarrays, etc. This article proposes a fully automatic mesh generation algorithm. This can remove any initialized parameter without any manual intervention. In the segmentation step, clustering algorithms are used because they do not consider the size and shape of the spots, do not depend on the initial state of the pixels, and do not require post-processing. In this article, a new method is proposed to estimate the initial parameters (centroid and number of clusters) required by any clustering algorithm. Qualitative and quantitative analysis shows that the algorithm can perform grid processing on microarray images well, and improves the performance of the clustering algorithm.