This application relates to the field of pipeline inspection technology and discloses a method and
system for identifying internal defects in building drainage pipelines based on
machine vision. The method includes: acquiring observation frame sequences of the pipeline interior under multiple lighting conditions; calculating
optical flow stability and
edge orientation fields, and fusing them to construct a reflection morphology
coupling tensor; extracting response differences,
flicker intensity, and saturation, calculating a specular artifact probability map, and generating a specular
mask; dividing the region using the
mask, reconstructing the specular region based on the texture of the non-occluded region, and obtaining a de-artifact texture
tensor; dividing it into reflection and morphology channels, extracting features and classifying them separately, and stitching them together to obtain an initial defect result; determining weight allocation rules based on water film coverage,
turbidity, and edge sharpness, assigning dynamic weights to the initial result, and obtaining a scene-adaptive fusion result; determining results that meet physical rules as real defects, and generating a
list of reliable defects. This application effectively improves the accuracy of identifying internal defects in building drainage pipelines.