A shape inspection method comprising: a light-section image generation step in which linear laser light is applied to an object surface from a laser light source and a light-section line based on the laser light on the object surface is imaged by an imaging apparatus, and thereby a light-section image that is a captured image used for a light-section method is generated; an indicator value calculation step in which a thickness indicator value indicating a thickness of the light-section line and a brightness indicator value indicating a brightness of the light-section line in the light-section image are calculated; a setting changing step in which setting of at least one of the laser light source and the imaging apparatus is changed so that each of the calculated thickness indicator value and the calculated brightness indicator value is within a prescribed range uniquely set in advance; and a shape inspection step in which image processing is performed on the light-section image after each of the thickness indicator value and the brightness indicator value is brought within the prescribed range, and thereby a shape of the object surface is inspected, wherein, in the indicator value calculation step, a pixel giving a maximum luminance value is specified in each of column directions of a light-section image related to the object surface that are directions corresponding to a relative movement direction of the object and the laser light source, and in a case where the maximum luminance value in a column has a luminance value not less than a first threshold, that column is taken as a pixel column to be processed, the sum of the number of pixels giving the maximum luminance value and the number of pixels having a luminance value not less than a second threshold with respect to the maximum luminance value in each of the pixel columns to be processed is taken as the thickness of the light-section line in each of the pixel columns to be processed, and the average of the thicknesses of the light-section line in all the pixel columns to be processed is calculated and taken as the thickness indicator value, and a value obtained by dividing the average of luminance values in all pixels that have been used at a time of calculating the thickness indicator value by a maximum output luminance value possibly outputted from the imaging apparatus is taken as the brightness indicator value. a light-section image generation step in which linear laser light is applied to an object surface from a laser light source and a light-section line based on the laser light on the object surface is imaged by an imaging apparatus, and thereby a light-section image that is a captured image used for a light-section method is generated; an indicator value calculation step in which a thickness indicator value indicating a thickness of the light-section line and a brightness indicator value indicating a brightness of the light-section line in the light-section image are calculated; a setting changing step in which setting of at least one of the laser light source and the imaging apparatus is changed so that each of the calculated thickness indicator value and the calculated brightness indicator value is within a prescribed range uniquely set in advance; and a shape inspection step in which image processing is performed on the light-section image after each of the thickness indicator value and the brightness indicator value is brought within the prescribed range, and thereby a shape of the object surface is inspected, wherein, in the indicator value calculation step, a pixel giving a maximum luminance value is specified in each of column directions of a light-section image related to the object surface that are directions corresponding to a relative movement direction of the object and the laser light source, and in a case where the maximum luminance value in a column has a luminance value not less than a first threshold, that column is taken as a pixel column to be processed, the sum of the number of pixels giving the maximum luminance value and the number of pixels having a luminance value not less than a second threshold with respect to the maximum luminance value in each of the pixel columns to be processed is taken as the thickness of the light-section line in each of the pixel columns to be processed, and the average of the thicknesses of the light-section line in all the pixel columns to be processed is calculated and taken as the thickness indicator value, and a value obtained by dividing the average of luminance values in all pixels that have been used at a time of calculating the thickness indicator value by a maximum output luminance value possibly outputted from the imaging apparatus is taken as the brightness indicator value.