The invention provides a
machine vision
light source control method and
system, and the method comprises the steps: carrying out the
spatial analysis of ambient light state data of a
machine vision scene, obtaining the
spatial distribution information of ambient light, and determining an ambient light illumination abnormal region on the surface of a target object through combining the spatial attitude information of the target object in the
machine vision scene; based on the distribution state information of the abnormal ambient
light irradiation area on the surface of the target object, adjusting the supplementary lighting
irradiation state of the
light source, analyzing the global image of the surface of the target object, determining the
bright spot distribution information of the surface of the target object, and comprehensively positioning the area range with excessively concentrated brightness generated by supplementary lighting
irradiation; based on the hot spot distribution information, the
irradiation light intensity distribution of the
light source is dynamically adjusted, and the corresponding optimal adjustment parameters are determined, so that the light emitting state adjustment or light
ray state modulation is performed on the light source, a flexible and locally adjustable supplementary lighting mode is provided for
machine vision recognition, and the applicability of the
machine vision light source to different scenes is improved.