Image processing method and device, electronic equipment and storage medium

By performing two zoom shootings on the target object in the security field and determining the appropriate magnification, the problem of too small target in the shooting screen is solved, and the effectiveness of target detection is improved.

CN119815172AActive Publication Date: 2025-04-11ZHEJIANG UNIVIEW TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202311310558.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-11
Publication Date
2025-04-11
Estimated Expiration
2043-10-11

AI Technical Summary

Technical Problem

In the security field, the moving target detected by radar is relatively small in the shooting screen, which causes the target captured to not meet the requirements and affects the effectiveness of target detection.

Method used

By determining the horizontal dimension of the target object in the first shooting screen, determining the first magnification based on the size, photographing the target object, and obtaining the second shooting screen. If the size of the target object in the second shooting screen still does not meet the requirements, the second horizontal dimension and the second magnification are further determined, and the second shooting is performed.

Benefits of technology

Through two zoom shooting, the problem of excessive magnification causing the target to exceed the screen or too small magnification causing the target to be smaller, ensuring that the target accounts for a moderate proportion in the screen, improving the effectiveness of target detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119815172A_ABST
    Figure CN119815172A_ABST
Patent Text Reader

Abstract

The invention discloses an image processing method and device, electronic equipment and a storage medium. The method comprises the following steps: determining a first transverse size of a target object in a first shot picture; determining a first amplification factor adopted for shooting the target object according to the first transverse size; determining a second transverse size of the target object in the second shooting picture; and based on the second transverse size and the first amplification factor, determining a second amplification factor adopted for shooting the target object, and shooting the target object according to the second amplification factor. According to the scheme, after the target object is shot based on the first magnification to obtain the second shot picture, the target in the second shot picture possibly does not meet the requirement, the target object is shot according to the second magnification, and the shooting efficiency is improved through two times of zoom shooting. The problem that the captured target does not meet the requirement due to the fact that the target in the shot picture is small is solved, and the effectiveness of target detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to an image processing method, device, electronic equipment and storage medium. Background Art

[0002] With the continuous development of the security field, radar can be used to detect designated areas. If a moving target is detected by radar, the camera equipment can be linked to capture the moving target. However, in actual use, it is found that the target entering the shooting screen is relatively small, resulting in the captured target not meeting the requirements. In the subsequent target analysis, effective analysis cannot be performed, affecting the effectiveness of target detection. Summary of the invention

[0003] The present invention provides an image processing method, device, electronic device and storage medium to solve the problem that the target in the shooting picture is relatively small, resulting in the captured target not meeting the requirements, thereby improving the effectiveness of target detection.

[0004] According to one aspect of the present invention, there is provided an image processing method, the method comprising:

[0005] Determine a first horizontal size of the target object in a first shooting picture, the first shooting picture being a picture when the target object is detected in the target detection area and the target shooting device is linked to shoot the target object, and the horizontal size is a size along the horizontal axis direction in the shooting picture;

[0006] determining a first magnification for photographing the target object according to the first lateral size;

[0007] Determining a second horizontal size of the target object in a second shooting picture, where the second shooting picture is a picture when the target object is photographed by the target shooting device according to the first magnification;

[0008] Based on the second lateral size and the first magnification, a second magnification used to photograph the target object is determined, and the target object is photographed at the second magnification.

[0009] According to another aspect of the present invention, there is provided an image processing device, the device comprising:

[0010] A first size determination module, used to determine a first horizontal size of the target object in a first shooting picture, wherein the first shooting picture is a picture when the target object is detected in the target detection area and the target shooting device is linked to shoot the target object, and the horizontal size is a size along the horizontal axis in the shooting picture;

[0011] A magnification determination module, configured to determine a first magnification for photographing the target object according to the first lateral size;

[0012] A second size determination module, used to determine a second horizontal size of the target object in a second shooting picture, where the second shooting picture is a picture when the target object is photographed by the target shooting device according to the first magnification;

[0013] The shooting module is used to determine a second magnification ratio used to shoot the target object based on the second lateral size and the first magnification ratio, and shoot the target object according to the second magnification ratio.

[0014] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0015] at least one processor; and

[0016] a memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the image processing method described in any embodiment of the present invention.

[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the image processing method described in any embodiment of the present invention when executed.

[0019] The technical solution of the embodiment of the present invention is that since the target object initially photographed by the target device cannot meet the requirements of subsequent analysis, after determining the first horizontal size of the target object in the first shooting picture, the first magnification ratio used for photographing the target object is further determined according to the first horizontal size, so that the target object is photographed according to the first magnification ratio to obtain a second shooting picture, so as to obtain a picture that better meets the requirements. If it is found that the ratio of the size of the target object in the second shooting picture to the picture size may still not meet the requirements, after determining the second horizontal size of the target object in the second shooting picture, the second magnification ratio used for photographing the target object is determined according to the second horizontal size and the first magnification ratio, so that the target object is photographed according to the second magnification ratio. After two zoom shots, the problem that the target exceeds the picture due to too large a magnification ratio or the target is too small due to too small a magnification ratio is solved, and the magnification ratio is set to a suitable value to ensure that the target occupies a moderate proportion in the picture, which effectively solves the problem that the captured target does not meet the requirements due to the small size of the target in the shooting picture, thereby improving the effectiveness of target detection.

[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0022] Figure 1a is a flowchart of an image processing method provided according to an embodiment of the present invention;

[0023] Figure 1b is a top view of a radar scanning target object applicable to an embodiment of the present invention;

[0024] Figure 2a is a flowchart of an image processing method provided according to an embodiment of the present invention;

[0025] Figure 2b is a top view of a target object photographed by a photographing device applicable to an embodiment of the present invention;

[0026] Figure 3 is a flowchart of an image processing method provided according to an embodiment of the present invention;

[0027] Figure 4a is a flowchart of an image processing method provided according to an embodiment of the present invention;

[0028] Figure 4b is a top view of a radar scanning object applicable to an embodiment of the present invention;

[0029] Figure 5 is a structural schematic diagram of an image processing device provided according to an embodiment of the present invention;

[0030] Figure 6 It is a schematic diagram of the structure of an electronic device for implementing the image processing method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0031] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0032] It should be noted that the terms "first", "second", "reference" and "target" in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0033] Embodiment 1

[0034] Figure 1a This is a flowchart of an image processing method provided by an embodiment of the present invention. This embodiment can be applied to the case where a radar tracks a moving target on a ship on the water surface, and the moving target is uploaded to a shooting device (laser ball camera), and the shooting device captures the target to obtain an image, and obtains a suitable capture magnification after image processing. This method can be executed by an image processing device, which can be implemented in the form of hardware and / or software, and can be configured in any electronic device with network communication function. Figure 1a As shown, the method includes:

[0035] S110: Determine a first horizontal size of the target object in the first shooting picture.

[0036] The first shooting picture is a picture when the target object is detected in the target detection area and the target shooting device is linked to shoot the target object. The horizontal size is the size along the horizontal axis in the shooting picture. The first horizontal size is the size of the target object along the horizontal axis in the shooting picture. Figure 1b The target object may be ships of different sizes traveling on the water.

[0037] Specifically, the radar is controlled to perform a scanning operation toward the target detection area at a preset time interval, and whether there is a target object in the target detection area is determined based on each scanning result. After determining that there is a target object, the radar reports the information to the target shooting device, and the target shooting device shoots the target object. When the radar scans the target object, it can obtain a first distance from the target object, and the first lateral size can be obtained based on the size information of the target object and the first distance, but it is not limited to this method of obtaining the first lateral size.

[0038] S120: Determine a first magnification ratio for photographing the target object according to the first horizontal size.

[0039] Specifically, the image of the target object captured by a general shooting device cannot meet the requirements of subsequent analysis. Therefore, the shooting device needs to be focused to ensure that the image of the target object taken by the shooting device meets the requirements of subsequent analysis. Therefore, it is necessary to accurately determine the first magnification that needs to be met when the target shooting device is focused.

[0040] Optionally, determining a first magnification ratio for photographing the target object based on the first horizontal size includes: determining an expected horizontal size ratio of the target object in the first shooting picture, and determining the horizontal size of the first shooting picture, and further determining the first magnification ratio for photographing the target object based on the expected horizontal size ratio, the horizontal size of the first shooting picture, and the first horizontal size.

[0041] The expected horizontal dimension ratio R0 is the minimum ratio of the first horizontal dimension of the target object in the first captured image. The horizontal dimension of the first captured image is determined by the resolution of the target capture device. For example, if the resolution of the target capture device is width CW*height CH, then the horizontal dimension of the first captured image is width CW.

[0042] Specifically, the first horizontal dimension ratio can be expressed by the horizontal dimension CW of the first shooting picture, the first horizontal dimension S1 and the first magnification Z1, as shown in the following formula:

[0043]

[0044] Among them, K2 is a constant. In order to satisfy the proportion of the first horizontal dimension in the first shooting picture, the proportion of the first horizontal dimension must be greater than or equal to the expected horizontal dimension proportion, that is, R≥R0. If R=R0, the first magnification Z1 can be calculated, which is expressed as follows:

[0045]

[0046] S130: Determine a second horizontal size of the target object in a second shooting picture, where the second shooting picture is a picture when the target object is photographed by a target shooting device at a first magnification.

[0047] Specifically, after the first magnification is determined, the target object position of the target object in the target detection area is determined so that the target object can be captured again to obtain an image that meets the requirements, so as to perform subsequent analysis. Specifically, the target shooting device is controlled to be directed toward the target object position, and the target shooting device is adjusted to the first magnification for shooting when adjusting toward the target object position to obtain a second shooting picture. If it is found that the target object in the second shooting picture is still relatively small and cannot meet the requirements of subsequent analysis, then the target shooting device needs to be focused again to obtain an image that meets the requirements.

[0048] Before taking a second shot of the target object, the second horizontal size of the target object in the second shooting picture needs to be determined first, so as to determine the magnification required for focusing according to the second horizontal size. The specific process is: the target object in the second shooting picture is separated from the background in the second shooting picture (the background in the second shooting picture is the scenery that sets off the target object, such as waves on the sea). For example, on the sea surface, the target shooting device (laser ball camera) tracks the target object (ship), because the waves on the sea will also cause interference in the reflection, but the background generated by the waves is different from the ship, so the ship can be easily separated; further determine the horizontal size of the target object separated from the second shooting picture, and determine it as the second horizontal size of the target object in the second shooting picture.

[0049] S140: Determine a second magnification ratio for photographing the target object based on the second lateral size and the first magnification ratio, and photograph the target object at the second magnification ratio.

[0050] Specifically, determine the expected horizontal size ratio of the target object in the second shooting picture, and determine the horizontal size of the second shooting picture. Further, if the current horizontal size ratio between the second horizontal size and the horizontal size of the second shooting picture does not meet the expected horizontal size ratio, adjust the second magnification ratio used for shooting the target object based on the current horizontal ratio and the expected horizontal ratio.

[0051] The expected horizontal dimension ratio R0 is the minimum ratio of the second horizontal dimension S2 of the target object in the first captured image. The horizontal dimension of the second captured image is determined by the resolution of the target capture device. For example, if the resolution of the target capture device is width CW*height CH, then the horizontal dimension of the second captured image is width CW.

[0052] Specifically, the current horizontal proportion R1 can be expressed as: R1 = S2 / CW. If R1 is less than R0, it means that the target object in the second shooting picture is still relatively small and cannot meet the requirements of subsequent analysis. Therefore, the second magnification Z2 is determined according to the current horizontal proportion R1 and the expected horizontal proportion R0, which is specifically expressed as follows:

[0053]

[0054] After the second magnification is determined, the target object position of the target object in the target detection area is determined to facilitate controlling the target shooting device toward the target object position, and when adjusting toward the target object position, the first magnification used by the target shooting device is adjusted to the second magnification for shooting, thereby obtaining a picture that meets the requirements.

[0055] The technical solution of the embodiment of the present invention is that since the target object initially photographed by the target device cannot meet the requirements of subsequent analysis, after determining the first horizontal size of the target object in the first shooting picture, the first magnification ratio used for photographing the target object is further determined according to the first horizontal size, so that the target object is photographed according to the first magnification ratio to obtain a second shooting picture, so as to obtain a picture that better meets the requirements. If it is found that the ratio of the size of the target object in the second shooting picture to the picture size may still not meet the requirements, after determining the second horizontal size of the target object in the second shooting picture, the second magnification ratio used for photographing the target object is determined according to the second horizontal size and the first magnification ratio, so that the target object is photographed according to the second magnification ratio. After two zoom shots, the problem that the target exceeds the picture due to too large a magnification ratio or the target is too small due to too small a magnification ratio is solved, and the magnification ratio is set to a suitable value to ensure that the target occupies a moderate proportion in the picture, which effectively solves the problem that the captured target does not meet the requirements due to the small size of the target in the shooting picture, thereby improving the effectiveness of target detection.

[0056] Embodiment 2

[0057] Figure 2a A flowchart of an image processing method provided in an embodiment of the present invention. The technical solution of this embodiment further optimizes the process of S110 in the aforementioned embodiment on the basis of the aforementioned embodiment. This embodiment can be combined with various optional solutions in one or more of the aforementioned embodiments, and this solution can be used to determine the first horizontal size of the target object in the first captured image under any circumstances.

[0058] like Figure 2a As shown, the method includes:

[0059] S210: Determine a reference object size of a target object in a target detection area, where the reference object and the target object meet a preset similarity condition in at least some object attribute dimensions.

[0060] The reference object is a typical object that may appear in a scene similar to the current scene of the target object. The typical objects that appear in different scenes may be different. A typical object is a ship, for example. A typical ship may be the largest ship, a frequently appearing ship, or a ship that frequently appears at this time and location.

[0061] In this embodiment, it is necessary to determine the first lateral dimension through the size information of the target object. However, when the radar scans the target object, what is fed back is the object attribute information of the target object, and the size information of the target object cannot be obtained. Therefore, it is necessary to compare the object attribute information of the target object with the object attribute information of the reference object, and find a reference object that meets the preset similarity condition with the target object in at least some object attribute dimensions, so as to use the size information of the reference object as the reference object size of the target object.

[0062] Specifically, target object attribute information of the target object in the target detection area is determined, the target object attribute information including the target object position, the target object detection time, the target object movement trajectory and the target object movement speed; then, a reference object size of the target object is determined from a preset object set based on the target object attribute information, and the preset object set pre-stores reference objects associated with different object attributes and the sizes of the reference objects.

[0063] S220: Determine a target object movement trajectory, a target object distance, and a reference shooting direction of the target object.

[0064] The reference shooting direction is determined based on the shooting direction of shooting the target object, and the target object distance is determined based on the distance from the target shooting device to the target object along the reference shooting direction.

[0065] like Figure 2b , the target object is target 1, the shooting device is ball camera C1, the moving trajectory of the target object is the moving trajectory T1 in the figure, the distance of the target object is the distance L1 in the figure, and the reference shooting direction is the direction along the center line.

[0066] S230 , determining a first horizontal size of the target object in the first shooting picture according to the reference object size, the target object movement trajectory, the target object distance, and the reference shooting direction.

[0067] The reference object size may be the length BL and the width BW of the target object.

[0068] Specifically, the reference object size, target object movement trajectory, target object distance and reference shooting direction are obtained. Generally, the target object (large ship) moves slowly with a stable trajectory. In a short period of time (for example, within 1 minute), it basically moves in a straight line. The angle α between the target object and the shooting object can be judged based on the target object movement trajectory, target object distance and reference shooting direction. The reference lateral size S1 in the first shooting picture when the reference object is photographed and imaged along the reference shooting direction by the target shooting device is determined according to the angle α and the reference object size. It is specifically expressed as: S1=BL*Sinα+BW*Cosα, and the reference lateral size S1 is determined as the first lateral size of the target object in the first shooting picture.

[0069] S240: Determine a first magnification ratio for photographing the target object according to the first horizontal size.

[0070] Specifically, the first horizontal size S1 and the expected horizontal size ratio R0 are obtained, the size R of the first horizontal size of the target object in the first shooting picture is greater than or equal to the expected horizontal size ratio, R=R0 is taken, and the first magnification Z1 is expressed as follows:

[0071]

[0072] S250: Determine a second horizontal size of the target object in the second shooting picture, determine a second magnification for photographing the target object based on the second horizontal size and the first magnification, and photograph the target object at the second magnification.

[0073] The technical solution of the embodiment of the present invention realizes accurate determination of the first horizontal size of the target object in the first shooting picture according to the reference object size, the target object movement trajectory, the target object distance and the reference shooting direction, so that the first magnification ratio used for shooting the target object can be accurately determined according to the first horizontal size, so that the target object is shot according to the first magnification ratio to obtain the second shooting picture, so as to obtain a picture that better meets the requirements. If it is found that the ratio of the size of the target object in the second shooting picture to the picture size may still not meet the requirements, after determining the second horizontal size of the target object in the second shooting picture, the second magnification ratio used for shooting the target object is determined according to the second horizontal size and the first magnification ratio, so that the target object is shot according to the second magnification ratio. After two zoom shootings, the problem that the target exceeds the picture due to too large a magnification ratio or the target is too small due to too small a magnification ratio is solved, and the magnification ratio is set to a suitable value to ensure that the target occupies a moderate proportion in the picture, which effectively solves the problem that the target in the shooting picture is relatively small and the captured target does not meet the requirements, thereby improving the effectiveness of target detection.

[0074] Embodiment 3

[0075] Figure 3 A flowchart of an image processing method provided for an embodiment of the present invention. The technical solution of this embodiment further optimizes the process of S110 in the aforementioned embodiment on the basis of the aforementioned embodiment. This embodiment can be combined with various optional schemes in the aforementioned one or more embodiments. When the signal strength fed back by the target object meets the requirement of the preset signal strength, this embodiment is triggered to determine the first horizontal size of the target object in the first captured image.

[0076] like Figure 3 As shown, the method includes:

[0077] S310: Determine a target signal strength corresponding to a target object in a target detection area, and determine a target object distance of the target object.

[0078] In this embodiment, how to determine whether the signal strength fed back by the target object meets the preset signal strength requirement, one method is to set a preset signal strength, if the signal strength fed back by the target object is greater than or equal to the preset signal strength, then it is determined that the signal strength fed back by the target object meets the preset signal strength requirement, another method is to set a preset distance (the preset distance is the maximum distance from the target shooting device to the target object along the reference shooting direction), when the target object distance is less than or equal to the preset distance, then it is determined that the signal strength fed back by the target object meets the preset signal strength requirement, that is, the method of determining the first horizontal size of the target object in the first shooting picture in this embodiment can be used. In this case, it is simpler and more convenient to determine the first horizontal size of the target object in the first shooting picture based on the target signal strength and the target object distance, which greatly reduces the calculation process.

[0079] The target signal strength is the signal strength fed back by the target object when the target object is detected by radar. The target object distance is determined based on the distance from the target shooting device to the target object along the reference shooting direction, and the reference shooting direction is determined based on the shooting direction of the target object, such as Figure 2b The direction along the center line is used as the reference shooting direction.

[0080] S320: Determine a first horizontal size of the target object in the first captured image according to the target signal strength and the distance of the target object.

[0081] Specifically, the preset lateral size calculation function is used to describe the correlation between the signal strength ss, the object distance L and the lateral size S. The signal strength is directly proportional to the lateral size, and the signal strength is inversely proportional to the square of the distance. The preset lateral size calculation function also includes a preset constant value k1, which is determined by the attenuation and scattering of the signal. The preset lateral size calculation function can be expressed as:

[0082]

[0083] Obtain a preset lateral size calculation function, a target signal strength ss, and a target object distance L1, input the target signal strength and the target object distance into the preset lateral size calculation function, and output a first lateral size S1 of the target object in the first shooting picture through the preset lateral size function. The first lateral size S1 can be expressed as: S1 = f(SS, L1) = (ss*L1 2 ) / k1.

[0084] S330: Determine a first magnification ratio for photographing the target object according to the first horizontal size.

[0085] Specifically, the first horizontal size S1 and the expected horizontal size ratio R0 are obtained, the size R of the first horizontal size of the target object in the first shooting picture is greater than or equal to the expected horizontal size ratio, R=R0 is taken, and the first magnification Z1 is expressed as follows:

[0086]

[0087] S340: Determine a second horizontal size of the target object in the second shooting picture, determine a second magnification ratio for shooting the target object based on the second horizontal size and the first magnification ratio, and shoot the target object at the second magnification ratio.

[0088] According to the technical solution of the embodiment of the present invention, since the target object initially photographed by the target device cannot meet the requirements of subsequent analysis, after determining the first horizontal size of the target object in the first shooting picture according to the target signal strength and the distance of the target object, the first magnification ratio used for photographing the target object is further accurately determined according to the first horizontal size, so that the target object is photographed according to the first magnification ratio to obtain a second shooting picture, so as to obtain a picture that better meets the requirements. If it is found that the ratio of the size of the target object in the second shooting picture to the picture size may still not meet the requirements, after determining the second horizontal size of the target object in the second shooting picture, the second magnification ratio used for photographing the target object is determined according to the second horizontal size and the first magnification ratio, so that the target object is photographed according to the second magnification ratio. After two zoom shots, the problem that the target exceeds the picture due to too large a magnification ratio or the target is too small due to too small a magnification ratio is solved, and the magnification ratio is set to a suitable value to ensure that the target occupies a moderate proportion in the picture, which effectively solves the problem that the target in the shooting picture is relatively small and the captured target does not meet the requirements, thereby improving the effectiveness of target detection.

[0089] Embodiment 4

[0090] Figure 4aA flowchart of an image processing method provided in an embodiment of the present invention. The technical solution of this embodiment further optimizes the process of S110 in the aforementioned embodiment on the basis of the aforementioned embodiment. This embodiment can be combined with each optional solution in one or more of the aforementioned embodiments, and this embodiment is applicable to the case where the number of dots of the target object fed back by the radar meets the preset dot number condition, thereby determining the first horizontal size of the target object in the first captured image in accordance with the method of determining the first horizontal size of the target object in the first captured image in this embodiment.

[0091] like Figure 4a As shown, the method includes:

[0092] S410: Determine a target detection angle corresponding to a target object in a target detection area, and determine a target object distance corresponding to the target object.

[0093] In this embodiment, the first lateral size is determined according to the number of dots of the target object fed back by the radar. As for how to judge whether the number of dots of the target object fed back by the radar meets the preset number of dots condition, on the one hand, a preset number of dots can be set. If the number of dots fed back by the target object is greater than or equal to the preset number of dots, it is determined that the number of dots of the target object fed back by the radar meets the preset number of dots condition; on the other hand, a preset distance can be set (the preset distance is the maximum distance from the target shooting device to the target object along the reference shooting direction). When the distance to the target object is less than or equal to the preset distance, it is determined that the number of dots of the target object fed back by the radar meets the preset number of dots condition, because for target objects of the same size, the number of dots detected and fed back by the radar at the same angle is inversely proportional to the distance, such as Figure 4b As shown, the above two aspects are met, that is, the method of determining the first horizontal size of the target object in the first shooting picture in this embodiment can be adopted.

[0094] The target detection angle range is determined by the size of the scanning angle range when the radar is used to detect the target object; the target object distance is determined based on the distance from the target shooting device to the target object along the reference shooting direction, and the reference shooting direction is determined based on the shooting direction of shooting the target object;

[0095] Optionally, determining a target detection angle corresponding to a target object in a target detection area includes:

[0096] Determine the target horizontal angular resolution β corresponding to the target object, and then determine the target dot matrix number N corresponding to the target object; finally, determine the target detection angle corresponding to the target object in the target detection area according to the target horizontal angular resolution and the target dot matrix number, that is, determine the minimum scanning angle range that can scan the target object according to the target horizontal angular resolution β, that is, the minimum scanning angle θ range can be expressed as Nβ≤θ<(N+1)β, and the minimum scanning angle θ range can be used as the target detection angle γ range, that is, Nβ≤γ<(N+1)β, thereby obtaining the target detection angle.

[0097] Among them, the target horizontal angular resolution is the horizontal angular resolution of the radar used to detect whether there is a target object in the target detection area, and the target dot number is the number of dots corresponding to the point cloud used to describe the target object detected in the horizontal direction when the radar detects the target object.

[0098] S420: Determine a first horizontal size of the target object in the first shooting picture according to the target detection angle and the distance of the target object.

[0099] Specifically, the target detection angle γ range is obtained, and the range of the first horizontal dimension S1 can be determined according to the target detection angle γ range and the target object distance, which can be expressed as:

[0100]

[0101] S430: Determine a first magnification ratio for photographing the target object according to the first horizontal size.

[0102] Specifically, obtain the range of the first horizontal dimension S1 and the expected horizontal dimension ratio R0, and take the upper limit value of the first horizontal dimension S1 To prevent the target object from occupying too large a proportion in the image, the first horizontal dimension of the target object in the first shooting picture must be greater than or equal to the expected horizontal dimension proportion. If R=R0 and K2=1, the first magnification Z1 is expressed as follows:

[0103]

[0104] S440: Determine a second horizontal size of the target object in the second shooting picture, determine a second magnification for photographing the target object based on the second horizontal size and the first magnification, and photograph the target object at the second magnification.

[0105] According to the technical solution of the embodiment of the present invention, since the target object initially photographed by the target device cannot meet the requirements of subsequent analysis, after determining the first horizontal size of the target object in the first shooting picture according to the target detection angle and the distance of the target object, the first magnification ratio used for photographing the target object is further determined according to the first horizontal size, so that the target object is photographed according to the first magnification ratio to obtain a second shooting picture, so as to obtain a picture that better meets the requirements. If it is found that the ratio of the size of the target object in the second shooting picture to the picture size may still not meet the requirements, after determining the second horizontal size of the target object in the second shooting picture, the second magnification ratio used for photographing the target object is determined according to the second horizontal size and the first magnification ratio, so that the target object is photographed according to the second magnification ratio. After two zooming shots, the problem that the target exceeds the picture due to too large a magnification ratio or the target is too small due to too small a magnification ratio is solved, and the magnification ratio is set to a suitable value to ensure that the target occupies a moderate proportion in the picture, which effectively solves the problem that the captured target does not meet the requirements due to the small size of the target in the shooting picture, thereby improving the effectiveness of target detection.

[0106] Embodiment 5

[0107] Figure 5 The schematic diagram of the structure of an image processing device provided by an embodiment of the present invention is applicable to the case where, when a radar tracks a ship on the water surface and finds a moving target, the moving target is uploaded to a shooting device (laser ball camera), the shooting device captures the target to obtain an image, and obtains a suitable capture magnification after image processing. The image processing device can be implemented in the form of hardware and / or software, and can be configured in any electronic device with network communication function. Figure 5 As shown, the device comprises:

[0108] A first size determination module 510 is used to determine a first horizontal size of the target object in a first shooting picture, wherein the first shooting picture is a picture when the target object is detected in the target detection area and the target shooting device is linked to shoot the target object, and the horizontal size is a size along the horizontal axis in the shooting picture;

[0109] A magnification determination module 520, configured to determine a first magnification for photographing the target object according to the first transverse size;

[0110] A second size determination module 530, configured to determine a second horizontal size of the target object in a second photographing picture, wherein the second photographing picture is a picture of the target object photographed by a target photographing device at the first magnification;

[0111] The photographing module 540 is configured to determine a second magnification ratio for photographing the target object based on the second lateral size and the first magnification ratio, and photograph the target object at the second magnification ratio.

[0112] Optionally, the first size determination module includes a first size determination unit, including:

[0113] A reference object size determination unit, configured to determine a reference object size of a target object in a target detection area, wherein the reference object and the target object satisfy a preset similarity condition in at least part of the object attribute dimensions;

[0114] an information determining unit, configured to determine a target object movement trajectory, a target object distance, and a reference shooting direction of the target object, wherein the reference shooting direction is determined based on a shooting direction for shooting the target object, and the target object distance is determined based on a distance from a target shooting device to the target object along the reference shooting direction;

[0115] The first reference size determining unit is used to determine a first horizontal size of the target object in the first shooting picture according to the reference object size, the target object movement trajectory, the target object distance and the reference shooting direction.

[0116] Optionally, a reference object size determination unit is used to:

[0117] Determine target object attribute information of a target object in a target detection area, wherein the target object attribute information includes a target object position, a target object detection time, a target object movement trajectory, and a target object movement speed;

[0118] The reference object size of the target object is determined from a preset object set according to the target object attribute information, wherein the preset object set pre-stores reference objects associated with different object attributes and sizes of the reference objects.

[0119] Optionally, the first reference size determination unit is used to:

[0120] Determine, according to the reference object size, the target object movement trajectory, the target object distance and the reference shooting direction, a reference horizontal size in a first shooting picture when the reference object is photographed and imaged by a target shooting device along the reference shooting direction;

[0121] The reference horizontal size is determined as a first horizontal size of the target object in the first shooting picture.

[0122] Optionally, the first size determination module includes a second size determination unit, configured to:

[0123] Determine a target signal strength corresponding to a target object in a target detection area, wherein the target signal strength is a signal strength fed back by the target object when the target object is detected by a radar;

[0124] Determining a target object distance of the target object, wherein the target object distance is determined based on a distance from the target photographing device to the target object along a reference photographing direction, wherein the reference photographing direction is determined based on a photographing direction in which the target object is photographed;

[0125] A first horizontal size of the target object in the first shooting picture is determined according to the target signal strength and the distance of the target object.

[0126] Optionally, the second size determining unit includes a second reference size determining unit, configured to:

[0127] Inputting the target signal strength and the target object distance into a preset horizontal size calculation function, and outputting a first horizontal size of the target object in the first shooting picture through the preset horizontal size function;

[0128] Among them, the preset lateral dimension calculation function is used to describe the correlation between signal strength, object distance and lateral dimension. The signal strength is directly proportional to the lateral dimension, and the signal strength is inversely proportional to the square of the distance. The preset lateral dimension calculation function also includes a preset constant value, which is determined by the attenuation and scattering of the signal.

[0129] Optionally, the first size determination module includes a third size determination unit, configured to:

[0130] Determine a target detection angle corresponding to a target object in a target detection area, wherein the target detection angle range is determined by a scanning angle range when a radar is used to detect the target object;

[0131] Determining a target object distance corresponding to the target object, wherein the target object distance is determined based on a distance from the target photographing device to the target object along a reference photographing direction, wherein the reference photographing direction is determined based on a photographing direction in which the target object is photographed;

[0132] A first horizontal size of the target object in a first shooting picture is determined according to the target detection angle and the distance of the target object.

[0133] Optionally, the third size determining unit includes an angle determining unit, configured to:

[0134] Determine a target horizontal angular resolution corresponding to the target object, where the target horizontal angular resolution is a horizontal angular resolution of a radar used to detect whether there is a target object in a target detection area;

[0135] Determine the number of target dot matrixes corresponding to the target object, where the number of target dot matrixes is the number of dot matrixes corresponding to the point cloud used to describe the target object detected in the horizontal direction when the radar detects the target object;

[0136] According to the target horizontal angular resolution and the number of target dots, a target detection angle corresponding to the target object in the target detection area is determined.

[0137] Optional, rate determination module, for:

[0138] Determining an expected horizontal size ratio of the target object in the first shooting picture, and determining a horizontal size of the first shooting picture;

[0139] A first magnification ratio for photographing the target object is determined according to the expected horizontal size ratio, the horizontal size of the first photographing picture, and the first horizontal size.

[0140] Optionally, a second size determination module is used to:

[0141] separating the target object in the second shooting picture from the background in the second shooting picture, wherein the background in the second shooting picture is a scene that sets off the target object;

[0142] The lateral size of the target object separated from the second shooting picture is determined and determined as the second lateral size of the target object in the second shooting picture.

[0143] Optionally, the shooting module includes a magnification determination unit, which is used to:

[0144] Determining an expected horizontal size ratio of the target object in the second shooting picture, and determining a horizontal size of the second shooting picture;

[0145] If the current horizontal dimension ratio between the second horizontal dimension and the horizontal dimension of the second shooting picture does not meet the expected horizontal dimension ratio, the second magnification ratio used to shoot the target object is adjusted based on the current horizontal dimension ratio and the expected horizontal dimension ratio.

[0146] Optionally, the shooting module includes a zoom shooting unit, which is used to:

[0147] determining a target object position of a target object in a target detection area;

[0148] The target shooting device is controlled to face the target object position, and when adjusting the direction toward the target object position, the first magnification adopted by the target shooting device is adjusted to a second magnification for shooting.

[0149] The image processing device provided in the embodiment of the present invention can execute the image processing method provided in any embodiment of the present invention, and has the corresponding functions and beneficial effects of executing the image processing method. For detailed process, please refer to the relevant operations of the image processing method in the above embodiment.

[0150] Embodiment 6

[0151] Figure 6 A schematic diagram of the structure of an electronic device that can be used to implement the image processing method of an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, 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 processing, cellular phones, smart phones, 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 examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0152] like Figure 6 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0153] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0154] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as an image processing method.

[0155] In some embodiments, the image processing method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the image processing method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the image processing method in any other appropriate manner (e.g., by means of firmware).

[0156] Various implementations 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 chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0157] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0158] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0159] To provide interaction with a user, the systems and techniques described herein may 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 a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0160] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0161] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0162] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0163] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. An image processing method, characterized in that: The method comprises: Determine a first horizontal size of the target object in a first shooting picture, the first shooting picture being a picture when the target object is detected in the target detection area and the target shooting device is linked to shoot the target object, and the horizontal size is a size along the horizontal axis direction in the shooting picture; determining a first magnification for photographing the target object according to the first lateral size; Determining a second horizontal size of the target object in a second shooting picture, where the second shooting picture is a picture when the target object is photographed by the target shooting device according to the first magnification; Based on the second lateral size and the first magnification, a second magnification used to photograph the target object is determined, and the target object is photographed at the second magnification.

2. The method according to claim 1, characterized in that Determining a first horizontal size of the target object in the first captured picture includes: Determine a reference object size of a target object in a target detection area, wherein the reference object and the target object satisfy a preset similarity condition in at least part of the object attribute dimensions; Determine a target object movement trajectory, a target object distance, and a reference shooting direction of the target object, wherein the reference shooting direction is determined based on a shooting direction for shooting the target object, and the target object distance is determined based on a distance from a target shooting device to the target object along the reference shooting direction; A first horizontal size of the target object in the first shooting picture is determined according to the reference object size, the target object movement trajectory, the target object distance and the reference shooting direction.

3. The method according to claim 1, characterized in that Determining a first horizontal size of the target object in the first captured picture includes: Determine a target signal strength corresponding to a target object in a target detection area, wherein the target signal strength is a signal strength fed back by the target object when the target object is detected by a radar; Determining a target object distance of the target object, wherein the target object distance is determined based on a distance from the target photographing device to the target object along a reference photographing direction, wherein the reference photographing direction is determined based on a photographing direction in which the target object is photographed; A first horizontal size of the target object in the first shooting picture is determined according to the target signal strength and the distance of the target object.

4. The method according to claim 3, characterized in that Determining a first horizontal size of the target object in a first captured image according to the target signal strength and the distance of the target object includes: Inputting the target signal strength and the target object distance into a preset horizontal size calculation function, and outputting a first horizontal size of the target object in the first shooting picture through the preset horizontal size function; Among them, the preset lateral dimension calculation function is used to describe the correlation between signal strength, object distance and lateral dimension. The signal strength is directly proportional to the lateral dimension, and the signal strength is inversely proportional to the square of the distance. The preset lateral dimension calculation function also includes a preset constant value, which is determined by the attenuation and scattering of the signal.

5. The method according to claim 1, characterized in that Determining a first horizontal size of the target object in the first captured picture includes: Determine a target detection angle corresponding to a target object in a target detection area, wherein the target detection angle range is determined by a scanning angle range when a radar is used to detect the target object; Determining a target object distance corresponding to the target object, wherein the target object distance is determined based on a distance from the target photographing device to the target object along a reference photographing direction, wherein the reference photographing direction is determined based on a photographing direction in which the target object is photographed; A first horizontal size of the target object in a first shooting picture is determined according to the target detection angle and the distance of the target object.

6. The method according to claim 5, characterized in that Determine the target detection angle corresponding to the target object in the target detection area, including: Determine a target horizontal angular resolution corresponding to the target object, where the target horizontal angular resolution is a horizontal angular resolution of a radar used to detect whether there is a target object in a target detection area; Determine the number of target dot matrixes corresponding to the target object, where the number of target dot matrixes is the number of dot matrixes corresponding to the point cloud used to describe the target object detected in the horizontal direction when the radar detects the target object; According to the target horizontal angular resolution and the number of target dots, a target detection angle corresponding to the target object in the target detection area is determined.

7. The method according to claim 1, characterized in that Determining a first magnification for photographing the target object according to the first lateral size includes: Determining an expected horizontal size ratio of the target object in the first shooting picture, and determining a horizontal size of the first shooting picture; A first magnification ratio for photographing the target object is determined according to the expected horizontal size ratio, the horizontal size of the first photographing picture, and the first horizontal size.

8. The method according to claim 1, characterized in that Determining a second magnification for photographing the target object based on the second lateral size and the first magnification includes: Determining an expected horizontal size ratio of the target object in the second shooting picture, and determining a horizontal size of the second shooting picture; If the current horizontal dimension ratio between the second horizontal dimension and the horizontal dimension of the second shooting picture does not meet the expected horizontal dimension ratio, the second magnification ratio used to shoot the target object is adjusted based on the current horizontal dimension ratio and the expected horizontal dimension ratio.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the image processing method according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the image processing method according to any one of claims 1 to 8 when executed.

Citation Information

Patent Citations

  • Monocular computer vision technology-based target object distance measurement method and system

    CN107305632A

  • Nighttime front vehicle detection method and system

    CN108037505A

  • Image processing method and device and related device

    CN109165645A

  • Automatic zooming method and device, storage medium and electronic device

    CN116347221A

  • Radar

    CN1871526A