Dendritic spines are the postsynaptic sites that receive most of the excitatory synaptic inputs, and thus provide the structural basis for synaptic function. Here, we describe an accurate method for measurement and analysis of spine morphology based on structured illumination microscopy (SIM) and computational geometry in cultured neurons. Surface mesh data converted from SIM images were comparable to data reconstructed from electron microscopic images. Dimensional reduction and machine learning applied to large data sets enabled identification of spine phenotypes caused by genetic mutations in key signal transduction molecules. This method, combined with time-lapse live imaging and glutamate uncaging, could detect plasticity-related changes in spine head curvature. The results suggested that the concave surfaces of spines are important for the long-term structural stabilization of spines by synaptic adhesion molecules.