A method, apparatus, electronic device and medium for adjusting the image acquisition direction
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-08
- Publication Date
- 2026-08-14
AI Technical Summary
但是,上述方案由于人为手动调整,因此存在一定的偏差,且标定效率低,加工生产耗时
[0018]本申请实施例的技术方案,通过第一图像采集器进行图像采集得到第一图像,并控制第二图像采集器从第一初始角度周向转动至第一预设角度的过程中和/或调节俯仰角从第二初始角度至第二预设角度的过程中进行图像采集得到第二图像;将第一图像和第二图像进行特征比对,确定特征比对结果;根据特征比对结果,对子图像采集器的图像采集方向进行调整,以在图像采集方向调整后通过第一图像采集器进行图像采集。本技术方案,根据第一图像和第二图像的比对结果确定各子图像采集器视场范围的拼接情况,进而对子图像采集器的图像采集方向进行自动调整,提高了子图像采集器调整的智能化和准确性。
Smart Images

Figure CN116668849B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image acquisition technology, and in particular to an image acquisition direction adjustment method, device, electronic device and medium. Background Technology
[0002] With the rapid development of various technologies in the surveillance field, camera forms have become more diverse, leading to the emergence of panoramic cameras that fuse multiple cameras. In order to fuse the images from multiple cameras of a panoramic camera at their optimal perspectives, and to ensure that the field of view of the image seen by the camera is wider and more comprehensive, it is necessary to calibrate the multi-camera fixtures.
[0003] Currently, the common solution for tooling multiple cameras involves manually adjusting the tooling positions of the panoramic cameras during production line processing. This adjusts the image acquisition angles and field of view of the cameras, allowing for the fusion and stitching of the images to obtain a wider and more comprehensive panoramic image. However, this method, due to manual adjustment, introduces certain deviations, has low calibration efficiency, and is time-consuming in production. Furthermore, during transportation, the multiple cameras may experience vibration, causing their calibration positions to shift. Additionally, temperature changes can cause thermal expansion and contraction in the panoramic camera structure, leading to inaccurate calibration positions. Summary of the Invention
[0004] This application provides an image acquisition direction adjustment method, device, electronic device, and medium to achieve hierarchical clustering of preset targets, ensure the capacity of the preset target deployment library, and improve the matching speed and accuracy of the targets to be matched.
[0005] According to one aspect of this application, an image acquisition direction adjustment method is provided, applied to an image acquisition device. The image acquisition device includes a first image acquisition unit composed of at least two sub-image acquisition units, and a rotatable second image acquisition unit. The field of view of the second image acquisition unit during its circumferential rotation from a first initial angle to a first preset angle and / or the field of view of the second image acquisition unit during its adjustment of the pitch angle from a second initial angle to a second preset angle includes the field of view of the first image acquisition unit. The method includes:
[0006] A first image is obtained by acquiring an image through a first image acquisition device, and a second image is obtained by controlling a second image acquisition device to rotate circumferentially from a first initial angle to a first preset angle and / or adjusting the pitch angle from a second initial angle to a second preset angle.
[0007] The first image and the second image are compared to determine the feature comparison result.
[0008] Based on the feature comparison results, the image acquisition direction of the sub-image acquisition device is adjusted so that the image can be acquired by the first image acquisition device after the image acquisition direction is adjusted.
[0009] According to another aspect of this application, an image acquisition direction adjustment device is provided, configured in an image acquisition device. The image acquisition device includes a first image acquisition unit consisting of at least two sub-image acquisition units, and a rotatable second image acquisition unit. The field of view of the second image acquisition unit during its circumferential rotation from a first initial angle to a first preset angle and / or the field of view of the second image acquisition unit during its adjustment of the pitch angle from a second initial angle to a second preset angle includes the field of view of the first image acquisition unit. The device includes:
[0010] The image acquisition module is used to acquire a first image by acquiring an image through a first image acquisition device, and to control a second image acquisition device to circumferentially rotate from a first initial angle to a first preset angle and / or adjust the pitch angle from a second initial angle to a second preset angle to acquire an image to obtain a second image.
[0011] The feature comparison module is used to compare the features of the first image and the second image and determine the feature comparison result.
[0012] The adjustment module is used to adjust the image acquisition direction of the sub-image acquisition device according to the feature comparison results, so that the image can be acquired by the first image acquisition device after the image acquisition direction is adjusted.
[0013] According to another aspect of this application, an electronic device is provided, the device comprising:
[0014] At least one processor; and
[0015] A memory that is communicatively connected to at least one processor; wherein,
[0016] The memory stores a computer program that can be executed by at least one processor, such that the at least one processor is able to perform the image acquisition orientation adjustment method of any embodiment of the present application.
[0017] According to another aspect of this application, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to execute and implement the image acquisition direction adjustment method of any embodiment of this application.
[0018] The technical solution of this application embodiment acquires a first image through a first image acquisition device, and acquires a second image by controlling a second image acquisition device to rotate circumferentially from a first initial angle to a first preset angle and / or adjusting the pitch angle from a second initial angle to a second preset angle. The first and second images are then compared to determine the feature comparison result. Based on the feature comparison result, the image acquisition direction of the sub-image acquisition devices is adjusted so that image acquisition is performed through the first image acquisition device after the image acquisition direction is adjusted. This technical solution determines the stitching situation of the field of view of each sub-image acquisition device based on the comparison result of the first and second images, and then automatically adjusts the image acquisition direction of the sub-image acquisition devices, improving the intelligence and accuracy of the sub-image acquisition device adjustment.
[0019] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a flowchart of an image acquisition direction adjustment method according to Embodiment 1 of this application;
[0022] Figure 2 This is a first schematic diagram of an image acquisition device according to Embodiment 1 of this application;
[0023] Figure 3 This is a second schematic diagram of an image acquisition device according to Embodiment 1 of this application;
[0024] Figure 4 This is a flowchart of an image acquisition direction adjustment method according to Embodiment 2 of this application;
[0025] Figure 5 This is a schematic diagram of the first image provided according to Embodiment 2 of this application;
[0026] Figure 6 This is a schematic diagram of the second image provided according to Embodiment 2 of this application;
[0027] Figure 7 This is a schematic diagram of the image acquisition direction provided according to Embodiment 2 of this application;
[0028] Figure 8 This is a schematic diagram of the second image pixel region provided according to Embodiment 2 of this application;
[0029] Figure 9 This is a flowchart of an image acquisition direction adjustment method according to Embodiment 3 of this application;
[0030] Figure 10 This is a flowchart illustrating the specific implementation of an image acquisition direction adjustment method according to Embodiment 3 of this application;
[0031] Figure 11 This is a schematic diagram of an image acquisition direction adjustment device according to Embodiment 4 of this application;
[0032] Figure 12 This is a schematic diagram of the structure of an electronic device that implements the image acquisition direction adjustment method provided in Embodiment 5 of this application. Detailed Implementation
[0033] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0034] It should be noted that the terms "first," "second," "third," "fourth," "actual," "preset," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0035] Example 1
[0036] Figure 1This is a flowchart illustrating an image acquisition direction adjustment method provided in Embodiment 1 of this application. This embodiment is applicable to situations where the image acquisition direction of at least two sub-image acquisition units in a first image acquisition unit needs to be adjusted. The method can be applied to an image acquisition device comprising a first image acquisition unit consisting of at least two sub-image acquisition units, and a rotatable second image acquisition unit. The field of view of the second image acquisition unit during its circumferential rotation from a first initial angle to a first preset angle and / or the field of view during the adjustment of the pitch angle from a second initial angle to a second preset angle includes the field of view of the first image acquisition unit. In this embodiment, the image acquisition device can be a panoramic integrated PTZ camera. A schematic diagram of a panoramic integrated PTZ camera is shown below. Figure 2 As shown, the panoramic camera is the first image acquisition device. It is fixed and cannot rotate, but at least two of its sub-cameras can be adjusted in image acquisition direction by a pan-tilt unit. The PTZ camera is the second image acquisition device, capable of moving along... Figure 2 It can rotate circumferentially in the horizontal direction, or along the horizontal direction. Figure 2 The vertical tilt angle is adjusted. This method can be executed by an image acquisition orientation adjustment device, which can be implemented in hardware and / or software and can be configured in electronic devices with image acquisition orientation adjustment capabilities. For example... Figure 1 As shown, the method includes:
[0037] S110. A first image is obtained by acquiring an image through the first image acquisition device, and a second image is obtained by controlling the second image acquisition device to rotate circumferentially from a first initial angle to a first preset angle and / or adjusting the pitch angle from a second initial angle to a second preset angle.
[0038] The first image acquisition unit has a base fixedly connected to a support (e.g., a crossbar). The base of the first image acquisition unit is equipped with several pan-tilt units. At least two sub-image acquisition units within the first image acquisition unit can be rotated by the pan-tilt units to adjust the image acquisition direction of each sub-image acquisition unit. The second image acquisition unit is also rotated by the pan-tilt units, for example, it can perform circumferential rotation and / or adjust the pitch angle. The circumferential motion is an orbital motion... Figure 3 The axis in the middle rotates, and the pitch angle is adjusted to rotate along the axis. The second image acquisition device has a maximum circumferential rotation angle and / or a maximum pitch angle, which is determined according to the hardware performance of the second image acquisition device. For example, the maximum circumferential rotation angle of the second image acquisition device can be 360 degrees, that is, it can rotate one full circle.
[0039] The first initial angle, the first preset angle, the second initial angle, and the second preset angle can be determined according to the actual situation. For example, using... Figure 2 and Figure 3Taking the installation direction of the image acquisition device as an example, the initial orientation of the image acquisition device can be set to due south. This means the angle between the horizontal rotation angle of the second image acquisition device and due south is 0 degrees, and the first initial angle is 0 degrees. The angle between the pitch angle and the horizontal plane is 0 degrees, and the second initial angle is 0 degrees. The first and second preset angles can be determined based on the field of view of the first image acquisition device. Assuming that the horizontal field of view of the second image acquisition device, when rotated from 0 degrees to the first angle, is equal to the horizontal field of view of the first image acquisition device, then the first preset angle is determined to be greater than or equal to the first angle. Similarly, assuming that the vertical field of view of the second image acquisition device, when rotated from 0 degrees to the second angle, is equal to the vertical field of view of the first image acquisition device, then the second preset angle is determined to be greater than or equal to the second angle. The above is only based on... Figure 2 and Figure 3 The following example illustrates the rotation angles along the horizontal and vertical directions using the installation direction of the image acquisition device. If the image acquisition device is installed at an angle, the horizontal direction should be the radial direction of the image acquisition device, and the vertical direction should be the axial direction of the image acquisition device.
[0040] In this embodiment, a first image is acquired by a first image acquisition device, and a second image is acquired by controlling a second image acquisition device to rotate circumferentially from a first initial angle to a first preset angle, and / or by controlling the second image acquisition device to adjust the pitch angle from a second initial angle to a second preset angle, or by controlling the second image acquisition device to rotate axially from a first initial angle to a first preset angle, and by adjusting the pitch angle from a second initial angle to a second preset angle. The second image can be obtained by fusing the images acquired during the rotation of the second image acquisition device.
[0041] S120. Perform feature comparison between the first image and the second image to determine the feature comparison result.
[0042] For example, feature comparison between the first and second images can be performed by comparing the pixels of the first image with the pixels of the second image to determine the similarity between the pixels; alternatively, it can be by comparing image macroblocks composed of adjacent pixels. Since the field of view of the second image acquisition device during its circumferential rotation from the first initial angle to the first preset angle and / or the field of view during its adjustment of the pitch angle from the second initial angle to the second preset angle includes the field of view of the first image acquisition device, there are identical image portions in the first and second images. The similarity between the pixels of the first and second images corresponding to these identical image portions is greater than a preset similarity threshold. Therefore, the identical image portions in the first and second images can be determined based on the pixel similarity comparison.
[0043] In this embodiment, a pixel at the first edge of the first image can be determined, and a matching pixel can be found in the second image. The pixels in the first image and the second image are then matched along the same direction to determine the portion of the second image identical to the first image. Alternatively, a pixel at the first edge of the first image and a pixel at the opposite edge (i.e., the second edge) can be determined, and a matching pixel can be found in the second image to determine the portion of the second image identical to the first image. The first edge is not limited and can be one of the left, right, top, or bottom edges of the rectangular first image. The left and right edges are opposite edges, and the top and bottom edges are opposite edges.
[0044] S130. Based on the feature comparison results, the image acquisition direction of the sub-image acquisition device is adjusted so that the image is acquired through the first image acquisition device after the image acquisition direction is adjusted.
[0045] For example, if the fields of view of each sub-image collector in the first image collector are completely stitched together, without overlap or gaps, then there are consecutive pixels in the second image that match the pixels in the first image. Therefore, the stitching situation of the fields of view of each sub-image collector can be determined based on the feature comparison results, and then the image acquisition direction of the sub-image collector can be adjusted according to the stitching situation. If the fields of view of the sub-image collectors overlap, the image acquisition direction of the sub-image collectors is adjusted to increase the angle between the image acquisition directions of the sub-image collectors to eliminate the overlap. If there are gaps between the fields of view of the sub-image collectors, the image acquisition direction of the sub-image collectors is adjusted to decrease the angle between the image acquisition directions of the sub-image collectors to eliminate the gaps in the fields of view of the sub-image collectors.
[0046] In this embodiment, the rotation angle of the image acquisition device can be adjusted by the gimbal corresponding to the sub-image acquisition device to adjust the image acquisition direction. The rotation direction and angle of the image acquisition device driven by the gimbal can be determined based on whether there is overlap or gap in the field of view of the sub-image acquisition device. Whether there is overlap or gap in the field of view of the sub-image acquisition device is determined based on the feature comparison results.
[0047] This application provides an image acquisition direction adjustment method. A first image is acquired using a first image acquisition device, and a second image is acquired by controlling a second image acquisition device to rotate circumferentially from a first initial angle to a first preset angle and / or adjusting the pitch angle from a second initial angle to a second preset angle. The first and second images are then compared to determine the feature comparison result. Based on the feature comparison result, the image acquisition direction of the sub-image acquisition devices is adjusted so that image acquisition is performed by the first image acquisition device after the image acquisition direction is adjusted. This technical solution determines the stitching of the field of view of each sub-image acquisition device based on the comparison result of the first and second images, thereby automatically adjusting the image acquisition direction of the sub-image acquisition devices, improving the intelligence and accuracy of the sub-image acquisition device adjustment.
[0048] In this embodiment, before acquiring the first image using the first image acquisition device, the sub-image acquisition devices of the first image acquisition device can be self-calibrated. For example, the initial rotation angle of the second image acquisition device is predetermined. At this time, the field of view of the second image acquisition device should correspond to the field of view of the first sub-image acquisition device in the first image acquisition device. Therefore, the angle of the first sub-image acquisition device can be adjusted according to the initial rotation angle of the second image acquisition device. For example, if the initial rotation angle of the second image acquisition device is due south, the angle of one sub-image acquisition device can be adjusted to face due south. The angle of the first sub-image acquisition device can be adjusted based on the field of view angle between the other sub-image acquisition devices and the first sub-image acquisition device to ensure that the field of view of each sub-image acquisition device is completely stitched together.
[0049] Example 2
[0050] Figure 4 This is a flowchart of an image acquisition direction adjustment method provided in Embodiment 2 of this application. This embodiment is an optimization based on the above embodiment; solutions not described in detail in this embodiment are found in the above embodiment. Figure 4 As shown, the method in this embodiment of the application specifically includes the following steps:
[0051] S210. A first image is obtained by acquiring an image through the first image acquisition device, and a second image is obtained by controlling the second image acquisition device to rotate circumferentially from a first initial angle to a first preset angle and / or adjusting the pitch angle from a second initial angle to a second preset angle.
[0052] S220. The first starting pixel located at the first edge of the first image is compared with the pixel of the second image to determine the second starting pixel that matches the first starting pixel in the second image.
[0053] The first edge can be any edge of the first image, such as the left edge of a rectangular image. If the first edge is the left or right edge, the first starting pixel located on the first edge can be a column of pixels closest to the edge or a portion of a column of pixels. If the first edge is the top or bottom edge, the first starting pixel located on the first edge can be a row of pixels closest to the edge or a portion of a row of pixels.
[0054] For example, feature comparison is performed between the first starting pixel and the pixels of the second image to determine the second starting pixel in the second image that matches the first starting pixel. Specifically, assuming the first starting pixel is the leftmost column of pixels in the first image, feature comparison is performed between the first starting pixel and each column of pixels in the second image, and similarity data between the first starting pixel and each column of pixels in the second image is calculated. The column of pixels in the second image corresponding to the maximum similarity data is determined as the second starting pixel. The process of calculating the similarity data between the first starting pixel and each column of pixels in the second image can be as follows: calculate the similarity value of corresponding pixel pairs in the same row of the column of pixels to be compared in the first starting pixel and the second image, and calculate the average of the similarity values of each pixel pair as the similarity data. Alternatively, a weighted average of the similarity values of each pixel pair can be calculated as the similarity data. Other calculation methods can also be used to calculate the similarity values of each pixel pair to obtain the similarity data.
[0055] S230. Starting from the first starting pixel, traverse the pixels of the first image along the target direction, and starting from the second starting pixel in the second image, search for the matching pixel corresponding to the currently traversed pixel along the target direction.
[0056] The target direction is the direction from the first edge to the opposite side of the first edge. Assuming the first edge is the left edge of the rectangular first image, the target direction is from left to right; assuming the first edge is the top edge of the rectangular first image, the target direction is from top to bottom. Specifically, assuming the first edge is the left edge of the rectangular first image, the first starting pixel is the leftmost column of pixels, and the target direction is from left to right, after finding the second starting pixel in the second image, the second column of pixels in the first image is compared with the column of pixels to the right of the second starting pixel. If the comparison is successful, the third column of pixels in the first image is compared with the second column of pixels to the right of the second starting pixel, and so on.
[0057] S240. If the currently traversed pixel does not match the pixel to be matched, the image acquisition direction of the sub-image acquisition device is adjusted.
[0058] For example, if the currently traversed pixel does not match the pixel to be matched, it is determined that there is an overlap or gap between the field of view of the sub-image acquisition unit, and the image acquisition direction of the sub-image acquisition unit needs to be adjusted. Specifically, if the target direction is from left to right or from right to left, the sub-image acquisition unit is controlled to rotate circumferentially to adjust the image acquisition angle; if the target direction is from top to bottom or from bottom to top, the sub-image acquisition unit is controlled to adjust the pitch angle to adjust the image acquisition angle.
[0059] This application provides an image acquisition direction adjustment method. A first starting pixel located at the first edge of a first image is compared with pixels in a second image to determine a second starting pixel in the second image that matches the first starting pixel. Starting from the first starting pixel, pixels in the first image are traversed along a target direction. Starting from the second starting pixel in the second image, a matching pixel is searched along the target direction to determine the currently traversed pixel. The feature comparison result between the currently traversed pixel and the matching pixel is determined, thereby determining whether there exists a matching pixel region in the second image that matches the pixels in the first image. This determines the stitching status of the field of view of each sub-image collector in the first image collector. If the currently traversed pixel does not match the matching pixel, it is determined that the field of view of the sub-image collector overlaps or has gaps. The image acquisition direction of the sub-image collector is then adjusted to achieve real-time automatic adjustment of the acquisition direction of the sub-image collector, improving adjustment accuracy and real-time performance, and ensuring the completeness and comprehensiveness of the field of view acquired by the first image collector.
[0060] In this embodiment of the application, the image acquisition direction of the sub-image acquisition device is adjusted according to the feature comparison result, including: if the currently traversed pixel does not match the pixel to be matched, and a pixel matching the pixel to be matched is found in the first image along the target direction, then the angle between the image acquisition directions of the sub-image acquisition devices along the adjustment direction is reduced; if the currently traversed pixel does not match the pixel to be matched, and a pixel matching the pixel to be matched is not found in the first image along the target direction, then the angle between the image acquisition directions of the sub-image acquisition devices along the adjustment direction is increased; wherein, the adjustment direction is the direction associated with the target direction.
[0061] For example, the field of view of the sub-image acquisition unit may overlap or have gaps. Therefore, it is necessary to further determine whether the field of view of the sub-image acquisition unit overlaps or has gaps based on the pixel feature comparison results of the first and second images. Specifically, if the currently traversed pixel does not match the pixel to be matched, the search continues along the target direction to determine whether there is a pixel that matches the pixel to be matched. Figure 5 and Figure 6 As shown, if the currently traversed pixel does not match the pixel to be matched, the search continues from left to right to find a matching pixel in the first image. If a matching pixel exists in the seventh column, it is determined that there is a gap between the field of view of the sub-image collectors, and therefore the angle between the image acquisition directions of the sub-image collectors along the adjustment direction is reduced. If no matching pixel exists, it is determined that there is an overlap between the field of view of the sub-image collectors, and therefore the angle between the image acquisition directions of the sub-image collectors along the adjustment direction is increased. In this embodiment, the image acquisition direction can be the direction emitted from the sub-image collector along the angle bisector of the field of view. For example, as... Figure 7 As shown, if the initial image acquisition directions of the two sub-image acquisition devices are a and b, and a gap is determined to exist between the two sub-image acquisition devices based on the feature comparison results, then the angle between the image acquisition directions of the sub-image acquisition devices along the adjustment direction is reduced to c and d. If the feature comparison results determine that there is overlap between the two sub-image acquisition devices, then the angle between the image acquisition directions of the sub-image acquisition devices along the adjustment direction is increased to e and f. The beneficial effect of the above scheme is that, based on the pixel matching situation, the overlap and gap situations of the sub-image acquisition devices' field of view are accurately determined, and then the image acquisition directions of the sub-image acquisition devices are adaptively adjusted to eliminate the overlap or gaps in the field of view, ensuring the integrity and comprehensiveness of the first image acquired by the first image acquisition device.
[0062] In this embodiment of the application, the image acquisition direction of the sub-image acquisition device is adjusted according to the feature comparison result, including: determining the target sub-image acquisition device corresponding to the traversed pixel based on the correspondence between the field of view of each sub-image acquisition device and the pixel region in the first image, and the target pixel region where the traversed pixel is located; and adjusting the image acquisition direction of the other sub-image acquisition devices except the target sub-image acquisition device.
[0063] For example, if, during the traversal of pixels in the first image, all traversed pixels match the corresponding pixels in the second image, and the currently traversed pixel in the first image does not match the pixel to be matched in the second image, then the sub-image collector corresponding to the traversed pixel in the first image is designated as the target sub-image collector. Here, the pixel to be matched in the second image is the pixel corresponding to the pixel position in the first image. For example, the pixel to be matched corresponding to the first column of pixels on the left side of the first image is the first column of pixels on the left side of the second image, the pixel to be matched corresponding to the second column of pixels on the left side of the first image is the second column of pixels on the left side of the second image, and so on. Figure 5 and Figure 6 As shown, if the currently traversed pixel does not match the pixel to be matched, then it is determined that the pixel in the first image has already been traversed, i.e., it is... Figure 5 The first to third columns of pixels in the image represent the target pixel region where the traversed pixels are located. Based on a pre-determined correspondence between the field of view of each image acquisition device and the pixel regions in the first image, the target sub-image acquisition device corresponding to the target pixel region is determined. For example, such as... Figure 8As shown, assuming the pixel regions from the first to the third column correspond to the field of view of the first sub-image collector, the pixel regions from the fourth to the sixth column correspond to the field of view of the second sub-image collector, and the pixel regions from the seventh to the ninth column correspond to the field of view of the third sub-image collector, and the currently traversed pixel point (i.e., the pixel point in the fourth column) does not match the corresponding pixel point to be matched in the second image, then the traversed pixels (i.e., the pixels from the first to the third column in the first image) are taken as the target pixel region. The target pixel region is determined to be the pixel region corresponding to the field of view of the first sub-image collector, and thus the first sub-image collector is taken as the target sub-image collector. Since the traversed pixel point matches the corresponding pixel point in the second image, it indicates that the image acquisition direction of the target sub-image collector is appropriate, therefore no adjustment to the image acquisition direction of the target sub-image collector is needed. Since the currently traversed pixel point does not match the pixel point to be matched, it indicates that the image acquisition direction of the other sub-image collectors is inappropriate, and there is overlap or gap between the field of view of the other sub-image collectors and the target sub-image collector. Therefore, the image acquisition direction of the other sub-image collectors needs to be adjusted. For example, assuming there are three sub-image acquisition devices, with the first sub-image acquisition device as the target device, if the currently traversed pixel does not match the pixel to be matched, and a matching pixel is found in the first image along the target direction, then the horizontal image acquisition direction angle between the second and first sub-image acquisition devices is decreased, and the horizontal image acquisition direction angle between the third and first sub-image acquisition devices is also decreased. Otherwise, the horizontal image acquisition direction angle between the second and first sub-image acquisition devices is increased, and the horizontal image acquisition direction angle between the third and first sub-image acquisition devices is also increased. The adjustment direction is the direction associated with the target direction. For example, if the target direction is from left to right in the first and second images, the adjustment direction is horizontal, i.e., adjusting the rotation angle of the sub-image acquisition device circumferentially. If the target direction is from top to bottom in the first and second images, the adjustment direction is vertical, i.e., adjusting the pitch angle of the sub-image acquisition device. The beneficial effect of the above scheme is that it can determine the specific location where the field of view overlaps or gaps exist based on the feature comparison of pixels, thereby locating the sub-image acquisition device with an inappropriate image acquisition direction, and then accurately adjusting the angle of the sub-image acquisition device with an inappropriate image acquisition direction to adjust the field of view of the sub-image acquisition device and eliminate overlaps or gaps.
[0064] In this embodiment of the application, the image acquisition direction of the sub-image acquisition device is adjusted according to the feature comparison result, including: continuing to traverse the pixels of the first image along the target direction to determine the number of consecutive mismatched pixels along the target direction; determining the target step size of the gimbal rotation based on the correlation between the gimbal rotation step size and the number of moved pixels, and the number of consecutive mismatched pixels along the target direction; and controlling the gimbal rotation according to the target step size to adjust the image acquisition direction of the sub-image acquisition device.
[0065] For example, the number of consecutive mismatched pixels along the target direction reflects the range of gaps between the field of view of the sub-image acquisition units. Based on the range of gaps between the field of view of the sub-image acquisition units, the magnitude of the adjustment to the acquisition direction of the sub-image acquisition units can be determined. Specifically, such as... Figure 5 As shown, assuming the consecutive mismatched pixels are in columns four to seven (four columns in total), then the number of consecutive mismatched pixels from left to right is four. Assuming a predetermined relationship between the gimbal rotation step size and the number of pixels moved: one gimbal rotation corresponds to four pixels moving in the first image, two gimbal rotations correspond to eight pixels moving, and so on. Therefore, there are four consecutive mismatched pixels from left to right, requiring a one-step gimbal rotation to eliminate the gaps or overlapping areas of these four pixels. The advantage of this scheme is that quantifying the gimbal rotation step size allows for precise determination of the gimbal rotation step size corresponding to overlapping or gap areas, thereby improving the correction efficiency and accuracy of the sub-image acquisition unit.
[0066] In this embodiment of the application, the first image includes sub-images acquired by at least two sub-image acquisition devices in the first image acquisition device; the first image and the second image are compared to determine the feature comparison result, including: determining that the sub-images of at least two sub-image acquisition devices correspond to the theoretical image regions in the second image based on the image acquisition directions of the at least two sub-image acquisition devices and the rotation angle of the second image acquisition device; comparing the features of each sub-image with the theoretical image regions in the second image corresponding to the sub-image to determine the feature comparison result; accordingly, the image acquisition direction of the sub-image acquisition device is adjusted according to the feature comparison result, including: if there is a mismatch between a sub-image and the theoretical image region in the second image corresponding to the sub-image, the image acquisition direction of the sub-image acquisition device corresponding to the sub-image is adjusted.
[0067] For example, the image acquisition direction of each sub-image acquisition unit should correspond to the rotation angle of the second image acquisition unit. Assuming due south is 0 degrees, the image acquisition direction of the first sub-image acquisition unit in the first image acquisition unit corresponds to the field of view from 0 degrees to southwest (45 degrees), corresponding to the field of view of the second image acquisition unit rotating from 0 degrees to 45 degrees. The image acquisition direction of the second sub-image acquisition unit in the first image acquisition unit corresponds to the field of view from 45 degrees to due west (90 degrees), corresponding to the field of view of the second image acquisition unit rotating from 45 degrees to 90 degrees. Therefore, the sub-image acquired by the first sub-image acquisition unit corresponds to the theoretical left half of the second image region, and the sub-image acquired by the second sub-image acquisition unit corresponds to the theoretical right half of the second image region. The sub-image acquired by the first sub-image acquisition unit is compared with the theoretical left half of the second image region. If they match, the image acquisition direction of the first sub-image acquisition unit does not need adjustment; if they do not match, the image acquisition direction of the first sub-image acquisition unit needs adjustment. The sub-image acquired by the second sub-image collector is matched with the right half of the theoretical image region in the second image. If they match, the image acquisition direction of the second sub-image collector does not need adjustment; otherwise, the image acquisition direction of the second sub-image collector needs adjustment. The specific adjustment direction can be adjusted according to the scheme described in the above embodiments. Feature comparison can include similarity comparison, pixel matching, etc. The advantage of this scheme is that it avoids traversing all pixels, enabling targeted and rapid identification of sub-image collectors that need adjustment, thereby adjusting their image acquisition direction to eliminate gaps or overlaps and improve the image quality of the first image collector.
[0068] Example 3
[0069] Figure 9 This is a flowchart of an image acquisition direction adjustment method provided in Embodiment 2 of this application. This embodiment is an optimization based on the above embodiment; solutions not described in detail in this embodiment are found in the above embodiment. Figure 9 As shown, the method in this embodiment of the application specifically includes the following steps:
[0070] S310. A first image is obtained by acquiring an image through the first image acquisition device, and a second image is obtained by controlling the second image acquisition device to rotate circumferentially from a first initial angle to a first preset angle and / or adjusting the pitch angle from a second initial angle to a second preset angle.
[0071] S320. The first starting pixel located at the first edge of the first image is compared with the pixel of the second image to determine the second starting pixel that matches the first starting pixel in the second image.
[0072] S330. Starting from the second starting pixel in the second image, search along the target direction for a second ending pixel that matches the first ending pixel in the first image; wherein the first ending pixel is a pixel located on the opposite side of the first edge.
[0073] Wherein, if the first edge is the left edge of the first image and the opposite edge of the first edge is the right edge of the first image, then the target direction is from left to right, and the first termination pixel is the rightmost column of pixels in the first image or a portion of the rightmost column of pixels. If the first edge is the top edge of the first image and the opposite edge of the first edge is the bottom edge of the first image, then the target direction is from top to bottom, and the first termination pixel is the bottommost column of pixels in the first image or a portion of the bottommost column of pixels.
[0074] Specifically, starting from the second starting pixel in the second image, the pixels in the second image are traversed along the target direction to determine the similarity between each pixel in the second image and the first ending pixel. The pixel in the second image with the highest similarity to the first ending pixel is taken as the second ending pixel.
[0075] S340. Determine the detection field of view of the first image collector based on the pixel difference between the second termination pixel and the second start pixel, the pixel width between opposite edges of the second image along the target direction, and the field of view of the second image collector corresponding to the second image.
[0076] For example, such as Figure 6 As shown, assuming the second starting pixel is in the fourth column and the second ending pixel is in the tenth column, the pixel difference between the second ending pixel and the second starting pixel is six pixels. The pixel width between opposite edges of the second image along the target direction is the pixel width from the leftmost edge to the rightmost edge, i.e., fifteen pixels. The detection field of view corresponding to the second image acquisition device acquiring the second image can be predetermined, that is, the field of view of the second image acquisition device during the process of circumferentially rotating from the first initial angle to the first preset angle, and / or the field of view of the pitch angle during the process of adjusting the pitch angle from the second initial angle to the second preset angle. If the target direction is horizontal, the detection field of view is the field of view of the second image acquisition device during the process of circumferentially rotating from the first initial angle to the first preset angle; if the target direction is vertical, the detection field of view is the field of view of the pitch angle during the process of adjusting the pitch angle from the second initial angle to the second preset angle.
[0077] Specifically, the pixel difference between the second termination pixel and the second start pixel, and the ratio of the pixel widths between opposite edges of the second image along the target direction can be determined. The product of this ratio and the field of view of the second image acquisition device corresponding to the second image is used as the detection field of view of the first image acquisition device. As in the example above, assuming the field of view of the second image acquisition device corresponding to the second image is... Then the field of view is detected. .
[0078] S350. Based on the comparison between the detected field of view and the theoretical field of view of the first image acquisition device, determine whether to execute the process of traversing the pixels of the first image from the first starting pixel along the target direction.
[0079] For example, if the field of view of each sub-image acquisition device is completely stitched together, that is, there is neither overlap nor gap between the field of view of each sub-image acquisition device, then the detected field of view angle should be equal to the theoretical field of view angle of the first image acquisition device. If they are not equal, it is determined that there is overlap or gap between the field of view of each sub-image acquisition device, and the image acquisition direction of the sub-image acquisition devices needs to be adjusted according to the scheme in the above embodiment.
[0080] In this embodiment of the application, determining whether to perform a process of traversing the pixels of the first image from the first starting pixel along the target direction based on the comparison result between the detected field of view and the theoretical field of view of the first image acquisition device includes: determining the theoretical field of view of the first image acquisition device corresponding to the current temperature based on the current temperature and the correlation between temperature and the field of view of the first image acquisition device; if the difference between the detected field of view and the theoretical field of view is greater than a preset threshold, then performing a process of traversing the pixels of the first image from the first starting pixel along the target direction.
[0081] For example, a first panoramic image can be pre-acquired using a first image acquisition device at different temperatures, and a second panoramic image can be simultaneously acquired using a second image acquisition device. Feature comparison is performed between the first and second panoramic images to determine that the edges of the first panoramic image correspond to the boundaries of the second panoramic image. Based on the boundaries and the field of view of the second image acquisition device, the field of view of the first panoramic image is determined, using the same method as in S340, thus establishing a correlation between temperature and the field of view of the first image acquisition device. The current temperature is determined, and the theoretical field of view of the first image acquisition device associated with the current temperature is determined from the correlation between temperature and the field of view of the first image acquisition device. If the difference between the detected field of view and the theoretical field of view is greater than a preset threshold, it is determined that there is overlap or gap between the field of view ranges of the sub-image acquisition devices, and the image acquisition direction of the sub-image acquisition devices needs to be adjusted.
[0082] S360. If the process of traversing the pixels of the first image along the target direction starting from the first starting pixel is executed, and the currently traversed pixel does not match the pixel to be matched, then the image acquisition direction of the sub-image acquisition device is adjusted.
[0083] This application provides an image acquisition direction adjustment method. Starting from a second starting pixel in a second image, a second ending pixel is searched along a target direction to find a second ending pixel that matches a first ending pixel in a first image, thereby determining the range in the second image corresponding to the first image. Based on the pixel difference between the second ending pixel and the second starting pixel, the pixel width between opposite edges of the second image along the target direction, and the field of view angle of the second image acquisition device corresponding to the second image, the detection field of view angle of the first image acquisition device is determined. Then, based on the range in the second image corresponding to the first image and the field of view angle of the second image acquisition device, the detection field of view angle of the first image acquisition device is calculated. By comparing the detection field of view angle with the theoretical field of view angle of the first image acquisition device, it is determined whether there is overlap or gaps in the field of view range of the first image acquisition device. This determines whether to perform a process of traversing the pixels of the first image along the target direction starting from the first starting pixel, so as to accurately and timely adjust the image acquisition direction of the sub-image acquisition device.
[0084] The complete implementation process of the embodiments of this application can be described as follows: Figure 10 As shown, the first image acquisition unit can perform self-calibration first. If it does not perform self-calibration, it can execute S310-S360. If it performs self-calibration, it can directly execute S210-S240.
[0085] Example 4
[0086] Figure 11 This is a schematic diagram of an image acquisition direction adjustment device provided in Embodiment 4 of this application. This device can execute the image acquisition direction adjustment method provided in any embodiment of this application, and possesses the corresponding functional modules and beneficial effects for executing the method. Figure 11 As shown, the device is configured in an image acquisition device, which includes a first image acquisition unit consisting of at least two sub-image acquisition units, and a rotatable second image acquisition unit. The field of view of the second image acquisition unit during its circumferential rotation from a first initial angle to a first preset angle and / or the field of view during its adjustment of the pitch angle from a second initial angle to a second preset angle includes the field of view of the first image acquisition unit. The device includes:
[0087] The image acquisition module 410 is used to acquire a first image through the first image acquisition device, and to control the second image acquisition device to rotate circumferentially from a first initial angle to a first preset angle and / or adjust the pitch angle from a second initial angle to a second preset angle to acquire a second image.
[0088] The feature comparison module 420 is used to perform feature comparison between the first image and the second image and determine the feature comparison result.
[0089] The adjustment module 430 is used to adjust the image acquisition direction of the sub-image acquisition device according to the feature comparison result, so that the image can be acquired through the first image acquisition device after the image acquisition direction is adjusted.
[0090] In this embodiment of the application, the feature comparison module 420 includes:
[0091] The matching unit is used to perform feature comparison between a first starting pixel located at a first edge of the first image and a pixel in the second image, and to determine a second starting pixel in the second image that matches the first starting pixel.
[0092] The result determination unit is used to traverse the pixels of the first image starting from the first starting pixel point along the target direction, search for the matching pixel point corresponding to the currently traversed pixel point along the target direction starting from the second starting pixel point in the second image, and determine the feature comparison result between the currently traversed pixel point and the matching pixel point; wherein, the target direction is the direction from the first edge to the side opposite the first edge.
[0093] In this embodiment of the application, the adjustment module 430 includes:
[0094] The reduction adjustment unit is used to reduce the angle between the sub-image acquisition directions along the adjustment direction if the currently traversed pixel does not match the pixel to be matched, and a pixel matching the pixel to be matched is found in the first image along the target direction.
[0095] An adjustment unit is configured to increase the angle between the sub-image acquisition units along the adjustment direction if the currently traversed pixel does not match the pixel to be matched, and no matching pixel is found in the first image along the target direction; wherein the adjustment direction is the direction associated with the target direction.
[0096] In this embodiment of the application, the adjustment module 430 includes:
[0097] The target sub-image acquisition unit is used to determine the target sub-image acquisition unit corresponding to the traversed pixel based on the correspondence between the field of view of each sub-image acquisition unit and the pixel region in the first image, as well as the target pixel region where the traversed pixel is located.
[0098] Other sub-image acquisition unit is used to adjust the image acquisition direction of other sub-image acquisition units besides the target sub-image acquisition unit.
[0099] In this embodiment of the application, the adjustment module 430 includes:
[0100] The quantity determination unit is used to continue traversing the pixels of the first image along the target direction to determine the number of consecutive mismatched pixels along the target direction.
[0101] The target step size determination unit is used to determine the target step size of the gimbal rotation based on the correlation between the gimbal rotation step size corresponding to the sub-image acquisition device and the number of moving pixels, as well as the number of consecutive mismatched pixels along the target direction.
[0102] The gimbal rotation control unit is used to control the gimbal rotation according to the target step size, so as to adjust the image acquisition direction of the sub-image acquisition unit.
[0103] In this embodiment of the application, the device further includes:
[0104] The second termination pixel determination module is used to search for a second termination pixel that matches the first termination pixel in the first image, starting from the second starting pixel in the second image and moving along the target direction; wherein the first termination pixel is a pixel located on the opposite side of the first edge.
[0105] The detection field of view determination module is used to determine the detection field of view of the first image collector based on the pixel difference between the second termination pixel and the second start pixel, the pixel width between opposite sides of the second image along the target direction, and the field of view of the second image collector corresponding to the second image.
[0106] The comparison module is used to determine whether to perform the process of traversing the pixels of the first image from the first starting pixel along the target direction based on the comparison result between the detected field of view and the theoretical field of view of the first image acquisition device.
[0107] In this embodiment of the application, the comparison module is specifically used for:
[0108] Based on the current temperature and the correlation between temperature and the field of view of the first image acquisition device, determine the theoretical field of view of the first image acquisition device corresponding to the current temperature;
[0109] If the difference between the detected field of view and the theoretical field of view is greater than a preset threshold, then the process of traversing the pixels of the first image along the target direction, starting from the first starting pixel, is executed.
[0110] In this embodiment of the application, the first image includes sub-images acquired by at least two sub-image acquisition devices in the first image acquisition device;
[0111] Feature comparison module 420 includes:
[0112] The theoretical image region determination unit is used to determine the theoretical image region in the second image corresponding to the sub-images of at least two sub-image collectors, based on the image acquisition directions of at least two sub-image collectors and the rotation angle of the second image collector;
[0113] The feature comparison result determination unit is used to perform feature comparison between each sub-image and the theoretical image region in the corresponding second image to determine the feature comparison result.
[0114] Adjustment module 430 includes:
[0115] The image acquisition direction adjustment unit is used to adjust the image acquisition direction of the sub-image acquisition device corresponding to the sub-image if there is a mismatch between the theoretical image region of the sub-image and the corresponding second image.
[0116] The image acquisition direction adjustment device provided in this application embodiment can execute the image acquisition direction adjustment method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects of executing the method.
[0117] Example 5
[0118] Figure 12 A schematic diagram of an electronic device 10, which can be used to implement embodiments of this application, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the application described and / or claimed herein.
[0119] like Figure 12As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0120] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0121] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the image acquisition orientation adjustment method.
[0122] In some embodiments, the image acquisition orientation adjustment method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the image acquisition orientation adjustment method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the image acquisition orientation adjustment method by any other suitable means (e.g., by means of firmware).
[0123] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0124] Computer programs used to implement the methods of this application may be written in any combination of one or more programming languages. These computer programs may be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable image acquisition orientation adjustment device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0125] In the context of this application, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0126] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0127] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0128] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0129] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired information of the technical solution of this application can be achieved, and this is not limited herein.
[0130] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for adjusting the image acquisition direction, characterized in that, The method is applied to an image acquisition device, the image acquisition device comprising a first image acquisition unit consisting of at least two sub-image acquisition units, and a rotatable second image acquisition unit, wherein the field of view of the second image acquisition unit during its circumferential rotation from a first initial angle to a first preset angle and / or the field of view during its adjustment of the pitch angle from a second initial angle to a second preset angle includes the field of view of the first image acquisition unit; the method includes: A first image is obtained by acquiring an image through the first image acquisition device, and a second image is obtained by controlling the second image acquisition device to rotate circumferentially from a first initial angle to a first preset angle and / or adjusting the pitch angle from a second initial angle to a second preset angle. The first image and the second image are compared by feature matching to determine the feature matching result; Based on the feature comparison results, the image acquisition direction of the sub-image acquisition device is adjusted so that the image is acquired through the first image acquisition device after the image acquisition direction is adjusted.
2. The method according to claim 1, characterized in that, The first image and the second image are compared by feature matching to determine the feature matching result, including: The first starting pixel located at the first edge of the first image is compared with the pixel of the second image to determine the second starting pixel in the second image that matches the first starting pixel. Starting from the first starting pixel, the pixels of the first image are traversed along the target direction. Starting from the second starting pixel in the second image, the matching pixel corresponding to the currently traversed pixel is searched along the target direction. The feature comparison result between the currently traversed pixel and the matching pixel is determined. The target direction is the direction from the first edge to the edge opposite the first edge.
3. The method according to claim 2, characterized in that, Based on the feature comparison results, the image acquisition direction of the sub-image acquisition device is adjusted, including: If the currently traversed pixel does not match the pixel to be matched, and a pixel matching the pixel to be matched is found in the first image along the target direction, then the angle between the sub-image collectors along the adjustment direction of the image acquisition direction is reduced. If the currently traversed pixel does not match the pixel to be matched, and no matching pixel is found in the first image along the target direction, then the angle between the sub-image collectors along the adjustment direction is increased; wherein, the adjustment direction is the direction associated with the target direction.
4. The method according to claim 2 or 3, characterized in that, Based on the feature comparison results, the image acquisition direction of the sub-image acquisition device is adjusted, including: Based on the correspondence between the field of view of each sub-image collector and the pixel region in the first image, and the target pixel region where the traversed pixel is located, the target sub-image collector corresponding to the traversed pixel is determined. Adjust the image acquisition direction of all sub-image acquisition devices except the target sub-image acquisition device.
5. The method according to claim 2 or 3, characterized in that, Based on the feature comparison results, the image acquisition direction of the sub-image acquisition device is adjusted, including: Continue traversing the pixels of the first image along the target direction to determine the number of consecutive mismatched pixels along the target direction; The target step size of the gimbal rotation is determined based on the relationship between the gimbal rotation step size and the number of moving pixels corresponding to the sub-image acquisition unit, as well as the number of consecutive mismatched pixels along the target direction. The gimbal is rotated according to the target step size to adjust the image acquisition direction of the sub-image acquisition unit.
6. The method according to claim 2, characterized in that, Before traversing the pixels of the first image along the target direction from the first starting pixel, the method further includes: Starting from the second starting pixel in the second image, search along the target direction for a second ending pixel that matches the first ending pixel in the first image; wherein, the first ending pixel is a pixel located on the opposite side of the first edge; The detection field of view of the first image collector is determined based on the pixel difference between the second termination pixel and the second start pixel, the pixel width between opposite edges of the second image along the target direction, and the field of view of the second image collector corresponding to the second image. Based on the comparison between the detected field of view and the theoretical field of view of the first image acquisition device, it is determined whether to execute the process of traversing the pixels of the first image along the target direction starting from the first starting pixel.
7. The method according to claim 6, characterized in that, Based on the comparison between the detected field of view and the theoretical field of view of the first image acquisition device, determine whether to execute the process of traversing the pixels of the first image along the target direction starting from the first starting pixel, including: Based on the current temperature and the correlation between temperature and the field of view of the first image acquisition device, determine the theoretical field of view of the first image acquisition device corresponding to the current temperature; If the difference between the detected field of view and the theoretical field of view is greater than a preset threshold, then the process of traversing the pixels of the first image along the target direction, starting from the first starting pixel, is executed.
8. The method according to claim 1, characterized in that, The first image includes sub-images acquired by at least two sub-image acquisition devices in the first image acquisition device; The first image and the second image are compared by feature matching to determine the feature matching result, including: Based on the image acquisition directions of at least two sub-image acquisition devices and the rotation angle of the second image acquisition device, the sub-images of at least two sub-image acquisition devices correspond to the theoretical image regions in the second image. The feature comparison results are determined by comparing the theoretical image regions in the corresponding second image with the features of each sub-image. Accordingly, based on the feature comparison results, the image acquisition direction of the sub-image acquisition device is adjusted, including: If there is a mismatch between the theoretical image region in the sub-image and the corresponding second image, the image acquisition direction of the sub-image acquisition device will be adjusted.
9. An image acquisition direction adjustment device, characterized in that, The device is configured in an image acquisition apparatus, which includes a first image acquisition unit consisting of at least two sub-image acquisition units, and a rotatable second image acquisition unit. The field of view of the second image acquisition unit during its circumferential rotation from a first initial angle to a first preset angle and / or the field of view during its adjustment of the pitch angle from a second initial angle to a second preset angle includes the field of view of the first image acquisition unit. The device includes: An image acquisition module is used to acquire a first image through the first image acquisition device, and to control the second image acquisition device to circumferentially rotate from a first initial angle to a first preset angle and / or adjust the pitch angle from a second initial angle to a second preset angle to acquire a second image. The feature comparison module is used to compare the features of the first image and the second image and determine the feature comparison result. The adjustment module is used to adjust the image acquisition direction of the sub-image acquisition device according to the feature comparison result, so that the image can be acquired through the first image acquisition device after the image acquisition direction is adjusted.
10. An electronic device, characterized in that, The device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the image acquisition orientation adjustment method according to any one of claims 1-8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the image acquisition direction adjustment method according to any one of claims 1-8.
Citation Information
Patent Citations
Image collection system and method
CN104836960A
Pole tower monitoring method and terminal based on digital image processing
CN114119746A