A method and system for stitching images from multi-view cameras during inspections.
By constructing the image sequence to be stitched in the multi-eye camera patrol system and adjusting the scaling ratio, the clarity problem caused by inconsistent image sizes is solved, and the effect of image stitching is improved.
Patent Information
- Application Number
- CN202411216526.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-09-02
AI Technical Summary
During the multi-eye camera patrol, due to inconsistent image sizes, the sharpness of the image after stitching is not high.
By obtaining the inspection information of multi-eye cameras, find the target image with a similarity greater than the preset threshold, and determine whether the inspection height difference is greater than the preset threshold. If it is greater than, build a sequence of images to be stitched, and use a preset stitching strategy to stitch the images, adjust the scaling ratio to improve clarity.
By adjusting the scaling ratio, the phenomenon of blurring or loss of pixel points is reduced and the clarity of image stitching is improved.
Smart Images

Figure CN118735776B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of image processing, and in particular relates to a method and system for stitching and processing patrol images of multiple cameras. Background Art
[0002] In order to improve the operation and maintenance quality and efficiency of substations, reduce the operation time of switchgear, reduce the labor intensity and operation risk of operation and maintenance personnel, and limited by the need to bury pipes in the early civil construction, the layout of primary and secondary equipment lags behind the layout of camera points, the camera points cannot be accurately arranged, and the later adjustment consumes huge manpower and material resources, and the effect is still not ideal. Therefore, it is proposed to use multi-camera patrol to monitor substations.
[0003] However, due to the complex environment of the substation, it may be necessary to adjust the patrol height of the multi-camera during the patrol process, which may cause inconsistent sizes of the collected images, thereby affecting the clarity of the stitched image obtained after the images are subsequently stitched. Summary of the invention
[0004] The present invention provides a method and system for splicing and processing patrol images of multiple cameras, which are used to solve the technical problem that when the image sizes are inconsistent and scaling and then splicing are required, the clarity of the spliced image may be low.
[0005] In a first aspect, the present invention provides a method for stitching and processing multi-camera patrol images, the method comprising:
[0006] Acquire multi-camera patrol information within a period of time, wherein the multi-camera patrol information includes multi-camera patrol images at each moment and patrol heights corresponding to the multi-camera patrol images;
[0007] Using a preset search rule to search for at least one target multi-camera patrol image in the multi-camera patrol images at each moment, wherein the similarity between two adjacent target multi-camera patrol images is greater than a preset threshold;
[0008] Obtain a first target patrol height corresponding to a first target multi-camera patrol image, and a second target patrol height corresponding to a second target multi-camera patrol image, and determine whether a difference between the first target patrol height and the second target patrol height is greater than a preset height threshold, wherein the first target multi-camera patrol image and the second target multi-camera patrol image are two adjacent target multi-camera patrol images;
[0009] If the difference between the first target patrol height and the second target patrol height is greater than a preset height threshold, all first multi-camera patrol images between the first target multi-camera patrol image and the second target multi-camera patrol image are acquired, and a sequence of images to be spliced is constructed according to the first target multi-camera patrol image, the second target multi-camera patrol image and the first multi-camera patrol image;
[0010] A preset first stitching strategy is used to stitch all images in the image sequence to be stitched to obtain a first stitched image, and the first stitched image is stitched with other target multi-camera patrol images until all target multi-camera patrol images are stitched to obtain a final multi-camera patrol image.
[0011] In a second aspect, the present invention provides a multi-camera patrol image stitching processing system, the system comprising:
[0012] An acquisition module is configured to acquire multi-camera patrol information within a period of time, wherein the multi-camera patrol information includes multi-camera patrol images at each moment and patrol heights corresponding to the multi-camera patrol images;
[0013] A search module is configured to use a preset search rule to search for at least one target multi-camera patrol image in the multi-camera patrol images at each moment, wherein the similarity between two adjacent target multi-camera patrol images is greater than a preset threshold;
[0014] A judgment module is configured to obtain a first target patrol height corresponding to a first target multi-camera patrol image and a second target patrol height corresponding to a second target multi-camera patrol image, and judge whether a difference between the first target patrol height and the second target patrol height is greater than a preset height threshold, wherein the first target multi-camera patrol image and the second target multi-camera patrol image are two adjacent target multi-camera patrol images;
[0015] A construction module is configured to obtain all first multi-camera patrol images between the first target multi-camera patrol image and the second target multi-camera patrol image if the height is greater than a preset height threshold, and construct an image sequence to be spliced according to the first target multi-camera patrol image, the second target multi-camera patrol image and the first multi-camera patrol image;
[0016] The stitching module is configured to adopt a preset first stitching strategy to stitch all images in the sequence of images to be stitched to obtain a first stitched image, and stitch the first stitched image with other target multi-camera patrol images until all target multi-camera patrol images are stitched to obtain a final multi-camera patrol image.
[0017] According to a third aspect, an electronic device is provided, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the steps of the multi-camera patrol image stitching processing method of any embodiment of the present invention.
[0018] In a fourth aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor executes the steps of the multi-camera patrol image stitching processing method of any embodiment of the present invention.
[0019] The multi-camera patrol image stitching processing method and system of the present application obtains a first target patrol height corresponding to a first target multi-camera patrol image and a second target patrol height corresponding to a second target multi-camera patrol image, and determines whether the difference between the first target patrol height and the second target patrol height is greater than a preset height threshold; if it is greater than the preset height threshold, all first multi-camera patrol images between the first target multi-camera patrol image and the second target multi-camera patrol image are obtained, and a sequence of images to be stitched is constructed according to the first target multi-camera patrol image, the second target multi-camera patrol image and the first multi-camera patrol image, and a preset first stitching strategy is used to stitch all images in the sequence of images to be stitched to obtain a first stitched image. In this way, by adjusting the scaling ratio of each area of the first target multi-camera patrol image in turn, the phenomenon of pixel blur or loss caused by excessive scaling can be reduced as much as possible, thereby improving the clarity of image stitching. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of 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 some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 A flowchart of a multi-camera patrol image stitching processing method provided by one embodiment of the present invention;
[0022] Figure 2 A structural block diagram of a multi-camera patrol image stitching processing system provided by one embodiment of the present invention;
[0023] Figure 3 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0024] 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 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.
[0025] See also Figure 1 , which shows a flow chart of a multi-camera patrol image stitching processing method of the present application.
[0026] like Figure 1 As shown, the multi-camera patrol image stitching processing method specifically includes the following steps:
[0027] Step S101, obtaining multi-camera patrol information within a period of time, wherein the multi-camera patrol information includes multi-camera patrol images at each moment and patrol heights corresponding to the multi-camera patrol images.
[0028] In this step, a multi-camera may be installed on a drone, so that the multi-camera patrol information within a period of time can be obtained by flying the drone for a period of time.
[0029] Step S102, using a preset search rule to search for at least one target multi-camera patrol image in the multi-camera patrol images at each moment, wherein the similarity between two adjacent target multi-camera patrol images is greater than a preset threshold.
[0030] In this step, the pre-trained image recognition model is used to determine the interval time based on each multi-camera patrol image, and at least one target multi-camera patrol image is searched from each multi-camera patrol image according to the interval time.
[0031] It should be noted that multiple candidate intervals and each multi-camera patrol image are input into a pre-trained image recognition model to output the average similarity of the front and back images corresponding to each candidate interval through the image recognition model. In the specific implementation, it is necessary to train the image recognition model in advance, or directly use the trained image recognition model for statistics. The average similarity of the front and back images is statistically shown as follows: increase the interval time in sequence to obtain multiple interval times such as 1, 2, ..., n, extract a section of multi-camera patrol images containing hundreds of images as prediction data, use the interval time and prediction data as model input, and use the trained SiameseNetworks model to obtain the average similarity of the front and back images corresponding to each candidate interval time.
[0032] If the average similarity of the previous and next images corresponding to the current candidate interval time is greater than a preset threshold, and the average similarity of the previous and next images corresponding to the next candidate interval time is less than the preset threshold, the current candidate interval time is determined as the target interval time.
[0033] Step S103, obtaining a first target patrol height corresponding to a first target multi-camera patrol image, and a second target patrol height corresponding to a second target multi-camera patrol image, and determining whether a difference between the first target patrol height and the second target patrol height is greater than a preset height threshold, wherein the first target multi-camera patrol image and the second target multi-camera patrol image are two adjacent target multi-camera patrol images.
[0034] In a specific embodiment, if the difference between the first target patrol height and the second target patrol height is not greater than a preset height threshold, a preset second stitching strategy is used to directly stitch the first target multi-camera patrol image and the second target multi-camera patrol image to obtain a first stitched image.
[0035] Specifically, a preset second stitching strategy is used to directly stitch the first target multi-camera patrol image with the second target multi-camera patrol image to obtain a first stitched image, including: aligning the first target multi-camera patrol image with the second target multi-camera patrol image based on at least two target pixel points, wherein the target pixel point is the pixel point of the object to be patrolled; after alignment, deduplicating the first target multi-camera patrol image and the second target multi-camera patrol image, and stitching the processed first target multi-camera patrol image with the second target multi-camera patrol image.
[0036] Step S104: If the difference between the first target patrol height and the second target patrol height is greater than a preset height threshold, all first multi-camera patrol images between the first target multi-camera patrol image and the second target multi-camera patrol image are obtained, and a sequence of images to be spliced is constructed based on the first target multi-camera patrol image, the second target multi-camera patrol image and the first multi-camera patrol image.
[0037] In this step, the acquisition time of the first target multi-camera patrol image, the second target multi-camera patrol image and the first multi-camera patrol image is obtained, and the first target multi-camera patrol image, the second target multi-camera patrol image and the first multi-camera patrol image are sorted according to the time sequence to obtain the image sequence to be spliced.
[0038] Step S105, using a preset first stitching strategy to stitch all images in the sequence of images to be stitched to obtain a first stitched image, and stitching the first stitched image with other target multi-camera patrol images until all target multi-camera patrol images are stitched to obtain a final multi-camera patrol image.
[0039] In this step, the patrol height corresponding to each image to be stitched in the sequence of images to be stitched is obtained; the scaling ratio is set according to the patrol height of other images to be stitched and the patrol height of the target image to be stitched, wherein the target image to be stitched is the image to be stitched whose acquisition time is closest to the current time in the sequence of images to be stitched, and the other images to be stitched are any images to be stitched in the sequence of images to be stitched except the target image to be stitched; the adjacent first image to be stitched and the second image to be stitched are aligned based on at least two target pixels, wherein the target pixel is the pixel of the object to be stitched, and the acquisition time corresponding to the first image to be stitched is earlier than the acquisition time corresponding to the second image to be stitched; the first sub-image to be stitched is intercepted in the first image to be stitched according to the boundary range of the second image to be stitched, wherein any pixel in the first sub-image to be stitched does not appear in the second image to be stitched; the first sub-image to be stitched is scaled according to the scaling ratio corresponding to the first image to be stitched, and after scaling each sub-image to be stitched, each sub-image to be stitched is stitched with the target image to be stitched.
[0040] For example, due to different patrol heights, the sizes of the first image A to be stitched and the first image B to be stitched are different. At this time, after the adjacent first image A to be stitched and the first image B to be stitched are aligned according to the target pixel points, the first image B to be stitched may be located in the middle of the first image A to be stitched. The uncovered area on the left edge of the first image A to be stitched may be caused by the non-existence of pixels in the first image B to be stitched, and the uncovered areas on the right edge and the upper and lower edges of the first image A to be stitched may be due to the fact that the size of the first image B to be stitched is smaller than that of the first image B to be stitched. The pixel points in the uncovered area of the right edge and the upper and lower side edges actually exist in the first image to be stitched B. Therefore, it is only necessary to intercept the uncovered area of the left edge as the first sub-image to be stitched a, and scale the first sub-image a. Similarly, compared with the first image B to be stitched and the first image C to be stitched, the first sub-image b to be stitched can be obtained. Then, the first sub-image a to be stitched, the first sub-image b to be stitched and the target image to be stitched are simply stitched together to obtain the final multi-camera patrol image.
[0041] Compared with the operation of directly scaling two target multi-camera patrol images with inconsistent sizes due to patrol height, this method obtains all multi-camera patrol images between two target multi-camera patrol images with inconsistent sizes, and scales each multi-camera patrol image after partially intercepting it. This method can reduce the phenomenon of pixel blur or loss caused by excessive scaling, thereby improving the clarity of image stitching.
[0042] It should be noted that it is determined whether the difference between the third target patrol height corresponding to the first stitched image and the fourth target patrol height corresponding to the other target multi-eye camera patrol images is greater than the preset height threshold; if the difference between the third target patrol height corresponding to the first stitched image and the fourth target patrol height corresponding to the other target multi-eye camera patrol images is not greater than the preset height threshold, the first stitched image and the other target multi-eye camera patrol images are directly stitched using the preset second stitching strategy to obtain a second stitched image; if the difference between the third target patrol height corresponding to the first stitched image and the fourth target patrol height corresponding to the other target multi-eye camera patrol images is greater than the preset height threshold, all second multi-eye camera patrol images between the second target multi-eye camera patrol image and the other target multi-eye camera patrol images are obtained, and other image sequences to be stitched are constructed according to the first stitched image, other target multi-eye camera patrol images and the second multi-eye camera patrol images; all images in the other image sequences to be stitched are stitched using the preset first stitching strategy to obtain a second stitched image.
[0043] In summary, the method of the present application obtains the first target patrol height corresponding to the first target multi-eye camera patrol image, and the second target patrol height corresponding to the second target multi-eye camera patrol image, and determines whether the difference between the first target patrol height and the second target patrol height is greater than a preset height threshold; if it is greater than the preset height threshold, all first multi-eye camera patrol images between the first target multi-eye camera patrol image and the second target multi-eye camera patrol image are obtained, and a sequence of images to be stitched is constructed according to the first target multi-eye camera patrol image, the second target multi-eye camera patrol image and the first multi-eye camera patrol image, and a preset first stitching strategy is used to stitch all images in the sequence of images to be stitched to obtain a first stitched image. In this way, by adjusting the scaling ratio of each area of the first target multi-eye camera patrol image in turn, the phenomenon of pixel blur or loss caused by excessive scaling can be reduced as much as possible, thereby improving the clarity of image stitching.
[0044] See also Figure 2 , which shows a structural block diagram of a multi-camera patrol image stitching processing system of the present application.
[0045] like Figure 2 As shown, the multi-camera patrol image stitching processing system 200 includes an acquisition module 210, a search module 220, a judgment module 230, a construction module 240 and a stitching module 250.
[0046] Among them, the acquisition module 210 is configured to obtain multi-eye camera patrol information within a period of time, and the multi-eye camera patrol information includes multi-eye camera patrol images at each moment and patrol heights corresponding to the multi-eye camera patrol images; the search module 220 is configured to use a preset search rule to search for at least one target multi-eye camera patrol image in the multi-eye camera patrol images at each moment, wherein the similarity between two adjacent target multi-eye camera patrol images is greater than a preset threshold; the judgment module 230 is configured to obtain a first target patrol height corresponding to a first target multi-eye camera patrol image, and a second target patrol height corresponding to a second target multi-eye camera patrol image, and judge whether the difference between the first target patrol height and the second target patrol height is greater than a preset height threshold, wherein the first target multi-eye camera patrol image has ... The camera patrol image and the second target multi-eye camera patrol image are two adjacent target multi-eye camera patrol images; the construction module 240 is configured to obtain all the first multi-eye camera patrol images between the first target multi-eye camera patrol image and the second target multi-eye camera patrol image if it is greater than a preset height threshold, and construct a sequence of images to be spliced according to the first target multi-eye camera patrol image, the second target multi-eye camera patrol image and the first multi-eye camera patrol image; the stitching module 250 is configured to adopt a preset first stitching strategy to stitch all images in the sequence of images to be stitched to obtain a first stitched image, and stitch the first stitched image with other target multi-eye camera patrol images until all target multi-eye camera patrol images are stitched to obtain a final multi-eye camera patrol image.
[0047] It should be understood that Figure 2 Modules and references documented in Figure 1 Therefore, the operations and features described above for the method and the corresponding technical effects are also applicable to Figure 2 The modules in it will not be described in detail here.
[0048] In some other embodiments, the embodiments of the present invention further provide a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor executes the multi-camera patrol image stitching processing method in any of the above method embodiments;
[0049] As an implementation mode, the computer-readable storage medium of the present invention stores computer-executable instructions, and the computer-executable instructions are configured as follows:
[0050] Acquire multi-camera patrol information within a period of time, wherein the multi-camera patrol information includes multi-camera patrol images at each moment and patrol heights corresponding to the multi-camera patrol images;
[0051] Using a preset search rule to search for at least one target multi-camera patrol image in the multi-camera patrol images at each moment, wherein the similarity between two adjacent target multi-camera patrol images is greater than a preset threshold;
[0052] Obtain a first target patrol height corresponding to a first target multi-camera patrol image, and a second target patrol height corresponding to a second target multi-camera patrol image, and determine whether a difference between the first target patrol height and the second target patrol height is greater than a preset height threshold, wherein the first target multi-camera patrol image and the second target multi-camera patrol image are two adjacent target multi-camera patrol images;
[0053] If the difference between the first target patrol height and the second target patrol height is greater than a preset height threshold, all first multi-camera patrol images between the first target multi-camera patrol image and the second target multi-camera patrol image are acquired, and a sequence of images to be spliced is constructed according to the first target multi-camera patrol image, the second target multi-camera patrol image and the first multi-camera patrol image;
[0054] A preset first stitching strategy is used to stitch all images in the image sequence to be stitched to obtain a first stitched image, and the first stitched image is stitched with other target multi-camera patrol images until all target multi-camera patrol images are stitched to obtain a final multi-camera patrol image.
[0055] The computer-readable storage medium may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the multi-camera patrol image stitching processing system, etc. In addition, the computer-readable storage medium may include a high-speed random access memory, and may also include a memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the computer-readable storage medium may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the multi-camera patrol image stitching processing system via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0056] Figure 3 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Figure 3As shown, the device includes: a processor 310 and a memory 320. The electronic device may also include: an input device 330 and an output device 340. The processor 310, the memory 320, the input device 330 and the output device 340 may be connected via a bus or other means. Figure 3 In the example, the connection through the bus is taken as an example. The memory 320 is the above-mentioned computer-readable storage medium. The processor 310 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 320, that is, the multi-camera patrol image stitching processing method of the above-mentioned method embodiment is realized. The input device 330 can receive input digital or character information, and generate key signal input related to user settings and function control of the multi-camera patrol image stitching processing system. The output device 340 may include display devices such as display screens.
[0057] The electronic device can execute the method provided by the embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not described in detail in this embodiment, please refer to the method provided by the embodiment of the present invention.
[0058] As an implementation mode, the electronic device is applied to a multi-camera patrol image stitching processing system, and is used for a client, and includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can:
[0059] Acquire multi-camera patrol information within a period of time, wherein the multi-camera patrol information includes multi-camera patrol images at each moment and patrol heights corresponding to the multi-camera patrol images;
[0060] Using a preset search rule to search for at least one target multi-camera patrol image in the multi-camera patrol images at each moment, wherein the similarity between two adjacent target multi-camera patrol images is greater than a preset threshold;
[0061] Obtain a first target patrol height corresponding to a first target multi-camera patrol image, and a second target patrol height corresponding to a second target multi-camera patrol image, and determine whether a difference between the first target patrol height and the second target patrol height is greater than a preset height threshold, wherein the first target multi-camera patrol image and the second target multi-camera patrol image are two adjacent target multi-camera patrol images;
[0062] If the difference between the first target patrol height and the second target patrol height is greater than a preset height threshold, all first multi-camera patrol images between the first target multi-camera patrol image and the second target multi-camera patrol image are acquired, and a sequence of images to be spliced is constructed according to the first target multi-camera patrol image, the second target multi-camera patrol image and the first multi-camera patrol image;
[0063] A preset first stitching strategy is used to stitch all images in the image sequence to be stitched to obtain a first stitched image, and the first stitched image is stitched with other target multi-camera patrol images until all target multi-camera patrol images are stitched to obtain a final multi-camera patrol image.
[0064] Through the description of the above implementation modes, those skilled in the art can clearly understand that each implementation mode can be implemented by means of software plus a necessary general hardware platform, or of course by hardware. Based on such an understanding, the above technical solution can essentially or in other words be embodied in the form of a software product that contributes to the prior art. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0065] 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 make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for stitching and processing multi-camera patrol images, characterized in that: The method comprises: Acquire multi-camera patrol information within a period of time, wherein the multi-camera patrol information includes multi-camera patrol images at each moment and patrol heights corresponding to the multi-camera patrol images; Using a preset search rule to search for at least one target multi-camera patrol image in the multi-camera patrol images at each moment, wherein the similarity between two adjacent target multi-camera patrol images is greater than a preset threshold, and using the preset search rule to search for at least one target multi-camera patrol image in the multi-camera patrol images at each moment includes: Determine the interval time based on each multi-camera patrol image through a pre-trained image recognition model, and search for at least one target multi-camera patrol image from each multi-camera patrol image according to the interval time; Obtain a first target patrol height corresponding to a first target multi-camera patrol image, and a second target patrol height corresponding to a second target multi-camera patrol image, and determine whether a difference between the first target patrol height and the second target patrol height is greater than a preset height threshold, wherein the first target multi-camera patrol image and the second target multi-camera patrol image are two adjacent target multi-camera patrol images; If the difference between the first target patrol height and the second target patrol height is greater than a preset height threshold, all first multi-camera patrol images between the first target multi-camera patrol image and the second target multi-camera patrol image are acquired, and a sequence of images to be spliced is constructed according to the first target multi-camera patrol image, the second target multi-camera patrol image and the first multi-camera patrol image; A preset first stitching strategy is used to stitch all the images in the sequence of images to be stitched to obtain a first stitched image, and the first stitched image is stitched with other target multi-camera patrol images until all target multi-camera patrol images are stitched to obtain a final multi-camera patrol image, wherein the stitching of all the images in the sequence of images to be stitched using the preset first stitching strategy to obtain the first stitched image includes: Obtaining the patrol height corresponding to each image to be stitched in the sequence of images to be stitched; The scaling ratio is set according to the patrol height of other images to be stitched and the patrol height of the target image to be stitched, wherein the target image to be stitched is an image to be stitched whose acquisition time is closest to the current time in the sequence of images to be stitched, and the other images to be stitched are any images to be stitched in the sequence of images to be stitched except the target image to be stitched; Aligning adjacent first and second images to be stitched based on at least two target pixels, wherein the target pixels are pixels of the object to be inspected, and the acquisition time corresponding to the first image to be stitched is earlier than the acquisition time corresponding to the second image to be stitched; intercepting a first sub-image to be stitched from the first image to be stitched according to a boundary range of the second image to be stitched, wherein any pixel point in the first sub-image to be stitched does not appear in the second image to be stitched; The first sub-images to be stitched are scaled according to a scaling ratio corresponding to the first image to be stitched, and after each sub-image to be stitched is scaled, each sub-image to be stitched is stitched with the target image to be stitched.
2. The method for stitching and processing multi-camera patrol images according to claim 1 is characterized in that: The step of stitching the first stitched image with other target multi-camera patrol images until all target multi-camera patrol images are stitched together to obtain a final multi-camera patrol image includes: Determine whether a difference between a third target patrol height corresponding to the first stitched image and a fourth target patrol height corresponding to the other target multi-camera patrol images is greater than a preset height threshold; If the difference between the third target patrol height corresponding to the first stitched image and the fourth target patrol height corresponding to the other target multi-camera patrol images is not greater than a preset height threshold, directly stitching the first stitched image with the other target multi-camera patrol images using a preset second stitching strategy to obtain a second stitched image; If the difference between the third target patrol height corresponding to the first stitched image and the fourth target patrol height corresponding to the other target multi-camera patrol images is greater than a preset height threshold, all second multi-camera patrol images between the second target multi-camera patrol image and the other target multi-camera patrol images are acquired, and other image sequences to be stitched are constructed according to the first stitched image, the other target multi-camera patrol images and the second multi-camera patrol images; A preset first stitching strategy is used to stitch all images in the other to-be-stitched image sequence to obtain a second stitched image.
3. The method for stitching and processing multi-camera patrol images according to claim 1 is characterized in that: After determining whether the difference between the first target patrol height and the second target patrol height is greater than a preset height threshold, the method further includes: If the difference between the first target patrol height and the second target patrol height is not greater than a preset height threshold, a preset second stitching strategy is used to directly stitch the first target multi-camera patrol image and the second target multi-camera patrol image to obtain a first stitched image.
4. The method for stitching and processing multi-camera patrol images according to claim 3 is characterized in that: The method of directly splicing the first target multi-camera patrol image with the second target multi-camera patrol image using a preset second splicing strategy to obtain a first spliced image includes: Aligning the first target multi-camera patrol image with the second target multi-camera patrol image based on at least two target pixel points, wherein the target pixel point is a pixel point of the object to be patrolled; After alignment, the first target multi-camera patrol image and the second target multi-camera patrol image are deduplicated, and the processed first target multi-camera patrol image and the second target multi-camera patrol image are spliced.
5. The method for stitching and processing multi-camera patrol images according to claim 1 is characterized in that: The step of constructing a sequence of images to be stitched according to the first target multi-camera patrol image, the second target multi-camera patrol image, and the first multi-camera patrol image comprises: Acquire the acquisition time of the first target multi-camera patrol image, the second target multi-camera patrol image and the first multi-camera patrol image, and sort the first target multi-camera patrol image, the second target multi-camera patrol image and the first multi-camera patrol image according to the time sequence to obtain the image sequence to be spliced.
6. A multi-camera patrol image stitching processing system, characterized in that: The system comprises: An acquisition module is configured to acquire multi-camera patrol information within a period of time, wherein the multi-camera patrol information includes multi-camera patrol images at each moment and patrol heights corresponding to the multi-camera patrol images; A search module is configured to use a preset search rule to search for at least one target multi-camera patrol image in the multi-camera patrol images at each moment, wherein the similarity between two adjacent target multi-camera patrol images is greater than a preset threshold, and the use of the preset search rule to search for at least one target multi-camera patrol image in the multi-camera patrol images at each moment includes: Determine the interval time based on each multi-camera patrol image through a pre-trained image recognition model, and search for at least one target multi-camera patrol image from each multi-camera patrol image according to the interval time; A judgment module is configured to obtain a first target patrol height corresponding to a first target multi-camera patrol image and a second target patrol height corresponding to a second target multi-camera patrol image, and judge whether a difference between the first target patrol height and the second target patrol height is greater than a preset height threshold, wherein the first target multi-camera patrol image and the second target multi-camera patrol image are two adjacent target multi-camera patrol images; A construction module is configured to obtain all first multi-camera patrol images between the first target multi-camera patrol image and the second target multi-camera patrol image if the height is greater than a preset height threshold, and construct an image sequence to be spliced according to the first target multi-camera patrol image, the second target multi-camera patrol image and the first multi-camera patrol image; The stitching module is configured to stitch all the images in the sequence of images to be stitched using a preset first stitching strategy to obtain a first stitched image, and stitch the first stitched image with other target multi-camera patrol images until all target multi-camera patrol images are stitched to obtain a final multi-camera patrol image, wherein the stitching of all the images in the sequence of images to be stitched using the preset first stitching strategy to obtain the first stitched image includes: Obtaining the patrol height corresponding to each image to be stitched in the sequence of images to be stitched; The scaling ratio is set according to the patrol height of other images to be stitched and the patrol height of the target image to be stitched, wherein the target image to be stitched is an image to be stitched whose acquisition time is closest to the current time in the sequence of images to be stitched, and the other images to be stitched are any images to be stitched in the sequence of images to be stitched except the target image to be stitched; Aligning adjacent first and second images to be stitched based on at least two target pixels, wherein the target pixels are pixels of the object to be inspected, and the acquisition time corresponding to the first image to be stitched is earlier than the acquisition time corresponding to the second image to be stitched; intercepting a first sub-image to be stitched from the first image to be stitched according to a boundary range of the second image to be stitched, wherein any pixel point in the first sub-image to be stitched does not appear in the second image to be stitched; The first sub-images to be stitched are scaled according to a scaling ratio corresponding to the first image to be stitched, and after each sub-image to be stitched is scaled, each sub-image to be stitched is stitched with the target image to be stitched.
7. An electronic device, characterized in that: include: At least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method described in any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Target moving path detection method, device, equipment, system and medium
CN116839577A
Distribution network line inspection method and system based on target tracking
CN117036401A