Picture merging method and device, equipment, medium and program product
By extracting the core area and center point of the image and calculating the intersection and merging ratio, the diversity merging of images is realized, which solves the problem of lack of diversity and overlap in image merging in the existing technology and improves the merging efficiency.
Patent Information
- Application Number
- CN202310251667.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-14
- Publication Date
- 2024-09-20
AI Technical Summary
Existing image merging technology lacks diversity when processing multiple images, manual dragging is inefficient and it is difficult to avoid serious overlap problems.
By extracting the core area and center point of the image, generating random points, calculating the intersection and union ratio, and repeating the moving steps until the intersection and union ratio is less than a predetermined value, the diversity of images is merged.
It realizes efficient automatic merging of multiple images, avoids serious overlap, and improves the diversity of image arrangement and merging efficiency.
Smart Images

Figure CN118674633A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer data processing, and in particular to a picture merging method, device, equipment, medium and program product. Background Art
[0002] Among the various image combination technologies currently available, multiple images uploaded by users are generally arranged regularly on one image, lacking the diversity of image combinations. Even if users are allowed to drag images at will, the image arrangement can be regular, irregular, overlapping, or non-overlapping, but when faced with a large number of images, manual dragging is very inefficient.
[0003] The present invention is an image merging technology that can effectively and diversely combine multiple images. Summary of the invention
[0004] The purpose of the present invention is to provide a picture merging method, device, equipment, medium and program product, which can efficiently and automatically merge multiple images and achieve diversity in image combinations.
[0005] An embodiment of the present invention discloses a method for merging pictures, the method comprising:
[0006] An extraction step of extracting core areas of a plurality of images to be merged and center points of a plurality of the core areas;
[0007] The generation step generates several random points on the new image;
[0008] A moving step, moving the center points of the plurality of core areas to the plurality of random points of the new image, and calculating the intersection-and-union ratio of any two adjacent core areas among the plurality of core areas;
[0009] The updating step repeats the moving step until the intersection-over-union ratio is less than a predetermined value, thereby obtaining the updated new image.
[0010] Optionally, the intersection-and-union ratio calculation formula for calculating the intersection-and-union ratio includes calculating the intersection score I sum ,
[0011]
[0012] The intersection I=m1*m2, m1 and m2 are the area values of two adjacent core areas, i is all possible values of any two adjacent core areas, and the area value range is 0-1.
[0013] Optionally, the intersection-over-union ratio calculation formula includes calculating the union score U sum ,
[0014]
[0015] Among them, the union U=m1+m2-I.
[0016] Optionally, the intersection-over-union calculation formula further includes calculating an intersection-over-union score IOU,
[0017] Optionally, the height of the new image is at least twice the maximum height of the multiple images to be merged, and the width of the new image is at least twice the width of the multiple images to be merged.
[0018] Optionally, the predetermined value is 0.2.
[0019] An embodiment of the present invention discloses an image merging device, the device comprising:
[0020] An extraction module, extracting core areas of multiple images to be merged and center points of multiple core areas;
[0021] The generation module generates several random points on the new image;
[0022] A moving module moves the center points of the plurality of core areas to the plurality of random points of the new image, and calculates the intersection-and-union ratio of any two adjacent core areas among the plurality of core areas;
[0023] The updating module repeats the moving step until the intersection-over-union ratio is less than a predetermined value, thereby obtaining the updated new image.
[0024] An embodiment of the present invention discloses an electronic device, characterized in that the device comprises a processor and a memory storing computer executable instructions, and the processor is configured to execute the instructions to implement the above-mentioned image merging method.
[0025] An embodiment of the present invention discloses a computer-readable storage medium, characterized in that at least one computer instruction is stored in the computer-readable storage medium, and the at least one instruction is loaded and executed by a processor to implement the above-mentioned image merging method.
[0026] An embodiment of the present invention discloses a computer program product, which includes computer instructions. When the computer instructions are executed, the above-mentioned picture merging method is implemented.
[0027] The present invention provides an image processing method, device, medium and program product, which finally realizes the calculation of intersection-and-union ratio of continuous regions by expressing continuous digital matrices as continuous regions, and is also compatible with the calculation of intersection-and-union ratio of discrete regions.
[0028] Compared with the prior art, the main difference and effect of the implementation of the present invention are: it is possible to extract the core area of a single image, and at the same time, the core areas of multiple images can be randomly combined into one image, there is no serious overlap in the merged images, and the image arrangement methods are diverse. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a schematic diagram of an existing method for calculating overlapping areas of images;
[0030] Figure 2 is a flow chart of a method for merging pictures according to an embodiment of the present invention;
[0031] Figure 3 is a schematic diagram of two gradient regions according to an embodiment of the present invention;
[0032] Figure 4 is a schematic diagram of an intersection according to an embodiment of the present invention;
[0033] Figure 5 is a schematic diagram of a union according to an embodiment of the present invention;
[0034] Figure 6 is a structural block diagram of an image merging device according to an embodiment of the present invention;
[0035] Figure 7 is a hardware structure block diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0036] The present invention will be further described below in conjunction with specific embodiments and accompanying drawings. It will be appreciated that the specific embodiments described herein are intended only to explain the present invention, rather than to limit the present invention. In addition, for ease of description, only some, but not all, structures or processes related to the present invention are shown in the accompanying drawings. It should be noted that in this specification, similar reference numerals and letters represent similar items in the following drawings.
[0037] It should be understood that although the terms "first", "second", etc. may be used herein to describe various features, these features should not be limited by these terms. These terms are used only to distinguish and should not be understood as indicating or implying relative importance. For example, a first feature may be referred to as a second feature, and similarly a second feature may be referred to as a first feature without departing from the scope of the exemplary embodiments.
[0038] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0039] Figure 1A schematic diagram of an existing method for calculating overlapping areas of images.
[0040] like Figure 1 As shown, in the existing image merging methods, a method of calculating the intersection-over-union ratio of the binary regions with edge mutations is generally used for the overlap between the merged images.
[0041] Among them, g1 and g2 represent two regions respectively, C represents the overlapping region of g1 and g2, C is the intersection of g1 and g2, A represents the g1 region excluding C, and B represents the g2 region excluding C.
[0042] According to the calculation formula of Intersection over Union (IOU), IOU is the ratio of intersection to union, that is,
[0043] In image processing, frequency reflects the degree of grayscale change in the image area, that is, the speed of grayscale change. For an image, the edge of the image is a sudden change part, the grayscale changes faster, and the image boundary is clearer; if the edge of the image is a gradual change part, the grayscale changes slowly, the image boundary is unclear, and the image data distribution is continuous.
[0044] In the prior art, the calculation of the image area requires a clear boundary, and the problem of calculating the area of a region with a gradient edge cannot be solved.
[0045] The present invention introduces a continuous digital matrix to represent a continuous area.
[0046] The essence of digital images is matrices. A digital image is a two-dimensional matrix, and each element in the matrix represents a pixel of the image.
[0047] In one example, the pixel data of a grayscale image is a matrix, the rows of the matrix correspond to the height of the image, the columns of the matrix correspond to the width of the image, the elements of the matrix correspond to the pixels of the image, and the values of the matrix elements are the grayscale values of the pixels.
[0048] For grayscale images, pixels have only one grayscale value, and the grayscale value of each pixel is a value between 0 and 255. Any color is composed of three primary colors: red, green, and blue. The grayscale image has only one channel, which has 256 grayscale levels. 255 represents full white, and 0 represents full black.
[0049] In another example, computers use three primary colors to represent color images, namely the RGB mode. Each pixel is determined by three values: R, G, and B. When quantizing colors, 8 bits are generally used to represent a component in RGB, so each component can be represented as 2 to the 8th power, that is, 0-255. That is to say, for each pixel of the color image, it is represented by a one-dimensional array containing three elements. The three elements in the one-dimensional array corresponding to each pixel represent the values of the three components B, G, and R, 0-255 respectively.
[0050] Current image merging technology can roughly arrange multiple images, but solving the overlap and diversity problems between multiple images is a difficult problem.
[0051] In view of the above problems, the present invention provides an image merging method, device, equipment, medium and program product, which realizes a method of merging multiple images in a diverse manner by using a continuous digital matrix to represent continuous areas and solves the problem of image merging overlap.
[0052] Figure 2 is a flowchart of a method for merging pictures according to an embodiment of the present invention.
[0053] like Figure 2 As shown, an image merging method provided by an embodiment of the present invention includes:
[0054] Step S100: extracting core areas of multiple images to be merged and center points of multiple core areas.
[0055] The core area of the image is extracted. There is a gradient at the edge of the core area, that is, the edge of the core area is not a clear and definite binary value, and the area value at the edge ranges from (0, 1).
[0056] As an implementation method, a user uploads n images, denoted as img1, img2...imgn, preferably, the value of n is greater than 2 and less than 4, and subject detection is performed on all uploaded images through a neural network to obtain the core areas of all uploaded images, and the core areas m1, m2...mn are obtained, and the corresponding center point coordinates are a1, a2...an.
[0057] In one example, a user uploads four images, and the core areas of the four images to be merged are detected through the subject detection neural network to obtain core areas m1, m2, m3 and m4, whose corresponding center point coordinates are a1, a2, a3 and a4, respectively, where m1, m2, m3, m4 are two-dimensional matrices with the same pixel height and pixel width.
[0058] It is worth noting that those skilled in the art will understand that the number of uploaded images is not a limiting condition of the present invention, and the number of images can be three or four, depending on the requirements of the actual application scenario.
[0059] Step S200: Generate a number of random points on the new image.
[0060] As an implementation manner, the height of the new image is at least twice the maximum height of the multiple images to be merged, and the width of the new image is at least twice the width of the multiple images to be merged.
[0061] Arrange the core areas on a new image, denoted as Img. The height and width of Img are denoted as H and W, where H is twice the maximum height of the n images uploaded by the user, and W is twice the maximum width of the n images uploaded by the user. Randomly generate n center points on the new image Img, denoted as b1, b2...bn.
[0062] Step S300: moving the center points of the multiple core areas to a number of random points of the new image, and calculating the intersection-and-union ratio of any two adjacent core areas in the multiple core areas.
[0063] As an implementation method, the center points a1, a2, ... an of the core areas are moved to the center points b1, b2, ... bn of the new image respectively, and the intersection-and-union ratio of any two core areas is calculated.
[0064] As an implementation method, calculating the intersection-and-union ratio of any two core areas is to calculate the intersection and union of the two core areas using an intersection-and-union ratio calculation formula, and finally obtain the ratio of the intersection to the union.
[0065] The intersection-and-union ratio calculation formula includes calculating the intersection score I sum ,
[0066]
[0067] The intersection I=m1*m2, m1 and m2 are the area values of two adjacent core areas, i is all possible values of any two adjacent core areas, and the area value range is 0-1.
[0068] The formula for calculating the intersection-over-union ratio includes calculating the union score U sum ,
[0069]
[0070] Among them, the union U=m1+m2-I.
[0071] The intersection-over-union calculation formula also includes calculating the intersection-over-union score IOU.
[0072] Step S400: Repeat the moving step until the intersection-over-union ratio is less than a predetermined value, and obtain an updated new image.
[0073] Preferably, the predetermined value is 0.2. If there is a situation where the intersection-and-union ratio of any two core regions is greater than 0.2, step S300 is repeated until the intersection-and-union ratio of any two core regions is less than 0.2.
[0074] In one example, the core areas m1, m2, m3 and m4 corresponding to the four uploaded images have an IoU ratio of m1 and m2 greater than 0.2, the center point of the new image is regenerated, the center points of the core areas m1, m2, m3 and m4 are moved to the center point of the regenerated new image, and the IoU ratio of any two adjacent core areas is calculated again until the IoU ratio between m1, m2, m3 and m4 is less than or equal to 0.2.
[0075] Figure 3 is a schematic diagram of two gradient regions m1 and m2 according to an embodiment of the present invention.
[0076] like Figure 3 As shown, there are two gradient areas m1 and m2. m1 and m2 are two-dimensional matrices with the same pixel height and pixel width. The values of their respective area parts are greater than 0 and less than 1. The brightness of the white pixel reflects the size of the specific number. Since there is a gradient at the edge of the area, it shows a gradual transition from black to white. The brightest part is the inside of the area, and the area value is 1. The darkest part is the background part, and the area value is 0. The area value at the edge ranges from greater than 0 to less than 1.
[0077] Figure 4 is a schematic diagram of an intersection according to an embodiment of the present invention.
[0078] like Figure 4 As shown, the brightest area of the overlapping part of the core image takes a value of 1, the darkest background area takes a value of 0, and the black-white gradient area takes a value of (0, 1). The overlapping part of the core image is obtained, that is, the intersection of the areas is obtained.
[0079] The calculation formula for the intersection is I = m1*m2, summing up all the overlapping parts, that is,
[0080]
[0081] Figure 5 is a schematic diagram of a union according to an embodiment of the present invention.
[0082] like Figure 5 As shown, the brightest area of the core image takes a value of 1, and the area where the black and white gradient occurs takes a value of (0, 1). The bright part of the core image is obtained, that is, the union of the areas is obtained.
[0083] The calculation formula of the union is U = m1 + m2 - I, summing up all the bright parts, that is
[0084]
[0085] Figure 6 is a structural block diagram of an image merging device according to an embodiment of the present invention.
[0086] like Figure 6 As shown, the apparatus 600 includes an extraction module 610, a generation module 620, a movement module 630, and an update module 640;
[0087] Extraction module 610: extracting core areas of multiple images to be merged and center points of multiple core areas;
[0088] Generating module 620: generating a number of random points on the new image;
[0089] Moving module 630: moving the center points of the multiple core areas to a number of random points of the new image, and calculating the intersection-and-union ratio of any two adjacent core areas in the multiple core areas;
[0090] Update module 640: Repeat the moving step until the intersection-over-union ratio is less than a predetermined value, and obtain an updated new image.
[0091] This embodiment and the aforementioned embodiment are corresponding method implementations, and this embodiment can be implemented in conjunction with the aforementioned embodiment. The relevant technical details mentioned in the aforementioned embodiment are still valid in this embodiment, and in order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the aforementioned embodiment.
[0092] According to some embodiments of the present invention, an electronic device is disclosed. The device includes a memory storing computer executable instructions and a processor, wherein the processor is configured to execute the instructions to implement an image merging method.
[0093] Figure 7 is a hardware structure block diagram of an electronic device according to an embodiment of the present invention.
[0094] like Figure 7 As shown, the electronic device 700 may include one or more processors 702, a system motherboard 708 connected to at least one of the processors 702, a system memory 705 connected to the system motherboard 708, a non-volatile memory (NVM) 706 connected to the system motherboard 708, and a network interface 710 connected to the system motherboard 708.
[0095] The processor 702 may include one or more single-core or multi-core processors. The processor 702 may include any combination of a general-purpose processor and a special-purpose processor (e.g., a graphics processor, an application processor, a baseband processor, etc.). In an embodiment of the present invention, the processor 702 may be configured to execute the following Figure 2 The picture merging method shown.
[0096] In some embodiments, system board 708 may include any suitable interface controller to provide any suitable interface to at least one of processors 702 and / or any suitable device or component in communication with system board 708 .
[0097] In some embodiments, the system motherboard 708 may include one or more memory controllers to provide an interface to the system memory 705. The system memory 705 may be used to load and store data and / or instructions. In some embodiments, the system memory 705 of the electronic device 700 may include any suitable volatile memory, such as a suitable dynamic random access memory (DRAM).
[0098] NVM 706 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. In some embodiments, NVM 706 may include any suitable non-volatile memory such as flash memory and / or any suitable non-volatile storage device, such as at least one of a HDD (Hard Disk Drive), a CD (CompactDisc) drive, and a DVD (Digital Versatile Disc) drive.
[0099] NVM 706 may include a portion of storage resources installed on a device of electronic device 700, or it may be accessible by the device but not necessarily a portion of the device. For example, NVM 706 may be accessed over a network via network interface 710.
[0100] In particular, system memory 705 and NVM 706 may include a temporary copy and a permanent copy of instruction 720, respectively. Instruction 720 may include instructions that, when executed by at least one of processors 702, cause electronic device 700 to implement the following: Figure 2 In some embodiments, the instructions 720, hardware, firmware and / or software components thereof may additionally / alternatively be located in the system mainboard 708, the network interface 710 and / or the processor 702.
[0101] The network interface 710 may include a transceiver for providing a radio interface for the electronic device 700, thereby communicating with any other suitable device (e.g., a front-end module, an antenna, etc.) through one or more networks. In some embodiments, the network interface 710 may be integrated with other components of the electronic device 700. For example, the network interface 710 may be integrated with at least one of the processor 702, the system memory 705, the NVM 706, and a firmware device (not shown) having instructions. When at least one of the processors 702 executes the instructions, the electronic device 700 implements Figure 2 One or more of the various embodiments shown.
[0102] The network interface 710 may further include any suitable hardware and / or firmware to provide a multiple-input multiple-output radio interface. For example, the network interface 710 may be a network adapter, a wireless network adapter, a telephone modem, and / or a wireless modem.
[0103] In one embodiment, at least one of the processors 702 may be packaged together with one or more controllers for the system motherboard 708 to form a system in package (SiP). In one embodiment, at least one of the processors 702 may be integrated on the same die with one or more controllers for the system motherboard 708 to form a system on a chip (SoC).
[0104] The electronic device 700 may further include an input / output (I / O) device 712 connected to the system motherboard 708. The I / O device 712 may include a user interface to enable a user to interact with the electronic device 700; the design of the peripheral component interface enables the peripheral components to interact with the electronic device 700. In some embodiments, the electronic device 700 further includes a sensor for determining at least one of an environmental condition and location information related to the electronic device 700.
[0105] In some embodiments, I / O device 712 may include, but is not limited to, a display (e.g., a liquid crystal display, a touch screen display, etc.), speakers, a microphone, one or more cameras (e.g., a still image camera and / or a video camera), a flashlight (e.g., an LED flash), and a keyboard.
[0106] In some embodiments, the peripheral component interface may include, but is not limited to, a non-volatile memory port, an audio jack, and a power interface.
[0107] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 700. In other embodiments of the present application, the electronic device 700 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0108] Program code can be applied to input instructions to perform the functions described in the present invention and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a system for processing instructions including processor 702 includes any system having a processor such as a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.
[0109] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in the present invention is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.
[0110] According to an embodiment of the present invention, a computer-readable storage medium is further provided, wherein at least one computer instruction is stored in the computer-readable storage medium, and the at least one instruction is loaded and executed by a processor to implement the aforementioned method.
[0111] According to an embodiment of the present invention, a computer program product is further proposed. The computer program product includes computer instructions. When the computer instructions are executed, the aforementioned image merging method is implemented.
[0112] Illustrative embodiments of the present invention include, but are not limited to, a picture merging method, apparatus, device, medium, and program product.
[0113] The various aspects of the illustrative embodiments will be described using terms commonly used by those skilled in the art to convey the essence of their work to other persons skilled in the art. However, it is apparent to those skilled in the art that some alternative embodiments may be implemented using some of the features described. For purposes of explanation, specific numbers and configurations are set forth so that the illustrative embodiments are more thoroughly understood. However, it is apparent to those skilled in the art that alternative embodiments may be implemented without the specific details. In some other cases, some well-known features are omitted or simplified herein to avoid obscuring the illustrative embodiments of the present invention.
[0114] In addition, various operations will be described as multiple separate operations in a manner that is most helpful for understanding the illustrative embodiments; however, the order of description should not be interpreted as implying that these operations must rely on the order of description, and many of the operations can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the operations can also be rearranged. When the described operations are completed, the process can be terminated, but can also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0115] References in the specification to "an example", "an example", "an embodiment", "an implementation", etc. indicate that the described embodiment may include a particular feature, structure, or property, but each embodiment may or may not necessarily include the particular feature, structure, or property. Moreover, these phrases are not necessarily directed to the same embodiment. In addition, when particular features are described in conjunction with a specific embodiment, the knowledge of those skilled in the art can affect the combination of these features with other embodiments, whether or not these embodiments are explicitly described.
[0116] Unless the context dictates otherwise, the terms "comprising," "having," and "including" are synonymous. The phrase "A and / or B" means "(A), (B), or (A and B)."
[0117] As used herein, the term "module" may refer to, be part of, or include: memory (shared, dedicated, or group) for running one or more software or firmware programs, application-specific integrated circuits (ASICs), electronic circuits and / or processors (shared, dedicated, or group), combinational logic circuits, and / or other suitable components that provide the described functionality.
[0118] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order is not necessary. Instead, in some embodiments, these features may be described in a manner and / or order different from that shown in the illustrative drawings. In addition, the structural or method features included in a specific figure do not mean that all embodiments need to include such features. In some embodiments, these features may not be included or may be combined with other features.
[0119] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0120] Similarly, it should be understood that in order to streamline the present invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the intention that the claimed invention requires more features than those expressly recited in each claim. Rather, as reflected in the claims, inventive aspects lie in less than all of the features of the individual embodiments previously disclosed. Therefore, the claims that follow the detailed description are hereby expressly incorporated into the detailed description, with each claim itself serving as a separate embodiment of the present invention.
[0121] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0122] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims, any one of the claimed embodiments may be used in any combination.
Claims
1. An image merging method, used in electronic equipment, It is characterized in that include: An extraction step of extracting core areas of a plurality of images to be merged and center points of a plurality of the core areas; The generation step generates several random points on the new image; A moving step, moving the center points of the plurality of core areas to the plurality of random points of the new image, and calculating the intersection-and-union ratio of any two adjacent core areas among the plurality of core areas; The updating step repeats the moving step until the intersection-over-union ratio is less than a predetermined value, thereby obtaining the updated new image.
2. The image merging method according to claim 1, It is characterized in that The intersection-and-union ratio calculation formula for calculating the intersection-and-union ratio includes calculating the intersection score I sum , The intersection I=m1*m2, m1 and m2 are the area values of two adjacent core areas, i is all possible values of any two adjacent core areas, and the area value range is 0-1.
3. The image merging method according to claim 2, It is characterized in that The intersection-over-union ratio calculation formula includes calculating the union score U sum , Among them, the union U=m1+m2-I.
4. The image merging method according to claim 3, It is characterized in that The intersection-over-union calculation formula also includes calculating the intersection-over-union score IOU, 5. The method for merging pictures according to any one of claims 1 to 4, It is characterized in that The height of the new image is at least twice the maximum height of the plurality of images to be merged, and the width of the new image is at least twice the width of the plurality of images to be merged.
6. The image merging method according to claim 5, It is characterized in that The predetermined value is 0.
2.
7. An image merging device, It is characterized in that include: An extraction module, extracting core areas of multiple images to be merged and center points of multiple core areas; The generation module generates several random points on the new image; A moving module moves the center points of the plurality of core areas to the plurality of random points of the new image, and calculates the intersection-and-union ratio of any two adjacent core areas among the plurality of core areas; The updating module repeats the moving step until the intersection-over-union ratio is less than a predetermined value, thereby obtaining the updated new image.
8. An electronic device, It is characterized in that The device comprises a memory storing computer executable instructions and a processor, wherein the processor is configured to execute the instructions to implement the picture merging method according to any one of claims 1-6.
9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores at least one computer instruction, and the at least one instruction is loaded and executed by a processor to implement the picture merging method according to any one of claims 1 to 6.
10. A computer program product, It is characterized in that The computer program product includes computer instructions, and when the computer instructions are executed, the picture merging method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Image data screening method and device, computer device and storage medium
CN111612726A
Image processing method and device, storage medium and electronic equipment
CN114820440A
