DNA chips (i.e., microarrays) biotechnology is a hybridization (i.e., DNA matching) based process that makes possible to quantify the relative abundance of mRNA from two distinct samples by analysing their fluorescence signals. This technique requires robotic placement (i.e., spotting) of thousands of cDNAs (i.e., complementary DNA) in an array format on glass microscope slides which provide gene-specific hybridization targets. The two different samples of mRNA, usually labeled with Cy3 and Cy5 fluorochromes, are cohybridized onto each spotted gene and two digital images, one for each fluorochrome, are acquired after hybridization. Before estimating the signal and background of each spot, it is necessary to locate the region of the spot in order to map the gene information with the corresponding spot. Therefore, these images must be segmented for analysis, that is, the spotting geometric structure must be found. That implies segmenting the subarrays (i.e., the set of grouped spots) and, then, the positions of the spots in each subarray. In this paper, we introduce a new technique using morphological operators that performs automatic gridding procedures (i.e., subarrays and spots segmentation). This technique has been implemented and tested in a variety of microarray images with success.