A procedure for bending a sheet of sheet metal on a panel bender machine, where the panel bender machine comprises a fixed workbench for supporting the metal sheet to be bent, a supporting frame for a clamping press, a presser comprising part of the press, and a corresponding counter-presser, all these components being designed to clamp the material during the bending process; and also comprising one or more bending blades and counterblades which can move towards the material during use, suitable mechanisms for moving the bending blade or blades, means for feeding the sheet or the profile towards the blades during the work cycle, transducers and sensors of various types for process control, connected to a processor unit equipped with a first machine control software designed to control the production process, means for entering and displaying bending data connected to the processor unit, and also comprising a TV camera installed alongside the panel bender machine whose optical vision axis is aligned with the bending line and oriented towards the metal sheet being bent, and where the TV camera can obtain a digital image of the bend made on the sheet of sheet metal and process this image using a second software for managing the TV camera, whereby during bending of the sheet metal sheet the first software for machine control transmits to the second software for TV camera management, the data relating to the nominal bending angle, the bending length, the distance of the bent edge from the centre line of the panel bender and the thickness of the sheet metal, whereby the second software acquires an image of the bent metal sheet, identifies the spatial position of the straight line corresponding to the bent edge of the sheet of sheet metal and then calculates its geometric coordinates in accordance with a preset referencing system, and supplies to the first software the value of the angle of the bend performed, and whereby the machine control is then returned to the first software, which calculates the difference between the angle of the bend actually performed and angle of the nominal bend and then orders the start of a new bend corresponding to the angular difference, thereby obtaining a bend which corresponds to the nominal bend, characterised in that the management software of the TV camera performs the following operations in the order shown: - cancellation from the image, by means of artificial masking, of those parts of the image, such as the counterblade and the presser, which might interfere with the search for the edge of the metal sheet; - calculation of the position on the image of a segment corresponding to the bent edge according to the nominal data; - shortening of this segment, and in particular the elimination of several millimetres of the segment from the part close to the bending point, because this part of the bend is not straight and is not therefore suitable for calculating the angle; - calculating a pair of segments parallel to the segment previously identified, where the pair of segments are at a preset distance from the other segment by a preset measurement, for example 20 pixel. - cancellation from the image, by means of artificial masking, of those parts of the image, such as the counterblade and the presser, which might interfere with the search for the edge of the metal sheet; - calculation of the position on the image of a segment corresponding to the bent edge according to the nominal data; - shortening of this segment, and in particular the elimination of several millimetres of the segment from the part close to the bending point, because this part of the bend is not straight and is not therefore suitable for calculating the angle; - calculating a pair of segments parallel to the segment previously identified, where the pair of segments are at a preset distance from the other segment by a preset measurement, for example 20 pixel.