A method for controlling the emission of an X-ray imaging device configured to take images of a patients body, into which a medical instrument has been inserted, is provided. The method comprises: processing at least one image of the patients body taken by the X-ray imaging device to extract information representing the instrument, wherein the at least one image comprises the instrument and adapting X-ray emission parameters of the X-ray imaging device, depending on the information extracted from the at least one image, to minimize the X-ray dose emitted towards the patients body.