The current intense interest in gold nanoparticles is due to their Surface Plasmon Resonances (SPR) that depend strongly on the shape and size of the nanoparticles. As the SPR wavelength and resonantly enhanced absorption and scattering properties also depend on the dielectric medium in which gold nanoparticles are embedded, and also depend on the way of their clustering, they are useful to design novel nanodevices, in particular when it is based on ideas taken from nature. With purpose to select the most promising configurations for novel nanodevice design in this work the method of cell recognition and evaluation of its efficiency is proposed. Exist different methods to produce microscopic images, they can be obtained for different types of cells in different environments. Due to this fact, the recognition algorithms are needed. All methods have their advantages and disadvantages and may work well only under certain conditions. Therefore, it is useful for each specific task to implement a separate algorithm that will be effective for the existing set of images, and take into account the peculiarities of these images. The task of this work is not only to develop flexible and customizable algorithm, that can be configured to segment cells on different types of images, but also provide numerical error analysis corresponding to each step of algorithm. As a result, a solution is developed, that has many customizable parameters to optimize the result for a specific data set and specific accuracy. In addition, this it is resistant to a lot of noise and artifacts, that can occur on images, such as uneven background, small debris, loss of focus when shooting. Numerical error analysis allows getting form of cell segmentation more precisely to be reproduced for novel nanostructured device design.