摘要 |
A method for identifying closed areas and defining masks in a digital image, comprising the stages of dividing the image into a plurality of points and memorising values representative at least of the relative luminance of each point of the image in an ordered sequence in the memory of an electronic processor; memorising values representative of the luminance gradient of each point of the image, determined on the basis of the luminance values of each point and of the surrounding points in an ordered sequence in the memory of the electronic processor; preparing an intermediate threshold value, in order to sub-divide the luminance gradient values into a first and a second group; memorising in the memory of the electronic processor an ordered series of values identifying borders, each defined by a cluster of adjacent points whose gradient value belongs to the first group of luminance gradient values; selecting closed edges, defined by the borders whose points all have at least two neighbours whose luminance gradient values belong to the first group; memorising in the memory of the electronic processor the points of the image that are included within each edge, taken in succession, to define masking areas of the digital image corresponding to objects depicted in this image. |