CPC G06T 5/50 (2013.01) [G06T 3/40 (2013.01); G06T 5/70 (2024.01); H04N 23/61 (2023.01); H04N 23/695 (2023.01); H04N 23/951 (2023.01); G06T 2207/20221 (2013.01)] | 11 Claims |
1. An image fusion method, comprising:
obtaining a first short-focus image and a first long-focus image respectively acquired by a short-focus sensor and a long-focus sensor at the same time;
according to focal lengths of a short-focus lens and a long-focus lens, calculating a reduction coefficient corresponding to the first long-focus image when sizes of a same target in the first long-focus image and in the first short-focus image are matched;
performing a reduction processing on the first long-focus image according to the reduction coefficient to obtain a second long-focus image;
according to a relative angle of the current long-focus lens and short-focus lens, calculating a position of the second long-focus image in the first short-focus image when positions of a same target in the second long-focus image and in the first short-focus image are matched;
according to a position of the second long-focus image in the first short-focus image, covering the first short-focus image by the second long-focus image to obtain a fused image;
wherein, the short-focus sensor is connected to the short-focus lens, the long-focus sensor is connected to the long-focus lens, and both the short-focus sensor and the long-focus sensor rotate with a Pan-Tilt platform at the same time, or, the short-focus sensor is fixed and only the long-focus sensor rotates with the Pan-Tilt platform,
wherein after obtaining the first short-focus image and the first long-focus image respectively acquired by the short-focus sensor and the long-focus sensor at the same time, and before calculating the reduction coefficient corresponding to the first long-focus image when the sizes of the same target in the first long-focus image and in the first short-focus image are matched, the method further comprises:
cropping the first short-focus image according to a preset short-focus field-of-view cropping coefficient, so that a field of view corresponding to the second short-focus image obtained through the cropping is equal to a field of view corresponding to the first short-focus image multiplied by the short-focus field-of-view cropping coefficient; enlarging the second short-focus image to a same size as the first short-focus image to obtain a third short-focus image;
according to the focal lengths of the short-focus lens and the long-focus lens, calculating the reduction coefficient corresponding to the first long-focus image when the sizes of the same target in the first long-focus image and in the first short-focus image are matched comprising:
according to the focal lengths of the short-focus lens and the long-focus lens and the short-focus field-of-view cropping coefficient, calculating the reduction coefficient corresponding to the first long-focus image when the sizes of the same target in the first long-focus image and in the third short-focus image are matched;
according to the relative angle of the current long-focus lens and short-focus lens, calculating the position of the second long-focus image in the first short-focus image when the positions of the same target in the second long-focus image and in the first short-focus image are matched comprising:
according to the relative angle of the current long-focus lens and short-focus lens and the short-focus field-of-view cropping coefficient, calculating a position of the second long-focus image in the third short-focus image when positions of the same target in the second long-focus image and in the third short-focus image are matched;
according to the position of the second long-focus image in the first short-focus image, covering the first short-focus image by the second long-focus image comprising:
according to the position of the second long-focus image in the third short-focus image, covering the third short-focus image by the second long-focus image.
|