An algorithm for identifying floating garbage images based on gun-ball linkage
By tracking and capturing sea surface targets through the gun-ball linkage system and optical flow method, combined with the image segmentation algorithm, the problem of missed detection and misidentification of sea-floating garbage identification methods is solved, achieving more efficient and accurate identification of sea-floating garbage and improving the recognition distance. and work efficiency.
Patent Information
- Application Number
- CN202011427832.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-07
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2040-12-07
AI Technical Summary
Existing methods for identifying seaborne garbage have problems such as high missed detection rate, untimely detection, limited recognition distance and misidentification. Especially in complex scenarios, the accuracy is low, and it is difficult to adapt to the particularity of seaborne garbage and environmental changes.
An image recognition algorithm based on gun-ball linkage is used to extract gun-ball video image frames, use the optical flow method to track the target, establish a gun-ball camera image plane mapping relationship, combine with the PTZ to control the ball machine to intercept video frames, and apply the trained sea drift Garbage segmentation model identifies and calculates the degree of pollution.
It improves the timeliness and accuracy of identifying seaborne garbage, expands the identification distance, reduces manual effort, improves work efficiency, and enhances the applicable scope of the identification method.
Smart Images

Figure CN114612812B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition, and in particular to an algorithm for recognizing images of floating garbage on the sea based on gun-ball linkage. Background Art
[0002] With the development of computer vision and information technology and the massive growth of multimedia data such as videos and images, people can make further decisions by mining information in videos and images. The frequent increase in marine debris has made the issue of marine ecological protection more and more urgent, and the identification and timely treatment of marine debris is one of the main tasks of marine ecological monitoring stations. However, existing marine debris identification methods, such as traditional image recognition methods and deep learning-based target detection algorithms, have certain limitations in practical applications. There are frequent problems such as high missed detection rate of marine debris, untimely detection, and poor scalability due to limited identification distance.
[0003] Timely discovery and treatment of floating garbage is a key task of the marine ecological and environmental protection departments. With the continuous reduction of garbage in the ocean, the suppressed photosynthesis of marine plants can also return to normal, increasing the oxygen content in the water, improving the vitality of marine life, and restoring the balance and steady state of the marine ecosystem. Dolphins and turtles no longer worry about accidentally eating plastic bags, and the agile sea lions are no longer afraid of being entangled by plastic packaging tapes when turning around, and the marine ecological benefits can be effectively protected. There are two existing marine debris recognition algorithms. One of them is a marine debris recognition method based on traditional image color processing technology. It extracts the image color histogram and performs threshold segmentation, and calculates the proportion of floating objects to judge the severity of pollution. However, this method is limited by the diversity of floating objects and changes in the environment. When the colors of floating objects are diverse, it is easy to misidentify garbage with similar colors to the water body as normal water bodies. What's more, when the lighting is different, the color of the water body also changes greatly, resulting in recognition errors. Another marine debris recognition method based on target detection uses a machine learning algorithm to detect and recognize floating objects by marking floating object target frames and conducting model training, and calculates the types and quantities of floating objects. However, it cannot adapt well to complex scenes with changing scenes. Due to the particularity of marine debris, they are all floating objects with a large field of view and a long distance. Traditional target detection algorithms are prone to missed detection of small or ultra-small floating objects, and there are no relatively stable structured features and uncertainty in the types of floating objects. The accuracy of the algorithm is generally low. Summary of the invention
[0004] The purpose of the present invention is to provide a marine debris image recognition algorithm based on gun-ball linkage to solve the problems raised in the above-mentioned background technology.
[0005] In order to solve the above technical problems, the present invention provides the following technical solutions: a sea floating garbage image recognition algorithm based on gun-ball linkage, comprising the following steps: step one, extraction; step two, positioning; step three, mapping; step four, interception; step five, calculation; step six, end;
[0006] In the above step 1, extract the gun camera video image frame frame_gun, divide the gun camera screen into 40 areas of 5*8, mark the center point of each area, use the pan / tilt to control the rotation of the ball camera, make the center point of the ball camera screen coincide with the center point of the gun camera calibration area, establish the mapping relationship between the gun and ball camera image planes, and generate the calibration file label;
[0007] In the above step 2, the gun video stream is obtained, and the moving target in the video is tracked and located using the optical flow method, and the center coordinates of the target detection frame with the largest pixel area are calculated as p_max(x_center,y_center);
[0008] In the above step 3, the center coordinate p_max is calculated based on the maximum target center coordinate p_max (x_center, y_center) obtained in step 2 and the gun ball calibration label in step 1, and is mapped to the ball camera coordinate ptz, where the ball camera ptz coordinate can be expressed as p_ptz (p, t, z);
[0009] In the above step 4, the ptz coordinates p_ptz(p, t, z) obtained in step 3 are rotated to the target screen through the pan / tilt control ball camera, and the ball camera video frame is intercepted as frame_ball. The trained marine debris segmentation model is used to perform forward calculation on frame_ball, and the marine debris area boundary point set set and the pixel size cnt occupied by the marine debris area are returned;
[0010] In the above step 5, the ratio of the pixel size cnt of the sea drift area obtained in step 4 to the pixel size of the ball camera image is calculated, which can be expressed as ratio = cnt / (H*W);
[0011] In the above step 6, the floating object pollution degree is calculated according to the ratio of the floating garbage pixels calculated in step 5 and the ratio value z of the ptz coordinate, which can be expressed as degree = ratio / (1 + z * (X-1)). The algorithm description ends here.
[0012] According to the above technical solution, in step three, p is the horizontal coordinate of the ball camera, t is the vertical coordinate, and z is the magnification.
[0013] According to the above technical solution, in step five, H and W are the pixel height and width of the ball camera video frame respectively.
[0014] According to the above technical solution, in step six, X is the maximum zoom ratio of the ball camera.
[0015] Compared with the prior art, the beneficial effects achieved by the present invention are: this algorithm for identifying marine debris based on the linkage of a gun and a ball provides a new technical application method for identifying marine debris, the ability and intensity of video monitoring of marine debris will be greatly improved, the discovery of marine debris will be more timely and accurate, and marine debris can be captured in real time; at the same time, the input of human energy in video monitoring of marine debris can be gradually reduced, and work efficiency can be truly improved; at the same time, the method has a wider range of applications for identifying marine debris, and compared with traditional marine debris identification methods, the maximum distance at which marine debris can be identified is greatly improved, and the application conditions are relatively simple; and it will greatly enhance the influence of customers in the industry and become a leader in the application of new technologies in the industry. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0017] Figure 1 is a flow chart of the method of the present invention;
[0018] Figure 2 It is the algorithm flow chart of the present invention;
[0019] Figure 3 It is a schematic diagram of the gun and ball calibration in the present invention;
[0020] Figure 4 It is a picture of the bolt screen in the present invention;
[0021] Figure 5 It is the screen picture of the ball machine in the present invention. DETAILED DESCRIPTION
[0022] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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.
[0023] See also Figure 1-5 The present invention provides a technical solution: a sea floating garbage image recognition algorithm based on gun-ball linkage, comprising the following steps: step one, extraction; step two, positioning; step three, mapping; step four, interception; step five, calculation; step six, end;
[0024] In the above step 1, extract the gun camera video image frame frame_gun, divide the gun camera screen into 40 areas of 5*8, mark the center point of each area, use the pan / tilt to control the rotation of the ball camera, make the center point of the ball camera screen coincide with the center point of the gun camera calibration area, establish the mapping relationship between the gun and ball camera image planes, and generate the calibration file label;
[0025] In the above step 2, the gun video stream is obtained, and the moving target in the video is tracked and located using the optical flow method, and the center coordinates of the target detection frame with the largest pixel area are calculated as p_max(x_center,y_center);
[0026] In the above step 3, the center coordinate p_max (x_center, y_center) obtained in step 2 and the gun-ball calibration label in step 1 are calculated to map the center coordinate p_max to the ball camera coordinate ptz, where the ball camera ptz coordinate can be expressed as p_ptz (p, t, z), where p is the horizontal coordinate of the ball camera, t is the vertical coordinate, and z is the magnification;
[0027] In the above step 4, the ptz coordinates p_ptz(p, t, z) obtained in step 3 are rotated to the target screen through the pan / tilt control ball camera, and the ball camera video frame is intercepted as frame_ball. The trained marine debris segmentation model is used to perform forward calculation on frame_ball, and the marine debris area boundary point set set and the pixel size cnt occupied by the marine debris area are returned;
[0028] In the above step 5, the ratio of the pixel size cnt of the sea drift area obtained in step 4 to the pixel size of the ball camera image is calculated, which can be expressed as ratio = cnt / (H*W), where H and W are the pixel height and width of the ball camera video frame respectively;
[0029] In the above step 6, the floating object pollution degree is calculated according to the ratio of the floating garbage pixels calculated in step 5 and the ratio value z of the ptz coordinate, which can be expressed as degree = ratio / (1 + z * (X-1)), where X is the maximum zoom ratio of the ball camera. The algorithm description ends here.
[0030] Based on the above, the advantage of the present invention is that, by constructing a gun-ball linkage system and utilizing the optical flow method to track and capture moving targets on the sea surface, the present invention is conducive to timely and accurate detection of marine debris and real-time capture of marine debris. At the same time, the method for identifying marine debris based on the gun-ball linkage combined with image segmentation has a wider scope of application. Compared with the traditional marine debris identification method, the maximum distance at which marine debris can be identified is greatly improved. At the same time, the application conditions are relatively simple. Based on the semantic segmentation algorithm, it is identified whether there is garbage in the sea area, and the warning conditions are set, and the warning is automatically analyzed, thereby reducing labor input and improving work efficiency.
[0031] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0032] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An algorithm for identifying floating garbage images based on gun-ball linkage, comprising the following steps: Step 1, extraction; Step 2, positioning; Step 3, mapping; Step 4, interception; Step 5, calculation; Step 6, end; It is characterized by: In the above step 1, extract the gun camera video image frame frame_gun, divide the gun camera screen into 40 areas of 5*8, mark the center point of each area, use the pan / tilt to control the rotation of the ball camera, make the center point of the ball camera screen coincide with the center point of the gun camera calibration area, establish the mapping relationship between the gun and ball camera image planes, and generate the calibration file label; In the above step 2, the gun video stream is obtained, and the moving target in the video is tracked and located using the optical flow method, and the center coordinates of the target detection frame with the largest pixel area are calculated as p_max(x_center,y_center); In the above step 3, the center coordinate p_max is calculated based on the maximum target center coordinate p_max (x_center, y_center) obtained in step 2 and the gun ball calibration label in step 1, and is mapped to the ball camera coordinate ptz, where the ball camera ptz coordinate can be expressed as p_ptz (p, t, z); In the above step 4, the ptz coordinates p_ptz(p, t, z) obtained in step 3 are rotated to the target screen through the pan / tilt control ball camera, and the ball camera video frame is intercepted as frame_ball. The trained marine debris segmentation model is used to perform forward calculation on frame_ball, and the marine debris area boundary point set set and the pixel size cnt occupied by the marine debris area are returned; In the above step 5, the ratio of the pixel size cnt of the sea drift area obtained in step 4 to the pixel size of the ball camera image is calculated, which can be expressed as ratio = cnt / (H*W); In the above step 6, the floating object pollution degree is calculated according to the ratio of the floating garbage pixels calculated in step 5 and the ratio value z of the ptz coordinate, which can be expressed as degree = ratio / (1 + z * (X-1)). The algorithm description ends here.
2. According to claim 1, a sea floating garbage image recognition algorithm based on gun-ball linkage is characterized by: In step three, p is the horizontal coordinate of the ball camera, t is the vertical coordinate, and z is the magnification.
3. According to claim 1, a sea floating garbage image recognition algorithm based on gun-ball linkage is characterized by: In step 5, H and W are the pixel height and width of the ball camera video frame respectively.
4. The marine debris image recognition algorithm based on gun-ball linkage according to claim 1 is characterized by: In step 6, X is the maximum zoom ratio of the dome camera.
Citation Information
Patent Citations
Gun and ball cooperated intelligent face snapshot camera and face snapshot method thereof
CN108900758A
Sea floating garbage identification method based on unmanned aerial vehicle
CN111079724A
