Image unit determination method, small target detection method and computer device
By splitting the image units in small object detection, using the field of view size and small object actual size, the problem of low detection efficiency of small object in the prior art is solved, and more efficient and accurate detection is achieved.
Patent Information
- Application Number
- CN201910110000.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-02-11
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2039-02-11
AI Technical Summary
The calculation amount of existing small object detection methods is too large and the detection efficiency is not high.
By obtaining the image to be tested, its field of view size and the actual size of the small target, the number of slicing is determined according to the preset resolution ratio, and the image to be tested is divided into multiple image units to improve the accuracy and efficiency of small target detection.
The reliability of the image unit and the accuracy of small object detection are improved, the calculation amount is reduced, and the detection efficiency is improved.
Smart Images

Figure CN111553339B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an image unit determination method, a small target detection method and a computer device. Background Art
[0002] Unmanned Aerial Vehicle (UAV) is a powered, controllable, reusable unmanned aerial vehicle that can carry multiple mission equipment and perform multiple tasks. With the continuous improvement of UAV performance and its advantages such as small size, flexibility, and difficulty in detection, UAVs have shown great application potential in military and civilian special fields such as reconnaissance and patrol, building survey, aerial mapping, and obstacle removal in dangerous environments. Among them, since UAVs mainly take images at a long distance and usually have a large field of view, UAVs can be used to detect and track specific small targets.
[0003] There are many existing methods for small target detection, including traditional machine vision, deep learning and other solutions. For example, a stable map of the image is generated, and then a saliency map is obtained by comparing the LAB color space pixel by pixel. Finally, the stable map and the saliency map are fused to remove false alarms and realize the detection of small targets such as pedestrians and vehicles.
[0004] However, during the research and development process, the inventors found that the computational complexity of the small target detection method in the prior art was too large and the detection efficiency was not high. Summary of the invention
[0005] The embodiments of the present invention provide an image unit determination method, a small target detection method and a computer device, which improve the reliability of the image unit and thus improve the accuracy of small target detection.
[0006] According to a first aspect of the present invention, there is provided a method for determining an image unit, comprising:
[0007] Get the image to be tested and the field of view size corresponding to the image to be tested, and get the actual size of the small target to be tested;
[0008] Determine the number of segments according to the actual size of the small target to be measured, the field of view size and a preset resolution ratio, wherein the resolution ratio is used to indicate the proportion of the pixel size of the small target to be measured in the pixel size of each image unit of the picture to be measured;
[0009] The image to be tested is segmented according to the segmentation quantity to obtain a plurality of image units for small target detection.
[0010] Optionally, in a possible implementation manner of the first aspect, obtaining the image to be tested and the size of the field of view corresponding to the image to be tested, and obtaining the actual size of the small target to be tested includes:
[0011] Obtaining the image to be tested taken by the drone and the shooting information of the image to be tested;
[0012] According to the shooting information, the field of view size corresponding to the image to be tested is determined.
[0013] Optionally, in another possible implementation manner of the first aspect, the shooting information includes a shooting height, a camera transverse field of view angle, a camera longitudinal field of view angle, and a camera inclination angle;
[0014] The step of determining the field of view size corresponding to the image to be tested according to the shooting information includes:
[0015] Determine that the camera inclination angle is 0, and then use Formula 1 to determine the field of view size corresponding to the image to be tested:
[0016]
[0017] Among them, S xy is the field of view size, h is the shooting height, θ x is the lateral field of view of the camera, θ y is the longitudinal field of view of the camera.
[0018] Optionally, in another possible implementation manner of the first aspect, segmenting the image to be tested according to the segmentation quantity to obtain a plurality of image units for small target detection includes:
[0019] The image to be tested is evenly divided according to the number of divisions to obtain a plurality of image units for small target detection.
[0020] Optionally, in another possible implementation manner of the first aspect, determining the field of view size corresponding to the image to be tested according to the shooting information further includes:
[0021] Determining that the camera tilt angle is greater than 0, sequentially determining a plurality of sub-field of view areas along the tilt direction of the camera;
[0022] respectively obtaining the size of each sub-field of view area;
[0023] The sum of the sizes of the plurality of sub-field-of-view areas is taken as the field-of-view size corresponding to the image to be tested.
[0024] Optionally, in another possible implementation of the first aspect, the plurality of sub-field-of-view areas are 4 sub-field-of-view areas;
[0025] The obtaining the size of each sub-field of view area respectively includes:
[0026] After determining that the camera inclination angle is greater than 0 and less than or equal to When , the sizes of the four sub-field-of-view areas are obtained in sequence using Formula 2:
[0027]
[0028] Among them, S 1y , S 2y , S 3y , S 4y are the sizes of the four sub-fields of view, β is the camera inclination angle, h is the shooting height, and θ x is the lateral field of view of the camera, θ y is the longitudinal field of view angle of the camera;
[0029] The sum of the sizes of the plurality of sub-field-of-view areas is used as the field-of-view size corresponding to the image to be tested, including:
[0030] The field of view size corresponding to the image to be tested is determined by formula 3:
[0031]
[0032] Among them, S xy is the field of view size.
[0033] Optionally, in another possible implementation of the first aspect, the plurality of sub-field-of-view areas are 4 sub-field-of-view areas;
[0034] The obtaining the size of each sub-field of view area respectively includes:
[0035] In determining that the camera inclination angle is greater than When , the sizes of the four sub-field-of-view areas are obtained in sequence using Formula 4:
[0036]
[0037] Among them, S 1y , S 2y , S 3y , S 4y are the sizes of the four sub-fields of view, β is the camera inclination angle, h is the shooting height, and θ x is the lateral field of view of the camera, θ y is the longitudinal field of view angle of the camera;
[0038] The sum of the sizes of the plurality of sub-field-of-view areas is used as the field-of-view size corresponding to the image to be tested, including:
[0039] The field of view size corresponding to the image to be tested is determined by formula 5:
[0040]
[0041] Among them, S xy is the field of view size.
[0042] Optionally, in another possible implementation manner of the first aspect, determining the number of segments according to the actual size of the small target to be measured, the field size, and a preset resolution ratio includes:
[0043] The number of segments corresponding to the image to be tested is determined by formula 6:
[0044]
[0045] Wherein, N is the number of segments, S xy is the field of view size, C is the actual size of the small target to be measured, is the preset resolution ratio.
[0046] According to a second aspect of the present invention, a small target detection method is provided, comprising:
[0047] According to the image unit determination method described in any one of the first aspect of the present invention and various possible implementations thereof, a plurality of image units for small target detection are obtained in the image to be tested;
[0048] The small target to be detected is detected on the multiple image units one by one to obtain the detection result of the small target.
[0049] According to a third aspect of the present invention, a computer device, a memory, a processor and a computer program are provided, wherein the computer program is stored in the memory, and the processor runs the computer program to perform the following steps:
[0050] Get the image to be tested and the field of view size corresponding to the image to be tested, and get the actual size of the small target to be tested;
[0051] Determine the number of segments according to the actual size of the small target to be measured, the field of view size and a preset resolution ratio, wherein the resolution ratio is used to indicate the proportion of the pixel size of the small target to be measured in the pixel size of each image unit of the picture to be measured;
[0052] The image to be tested is segmented according to the segmentation quantity to obtain a plurality of image units for small target detection.
[0053] Optionally, in a possible implementation manner of the third aspect, the processor is further configured to perform the following steps:
[0054] Obtaining the image to be tested taken by the drone and the shooting information of the image to be tested;
[0055] According to the shooting information, the field of view size corresponding to the image to be tested is determined.
[0056] Optionally, in another possible implementation manner of the third aspect, the processor is further configured to perform the following steps:
[0057] The shooting information includes shooting height, camera lateral field of view angle, camera longitudinal field of view angle and camera inclination angle;
[0058] The step of determining the field of view size corresponding to the image to be tested according to the shooting information includes:
[0059] Determine that the camera inclination angle is 0, and then use Formula 1 to determine the field of view size corresponding to the image to be tested:
[0060]
[0061] Among them, S xy is the field of view size, h is the shooting height, θ x is the lateral field of view of the camera, θ y is the longitudinal field of view of the camera.
[0062] Optionally, in yet another possible implementation manner of the third aspect, the processor is further configured to perform the following steps:
[0063] The image to be tested is evenly divided according to the number of divisions to obtain a plurality of image units for small target detection.
[0064] Optionally, in yet another possible implementation manner of the third aspect, the processor is further configured to perform the following steps:
[0065] Determining that the camera tilt angle is greater than 0, sequentially determining a plurality of sub-field of view areas along the tilt direction of the camera;
[0066] respectively obtaining the size of each sub-field of view area;
[0067] The sum of the sizes of the plurality of sub-field-of-view areas is taken as the field-of-view size corresponding to the image to be tested.
[0068] Optionally, in another possible implementation manner of the third aspect, the processor is further configured to perform the following steps: the plurality of sub-viewing field areas are 4 sub-viewing field areas;
[0069] After determining that the camera inclination angle is greater than 0 and less than or equal to When , the sizes of the four sub-field-of-view areas are obtained in sequence using Formula 2:
[0070]
[0071] Among them, S1y , S 2y , S 3y , S 4y are the sizes of the four sub-fields of view, β is the camera inclination angle, h is the shooting height, and θ x is the lateral field of view of the camera, θ y is the longitudinal field of view angle of the camera;
[0072] The sum of the sizes of the plurality of sub-field-of-view areas is used as the field-of-view size corresponding to the image to be tested, including:
[0073] The field of view size corresponding to the image to be tested is determined by formula 3:
[0074]
[0075] Among them, S xy is the field of view size.
[0076] Optionally, in another possible implementation manner of the third aspect, the processor is further configured to perform the following steps: the plurality of sub-viewing field areas are 4 sub-viewing field areas;
[0077] In determining that the camera inclination angle is greater than When , the sizes of the four sub-field-of-view areas are obtained in sequence using Formula 4:
[0078]
[0079] Among them, S 1y , S 2y , S 3y , S 4y are the sizes of the four sub-fields of view, β is the camera inclination angle, h is the shooting height, and θ x is the lateral field of view of the camera, θ y is the longitudinal field of view angle of the camera;
[0080] The sum of the sizes of the plurality of sub-field-of-view areas is used as the field-of-view size corresponding to the image to be tested, including:
[0081] The field of view size corresponding to the image to be tested is determined by formula 5:
[0082]
[0083] Among them, S xy is the field of view size.
[0084] Optionally, in yet another possible implementation manner of the third aspect, the processor is further configured to perform the following steps:
[0085] The number of segments corresponding to the image to be tested is determined by formula 6:
[0086]
[0087] Wherein, N is the number of segments, S xy is the field of view size, C is the actual size of the small target to be measured, is the preset resolution ratio.
[0088] According to a fourth aspect of the present invention, there is provided a computer device, comprising: a memory, a processor, and a computer program, wherein the computer program is stored in the memory, and the processor runs the computer program to perform the following steps:
[0089] According to the image unit determination method described in any one of the first aspect of the present invention and various possible implementations thereof, a plurality of image units for small target detection are obtained in the image to be tested;
[0090] The small target to be detected is detected on the multiple image units one by one to obtain the detection result of the small target.
[0091] According to a fifth aspect of the present invention, a readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, it is used to implement the image unit determination method described in any one of the first aspect of the present invention and its various possible implementation methods.
[0092] According to a sixth aspect of the present invention, a readable storage medium is provided, wherein the readable storage medium stores a computer program, and when the computer program is executed by a processor, it is used to implement the small target detection method described in the second aspect of the present invention.
[0093] The present invention provides an image unit determination method, a small target detection method and a computer device, which obtain a picture to be tested and a field of view size corresponding to the picture to be tested, and obtain the actual size of the small target to be tested; then determine the number of cuts according to the actual size of the small target to be tested, the field of view size and a preset resolution ratio, wherein the resolution ratio is used to indicate the proportion of the pixel size of the small target to be tested in the pixel size of each image unit in the picture to be tested; the picture to be tested is cut according to the number of cuts to obtain multiple image units for small target detection, and the field of view size and the actual size of the small target are introduced in the image unit cutting process so that the obtained image unit meets the resolution ratio, thereby improving the reliability of image unit cutting and thus improving the efficiency of small target detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0094] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of the present invention;
[0095] Figure 2 is a schematic flow chart of a method for determining an image unit provided by an embodiment of the present invention;
[0096] Figure 3 The camera tilt angle is greater than 0 and less than Schematic diagram of
[0097] Figure 4 The embodiment of the present invention provides a camera with an inclination angle greater than and less than Schematic diagram of
[0098] Figure 5 The embodiment of the present invention provides a camera with an inclination angle greater than Schematic diagram of
[0099] Figure 6 is a schematic diagram of the hardware structure of a computer device provided by an embodiment of the present invention;
[0100] Figure 7 It is a schematic diagram of the hardware structure of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0101] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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 are within the scope of protection of the present invention.
[0102] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above 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 numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in sequences other than those illustrated or described herein.
[0103] It should be understood that in various embodiments of the present invention, the size of the sequence number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0104] It should be understood that in the present invention, "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products or apparatuses.
[0105] It should be understood that in the present invention, "plurality" refers to two or more than two. "And / or" is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "Contains A, B and C", "Contains A, B, C" means that A, B, and C are all included, "Contains A, B or C" means that one of A, B, and C is included, and "Contains A, B and / or C" means that any one, any two, or any three of A, B, and C are included.
[0106] It should be understood that in the present invention, "B corresponding to A", "B corresponding to A", "A corresponds to B" or "B corresponds to A" means that B is associated with A and B can be determined based on A. Determining B based on A does not mean determining B based only on A, but B can also be determined based on A and / or other information. A and B match when the similarity between A and B is greater than or equal to a preset threshold.
[0107] Depending on the context, "if" as used herein may be interpreted as "when" or "when" or "in response to determining" or "in response to detecting."
[0108] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0109] See also Figure 1 , is a schematic diagram of an application scenario provided by an embodiment of the present invention. Figure 1In the scene shown, the drone 1 uses its own mounted camera to take pictures of the ground road to be tested, such as traffic pictures, while flying or hovering, where x is the direction of the camera's lateral field of view, and y is the direction of the camera's longitudinal field of view. The drone 1 transmits the captured traffic pictures to the server 2, and the server 2 executes the various image unit determination methods and small target detection methods described below. Alternatively, the drone 1 independently takes pictures of the pictures to be tested, and executes the various image unit determination methods and small target detection methods described below, and finally transmits the small target detection results to the server 2. The small target to be tested may be, for example, a vehicle in a traffic picture, which can achieve detection purposes such as specific vehicle detection, vehicle flow detection, and traffic violation detection. The small target to be tested may also be, for example, a pedestrian, which can achieve detection purposes such as pedestrian intrusion detection, pedestrian flow detection, and personnel distribution detection. The embodiment of the present invention obtains the test picture by taking pictures with a camera carried by the drone, and then introduces the field of view size and the actual size of the small target in the image unit segmentation process through the image unit determination method and the small target detection method in the following various embodiments, so that the obtained image unit meets the resolution ratio, improves the segmentation reliability of the image unit, and thus improves the efficiency of small target detection.
[0110] See also Figure 2 , is a schematic flow chart of a method for determining an image unit provided by an embodiment of the present invention, Figure 2 The execution subject of the method shown may be software and / or hardware devices. It includes steps S101 to S103, which are as follows:
[0111] S101, obtaining a picture to be tested and a field size corresponding to the picture to be tested, and obtaining an actual size of a small target to be tested.
[0112] It can be understood that Figure 1 The drone 1 shown captures the image to be tested, and generates the field of view size corresponding to the image to be tested according to the shooting information (such as the posture of the camera) during shooting, and then transmits the image to be tested and the field of view size corresponding to the image to be tested to the server 2. It can also be understood that the drone 1 captures the image to be tested, and records the shooting information during shooting, and then transmits the image to be tested and the shooting information corresponding to the image to be tested to the server 2, and the server 2 generates the field of view size corresponding to the image to be tested. The embodiment of the present invention takes the server 2 as an example of the execution subject, but is not limited to this.
[0113] Optionally, the server may obtain the image to be tested taken by the drone and the shooting information of the image to be tested, and then determine the field of view size corresponding to the image to be tested based on the shooting information. The shooting information may include shooting height, camera lateral field of view angle, camera longitudinal field of view angle and camera inclination angle. The camera lateral field of view angle and the camera longitudinal field of view angle can be understood as the field of view angles in two mutually orthogonal directions in the camera field of view. The camera field of view can be understood as the ground area photographed by the camera.
[0114] In one implementation, the process of determining the field of view size corresponding to the image to be tested according to the shooting information may be: determining that the camera inclination angle is 0, and then determining the field of view size corresponding to the image to be tested according to Formula 1:
[0115]
[0116] Among them, S xy is the field of view size, h is the shooting height, θ x is the lateral field of view of the camera, θ y is the longitudinal field of view of the camera.
[0117] The camera tilt angle of 0 can be understood as the camera shooting vertically downward to obtain the image to be tested when the drone is flying horizontally or hovering. At this time, the drone camera has a horizontal field of view range Field x , with a vertical field of view Field y :
[0118]
[0119]
[0120] Among them, the horizontal field of view range Field x , which can be understood as the actual horizontal size of the image displayed by the image to be tested; the horizontal field of view range Field y , which can be understood as the actual vertical size of the image displayed on the image to be tested. xy It can be understood as the actual area of the image displayed by the picture to be tested.
[0121] S102, determining the number of segments according to the actual size of the small target to be measured, the field size and a preset resolution ratio.
[0122] The resolution ratio is used to indicate the proportion of the pixel size of the small target to be measured in the pixel size of each image unit of the image to be measured. The resolution ratio reflects the size relationship between the pixel size of the image unit and the pixel size of the small target to be measured. Assume that the preset resolution ratio is If the pixel size of the small target to be detected is 100 pixel units, then each image unit obtained by segmentation should contain 100*M pixel units. The preset resolution ratio can be a fixed preset or determined according to the small target detection algorithm used. For example, for a small target detection algorithm with high-precision recognition, the small target can be detected even if the proportion of small targets in the image unit is extremely small, so the resolution ratio can be smaller; while for a small target detection algorithm with low recognition accuracy, it is necessary to increase the proportion of small target pixels in each image unit, so the resolution ratio should be preset to be larger. The number of segments obtained in this way can make the obtained image unit meet the resolution ratio and improve the accuracy of subsequent small target detection.
[0123] Optionally, the ratio of the pixel size of the image unit to the pixel size of the small target to be measured should be the same as the actual size ratio of the two. Therefore, the resolution ratio can be expressed by the ratio of the actual size of the image unit to the actual size of the small target to be measured: Therefore, the number of segments corresponding to the image to be tested can be determined by Formula 6:
[0124]
[0125] Wherein, N is the number of segments, S xy is the field of view size, C is the actual size of the small target to be measured, is the preset resolution ratio.
[0126] The actual size of the small target to be detected can be the size of the small target in the top view, such as the size of the top surface of the vehicle. In the application scenario of vehicle detection by drone, since the field of view of the drone is large, and the vehicle on the ground can be understood as the small target to be detected, the sum of the areas of the front cover, top cover and rear cover of the target vehicle can be pre-set as the actual size C of the small target to be detected, and then determined according to the resolution ratio of the currently used small target detection algorithm. For example, the resolution ratio is determined as Then, after the drone takes the image of the vehicle, the field of view size S is calculated based on the shooting information. xy , the number of segments is calculated by formula 6. When the small target to be measured remains unchanged, that is, the actual size C of the small target to be measured and the resolution ratio When all are fixed, the drone takes multiple pictures to be tested, and the field of view size S can be obtained. xy The number of slices N increases or decreases in direct proportion.
[0127] S103, dividing the image to be tested according to the number of divisions to obtain a plurality of image units for small target detection.
[0128] It can be understood that the image to be tested is evenly divided according to the obtained number of divisions to obtain multiple evenly distributed image units, each of which meets the preset resolution ratio. In the process of dividing the image units, image units matching the pixel size of the small target to be tested are obtained according to the preset resolution ratio. These image units are used to detect one by one in the subsequent small target detection process, which can improve the detection efficiency compared with the existing pixel-by-pixel detection.
[0129] The present embodiment provides a method for determining an image unit, which obtains a picture to be tested and a field of view size corresponding to the picture to be tested, and obtains the actual size of a small target to be tested; then determines the number of cuts according to the actual size of the small target to be tested, the field of view size and a preset resolution ratio, wherein the resolution ratio is used to indicate the proportion of the pixel size of the small target to be tested in the pixel size of each image unit in the picture to be tested; the picture to be tested is cut according to the number of cuts to obtain a plurality of image units for small target detection, and the field of view size and the actual size of the small target are introduced in the image unit cutting process so that the obtained image unit meets the resolution ratio, thereby improving the reliability of image unit cutting and thus improving the accuracy and efficiency of small target detection.
[0130] Optionally, in the above embodiment, the process of determining the field of view size corresponding to the image to be tested according to the shooting information can also be implemented in different ways when the camera is tilted. For example, when it is determined that the camera tilt angle is greater than 0, a plurality of sub-field of view areas are sequentially determined along the tilt direction of the camera. Then, the size of each of the sub-field of view areas is obtained respectively, and the sum of the sizes of the plurality of sub-field of view areas is used as the field of view size corresponding to the image to be tested.
[0131] Regarding the process of respectively obtaining the size of each sub-field of view area, the following is a case where the camera inclination angle is greater than 0 and less than or equal to and the camera tilt angle is greater than The situations are described respectively.
[0132] See also Figure 3 , is a camera tilt angle greater than 0 and less than For a schematic diagram, see Figure 4 , is a camera with an inclination angle greater than and less than It can be understood that the tilt direction of the camera is taken as the direction of the camera's longitudinal field of view, and the field of view size is divided into four equal-angle areas along the direction of the camera's longitudinal field of view, each area corresponding to a
[0133] Figure 3 The camera tilt angle shown is greater than 0 and less than In the case of , the direction ranges of the longitudinal field of view angles of the cameras in the four regions are y 1 ,y 2 ,y 3 ,y 4 , as follows:
[0134]
[0135]
[0136]
[0137]
[0138] Figure 4 The camera tilt angle shown is greater than and less than In the case of , the direction ranges of the longitudinal field of view angles of the cameras in the four regions are y 1 ,y 2 ,y 3 ,y 4 , as follows:
[0139]
[0140]
[0141]
[0142]
[0143] visible, Figure 3 and Figure 4 In any case, the sizes of the four sub-field-of-view areas shown can be calculated by the following formula 2.
[0144] As an implementation method, after determining that the camera inclination angle is greater than 0 and less than or equal to When , the sizes of the four sub-field-of-view areas are obtained in sequence using Formula 2:
[0145]
[0146] Among them, S 1y , S 2y , S 3y , S 4y are the sizes of the four sub-fields of view, β is the camera inclination angle, h is the shooting height, and θ x is the lateral field of view of the camera, θ y is the longitudinal field of view of the camera.
[0147] The specific implementation method of taking the sum of the sizes of several sub-field of view areas as the field of view size corresponding to the image to be tested may also be to determine the field of view size corresponding to the image to be tested using Formula 3:
[0148]
[0149] Among them, S xy is the field of view size.
[0150] See also Figure 5 , is a camera with an inclination angle greater than Schematic diagram, the plurality of sub-field of view areas are 4 sub-field of view areas, which can be understood as dividing the field of view size into 4 areas of equal angles along the direction of the longitudinal field of view angle of the camera, each area corresponding to a The direction ranges of the longitudinal field of view of the cameras in the four areas are y 1 ,y 2 ,y 3 ,y 4 , as follows:
[0151]
[0152]
[0153]
[0154]
[0155] visible, Figure 5 In this case, the sizes of the four sub-field-of-view areas shown can be calculated by the following formula 4.
[0156] In determining that the camera inclination angle is greater than When , the sizes of the four sub-field-of-view areas are obtained in sequence using Formula 4:
[0157]
[0158] Among them, S 1y , S 2y , S 3y , S 4y are the sizes of the four sub-fields of view, β is the camera inclination angle, h is the shooting height, and θ x is the lateral field of view of the camera, θ y is the longitudinal field of view angle of the camera;
[0159] The specific implementation method of taking the sum of the sizes of several sub-field of view areas as the field of view size corresponding to the image to be tested may also be to determine the field of view size corresponding to the image to be tested using Formula 5:
[0160]
[0161] Among them, S xy is the field of view size.
[0162] In this embodiment, the field of view size and the actual size of the small target are introduced during the image unit segmentation process, so that the obtained image units meet the resolution ratio, improving the reliability of the image unit segmentation, and thus improving the efficiency of small target detection.
[0163] An embodiment of the present invention also provides a small target detection method, which mainly includes: determining multiple image units for small target detection in the to-be-tested picture according to the image unit determination method described in any one of the above various embodiments; detecting the to-be-tested small target for each of the multiple image units one by one to obtain the detection result of the small target, improving the reliability of the image unit segmentation, and thus improving the efficiency of small target detection.
[0164] See Figure 6 , which is a schematic diagram of the hardware structure of a computer device provided by an embodiment of the present invention. The computer device 60 includes: a processor 61, a memory 62, and a computer program.
[0165] Among them, the memory 62 is used to store the computer program, and this memory can also be a flash memory. The computer program is, for example, an application program, a functional module, etc. that implement the above method.
[0166] The processor 61 is used to execute the computer program stored in the memory to implement the following steps:
[0167] Obtain the to-be-tested picture and the corresponding field of view size of the to-be-tested picture, and obtain the actual size of the to-be-tested small target;
[0168] Determine the segmentation quantity according to the actual size of the to-be-tested small target, the field of view size, and a preset resolution ratio, where the resolution ratio is used to indicate the proportion of the pixel size of the to-be-tested small target in the pixel size of each image unit of the to-be-tested picture;
[0169] Segment the to-be-tested picture according to the segmentation quantity to obtain multiple image units for small target detection.
[0170] For the specific implementation of the processor 61 to execute the above steps, reference can be made to the relevant descriptions in the foregoing method embodiments.
[0171] Optionally, the memory 62 can be either independent or integrated with the processor 61.
[0172] When the memory 62 is a device independent of the processor 61, the computer device 60 may further include:
[0173] The bus 63 is used to connect the memory 62 and the processor 61 .
[0174] Optionally, the processor 61 is further configured to perform the following steps:
[0175] Obtaining the image to be tested taken by the drone and the shooting information of the image to be tested;
[0176] According to the shooting information, the field of view size corresponding to the image to be tested is determined.
[0177] Optionally, the processor 61 is further configured to perform the following steps:
[0178] The shooting information includes shooting height, camera lateral field of view angle, camera longitudinal field of view angle and camera inclination angle;
[0179] The step of determining the field of view size corresponding to the image to be tested according to the shooting information includes:
[0180] Determine that the camera inclination angle is 0, and then use Formula 1 to determine the field of view size corresponding to the image to be tested:
[0181]
[0182] Among them, S xy is the field of view size, h is the shooting height, θ x is the lateral field of view of the camera, θ y is the longitudinal field of view of the camera.
[0183] Optionally, the processor 61 is further configured to perform the following steps:
[0184] The image to be tested is evenly divided according to the number of divisions to obtain a plurality of image units for small target detection.
[0185] Optionally, the processor 61 is further configured to perform the following steps:
[0186] Determining that the camera tilt angle is greater than 0, sequentially determining a plurality of sub-field of view areas along the tilt direction of the camera;
[0187] respectively obtaining the size of each sub-field of view area;
[0188] The sum of the sizes of the plurality of sub-field-of-view areas is taken as the field-of-view size corresponding to the image to be tested.
[0189] Optionally, the processor 61 is further configured to perform the following steps: the plurality of sub-viewing field areas are 4 sub-viewing field areas;
[0190] When it is determined that the camera inclination angle is greater than 0 and less than or equal to , the sizes of the 4 sub - field - of - view regions are obtained in sequence according to Formula 2:
[0191]
[0192] where S 1y , S 2y , S 3y , S 4y are the sizes of the 4 sub - field - of - view regions in sequence, β is the camera inclination angle, h is the shooting height, θ x is the horizontal field - of - view angle of the camera, and θ y is the vertical field - of - view angle of the camera;
[0193] Taking the sum of the sizes of the several sub - field - of - view regions as the field - of - view size corresponding to the picture to be measured includes:
[0194] Determining the field - of - view size corresponding to the picture to be measured according to Formula 3:
[0195]
[0196] where S xy is the field - of - view size.
[0197] Optionally, the processor 61 is further configured to execute the following steps: the several sub - field - of - view regions are 4 sub - field - of - view regions;
[0198] When it is determined that the camera inclination angle is greater than , the sizes of the 4 sub - field - of - view regions are obtained in sequence according to Formula 4:
[0199]
[0200] where S 1y , S 2y , S 3y , S 4y are the sizes of the 4 sub - field - of - view regions in sequence, β is the camera inclination angle, h is the shooting height, θ x is the horizontal field - of - view angle of the camera, and θ y is the vertical field - of - view angle of the camera;
[0201] Taking the sum of the sizes of the several sub - field - of - view regions as the field - of - view size corresponding to the picture to be measured includes:
[0202] Determining the field - of - view size corresponding to the picture to be measured according to Formula 5:
[0203]
[0204] Among them, S xy is the field of view size.
[0205] Optionally, the processor 61 is further configured to perform the following steps:
[0206] The number of segments corresponding to the image to be tested is determined by formula 6:
[0207]
[0208] Wherein, N is the number of segments, S xy is the field of view size, C is the actual size of the small target to be measured, is the preset resolution ratio.
[0209] See also Figure 7 , is a schematic diagram of the hardware structure of a computer device provided in an embodiment of the present invention. The computer device 70 includes: a processor 71, a memory 72 and a computer program;
[0210] The memory 72 is used to store the computer program, and the memory may also be a flash memory. The computer program is, for example, an application program, a functional module, etc. for implementing the above method.
[0211] The processor 71 is configured to execute the computer program stored in the memory to implement the following steps:
[0212] According to the image unit determination method described in the above method embodiment, a plurality of image units for small target detection are obtained in the image to be tested;
[0213] The small target to be detected is detected on the multiple image units one by one to obtain the detection result of the small target.
[0214] For details about how the processor 71 executes the above steps, please refer to the relevant description in the previous method embodiment.
[0215] Optionally, the memory 72 may be independent or integrated with the processor 71 .
[0216] When the memory 72 is a device independent of the processor 71, the computer device 70 may further include:
[0217] The bus 73 is used to connect the memory 72 and the processor 71 .
[0218] An embodiment of the present invention further provides a readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, it is used to implement the image unit determination method provided by the various embodiments described above.
[0219] An embodiment of the present invention further provides another readable storage medium. A computer program is stored in the readable storage medium. When the computer program is executed by a processor, it is used to implement the small target detection method provided by the above various embodiments.
[0220] Among them, the readable storage medium can be a computer storage medium or a communication medium. The communication medium includes any medium that facilitates the transmission of a computer program from one place to another. The computer storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer. For example, the readable storage medium is coupled to the processor, so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). In addition, the ASIC can be located in a user device. Of course, the processor and the readable storage medium can also exist as discrete components in a communication device. The readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0221] The present invention also provides a program product. The program product includes execution instructions, and the execution instructions are stored in a readable storage medium. At least one processor of the device can read the execution instructions from the readable storage medium, and at least one processor executes the execution instructions so that the device implements the method provided by the above various embodiments.
[0222] In the above embodiment of the computer device, it should be understood that the processor can be a central processing unit (CPU for short), and can also be other general-purpose processors, digital signal processors (DSP for short), application specific integrated circuits (ASIC for short), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in combination with the present invention can be directly embodied as being completed by the execution of a hardware processor, or can be completed by a combination of hardware and software modules in the processor.
[0223] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for determining an image unit, It is characterized in that include: Get the image to be tested and the field of view size corresponding to the image to be tested, and get the actual size of the small target to be tested; Determine the number of segments according to the actual size of the small target to be measured, the field of view size and a preset resolution ratio, wherein the resolution ratio is used to indicate the proportion of the pixel size of the small target to be measured in the pixel size of each image unit of the picture to be measured; Segmenting the image to be tested according to the segmentation quantity to obtain a plurality of image units for small target detection; The obtaining the field of view size corresponding to the image to be tested includes: If the camera tilt angle is 0, the field of view size corresponding to the image to be tested is determined by formula 1: Formula 1 in, is the field of view size, For shooting height, is the camera's horizontal field of view, is the camera's vertical field of view; If the camera tilt angle is greater than 0, a plurality of sub-field of view areas are sequentially determined along the tilt direction of the camera; Respectively obtaining the size of each sub-field of view area; The sum of the sizes of the plurality of sub-field-of-view areas is used as the field-of-view size corresponding to the image to be tested; The step of determining the number of segments according to the actual size of the small target to be measured, the field of view size, and a preset resolution ratio includes: The number of segments corresponding to the image to be tested is determined by formula 6: Formula 6 Wherein, N is the number of segments, is the field of view size, C is the actual size of the small target to be measured, is the preset resolution ratio.
2. The method according to claim 1, It is characterized in that The step of obtaining the image to be tested and the field size corresponding to the image to be tested, and obtaining the actual size of the small target to be tested, includes: Obtaining the image to be tested taken by the drone and the shooting information of the image to be tested; According to the shooting information, the field of view size corresponding to the image to be tested is determined.
3. The method according to claim 1, It is characterized in that The step of dividing the image to be tested according to the number of divisions to obtain a plurality of image units for small target detection includes: The image to be tested is evenly divided according to the number of divisions to obtain a plurality of image units for small target detection.
4. The method according to claim 1, It is characterized in that The plurality of sub-viewing field areas are 4 sub-viewing field areas; The obtaining the size of each sub-field of view area respectively includes: After determining that the camera inclination angle is greater than 0 and less than or equal to When , the sizes of the four sub-field-of-view areas are obtained in sequence using Formula 2: Formula 2 in, , , , are the sizes of the four sub-fields of view, is the camera tilt angle, is the shooting height, is the lateral field of view of the camera, is the longitudinal field of view angle of the camera; The sum of the sizes of the plurality of sub-field-of-view areas is used as the field-of-view size corresponding to the image to be tested, including: The field of view size corresponding to the image to be tested is determined by formula 3: Formula 3 in, is the field of view size.
5. The method according to claim 1, It is characterized in that The plurality of sub-viewing field areas are 4 sub-viewing field areas; The obtaining the size of each sub-field of view area respectively includes: In determining that the camera inclination angle is greater than When , the sizes of the four sub-field-of-view areas are obtained in sequence using Formula 4: Formula 4 in, , , , are the sizes of the four sub-fields of view, is the camera tilt angle, is the shooting height, is the lateral field of view of the camera, is the longitudinal field of view angle of the camera; The sum of the sizes of the plurality of sub-field-of-view areas is used as the field-of-view size corresponding to the image to be tested, including: The field of view size corresponding to the image to be tested is determined by formula 5: Formula 5 in, is the field of view size.
6. A small target detection method, It is characterized in that include: According to the image unit determination method according to any one of claims 1 to 5, a plurality of image units for small target detection are obtained in the image to be tested; The small target to be detected is detected on the multiple image units one by one to obtain the detection result of the small target.
7. A computer device, It is characterized in that A memory, a processor, and a computer program, wherein the computer program is stored in the memory, and the processor runs the computer program to perform the following steps: Get the image to be tested and the field of view size corresponding to the image to be tested, and get the actual size of the small target to be tested; Determine the number of segments according to the actual size of the small target to be measured, the field of view size and a preset resolution ratio, wherein the resolution ratio is used to indicate the proportion of the pixel size of the small target to be measured in the pixel size of each image unit of the picture to be measured; Segmenting the image to be tested according to the segmentation quantity to obtain a plurality of image units for small target detection; The obtaining the field of view size corresponding to the image to be tested includes: If the camera tilt angle is 0, the field of view size corresponding to the image to be tested is determined by formula 1: Formula 1 in, is the field of view size, For shooting height, is the camera's horizontal field of view, is the camera's vertical field of view; If the camera tilt angle is greater than 0, a plurality of sub-field of view areas are sequentially determined along the tilt direction of the camera; Respectively obtaining the size of each sub-field of view area; The sum of the sizes of the plurality of sub-field-of-view areas is used as the field-of-view size corresponding to the image to be tested; The step of determining the number of segments according to the actual size of the small target to be measured, the field of view size, and a preset resolution ratio includes: The number of segments corresponding to the image to be tested is determined by formula 6: Formula 6 Wherein, N is the number of segments, is the field of view size, C is the actual size of the small target to be measured, is the preset resolution ratio.
8. A computer device, It is characterized in that include: A memory, a processor, and a computer program, wherein the computer program is stored in the memory, and the processor runs the computer program to perform the following steps: According to the image unit determination method according to any one of claims 1 to 5, a plurality of image units for small target detection are obtained in the image to be tested; The small target to be detected is detected on the multiple image units one by one to obtain the detection result of the small target.
9. A readable storage medium, wherein a computer program is stored in the readable storage medium, and when the computer program is executed by a processor, it is used to implement the image unit determination method described in any one of claims 1 to 5.
10. A readable storage medium, wherein a computer program is stored in the readable storage medium, and when the computer program is executed by a processor, it is used to implement the small target detection method according to claim 6.
Citation Information
Patent Citations
Method and device for searching for monitored objects and spherical camera
CN104301676A
Moving target tracking method and system
CN106919895A