Image acquisition method, device and equipment
By linking radar and cameras, and using object distance and focus maps to quickly determine the focus position, the problems of long autofocus time and blurry target objects are solved, and clear focusing on fast-moving targets is achieved.
Patent Information
- Application Number
- CN202410508766.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-25
- Publication Date
- 2025-10-28
AI Technical Summary
Existing autofocus technology is time-consuming on fast-moving targets, and the region of interest tends to focus on the background, resulting in a blurred target object.
The actual distance between the target object and the integrated radar-visual equipment is obtained by radar. The target focal position is quickly determined by the object distance mapping table and the object distance-focus mapping table, and the camera is controlled to acquire images.
It achieves fast and accurate focusing on the target object, avoiding focusing on the background and keeping the target of interest clear, making it suitable for detecting fast-moving targets.
Smart Images

Figure CN120856980A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to an image acquisition method, apparatus and device. Background Technology
[0002] Focusing, also known as focusing, is the process of adjusting the camera's focal distance to achieve a sharp image of the subject by changing the position of the focusing mechanism. This process requires adjusting the camera's focal distance. Focusing can be achieved in various ways, such as autofocus, manual focus, and multi-focus.
[0003] During autofocus, it is usually necessary to refer to the image sharpness statistics and drive the focus to oscillate around the point of sharpness, gradually approaching the maximum value of the sharpness statistics, which is the sharpest focus position.
[0004] However, in the methods described above, searching for sharp points is time-consuming, and it is difficult to clearly detect fast-moving objects. Moreover, regions of interest are generally highly targeted objects such as people, vehicles, and ships, and these objects occupy a relatively small proportion of the image. When determining sharp points using sharpness statistics, there is a high probability that the focus will be on the background, while the target object of interest remains blurry. Summary of the Invention
[0005] This application provides an image acquisition method applied to a radar-visual integrated device, the radar-visual integrated device including radar and camera, the method comprising:
[0006] The radar acquires the actual distance between the target object and the integrated radar-visual device.
[0007] By querying the acquired object distance mapping table through the actual object distance of the target, the internal object distance of the target corresponding to the actual object distance is obtained. The object distance mapping table includes the mapping relationship between the actual object distance and the internal object distance.
[0008] Based on the stored object distance-focus mapping table corresponding to the current magnification of the camera, the target focus position corresponding to the internal object distance is obtained by querying the object distance-focus mapping table through the internal object distance of the target; wherein, the object distance-focus mapping table includes the mapping relationship between the internal object distance and the focus position, and the internal object distance is a set value when constructing the object distance-focus mapping table;
[0009] The camera is controlled to acquire an image of the target object based on the target focus position.
[0010] This application provides an image acquisition device applied to a radar-visual integrated device, the radar-visual integrated device including a radar and a camera, the device comprising:
[0011] The acquisition module is used to acquire the actual distance between the target object and the integrated radar-visual device through the radar;
[0012] The processing module is used to query an acquired object distance mapping table through the actual object distance of the target to obtain the target internal object distance corresponding to the actual object distance. The object distance mapping table includes the mapping relationship between the actual object distance and the internal object distance. Based on the stored object distance-focus mapping table corresponding to the current magnification of the camera, the module queries the object distance-focus mapping table through the target internal object distance to obtain the target focus position corresponding to the target internal object distance. The object distance-focus mapping table includes the mapping relationship between the internal object distance and the focus position, and the internal object distance is a set value when constructing the object distance-focus mapping table.
[0013] The control module is used to control the camera to acquire images of the target object based on the target focus position.
[0014] This application provides a radar-visual integrated device, including: a processor, radar, and a camera, wherein:
[0015] The radar is used to obtain the actual distance between the target object and the integrated radar-visual device;
[0016] The processor is configured to query an acquired object distance mapping table using the actual object distance to obtain the target internal object distance corresponding to the actual object distance, wherein the object distance mapping table includes a mapping relationship between the actual object distance and the internal object distance; and based on a stored object distance-focus mapping table corresponding to the current magnification of the camera, query the object distance-focus mapping table using the target internal object distance to obtain the target focus position corresponding to the target internal object distance; wherein the object distance-focus mapping table includes a mapping relationship between the internal object distance and the focus position, and the internal object distance is a set value when constructing the object distance-focus mapping table;
[0017] The camera is used to acquire an image of the target object based on the target focus position.
[0018] As can be seen from the above technical solutions, in this embodiment, by maintaining an object distance mapping table (the mapping relationship between actual object distance and internal object distance) and an object distance-focus mapping table (the mapping relationship between internal object distance and focus position), after obtaining the actual object distance between the target object and the radar-visual integrated device, the target focus position can be obtained by querying the object distance mapping table and the object distance-focus mapping table. Then, based on the target focus position, the camera is controlled to acquire images, thereby quickly focusing on the target object (i.e., the target object). This method can quickly and accurately obtain the focus position of the target object. When the radar-linked camera PTZs with the target object, it can immediately achieve clear focusing without the problem of long processing times. It can also clearly detect and accurately focus on fast-moving target objects. Furthermore, it can accurately focus on the target object and avoid focusing on the background, keeping the target object of interest in the image always in sharp focus. Attached Figure Description
[0019] Figure 1 This is a flowchart illustrating an image acquisition method according to one embodiment of this application;
[0020] Figure 2 This is a schematic diagram showing the relationship between the focal position F and the object distance L in one embodiment of this application;
[0021] Figure 3 This is a flowchart illustrating the automatic calibration process in one embodiment of this application;
[0022] Figure 4 This is a flowchart illustrating the manual calibration process in one embodiment of this application;
[0023] Figure 5 This is a flowchart illustrating an image acquisition method according to one embodiment of this application;
[0024] Figure 6 This is a schematic diagram of the structure of an image acquisition device according to one embodiment of this application;
[0025] Figure 7 This is a hardware structure diagram of a radar-visual integrated device according to one embodiment of this application. Detailed Implementation
[0026] This application proposes an image acquisition method that can be applied to a radar-view integrated device (i.e., a device that deploys radar and a camera on the same machine, referred to as a radar-view integrated device; the radar-view integrated device is a radar-camera linked device, and the camera can be a gimbal camera / PTZ camera), and the radar-view integrated device includes both radar and a camera. See also Figure 1 The diagram shown is a flowchart of the method, which may include:
[0027] Step 101: Obtain the actual distance between the target object and the integrated radar-visual equipment using radar.
[0028] Step 102: Query the acquired object distance mapping table through the actual object distance of the target to obtain the target internal object distance corresponding to the actual object distance of the target. The object distance mapping table includes the mapping relationship between the actual object distance and the internal object distance.
[0029] Step 103: Based on the stored object distance-focus mapping table corresponding to the camera's current magnification, query the object distance-focus mapping table using the internal object distance of the target to obtain the target focus position corresponding to the internal object distance of the target; wherein, the object distance-focus mapping table can include the mapping relationship between the internal object distance and the focus position. The internal object distance in the object distance-focus mapping table is a set value when the object distance-focus mapping table is constructed.
[0030] Step 104: Based on the target focus position, control the camera to acquire an image of the target object.
[0031] For example, by querying the acquired object distance mapping table through the target actual object distance, the target internal object distance corresponding to the target actual object distance can be obtained. This may include, but is not limited to: if the object distance mapping table contains an internal object distance corresponding to the target actual object distance, then the internal object distance corresponding to the target actual object distance is determined as the target internal object distance. Alternatively, if the object distance mapping table does not contain an internal object distance corresponding to the target actual object distance, then a first actual object distance and a second actual object distance are queried from the object distance mapping table. The first actual object distance is an adjacent actual object distance that is less than the target actual object distance, and the second actual object distance is an adjacent actual object distance that is greater than the target actual object distance. Based on the first actual object distance, the second actual object distance, the internal object distance corresponding to the first actual object distance, the internal object distance corresponding to the second actual object distance, and the target actual object distance, the target internal object distance corresponding to the target actual object distance is determined.
[0032] For example, before obtaining the target internal object distance corresponding to the actual target object distance by querying the acquired object distance mapping table, an object distance mapping table can be obtained. The process of obtaining the object distance mapping table may include, but is not limited to: obtaining the correspondence between the actual object distance of the calibration point and the camera focus position at the camera's calibration magnification; wherein, the camera focus position is the focus position obtained when the image of the calibration point is clearly focused. Based on the object distance focus mapping table corresponding to the camera's calibration magnification, the internal object distance corresponding to the camera focus position is obtained by querying the object distance focus mapping table. The mapping relationship between the actual object distance and the internal object distance is recorded in the object distance mapping table.
[0033] For example, at the camera's calibration magnification, obtaining the correspondence between the actual object distance of the calibration point and the camera's focal position can include, but is not limited to: selecting N calibration points within the radar's coverage area according to the object distance distribution (N can be a positive integer), and determining the actual object distance between each calibration point and the integrated radar-visual equipment based on the object distance distribution. Iterating through each calibration point sequentially, for the currently traversed calibration point, based on the spatial position mapping relationship between the radar and the camera, converting the physical coordinates of the calibration point into the camera's PT (Pan Tilt) information. Controlling the camera to position itself at the calibration point based on the calibration magnification and PT information, and triggering the camera to automatically focus on the calibration point, obtaining the camera's focal position after clear focusing. Recording the correspondence between the actual object distance of the calibration point and the camera's focal position at the calibration magnification.
[0034] For example, at the camera's calibration magnification, obtaining the correspondence between the actual object distance of the calibration point and the camera's focal position can include, but is not limited to: for any calibration point, controlling the camera to position itself at that calibration point and triggering the camera to automatically focus on that calibration point to obtain the camera's focal position after it is clearly focused. When the camera positions itself at the calibration point, determining the camera's current PT information and calibration magnification. Based on the spatial position mapping relationship between the radar and the camera, converting the PT information into the physical coordinates of the calibration point, and determining the actual object distance between the calibration point and the integrated radar-visualization device based on these physical coordinates. At this calibration magnification, recording the correspondence between the actual object distance of the calibration point and the camera's focal position.
[0035] For example, by querying the target internal object distance focus mapping table, the target focus position corresponding to the target internal object distance can be obtained. This may include, but is not limited to: if the target internal object distance focus mapping table has a focus position corresponding to the target internal object distance, then the focus position corresponding to the target internal object distance is determined as the target focus position; or, if the target internal object distance focus mapping table does not have a focus position corresponding to the target internal object distance, then the first internal object distance and the second internal object distance are queried from the target internal object distance focus mapping table, where the first internal object distance is the adjacent internal object distance that is less than the target internal object distance, and the second internal object distance is the adjacent internal object distance that is greater than the target internal object distance; based on the first internal object distance, the second internal object distance, the focus position corresponding to the first internal object distance, the focus position corresponding to the second internal object distance, and the target internal object distance, the target focus position corresponding to the target internal object distance is determined.
[0036] For example, determining the target focal position corresponding to the target internal object distance based on the first internal object distance, the second internal object distance, the focal position corresponding to the first internal object distance, the focal position corresponding to the second internal object distance, and the target internal object distance may include, but is not limited to, using the following formula to determine the target focal position corresponding to the target internal object distance: Where F represents the target focus position, F i+1F represents the focal position corresponding to the second internal object distance. i L represents the focal position corresponding to the first internal object distance. i+1 L represents the second internal object distance. i L represents the first internal object distance, and L represents the target internal object distance.
[0037] As can be seen from the above technical solutions, in this embodiment, by maintaining an object distance mapping table (the mapping relationship between actual object distance and internal object distance) and an object distance-focus mapping table (the mapping relationship between internal object distance and focus position), after obtaining the actual object distance between the target object and the radar-visual integrated device, the target focus position can be obtained by querying the object distance mapping table and the object distance-focus mapping table. Then, based on the target focus position, the camera is controlled to acquire images, thereby quickly focusing on the target object (i.e., the target object). This method can quickly and accurately obtain the focus position of the target object. When the radar-linked camera PTZs with the target object, it can immediately achieve clear focusing without the problem of long processing times. It can also clearly detect and accurately focus on fast-moving target objects. Furthermore, it can accurately focus on the target object and avoid focusing on the background, keeping the target object of interest in the image always in sharp focus.
[0038] The image acquisition method of this application will be described below with reference to specific embodiments.
[0039] During autofocus, it is usually necessary to refer to the image sharpness statistics and drive the focus to oscillate around the point of sharpness, gradually approaching the maximum value of the sharpness statistics, which is the sharpest focus position.
[0040] However, in the methods described above, searching for sharp points is time-consuming, and it is difficult to clearly detect fast-moving objects. Moreover, regions of interest are generally highly targeted objects such as people, vehicles, and ships, and these objects occupy a relatively small proportion of the image. When determining sharp points using sharpness statistics, there is a high probability that the focus will be on the background, while the target object of interest remains blurry.
[0041] In response to the above findings, this application proposes an image acquisition method that can be applied to a radar-visual integrated device, which may include radar and a camera. Through this image acquisition method, rapid focusing of the radar-linked gimbal (i.e., gimbal camera, hereinafter referred to as camera) can be achieved.
[0042] For example, the image acquisition method in this embodiment may involve the following process:
[0043] First, maintain the object distance-focus mapping table. The object distance-focus mapping table can include the mapping relationship between the internal object distance and the focus position, and the internal object distance is the set value (i.e., fixed value) when the object distance-focus mapping table is constructed.
[0044] The key to a camera's sharp focus is determining the position of the focusing motor (i.e., the focal point F). At any magnification, the focal point F has a specific relationship with the object distance L (the distance between the object being photographed (such as a person, car, or boat) and the camera / lens). This specific relationship is the mapping relationship between the object distance L and the focal point F.
[0045] See Figure 2 The diagram shows the relationship between the focal position F and the object distance L. After discretizing each object distance L in this curve, the relationship can also be expressed as the following object distance focusing formula: F i =f(L i ), where L i F represents the i-th object distance. i Let F represent the focal position corresponding to the i-th object distance, and f represent the functional relationship between the focal position F and the object distance L. Figure 2 It can be seen that the larger the object distance L is, the smaller the focal position F is. The functional relationship f can reflect that the larger the object distance L is, the smaller the focal position F is.
[0046] Obviously, for each object distance L (such as object distance L1, object distance L2, object distance L3, object distance L4, object distance L5, etc.), by Figure 2 Alternatively, the focusing formula for this object distance can be used to obtain the focal position F corresponding to the object distance L.
[0047] In one possible implementation, in order to know the mapping relationship between the focal position F and the object distance L, the mapping relationship between the focal position F and the object distance L can be calibrated, or other methods can be used to obtain the mapping relationship between the focal position F and the object distance L. There are no restrictions on this. The following will take the calibration of the mapping relationship as an example.
[0048] For example, you can place the object to be photographed (such as a person, car, or boat) at a designated location, triggering the camera to automatically focus on that location and obtain the focal point position after it is in focus. This gives you the mapping relationship between the focal point position and the object distance. After placing the object to be photographed at multiple designated locations, you obtain the focal point position corresponding to each designated location, thus obtaining multiple mapping relationships (multiple mapping relationships between focal points and object distances).
[0049] In the above process, the object distance L represents the distance between the object being photographed (i.e., the specified position) and the camera. During the calibration process, it is not necessary to actually measure the real distance between the object being photographed and the camera (i.e., the actual distance / the actual object distance). Instead, a certain set value (fixed value) is used as the distance between the object being photographed and the camera, as long as the relationship that "the larger the object distance L is, the smaller the focal position F is" is satisfied.
[0050] For example, six distance values can be preset, which are called the set values, denoted as object distance L1, object distance L2, object distance L3, object distance L4, object distance L5, and object distance L6. During the calibration process, the object to be photographed can be placed at one of the six specified positions. When the camera is triggered to autofocus, six focal points are obtained, denoted as focal point F1, focal point F2, focal point F3, focal point F4, focal point F5, and focal point F6. Based on this, assuming object distance L1>object distance L2>object distance L3>object distance L4>object distance L5>object distance L6, and focal position F1>focal position F2>focal position F3>focal position F4>focal position F5>focal position F6, in order to satisfy the relationship that "the larger the object distance L is, the smaller the focal position F is", then object distance L1 corresponds to focal position F6, object distance L2 corresponds to focal position F5, object distance L3 corresponds to focal position F4, object distance L4 corresponds to focal position F3, object distance L5 corresponds to focal position F2, and object distance L6 corresponds to focal position F1. Thus, the mapping relationship between object distance L and focal position F can be obtained.
[0051] Since the above object distances (such as object distance L1, object distance L2, object distance L3, object distance L4, object distance L5, and object distance L6) are set values and not necessarily the actual object distance between the object being photographed and the camera, the above object distances can be called internal object distances. That is, internal object distances are set values (i.e., fixed values) when constructing the object distance focus mapping table, and internal object distances are not the actual object distance (i.e., true distance) between the object being photographed and the camera.
[0052] In summary, the mapping relationship between the focal position F and the internal object distance L can be obtained. For example, an object distance-focal point mapping table can be constructed, which includes the mapping relationship between the internal object distance L and the focal position F, such as the mapping relationship between the internal object distance L1 and the focal position F6, the mapping relationship between the internal object distance L2 and the focal position F5, the mapping relationship between the internal object distance L3 and the focal position F4, and so on.
[0053] In one possible implementation, the camera provides an optical mapping relationship between a magnification Z and a focal position F for any object distance within the shooting distance range. Therefore, for each magnification of the camera (such as the magnification Z of a PTZ camera), the mapping relationship between the focal position F and the internal object distance L can be obtained. For example, first control the camera at magnification Z1 to obtain the mapping relationship between the focal position F and the internal object distance L, then control the camera at magnification Z2 to obtain the mapping relationship between the focal position F and the internal object distance L, and so on.
[0054] In summary, an object distance-focus mapping table can be constructed, which includes the mapping relationship between magnification Z, internal object distance L, and focus position F, i.e., the LZF mapping relationship. See Table 1 for an example of this object distance-focus mapping table; however, this is merely an example and no restrictions are imposed on this object distance-focus mapping table.
[0055] Table 1
[0056]
[0057] As can be seen from Table 1, at magnification Z1, the focal position F corresponding to the internal object distance L1 is... 11 The internal object distance L2 corresponds to the focal position F. 21 At magnification Z2, the internal object distance L1 corresponds to the focal position F. 12 And so on.
[0058] For example, before the camera leaves the factory, the object distance-focus mapping table can be pre-stored in the camera's memory. This object distance-focus mapping table includes the mapping relationship between magnification Z, internal object distance L, and focus position F, as shown in Table 1. Thus, during camera use, given the camera's magnification Z, as long as the internal object distance L between the subject and the camera is obtained, the focus position F corresponding to the internal object distance L can be quickly obtained by querying the mapping relationship. Then, focus can be performed using the focus position F. In other words, the object distance-focus mapping table can be used to calculate the focus position corresponding to any internal object distance and any magnification.
[0059] Second, the system automatically calibrates the correspondence between the actual object distance and the camera focus position. The actual object distance can represent the distance between the object being photographed and the camera; that is, the actual object distance can be expressed as the true distance / actual distance between the object and the camera. The camera focus position can be the focus position F.
[0060] For example, the camera's magnification Z can be set to the calibration magnification, which can be any magnification supported by the camera; there are no restrictions on this. At the camera's calibration magnification, the correspondence between the actual object distance and the camera's focus position can be automatically calibrated. See [link to documentation]. Figure 3 The diagram shown is a flowchart of the automatic calibration process.
[0061] Step 301: Obtain the radar coverage area (i.e., the radar's acquisition range).
[0062] For example, for a radar-visual integrated device, before processing with the radar-visual integrated device, the radar coverage range can be set, indicating that when the target object (such as a person, vehicle, ship, etc., i.e. the object being photographed) is within the coverage range, the radar can detect the actual distance of the target object.
[0063] Step 302: Within the radar's coverage area, select N calibration points according to the object distance distribution. N can be a positive integer. Determine the actual object distance between each calibration point and the integrated radar-visual equipment based on the object distance distribution.
[0064] For example, a pre-configured object distance distribution can be obtained, and the object distance distribution can include N distance values, such as distance value a1, distance value a2, distance value a3, ... Calibration points b1, b2, b3, ... can be selected within the radar's coverage area. The actual object distance between calibration point b1 and the integrated radar-view device is distance value a1 (i.e., a location point is selected as calibration point b1 from all location points separated from the integrated radar-view device by distance value a1). In other words, calibration point b1 is selected based on distance value a1 in the object distance distribution. The actual object distance between calibration point b2 and the integrated radar-view device is distance value a2, and so on.
[0065] For example, since calibration point b1 is selected based on distance value a1 in the object distance distribution, the actual object distance between calibration point b1 and the integrated radar-view device is determined to be distance value a1 based on the object distance distribution, and the actual object distance between calibration point b2 and the integrated radar-view device is determined to be distance value a2 based on the object distance distribution, and so on.
[0066] Step 303: Mark all calibration points in sequence. For example, traverse each calibration point in turn, and for the current calibration point, subsequent steps can be used to calibrate it.
[0067] Step 304: Based on the spatial position mapping relationship between the radar and the camera (representing the mapping relationship between the radar coordinate system and the camera coordinate system), convert the physical coordinates of the calibration point into the PT information of the camera.
[0068] For example, based on the extrinsic parameters between the radar and the camera (such as rotation matrices, translation matrices, etc.), a spatial position mapping relationship between the radar and the camera can be pre-constructed. This spatial position mapping relationship represents the mapping relationship between coordinates in the radar coordinate system and coordinates in the camera coordinate system, and there are no restrictions on this spatial position mapping relationship. For example, an example of this spatial position mapping relationship is: Y = A * X, where X represents the coordinates in the radar coordinate system (such as three-dimensional coordinates), Y represents the coordinates in the camera coordinate system (such as PT coordinates), and A represents the spatial position mapping relationship between the radar and the camera, determined based on the extrinsic parameters between the radar and the camera.
[0069] Based on this, for the currently traversed calibration point, its three-dimensional coordinates in the world coordinate system can be obtained. These three-dimensional coordinates represent the physical coordinates of the calibration point, that is, its coordinates in the radar coordinate system. Substituting the physical coordinates of the calibration point into the above relationship, we can obtain the PT coordinates of the point in the camera coordinate system. These PT coordinates are the camera's PT information.
[0070] In summary, the physical coordinates of this calibration point can be converted into the camera's PT information.
[0071] For example, camera PT refers to the camera's horizontal rotation (yaw angle P) and vertical rotation (pitch angle T). PTZ refers to the camera's PTZ motion, which includes three types of motion: horizontal rotation (yaw angle P), vertical rotation (pitch angle T), and target magnification / reduction (magnification Z), to meet the needs of various orientations.
[0072] For example, the magnification Z of a camera refers to the position of the zoom motor in the lens assembly, which controls the zoom level. The focus F refers to the position of the focus motor in the lens assembly, which controls the focus of the lens to ensure image sharpness.
[0073] Step 305: Based on the calibration magnification and the PT information, control the camera to position itself at the calibration point.
[0074] For example, the camera's magnification is controlled by the calibration magnification, and the camera's PT is controlled by the PT information (i.e., PT coordinates). In this way, by performing this PTZ, the camera can be controlled to locate the calibration point.
[0075] Step 306: After the camera is positioned at the calibration point, trigger the camera to automatically focus on the calibration point. During the automatic focusing process, the camera focus position after it is in focus can be obtained.
[0076] For example, during autofocusing, an image can be captured by the camera. If the location of the calibration point in the image is clear, the camera focus position corresponding to the clear image is obtained. If the location of the calibration point in the image is not clear, image capture continues until the location of the calibration point is clear.
[0077] Step 307: At the calibration magnification, record the correspondence between the actual object distance of the calibration point and the camera focus position, that is, automatically calibrate the correspondence between the actual object distance and the camera focus position.
[0078] In summary, we can obtain (L, Z, F) corresponding to the calibration point, where L represents the actual object distance of the calibration point, Z represents the calibration magnification, and F represents the camera focus position for autofocusing the calibration point.
[0079] Step 308: Determine whether all calibration points have completed automatic calibration. If yes, end the automatic calibration process; otherwise, iterate through the next calibration point and execute step 304 for the next calibration point. This will not be elaborated further here.
[0080] In summary, for each calibration point, the corresponding (L, Z, F) can be obtained.
[0081] Third, manually calibrate the correspondence between the actual object distance and the camera focus position. The actual object distance can represent the distance between the object being photographed and the camera; that is, the actual object distance can be expressed as the true distance / actual distance between the object and the camera. The camera focus position can be the focus position F.
[0082] During automatic calibration, there is a small probability of defocusing during autofocus, or the calibration magnification needs to be reset if it is inappropriate. To address these issues, manual calibration can be used. In manual calibration, any calibration point can be modified at (Z, F), or a new calibration point can be randomly set and (L, Z, F) re-acquired. Compared to automatic calibration, the core of manual calibration is to calculate the corresponding radar detection position from the camera's PT (Pressure Point) based on the spatial mapping relationship between the radar and the camera.
[0083] For example, set the camera's magnification Z to the calibration magnification, and manually calibrate the correspondence between the actual object distance and the camera's focal position at the calibration magnification. See [link to documentation]. Figure 4 The diagram shown is a flowchart of the manually calibrated process.
[0084] Step 401: Obtain N calibration points, where N is a positive integer. All N calibration points are arbitrary, meaning any location within the radar's coverage area is selected as a calibration point. Iterate through each calibration point sequentially. For the currently traversed calibration point, subsequent steps can be used to calibrate it.
[0085] Step 402: Control the camera to position itself at the calibration point. When the camera is positioned at the calibration point, determine the current PT information (i.e., the PT coordinates currently used by the camera) and calibration magnification of the camera.
[0086] For example, by controlling the camera's PTZ, the camera is positioned at the calibration point. Based on this, the camera's current PT information and current Z information can be determined. The camera's current Z information is the currently used calibration magnification, and the camera's current PT information is the currently used PT coordinates.
[0087] Step 403: After the camera is positioned at the calibration point, the camera is triggered to automatically focus on the calibration point. During the automatic focusing process, the camera focus position after it is in focus can be obtained.
[0088] For example, during autofocusing, an image can be captured by the camera. If the location of the calibration point in the image is clear, the camera focus position corresponding to the clear image is obtained. If the location of the calibration point in the image is not clear, image capture continues until the location of the calibration point is clear.
[0089] Step 404: Based on the spatial position mapping relationship between the radar and the camera (representing the mapping relationship between the radar coordinate system and the camera coordinate system), convert the PT information into the physical coordinates of the calibration point.
[0090] For example, based on the extrinsic parameters between the radar and the camera (such as rotation matrices, translation matrices, etc.), a spatial position mapping relationship between the radar and the camera can be pre-constructed. This spatial position mapping relationship represents the mapping relationship between coordinates in the radar coordinate system and coordinates in the camera coordinate system, and there are no restrictions on this spatial position mapping relationship. For example, an example of this spatial position mapping relationship is: Y = A * X, where X represents the coordinates in the radar coordinate system (such as three-dimensional coordinates), Y represents the coordinates in the camera coordinate system (such as PT coordinates), and A represents the spatial position mapping relationship between the radar and the camera, determined based on the extrinsic parameters between the radar and the camera.
[0091] Based on this, for the calibration point currently being traversed, after obtaining the PT coordinates of the point in the camera coordinate system (i.e., the camera's PT information), the PT coordinates can be substituted into the above relationship to obtain the three-dimensional coordinates of the calibration point in the radar coordinate system, i.e., the physical coordinates of the calibration point.
[0092] In summary, the camera's PT information can be converted into the physical coordinates of the calibration point.
[0093] Step 405: Determine the actual object distance between the calibration point and the integrated radar-visual equipment based on the physical coordinates.
[0094] For example, the physical coordinates of the calibration point represent the three-dimensional coordinates of the calibration point in the world coordinate system, and these three-dimensional coordinates contain distance information (i.e., the distance between the calibration point and the integrated radar-view device). Therefore, the actual object distance between the calibration point and the integrated radar-view device can be determined based on the physical coordinates.
[0095] Step 406: At the calibration magnification, record the correspondence between the actual object distance of the calibration point and the camera focus position, that is, manually calibrate the correspondence between the actual object distance and the camera focus position.
[0096] In summary, we can obtain (L, Z, F) corresponding to the calibration point, where L represents the actual object distance of the calibration point, Z represents the calibration magnification, and F represents the camera focus position for autofocusing the calibration point.
[0097] It can also determine whether all calibration points have been manually calibrated. If yes, the manual calibration process ends; otherwise, it iterates through the next calibration point and executes step 302 for the next calibration point, which will not be elaborated here.
[0098] In summary, for each calibration point, the corresponding (L, Z, F) can be obtained.
[0099] Fourth, maintain the object distance mapping table. The object distance mapping table can include the mapping relationship between the actual object distance and the internal object distance. The actual object distance can represent the real distance / actual distance between the object being photographed and the camera. The internal object distance is the set value (fixed value) when constructing the object distance focus mapping table, that is, the virtual distance value.
[0100] For example, to maintain the object distance mapping table, the following steps can be taken:
[0101] Step S11: Under the camera's calibration magnification, obtain the correspondence between the actual object distance of the calibration point and the camera's focal position. The camera's focal position is the focal position obtained when the image of the calibration point is clearly focused.
[0102] For example, it can automatically calibrate the correspondence between the actual object distance and the camera's focal point position; see [link / reference]. Figure 3 As shown, the correspondence between the actual object distance and the camera focus position can also be manually calibrated. See [link to documentation]. Figure 4 As shown.
[0103] For example, based on Figure 3 The automatic calibration process shown or Figure 4 The manual calibration process shown can maintain the mapping table shown in Table 2. This mapping table includes the mapping relationship between actual object distance, camera focus position, and magnification. Actual object distance represents the actual object distance L currently detected by the radar, magnification represents the camera's calibration magnification Z, and camera focus position represents the camera's clear focus position F, i.e. (L, Z, F).
[0104] Table 2
[0105] Calibration point number Actual object distance L Calibration ratio Z Camera focus position F 1 L1 <![CDATA[Z1]]> <![CDATA[F1]]> 2 L2 <![CDATA[Z1]]> <![CDATA[F2]]> … … … … n Ln <![CDATA[Z1]]> <![CDATA[F n ]]>
[0106] Step S12: Based on the object distance focus mapping table corresponding to the camera's calibration magnification, query the object distance focus mapping table through the camera's focus position to obtain the internal object distance corresponding to the camera's focus position.
[0107] Step S13: Record the mapping relationship between the actual object distance and the internal object distance in the object distance mapping table.
[0108] For example, for each calibration point, the actual object distance, camera focus position, and calibration magnification are known, as shown in Table 2. Calibration point 1 corresponds to the actual object distance L1, calibration magnification Z1, and camera focus position F1, and so on. The object distance-focus mapping table shown in Table 1 can be consulted. For example, the first row represents the object distance-focus mapping table corresponding to magnification Z1, the second row represents the object distance-focus mapping table corresponding to magnification Z2, and so on. Clearly, the internal object distance corresponding to the camera focus position F1 can be obtained by consulting the first row of the object distance-focus mapping table. For instance, if the camera focus position F1 equals F...11 Then the internal object distance is the internal object distance L1. If the camera focus position F1 equals F 21 If the internal object distance is L2, then the internal object distance is L2, and so on.
[0109] In summary, for each calibration point, the actual object distance and the internal object distance of that calibration point can be obtained. This allows for the maintenance of an object distance mapping table, which includes the mapping relationship between the actual object distance and the internal object distance. See Table 3 for an example of this object distance mapping table.
[0110] Table 3
[0111]
[0112]
[0113] It should be noted that the internal object distance in Table 1 is a set value, not the actual object distance. That is, the L in the object distance-focus (FL) relationship pre-stored in the camera often does not match the actual object distance. Therefore, it is necessary to discretize and calibrate the mapping relationship between the internal object distance and the actual object distance, that is, to maintain the object distance mapping table.
[0114] Fifth, the linkage between cameras and radar.
[0115] Based on the object distance mapping table (see Table 3) and the object distance-focus mapping table (see Table 1), camera and radar can be linked. For example, the radar detects a target object in the scene, and the camera acquires an image of the target object, thus achieving camera-radar linkage. See [link to table]. Figure 5 The diagram shows a flowchart of an image acquisition method. The following steps can be used to achieve the linkage between the camera and the radar.
[0116] Step 501: Obtain the actual distance between the target object and the integrated radar-visual equipment using radar.
[0117] For example, when a target object (such as a person, vehicle, or ship, i.e., the object being photographed) appears within the radar's coverage area, the actual distance between the target object and the integrated radar-vision device can be collected by the radar. The actual distance between the target object represents the true distance / actual distance between the object being photographed and the integrated radar-vision device.
[0118] Step 502: Query the object distance mapping table (which includes the mapping relationship between the actual object distance and the internal object distance) to obtain the target internal object distance corresponding to the actual object distance.
[0119] For example, since the object distance mapping table includes the mapping relationship between the actual object distance and the internal object distance, the internal object distance of the target can be obtained when the object distance mapping table is queried through the actual object distance of the target.
[0120] In one possible implementation, if the object distance mapping table contains an internal object distance corresponding to the actual target object distance, then the internal object distance corresponding to the actual target object distance can be determined as the target internal object distance. For example, if the actual target object distance is the actual object distance L1, then Table 3 contains an internal object distance L1' corresponding to the actual object distance L1. Therefore, the internal object distance L1' corresponding to the actual object distance L1 can be used as the target internal object distance.
[0121] In one possible implementation, if the object distance mapping table does not contain an internal object distance corresponding to the target actual object distance, a first actual object distance and a second actual object distance can be retrieved from the object distance mapping table. The first actual object distance is the adjacent actual object distance smaller than the target actual object distance (i.e., the first actual object distance smaller than the target actual object distance, i.e., the largest actual object distance smaller than the target actual object distance), and the second actual object distance is the adjacent actual object distance larger than the target actual object distance (i.e., the first actual object distance larger than the target actual object distance, i.e., the smallest actual object distance larger than the target actual object distance). Based on this, the target internal object distance corresponding to the target actual object distance can be determined based on the first actual object distance, the second actual object distance, the internal object distance corresponding to the first actual object distance, the internal object distance corresponding to the second actual object distance, and the target actual object distance.
[0122] For example, if the target actual object distance is Ls, then there is no corresponding internal object distance in Table 3. Therefore, it is necessary to look up the first and second actual object distances from the object distance mapping table. Assuming the target actual object distance Ls is between actual object distances L1 and L2 (i.e., Ls is greater than L1 and less than L2), then the first actual object distance is L1, and the second actual object distance is L2. Assuming the target actual object distance Ls is between actual object distances L2 and L3 (i.e., Ls is greater than L2 and less than L3), then the first actual object distance is L2, the second actual object distance is L3, and so on.
[0123] Based on this, an interpolation algorithm can be used to determine the target internal distance corresponding to the actual target distance Ls, or other algorithms can be used to determine the target internal distance corresponding to the actual target distance Ls, without any restrictions.
[0124] When using interpolation, the internal distance of the target corresponding to the actual distance Ls can be determined using the following formula.
[0125]
[0126] L′ represents the internal target distance corresponding to the actual target distance Ls, L i+1 L represents the second actual object distance L2, L iL1 represents the first actual object distance. i+1 ′ represents the internal object distance L2' corresponding to the second actual object distance L2, L i ′ represents the internal object distance L1' corresponding to the first actual object distance L1, L real This represents the actual distance Ls between the target and the target. In summary, the internal distance between the target and the target can be determined based on the first actual distance, the second actual distance, the internal distance corresponding to the first actual distance, the internal distance corresponding to the second actual distance, and the actual distance between the target and the target.
[0127] Step 503: Based on the object distance-focus mapping table corresponding to the current magnification of the camera, query the object distance-focus mapping table through the object distance inside the target to obtain the target focus position corresponding to the object distance inside the target.
[0128] For example, since the object distance-focus mapping table includes the mapping relationship between the internal object distance and the focus position, the target focus position can be obtained when querying the object distance-focus mapping table through the target's internal object distance.
[0129] Referring to Table 1, the object distance-focus mapping table can include the mapping relationship between magnification Z, internal object distance L, and focus position F. Based on the object distance-focus mapping table shown in Table 1, the first row represents the object distance-focus mapping table corresponding to magnification Z1, the second row represents the object distance-focus mapping table corresponding to magnification Z2, and so on. Therefore, if the camera's current magnification is Z1, the target focus position is obtained by querying the object distance-focus mapping table in the first row using the target's internal object distance. If the camera's current magnification is Z2, the target focus position is obtained by querying the object distance-focus mapping table in the second row using the target's internal object distance, and so on.
[0130] In one possible implementation, if the object distance-focus mapping table contains a focus position corresponding to the internal object distance of the target, then the focus position corresponding to the internal object distance of the target is determined as the target focus position. For example, if the current magnification of the camera is magnification Z1 and the internal object distance of the target is internal object distance L1, then Table 1 contains a focus position F corresponding to internal object distance L1. 11 Therefore, the focal position F 11 As the target focal point.
[0131] In one possible implementation, if the object distance-focus mapping table does not contain a focus position corresponding to the target internal object distance, a first internal object distance and a second internal object distance can be retrieved from the object distance-focus mapping table. The first internal object distance is the adjacent internal object distance smaller than the target internal object distance (i.e., the first internal object distance smaller than the target internal object distance, i.e., the largest internal object distance smaller than the target internal object distance), and the second internal object distance is the adjacent internal object distance larger than the target internal object distance (i.e., the first internal object distance larger than the target internal object distance, i.e., the smallest internal object distance larger than the target internal object distance). Based on this, the target focus position corresponding to the target internal object distance can be determined based on the first internal object distance, the second internal object distance, the focus position corresponding to the first internal object distance, the focus position corresponding to the second internal object distance, and the target internal object distance.
[0132] For example, if the target internal object distance is Lp, then there is no focal position corresponding to the target internal object distance Lp in Table 1. Therefore, it is necessary to look up the first and second internal object distances from the object distance-focal mapping table. Assuming the target internal object distance Lp is located between internal object distances L1 and L2 (i.e., the target internal object distance Lp is greater than internal object distance L1 and less than internal object distance L2), then the first internal object distance is internal object distance L1, and the second internal object distance is internal object distance L2. Assuming the target internal object distance Lp is located between internal object distances L2 and L3 (i.e., the target internal object distance Lp is greater than internal object distance L2 and less than internal object distance L3), then the first internal object distance is internal object distance L2, the second internal object distance is internal object distance L3, and so on.
[0133] Based on this, an interpolation algorithm can be used to determine the target focal position corresponding to the internal object distance Lp, or other algorithms can be used; there are no restrictions on which one is used. When using the interpolation method, the target focal position corresponding to the internal object distance Lp can be determined using the following formula.
[0134]
[0135] In the above formula, F represents the target focal position corresponding to the object distance Lp inside the target. i+1 This indicates the focal position corresponding to the second internal object distance L2 (obtained from the object distance-focal point mapping table), F i This indicates the focal position corresponding to the first internal object distance L1 (obtained from the object distance-focal point mapping table), L i+1 L2 represents the second internal object distance. i Let L1 represent the first internal object distance, and L represent the target internal object distance Lp. In summary, the target focal position corresponding to the target internal object distance can be determined based on the first internal object distance, the second internal object distance, the focal position corresponding to the first internal object distance, the focal position corresponding to the second internal object distance, and the target internal object distance.
[0136] In one possible implementation, after obtaining the target focus position, the camera can be controlled to acquire images of the target object based on the target focus position, thereby realizing the linkage between the radar and the camera.
[0137] As can be seen from the above technical solutions, in this embodiment, by maintaining an object distance mapping table and an object distance-focus mapping table, after obtaining the actual object distance between the target object and the integrated radar-vision device, the target focus position can be obtained by querying the object distance mapping table and the object distance-focus mapping table. Then, based on the target focus position, the camera is controlled to acquire images, thereby quickly focusing on the target object (i.e., the target object). This method can quickly and accurately obtain the focus position of the target object. When the radar-linked camera PTZs with the target object, it can immediately achieve clear focusing without the problem of long processing times. It can also clearly detect and accurately focus on fast-moving target objects. Furthermore, it can accurately focus on the target object and avoid focusing on the background, keeping the target object of interest in the image always in sharp focus.
[0138] In the above approach, combining focusing relationships and based on the real-time distance characteristics of the target object (such as moving targets like vehicles, people, and ships), a rapid radar distance focusing method is designed. This method can quickly focus on the target object. After the actual distance and internal distance are calibrated, the position of the focusing motor of the radar-detected target object can be quickly and accurately calculated directly. When the radar-linked camera PTZ reaches the target object, immediate focusing and clear focusing can be achieved, eliminating the blurring process inherent in general focusing algorithms. Especially for fast-moving targets, it can accurately focus on the target object, is less susceptible to external environmental interference, and accurately focus on the target object, keeping the target object of interest in the image always in sharp focus.
[0139] Based on the same concept as the above method, this application proposes an image acquisition device applied to a radar-visual integrated device, which includes a radar and a camera. (See [link]). Figure 6 The diagram shown is a structural schematic of the image acquisition device, which may include:
[0140] The acquisition module 61 is used to acquire the actual distance between the target object and the radar-visual integrated device through the radar; the processing module 62 is used to query the acquired object distance mapping table through the actual object distance to obtain the target internal object distance corresponding to the actual object distance, the object distance mapping table including the mapping relationship between the actual object distance and the internal object distance; based on the stored object distance focus mapping table corresponding to the current magnification of the camera, the target internal object distance is queried through the object distance focus mapping table to obtain the target focus position corresponding to the target internal object distance; wherein, the object distance focus mapping table includes the mapping relationship between the internal object distance and the focus position, and the internal object distance is a set value when constructing the object distance focus mapping table; the control module 63 is used to control the camera to acquire images of the target object based on the target focus position.
[0141] For example, when the processing module 62 queries the acquired object distance mapping table to obtain the target internal object distance corresponding to the target actual object distance, it specifically performs the following: if the object distance mapping table contains an internal object distance corresponding to the target actual object distance, then the internal object distance corresponding to the target actual object distance is determined as the target internal object distance; or, if the object distance mapping table does not contain an internal object distance corresponding to the target actual object distance, then a first actual object distance and a second actual object distance are queried from the object distance mapping table, wherein the first actual object distance is an adjacent actual object distance less than the target actual object distance, and the second actual object distance is an adjacent actual object distance greater than the target actual object distance; based on the first actual object distance, the second actual object distance, the internal object distance corresponding to the first actual object distance, the internal object distance corresponding to the second actual object distance, and the target actual object distance, the target internal object distance corresponding to the target actual object distance is determined.
[0142] For example, the processing module 62 is further configured to obtain the object distance mapping table. Specifically, when obtaining the object distance mapping table, the processing module 62 is configured to: obtain the correspondence between the actual object distance of the calibration point and the camera focus position at the camera's calibration magnification; wherein, the camera focus position is the focus position obtained when the image of the calibration point is clearly focused; based on the object distance focus mapping table corresponding to the camera's calibration magnification, query the object distance focus mapping table through the camera focus position to obtain the internal object distance corresponding to the camera focus position; and record the mapping relationship between the actual object distance and the internal object distance in the object distance mapping table.
[0143] For example, when the processing module 62 obtains the correspondence between the actual object distance of the calibration point and the camera focus position under the calibration magnification of the camera, it is specifically used to: select N calibration points according to the object distance distribution within the coverage area of the radar, and determine the actual object distance between each calibration point and the radar-visual integrated device based on the object distance distribution; sequentially traverse each calibration point, and for the currently traversed calibration point, convert the physical coordinates of the calibration point into the PT information of the camera based on the spatial position mapping relationship between the radar and the camera; control the camera to position itself at the calibration point based on the calibration magnification and the PT information, and trigger the camera to automatically focus on the calibration point to obtain the camera focus position after clear focus; record the correspondence between the actual object distance of the calibration point and the camera focus position under the calibration magnification.
[0144] For example, when the processing module 62 obtains the correspondence between the actual object distance of the calibration point and the camera focus position under the calibration magnification of the camera, it is specifically used for: for any calibration point, controlling the camera to position itself at the calibration point, triggering the camera to automatically focus on the calibration point, and obtaining the camera focus position after clear focus; when the camera is positioned at the calibration point, determining the current PT information and calibration magnification of the camera; based on the spatial position mapping relationship between the radar and the camera, converting the PT information into the physical coordinates of the calibration point, and determining the actual object distance between the calibration point and the integrated radar-visual device based on the physical coordinates; and recording the correspondence between the actual object distance of the calibration point and the camera focus position under the calibration magnification.
[0145] For example, when the processing module 62 queries the object distance-focus mapping table to obtain the target focus position corresponding to the target internal object distance, it specifically performs the following: if the object distance-focus mapping table contains a focus position corresponding to the target internal object distance, it determines the focus position corresponding to the target internal object distance as the target focus position; or, if the object distance-focus mapping table does not contain a focus position corresponding to the target internal object distance, it queries the object distance-focus mapping table for a first internal object distance and a second internal object distance, wherein the first internal object distance is an adjacent internal object distance less than the target internal object distance, and the second internal object distance is an adjacent internal object distance greater than the target internal object distance; and determines the target focus position corresponding to the target internal object distance based on the first internal object distance, the second internal object distance, the focus position corresponding to the first internal object distance, the focus position corresponding to the second internal object distance, and the target internal object distance.
[0146] For example, when the processing module 62 determines the target focus position corresponding to the target internal object distance based on the first internal object distance, the second internal object distance, the focus position corresponding to the first internal object distance, the focus position corresponding to the second internal object distance, and the target internal object distance, it specifically uses the following formula to determine the target focus position corresponding to the target internal object distance: Where F represents the target focus position, F i+1 F is used to indicate the focal position corresponding to the second internal object distance. i L is used to represent the focal position corresponding to the first internal object distance. i+1 L is used to represent the second internal object distance. i L is used to represent the first internal object distance, and L is used to represent the target internal object distance.
[0147] Based on the same concept as the above method, this application proposes a radar-visual integrated device, which may include: a processor, a radar, and a camera, wherein:
[0148] The radar is used to obtain the actual distance between the target object and the integrated radar-visual device;
[0149] The processor is configured to query an acquired object distance mapping table using the actual object distance to obtain the target internal object distance corresponding to the actual object distance, wherein the object distance mapping table includes a mapping relationship between the actual object distance and the internal object distance; and based on a stored object distance-focus mapping table corresponding to the current magnification of the camera, query the object distance-focus mapping table using the target internal object distance to obtain the target focus position corresponding to the target internal object distance; wherein the object distance-focus mapping table includes a mapping relationship between the internal object distance and the focus position, and the internal object distance is a set value when constructing the object distance-focus mapping table;
[0150] The camera is used to acquire an image of the target object based on the target focus position.
[0151] Based on the same concept as the methods described above, this application proposes a radar-visual integrated device, see [link to relevant documentation]. Figure 7 As shown, the integrated radar-visual device may include: a processor 71 and a machine-readable storage medium 72, the machine-readable storage medium 72 storing machine-executable instructions that can be executed by the processor 71; the processor 71 is used to execute the machine-executable instructions to implement the image acquisition method disclosed in the above example of this application.
[0152] Based on the same concept as the above method, this application also provides a machine-readable storage medium storing a plurality of computer instructions, which, when executed by a processor, can implement the image acquisition method disclosed in the above examples of this application.
[0153] The aforementioned machine-readable storage medium can be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, machine-readable storage media can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or combinations thereof.
[0154] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0155] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. An image acquisition method, characterized in that, The image acquisition method is applied to a radar-visual integrated device, which includes a radar and a camera. The method includes: The radar acquires the actual distance between the target object and the integrated radar-visual equipment. By querying the acquired object distance mapping table through the actual object distance of the target, the internal object distance of the target corresponding to the actual object distance is obtained. The object distance mapping table includes the mapping relationship between the actual object distance and the internal object distance. Based on the stored object distance-focus mapping table corresponding to the current magnification of the camera, the target focus position corresponding to the internal object distance is obtained by querying the object distance-focus mapping table through the internal object distance of the target; wherein, the object distance-focus mapping table includes the mapping relationship between the internal object distance and the focus position, and the internal object distance is a set value when constructing the object distance-focus mapping table; The camera is controlled to acquire an image of the target object based on the target focus position.
2. The method according to claim 1, characterized in that, The step of querying the acquired object distance mapping table through the actual object distance to obtain the target internal object distance corresponding to the actual object distance includes: If the object distance mapping table contains an internal object distance corresponding to the actual object distance of the target, then the internal object distance corresponding to the actual object distance of the target is determined as the target internal object distance; Alternatively, if the object distance mapping table does not contain an internal object distance corresponding to the target actual object distance, then the first actual object distance and the second actual object distance are queried from the object distance mapping table. The first actual object distance is an adjacent actual object distance that is less than the target actual object distance, and the second actual object distance is an adjacent actual object distance that is greater than the target actual object distance. Based on the first actual object distance, the second actual object distance, the internal object distance corresponding to the first actual object distance, the internal object distance corresponding to the second actual object distance, and the target actual object distance, the target internal object distance corresponding to the target actual object distance is determined.
3. The method according to claim 1 or 2, characterized in that, Before obtaining the target internal object distance corresponding to the target actual object distance by querying the already obtained object distance mapping table through the target actual object distance, the process of obtaining the object distance mapping table includes: At the camera's calibrated magnification, the correspondence between the actual object distance of the calibration point and the camera's focal position is obtained; wherein, the camera's focal position is the focal position obtained when the image of the calibration point is clearly focused; Based on the object distance focus mapping table corresponding to the calibrated magnification of the camera, the internal object distance corresponding to the camera focus position is obtained by querying the object distance focus mapping table through the camera focus position; The mapping relationship between the actual object distance and the internal object distance is recorded in the object distance mapping table.
4. The method according to claim 3, characterized in that, The step of obtaining the correspondence between the actual object distance of the calibration point and the camera focal position at the camera's calibration magnification includes: Within the coverage area of the radar, N calibration points are selected according to the object distance distribution, where N is a positive integer. Based on the object distance distribution, the actual object distance between each calibration point and the integrated radar-visual device is determined. Each calibration point is traversed sequentially. For the current calibration point, the physical coordinates of the calibration point are converted into the PT information of the camera based on the spatial position mapping relationship between the radar and the camera. Based on the calibration magnification and the PT information, the camera is controlled to locate the calibration point, and the camera is triggered to automatically focus on the calibration point to obtain the camera focus position after it is clearly focused. Record the correspondence between the actual object distance of the calibration point and the focal position of the camera at the calibration magnification.
5. The method according to claim 3, characterized in that, The step of obtaining the correspondence between the actual object distance of the calibration point and the camera focal position at the camera's calibration magnification includes: For any calibration point, control the camera to position itself at the calibration point, trigger the camera to automatically focus on the calibration point, and obtain the camera focus position after it is in focus; When the camera is positioned at the calibration point, determine the camera's current PT information and calibration magnification; Based on the spatial position mapping relationship between the radar and the camera, the PT information is converted into the physical coordinates of the calibration point, and the actual object distance between the calibration point and the integrated radar-visual device is determined based on the physical coordinates. Record the correspondence between the actual object distance of the calibration point and the focal position of the camera at the calibration magnification.
6. The method according to claim 1, characterized in that, The step of querying the object distance-focus mapping table through the object distance inside the target to obtain the target focus position corresponding to the object distance inside the target includes: If the object distance-focus mapping table contains a focus position corresponding to the object distance inside the target, then the focus position corresponding to the object distance inside the target is determined as the target focus position; or... If the object distance-focus mapping table does not contain a focus position corresponding to the target internal object distance, then the first internal object distance and the second internal object distance are queried from the object distance-focus mapping table. The first internal object distance is an adjacent internal object distance that is less than the target internal object distance, and the second internal object distance is an adjacent internal object distance that is greater than the target internal object distance. Based on the first internal object distance, the second internal object distance, the focus position corresponding to the first internal object distance, the focus position corresponding to the second internal object distance, and the target internal object distance, the target focus position corresponding to the target internal object distance is determined.
7. The method according to claim 6, characterized in that, The step of determining the target focal position corresponding to the target internal object distance based on the first internal object distance, the second internal object distance, the focal position corresponding to the first internal object distance, the focal position corresponding to the second internal object distance, and the target internal object distance includes: The target focal position corresponding to the object distance inside the target is determined using the following formula: Where F represents the target focal position, F i+1 F represents the focal position corresponding to the second internal object distance. i L represents the focal position corresponding to the first internal object distance. i+1 L represents the second internal object distance. i L represents the first internal object distance, and L represents the target internal object distance.
8. An image acquisition device, characterized in that, The image acquisition device is used in a radar-visual integrated device, which includes a radar and a camera. The device includes: The acquisition module is used to acquire the actual distance between the target object and the integrated radar-visual device through the radar; The processing module is used to query an acquired object distance mapping table through the actual object distance of the target to obtain the target internal object distance corresponding to the actual object distance. The object distance mapping table includes the mapping relationship between the actual object distance and the internal object distance. Based on the stored object distance-focus mapping table corresponding to the current magnification of the camera, the module queries the object distance-focus mapping table through the target internal object distance to obtain the target focus position corresponding to the target internal object distance. The object distance-focus mapping table includes the mapping relationship between the internal object distance and the focus position, and the internal object distance is a set value when constructing the object distance-focus mapping table. The control module is used to control the camera to acquire images of the target object based on the target focus position.
9. The apparatus according to claim 8, Its features are, in, The processing module obtains the target internal distance corresponding to the target actual object distance by querying the acquired object distance mapping table through the target actual object distance. Specifically, it performs the following: if the object distance mapping table contains an internal distance corresponding to the target actual object distance, then the internal distance corresponding to the target actual object distance is determined as the target internal distance; or, if the object distance mapping table does not contain an internal distance corresponding to the target actual object distance, then a first actual object distance and a second actual object distance are queried from the object distance mapping table, wherein the first actual object distance is an adjacent actual object distance less than the target actual object distance, and the second actual object distance is an adjacent actual object distance greater than the target actual object distance; based on the first actual object distance, the second actual object distance, the internal distance corresponding to the first actual object distance, the internal distance corresponding to the second actual object distance, and the target actual distance, the target internal distance corresponding to the target actual object distance is determined. The processing module is further configured to acquire the object distance mapping table. Specifically, acquiring the object distance mapping table involves: obtaining the correspondence between the actual object distance of the calibration point and the camera focus position at the camera's calibration magnification; wherein the camera focus position is the focus position obtained when the image of the calibration point is clearly focused; based on the object distance-focus mapping table corresponding to the camera's calibration magnification, querying the object distance-focus mapping table through the camera focus position to obtain the internal object distance corresponding to the camera focus position; and recording the mapping relationship between the actual object distance and the internal object distance in the object distance mapping table. Specifically, when the processing module obtains the correspondence between the actual object distance of the calibration point and the camera focus position under the calibration magnification of the camera, it is used to: select N calibration points (where N is a positive integer) within the radar coverage area according to the object distance distribution; determine the actual object distance between each calibration point and the integrated radar-visual equipment based on the object distance distribution; sequentially traverse each calibration point; for the currently traversed calibration point, convert the physical coordinates of the calibration point into the PT information of the camera based on the spatial position mapping relationship between the radar and the camera; control the camera to locate the calibration point based on the calibration magnification and the PT information, and trigger the camera to automatically focus on the calibration point to obtain the camera focus position after clear focus; and record the correspondence between the actual object distance of the calibration point and the camera focus position under the calibration magnification. Specifically, when the processing module obtains the correspondence between the actual object distance of the calibration point and the camera focus position at the camera's calibration magnification, it is used for: for any calibration point, controlling the camera to position itself at the calibration point, triggering the camera to automatically focus on the calibration point, and obtaining the camera focus position after clear focus; when the camera positions itself at the calibration point, determining the current PT information and calibration magnification of the camera; based on the spatial position mapping relationship between the radar and the camera, converting the PT information into the physical coordinates of the calibration point, and determining the actual object distance between the calibration point and the integrated radar-visual equipment based on the physical coordinates; and recording the correspondence between the actual object distance of the calibration point and the camera focus position at the calibration magnification. Specifically, when the processing module queries the object distance-focus mapping table to obtain the target focus position corresponding to the target internal object distance, it performs the following steps: if the object distance-focus mapping table contains a focus position corresponding to the target internal object distance, then the focus position corresponding to the target internal object distance is determined as the target focus position; or, if the object distance-focus mapping table does not contain a focus position corresponding to the target internal object distance, then a first internal object distance and a second internal object distance are queried from the object distance-focus mapping table, wherein the first internal object distance is an adjacent internal object distance less than the target internal object distance, and the second internal object distance is an adjacent internal object distance greater than the target internal object distance; and the target focus position corresponding to the target internal object distance is determined based on the first internal object distance, the second internal object distance, the focus position corresponding to the first internal object distance, the focus position corresponding to the second internal object distance, and the target internal object distance. Specifically, when the processing module determines the target focal position corresponding to the target internal object distance based on the first internal object distance, the second internal object distance, the focal position corresponding to the first internal object distance, the focal position corresponding to the second internal object distance, and the target internal object distance, it uses the following formula to determine the target focal position corresponding to the target internal object distance: Where F represents the target focus position, F i+1 F is used to represent the focal position corresponding to the second internal object distance, and L is used to represent the focal position corresponding to the first internal object distance. i+1 L is used to represent the second internal object distance. i L is used to represent the first internal object distance, and L is used to represent the target internal object distance.
10. A radar-visual integrated device, characterized in that, include: Processor, radar, and camera, among which: The radar is used to obtain the actual distance between the target object and the integrated radar-visual device; The processor is configured to query an acquired object distance mapping table using the actual object distance to obtain the target internal object distance corresponding to the actual object distance, wherein the object distance mapping table includes a mapping relationship between the actual object distance and the internal object distance; and based on a stored object distance-focus mapping table corresponding to the current magnification of the camera, query the object distance-focus mapping table using the target internal object distance to obtain the target focus position corresponding to the target internal object distance; wherein the object distance-focus mapping table includes a mapping relationship between the internal object distance and the focus position, and the internal object distance is a set value when constructing the object distance-focus mapping table; The camera is used to acquire an image of the target object based on the target focus position.
Citation Information
Patent Citations
Method capable of achieving rapid automatic focusing and image acquisition device
CN103197491A
Automatic focusing method
CN104683693A
Terminal
CN104683694A
Focus fixing method and system for laser ranging
CN107462967A
Video shooting method and electronic equipment
CN110099211A