A computer-implemented method for inspecting cargo with X-rays, comprising steps: scanning the cargo with a matrix comprising at least two rows of detectors, comprising: mutually displacing the cargo and the matrix with a mutual scanning displacement, and detecting, with the matrix, radiation generated by a plurality of successive X ray pulses irradiating the cargo, during the mutual scanning displacement, wherein each zone of the cargo irradiated by a first X ray pulse is irradiated by at least one second X ray pulse, and wherein a radiation corresponding to the first X ray pulse is detected by a first row of the matrix, and a radiation corresponding to the at least one second pulse is detected by at least one second row of the matrix; generating a first image of the cargo for the first row of the matrix and at least one second image of the cargo for the at least one second row of the matrix, wherein each image comprises pixels corresponding to the row of detectors for each X ray pulse; determining, for each zone of the cargo irradiated by the first X ray pulse and by the at least one second X ray pulse, at least one local mutual parasitic displacement between the cargo and the matrix by determining local mutual displacements between corresponding pixels of the first image and the at least one second image, the local mutual parasitic displacement: occurring between the first pulse and the at least one second X ray pulse, and being other than the mutual scanning displacement occurring between the first pulse and at least one second pulse; determining at least one total mutual parasitic displacement, by summing the determined local mutual displacements for the irradiated zones, from an X ray pulse associated with a start of the scan of the cargo to an X ray pulse associated with an end of the scan of the cargo; and generating at least one corrected image of the cargo, based on at least one of the first image and the at least one second image and on the determined at least one total mutual parasitic displacement. scanning the cargo with a matrix comprising at least two rows of detectors, comprising: mutually displacing the cargo and the matrix with a mutual scanning displacement, and detecting, with the matrix, radiation generated by a plurality of successive X ray pulses irradiating the cargo, during the mutual scanning displacement, wherein each zone of the cargo irradiated by a first X ray pulse is irradiated by at least one second X ray pulse, and wherein a radiation corresponding to the first X ray pulse is detected by a first row of the matrix, and a radiation corresponding to the at least one second pulse is detected by at least one second row of the matrix; mutually displacing the cargo and the matrix with a mutual scanning displacement, and detecting, with the matrix, radiation generated by a plurality of successive X ray pulses irradiating the cargo, during the mutual scanning displacement, wherein each zone of the cargo irradiated by a first X ray pulse is irradiated by at least one second X ray pulse, and wherein a radiation corresponding to the first X ray pulse is detected by a first row of the matrix, and a radiation corresponding to the at least one second pulse is detected by at least one second row of the matrix; generating a first image of the cargo for the first row of the matrix and at least one second image of the cargo for the at least one second row of the matrix, wherein each image comprises pixels corresponding to the row of detectors for each X ray pulse; determining, for each zone of the cargo irradiated by the first X ray pulse and by the at least one second X ray pulse, at least one local mutual parasitic displacement between the cargo and the matrix by determining local mutual displacements between corresponding pixels of the first image and the at least one second image, the local mutual parasitic displacement: occurring between the first pulse and the at least one second X ray pulse, and being other than the mutual scanning displacement occurring between the first pulse and at least one second pulse; occurring between the first pulse and the at least one second X ray pulse, and being other than the mutual scanning displacement occurring between the first pulse and at least one second pulse; determining at least one total mutual parasitic displacement, by summing the determined local mutual displacements for the irradiated zones, from an X ray pulse associated with a start of the scan of the cargo to an X ray pulse associated with an end of the scan of the cargo; and generating at least one corrected image of the cargo, based on at least one of the first image and the at least one second image and on the determined at least one total mutual parasitic displacement.