Picture stitching method and device, electronic equipment and storage medium
By integrating image stitching preview, image selection, and template selection areas into the image stitching interface, users can flexibly adjust the number of images and templates within the same interface. This solves the problem of inflexible operation caused by frequent switching in existing technologies, and improves the efficiency and user experience of image stitching.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
- Filing Date
- 2023-01-03
- Publication Date
- 2026-04-24
AI Technical Summary
In existing technologies, when users need to change the number of images to be stitched, they need to frequently switch to the image selection interface, which makes the operation inflexible, increases the operation cost of image stitching, and reduces efficiency.
This invention provides a method for image stitching. By including a stitching preview area, an image selection area, and a template selection area on the same interface, users can flexibly select and adjust the number of images without switching pages. They can also replace images and match templates through operations such as sliding and dragging, and the images to be stitched are automatically updated.
It reduces user operation costs, improves the efficiency and flexibility of image stitching, meets the needs of stitching different numbers of images, and enhances the user experience.
Smart Images

Figure CN115936998B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to an image stitching method, apparatus, electronic device, and storage medium. Background Technology
[0002] Currently, with the development of internet technology, more and more users are posting pictures online. When there are a large number of pictures to post, users often choose to stitch multiple pictures together to create a collage, which they then post. In related technologies, users first select multiple pictures to be stitched in the image selection interface, and then choose a collage template in the image stitching interface. Based on the pictures to be stitched and the collage template, the collage is generated.
[0003] However, in the above method, if the user needs to change the number of images to be stitched, they need to go to the image selection interface to select images. This method is inflexible, resulting in high operation costs for image stitching and affecting the efficiency of image stitching. Summary of the Invention
[0004] This application provides an image stitching method, apparatus, electronic device, and storage medium, which can save on the operational costs of image stitching and improve the efficiency of image stitching. The technical solution of this application is as follows:
[0005] According to a first aspect of the embodiments of this application, an image stitching method is provided, the method comprising:
[0006] The image stitching interface includes a stitching preview area, an image selection area, and a template selection area. The stitching preview area is used to preview the stitching, the image selection area is used to display multiple images in the target storage space, and the template selection area is used to display multiple sets of stitching templates. Each set of stitching templates corresponds to a different number of images, and each set of stitching templates includes at least one stitching template.
[0007] In response to the selection of at least one image in the image selection area, determine the images to be stitched together;
[0008] Based on the images to be pieced together and the first puzzle template, the first puzzle piece is displayed in the puzzle preview area. This first puzzle template is the first puzzle template that matches the number of images to be pieced together among multiple puzzle templates.
[0009] In the above method, users can select images in the image selection area of the image stitching interface. When users need to change the number of images to be stitched, they no longer need to jump back and forth. It can flexibly adapt to the stitching needs of different numbers of images, thereby saving operating costs and improving the efficiency of image stitching.
[0010] In one possible implementation, after displaying the image stitching interface, the method further includes:
[0011] In response to a swipe gesture on the image selection area, the images displayed in the image selection area are switched.
[0012] In the above method, users can browse images in the target storage space by sliding the selected area of the image. This allows them to select images without leaving the image stitching interface, saving users' operational costs and improving the efficiency of image stitching.
[0013] In one possible implementation, after displaying the first puzzle piece in the puzzle preview area based on the image to be pieced together and the first puzzle template, the method further includes:
[0014] In response to a drag operation on any image in the image selection area, if the endpoint of the drag operation is located in the first puzzle, the existing image at the target position of the first puzzle is replaced with the image corresponding to the drag operation.
[0015] In the above method, the image at the target position of the first puzzle piece can be replaced by dragging. Users do not need to manually deselect the image first and then manually click to select a new image to replace it. The operation is more flexible and can save users' operation costs.
[0016] In one possible implementation, after determining the images to be stitched in response to a selection operation of at least one image in the image selection area, the method further includes:
[0017] In response to a click on the second puzzle template, a second number of images matching the second puzzle template is determined, and a target number is determined based on the first and second numbers.
[0018] If the first quantity is greater than or equal to the second quantity, determine the first image of the target quantity from the images to be stitched, delete the first image of the target quantity from the images to be stitched, and obtain the updated images to be stitched.
[0019] If the first quantity is less than the second quantity, determine the target quantity of the second image from the target storage space, add the target quantity of the second image as the image to be stitched, and obtain the updated image to be stitched.
[0020] Based on the updated image to be pieced together and the second puzzle template, the second puzzle piece is displayed in the puzzle preview area.
[0021] The above method can automatically update the images to be stitched based on the user-selected puzzle template, and display the puzzle in the puzzle preview area based on the updated images to be stitched. This can reduce the user's selection of images and improve the efficiency of image stitching.
[0022] In one possible implementation, determining the target number of first images from the images to be stitched includes:
[0023] Based on the selection order of the images to be stitched, determine the first image in the previous target quantity.
[0024] In the above method, the images with the highest selection order are designated as the first images. Generally, users prefer to stitch together images with lower selection order. Therefore, after deleting the images with higher selection order from the images to be stitched, the likelihood of users reselecting the deleted images is relatively small, which can improve the effectiveness of updating the images to be stitched.
[0025] In one possible implementation, the second image used to determine the target number from the target storage space includes at least one of the following:
[0026] Based on the order of the images to be stitched in the target storage space, the number of images adjacent to the images to be stitched are determined as the second images;
[0027] Based on image attribute conditions, determine the target number of second images from the target storage space. The image attribute conditions refer to the second images having the target image attributes.
[0028] Based on the image date condition, a target number of second images are determined from the target storage space. The image date condition refers to the image date of the second images falling within the target time period.
[0029] In the above method, adding images adjacent to the image to be stitched as the images to be stitched can quickly determine the second image from the target storage space without consuming too many computing resources; adding images with the attributes of the target image as the images to be stitched can make the newly added images match the user's stitching preferences, reduce the user's manual selection of newly added images, and improve the efficiency of image stitching; adding images whose dates are within the target time period as the images to be stitched can reduce the probability of newly added images and images that have already been stitched, and improve the effectiveness of updating the images to be stitched.
[0030] In one possible implementation, the method further includes:
[0031] Displays an image selection interface, which is used to display multiple images in the target storage space;
[0032] In response to the selection of at least one image in the image selection interface, the image editing interface is displayed;
[0033] The image stitching interface includes:
[0034] When the collage function in the image editing interface is triggered, the image collage interface is displayed.
[0035] In the above method, after the user selects the images to be stitched from the image selection interface, they can edit the images in the image editing interface and then stitch the edited images together. This can meet the user's editing needs for the stitched images and improve the quality of the stitching.
[0036] In one possible implementation, the method further includes:
[0037] Displays the application's functional interface, which includes a jigsaw puzzle control;
[0038] In response to a click on the puzzle control, the image selection interface is displayed;
[0039] The image stitching interface includes:
[0040] In response to the selection of at least one image in the image selection interface, the image stitching interface is displayed.
[0041] In the above method, users trigger the jigsaw puzzle function by clicking the jigsaw puzzle control on the application's function interface. After selecting an image from the image selection interface, they can directly jump to the image stitching interface to stitch the images together, thus saving the transition time from image selection to jigsaw puzzle stitching and improving the efficiency of image stitching.
[0042] According to a second aspect of the embodiments of this application, an image stitching device is provided, the device comprising:
[0043] The display unit is configured to execute the display of an image stitching interface, which includes a stitching preview area, an image selection area, and a template selection area. The stitching preview area is used to preview the stitching, the image selection area is used to display multiple images in the target storage space, and the template selection area is used to display multiple sets of stitching templates. Each set of stitching templates corresponds to a different number of images, and each set of stitching templates includes at least one stitching template.
[0044] The first determining unit is configured to perform a selection operation in response to at least one image in the image selection area to determine the images to be stitched together;
[0045] The jigsaw puzzle unit is configured to perform a first jigsaw puzzle display in the jigsaw puzzle preview area based on the images to be pieced together and a first jigsaw puzzle template, which is a jigsaw puzzle template that matches the first number of images to be pieced together from a set of jigsaw puzzle templates.
[0046] In one possible implementation, the device further includes:
[0047] The switching unit is configured to switch the images displayed in the image selection area in response to a swipe operation on the image selection area.
[0048] In one possible implementation, the device further includes:
[0049] The replacement unit is configured to perform a drag operation in response to any image in the image selection area, and if the endpoint of the drag operation is located in the first puzzle, replace the existing image at the target position of the first puzzle with the image corresponding to the drag operation.
[0050] In one possible implementation, the device further includes:
[0051] The second determining unit is configured to perform a click operation on the second puzzle template, determine a second number of images matching the second puzzle template, and determine a target number based on the first and second numbers;
[0052] The first update unit is configured to perform the following steps: if the first quantity is greater than or equal to the second quantity, determine the target quantity of the first image from the images to be stitched, delete the target quantity of the first image from the images to be stitched, and obtain the updated images to be stitched.
[0053] The second update unit is configured to perform the following steps: if the first quantity is less than the second quantity, determine the target quantity of the second image from the target storage space, add the target quantity of the second image as the image to be stitched, and obtain the updated image to be stitched.
[0054] This puzzle unit is also configured to display the second puzzle piece in the puzzle preview area based on the updated image to be pieced together and the second puzzle template.
[0055] In one possible implementation, the first update unit is configured to perform:
[0056] Based on the selection order of the images to be stitched, determine the first image in the previous target quantity.
[0057] In one possible implementation, the second update unit is configured to perform at least one of the following:
[0058] Based on the order of the images to be stitched in the target storage space, the number of images adjacent to the images to be stitched are determined as the second images;
[0059] Based on image attribute conditions, determine the target number of second images from the target storage space. The image attribute conditions refer to the second images having the target image attributes.
[0060] Based on the image date condition, a target number of second images are determined from the target storage space. The image date condition refers to the image date of the second images falling within the target time period.
[0061] In one possible implementation, the display unit is also configured to perform:
[0062] Displays an image selection interface, which is used to display multiple images in the target storage space;
[0063] In response to the selection of at least one image in the image selection interface, the image editing interface is displayed;
[0064] The image stitching interface includes:
[0065] When the collage function in the image editing interface is triggered, the image collage interface is displayed.
[0066] In one possible implementation, the display unit is also configured to perform:
[0067] Displays the application's functional interface, which includes a jigsaw puzzle control;
[0068] In response to a click on the puzzle control, the image selection interface is displayed;
[0069] The image stitching interface includes:
[0070] In response to the selection of at least one image in the image selection interface, the image stitching interface is displayed.
[0071] According to a third aspect of the embodiments of this application, an electronic device is provided, the electronic device comprising:
[0072] One or more processors;
[0073] Memory used to store the executable program code of the processor;
[0074] The processor is configured to execute the program code to implement the image stitching method described above.
[0075] According to a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided, the computer-readable storage medium comprising: when program code in the computer-readable storage medium is executed by a processor of an electronic device, enabling the electronic device to perform the above-described image stitching method.
[0076] According to a fifth aspect of the embodiments of this application, a computer program product is provided, including one or more instructions, which are executed by one or more processors of an electronic device, enabling the electronic device to perform the above-described image stitching method.
[0077] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0078] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application, and do not constitute an undue limitation of this application.
[0079] Figure 1 This is a schematic diagram of the implementation environment of an image stitching method provided in an embodiment of this application;
[0080] Figure 2 This is a flowchart of an image stitching method provided in an embodiment of this application;
[0081] Figure 3 This is a flowchart of an image stitching method provided in an embodiment of this application;
[0082] Figure 4 This is a schematic diagram of an image selection interface provided in an embodiment of this application;
[0083] Figure 5 This is a schematic diagram of an image editing interface provided in an embodiment of this application;
[0084] Figure 6 This is a schematic diagram of an image stitching interface provided in an embodiment of this application;
[0085] Figure 7 This is a schematic diagram of an image editing interface provided in an embodiment of this application;
[0086] Figure 8 This is a schematic diagram of a work publishing interface provided in an embodiment of this application;
[0087] Figure 9 This is a schematic diagram of a publishing history interface provided in an embodiment of this application;
[0088] Figure 10This is a schematic diagram of a video playback interface provided in an embodiment of this application;
[0089] Figure 11 This is a structural block diagram of an image stitching device provided in an embodiment of this application;
[0090] Figure 12 This is a structural block diagram of a terminal provided in an embodiment of this application. Detailed Implementation
[0091] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0092] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of methods and systems consistent with some aspects of this application as detailed in the appended claims.
[0093] In this application, the terms "first," "second," etc., are used to distinguish identical or similar items that have essentially the same function. It should be understood that there is no logical or temporal dependency between "first," "second," and "nth," nor does it limit the quantity or execution order. It should also be understood that although the following description uses the terms "first," "second," etc., to describe various elements, these elements should not be limited by the terms.
[0094] These terms are simply used to distinguish one element from another. For example, without departing from the scope of various examples, the first puzzle template can be called the second puzzle template, and similarly, the second puzzle template can be called the first puzzle template.
[0095] "At least one" refers to one or more. For example, at least one jigsaw puzzle template can be one jigsaw puzzle template, two jigsaw puzzle templates, three jigsaw puzzle templates, or any integer number of jigsaw puzzle templates greater than or equal to one. "Multiple" means two or more images. For example, multiple images can be two images, three images, or any integer number of images greater than or equal to two.
[0096] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the images in the target storage space involved in this application were obtained with full authorization.
[0097] The implementation environment of the embodiments of this application is described below.
[0098] Figure 1 This is a schematic diagram illustrating the implementation environment of an image stitching method provided in this application embodiment, such as... Figure 1 As shown, the implementation environment includes a terminal 101 and a server 102. The terminal 101 can connect to the server 102 via a wireless network or a wired network.
[0099] Terminal 101 can be at least one of the following devices: smartphone, smartwatch, desktop computer, laptop, virtual reality terminal, augmented reality terminal, wireless terminal, and laptop computer. Terminal 101 has communication functions and can access the Internet. Terminal 101 can refer to one of multiple terminals; this embodiment only uses terminal 101 as an example. Those skilled in the art will understand that the number of terminals can be more or less. Indicatively, terminal 101 runs an application that provides a jigsaw puzzle function. Users logged into the application can use it to stitch multiple images in a target storage space to create a jigsaw puzzle, and then save, edit, publish, or set the puzzle as a video cover, etc. This application can be a short video application, a social application, a conferencing application, an image processing application, etc., and is not limited thereto.
[0100] Server 102 can be a standalone physical server, a server cluster consisting of multiple physical servers, or a distributed file system. It can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Server 102 provides background services for applications running on terminal 101. For example, server 102 can provide object account login and image publishing services for applications running on terminal 101, etc.
[0101] In some embodiments, the wired or wireless network uses standard communication technologies and / or protocols. The network is typically the Internet, but can be any network, including but not limited to LAN (Local Area Network), MAN (Metropolitan Area Network), WAN (Wide Area Network), mobile, wired or wireless networks, private networks, or any combination of virtual private networks. In some embodiments, technologies and / or formats including HTML (Hypertext Markup Language), XML (Extensible Markup Language), etc., are used to represent data exchanged over the network. Furthermore, conventional encryption technologies such as SSL (Secure Socket Layer), TLS (Transport Layer Security), VPN (Virtual Private Network), and IPsec (Internet Protocol Security) can be used to encrypt all or some links. In other embodiments, custom and / or dedicated data communication technologies can be used to replace or supplement the aforementioned data communication technologies.
[0102] The above describes the implementation environment of an image stitching method provided by the embodiments of this application. The following describes the process of the image stitching method provided by the embodiments of this application. Figure 2 This is a flowchart of an image stitching method provided in an embodiment of this application, such as... Figure 2 As shown, the method is executed by the aforementioned terminal and includes the following steps 201 to 203.
[0103] In step 201, the terminal displays an image stitching interface, which includes a stitching preview area, an image selection area, and a template selection area.
[0104] The puzzle preview area is used to preview the puzzle. The image selection area displays multiple images from the target storage space, which refers to the user-authorized local storage space (i.e., the terminal's storage space) or user-authorized cloud storage space. The template selection area displays multiple puzzle templates, each corresponding to a different number of images, and each set includes at least one puzzle template. For example, the template selection area displays four puzzle templates, each used to stitch together a fixed number of images, with the sets corresponding to 2, 3, 4, and 5 images respectively. Each set includes five puzzle templates, providing five different layouts for stitching the corresponding number of images. Each puzzle template includes at least one position box, indicating the position of each image to be stitched within the puzzle based on that template. The number of position boxes in a puzzle template matches the number of images to be stitched.
[0105] The terminal responds to the target application's collage function being triggered by displaying an image stitching interface. The target application is an application running on the terminal that provides the collage function. This target application can be a short video application, a social media application, a conferencing application, an image processing application, etc., and is not limited thereto. The collage function refers to the ability to stitch images together.
[0106] Depending on the different settings of different applications, the target application can display the image stitching interface in two different ways.
[0107] In the first implementation, the process of the terminal displaying the image stitching interface in response to the target application's collage function includes: displaying an image selection interface for displaying multiple images in the target storage space; displaying an image editing interface in response to the selection of at least one image in the image selection interface; and displaying the image stitching interface in response to a click operation on the collage function space of the image editing interface.
[0108] In the second implementation, the process of the terminal displaying the image stitching interface in response to the target application's jigsaw puzzle function being triggered includes: displaying the application's function interface, which includes a jigsaw puzzle function control; displaying an image selection interface in response to a click operation on the jigsaw puzzle function control; and displaying the image stitching interface in response to the selection operation of at least one image in the image selection interface.
[0109] It should be noted that the above two methods are merely exemplary descriptions of how the target application displays the image stitching interface. The implementation method of the target application displaying the image stitching interface can be determined according to the actual settings of the application, and this application embodiment does not limit it in this regard.
[0110] In step 202, the terminal responds to the selection operation of at least one image in the image selection area and determines the images to be stitched together.
[0111] The images to be stitched together refer to at least one image obtained by selecting images in the image selection interface and selecting images in the image selection area.
[0112] In step 203, the terminal displays the first puzzle in the puzzle preview area based on the images to be pieced together and the first puzzle template. The first puzzle template is a puzzle template that matches the first number of images to be pieced together among multiple puzzle templates.
[0113] The first quantity refers to the number of images to be stitched together, which can include the number of images selected in the image selection interface and the number of images selected in the image selection area. The first mosaic refers to the mosaic obtained by stitching together the images to be stitched together.
[0114] The terminal can display a first jigsaw puzzle in the puzzle preview area based on the selection order of the images to be stitched, using a first puzzle template. This process includes: obtaining the selection order of the images to be stitched; determining the images corresponding to each position box in the first puzzle template based on the selection order; and arranging the images to be stitched in their corresponding positions based on the position boxes to obtain the first puzzle. Alternatively, the terminal can randomly arrange the images to be stitched in the positions corresponding to the position boxes; this embodiment does not limit this approach.
[0115] Using the above method, images can be selected from the image selection area in the image stitching interface. When users need to change the number of images to be stitched, they no longer need to jump back and forth, which can flexibly adapt to the stitching needs of different numbers of images, thereby saving operating costs and improving the efficiency of image stitching.
[0116] The above Figure 2 The diagram shown is only the basic process of this application. The solution provided in this application will be further elaborated below. Figure 3 This is a flowchart of an image stitching method provided in an embodiment of this application, such as... Figure 3 As shown, the method is executed by the aforementioned terminal and includes the following steps 301 to 308.
[0117] In step 301, the terminal responds to the target application's puzzle function being triggered by displaying an image puzzle interface, which includes a puzzle preview area, an image selection area, and a template selection area.
[0118] The system can display multiple images in the target storage space based on their arrangement within the target storage space. For example, if the images are arranged in reverse chronological order by date, the images displayed in the selection area will be recently taken or saved. Alternatively, based on the selection of images in the image selection interface, multiple images adjacent to the selected image can be displayed in the selection area according to their order in the target storage space. The images displayed in the selection area can be arranged in rows or columns, and multiple rows or columns can be displayed without affecting the visual appeal. The arrangement of the various puzzle templates in the template selection area is similar and will not be described further.
[0119] It should be noted that the above descriptions of the images displayed in the image selection area, the arrangement of the images in the image selection area, and the arrangement of the jigsaw puzzle templates in the template selection area are merely exemplary and can be set according to actual needs. This application embodiment does not limit this.
[0120] The positions of the puzzle preview area, image selection area, and template selection area within the image stitching interface can be customized according to the user's operating habits. For example, if the terminal detects that the user is right-handed, the puzzle preview area can be placed on the left side of the image stitching interface, while the image selection area and template selection area can be placed on the right side. This allows the user to easily select images and templates without affecting the puzzle preview. Alternatively, the user can adjust the position of each area on the interface by sliding the puzzle preview area, image selection area, and template selection area. Furthermore, the image stitching interface may include a display control; clicking this control shows or hides the image selection area. In some embodiments, the image selection area is a page that floats on the image stitching interface. This application does not limit the positional relationship between the various areas within the image stitching interface.
[0121] In some embodiments, when the terminal displays the image stitching interface, it displays a mosaic of the selected images in the mosaic preview area of the image stitching interface based on the images selected in the image selection interface.
[0122] In step 302, the terminal responds to the swipe operation on the image selection area by switching the images displayed in the image selection area.
[0123] The sliding operation on the image selection area corresponds to the arrangement of the images within that area. For example, if the images are arranged in rows, the sliding operation is a left-right swipe; if they are arranged in columns, the sliding operation is a up-down swipe. In response to the sliding operation, the terminal switches the images displayed in the image selection area based on their display order.
[0124] Based on step 302 above, users can browse images in the target storage space by sliding the image selection area. This allows them to select images without leaving the image stitching interface, saving users' operational costs and improving the efficiency of image stitching.
[0125] In step 303, the terminal responds to the selection operation of at least one image in the image selection area and determines the images to be stitched together.
[0126] The same applies to steps 303 and 202 above, and will not be repeated here.
[0127] In step 304, the terminal displays a first puzzle in the puzzle preview area based on the images to be pieced together and the first puzzle template. The first puzzle template is a puzzle template that matches the first number of images to be pieced together among multiple puzzle templates.
[0128] The process of determining the first jigsaw puzzle template includes: determining a first number of images to be pieced together; determining a set of jigsaw puzzle templates corresponding to the first number of images to be pieced together; and determining a first jigsaw puzzle template that matches the first number from the set of jigsaw puzzle templates.
[0129] The first puzzle template that matches the first quantity is determined from the set of puzzle templates, including the following two cases:
[0130] When there is only one puzzle template in each group, the first puzzle template is the one corresponding to the first quantity of images to be pieced together. In this method, since there is only one puzzle template in each group, there is only one puzzle template that matches the first quantity of images to be pieced together. With the number of images to be pieced together remaining constant, users do not need to select puzzle templates multiple times to determine the best one, saving them operational costs. Furthermore, one number of images to be pieced together corresponds to only one puzzle template, which helps save development costs.
[0131] In cases where there are multiple puzzle templates in each group, the puzzle template with the highest number of uses by the user is determined based on the user's historical puzzle-solving process. The puzzle template with the highest number of uses that matches the first quantity is then designated as the first puzzle template. Alternatively, based on the usage of puzzle templates by all users, the puzzle template with the highest number of users in each group can be determined, and the puzzle template with the highest number of users that matches the first quantity is designated as the first puzzle template. This embodiment does not limit this approach. In the above method, the puzzle template with the highest number of uses among the multiple puzzle templates corresponding to the first quantity is determined as the default puzzle template for the images to be pieced together. This makes the puzzle template determined by the terminal based on the number of images to be pieced together more in line with the user's puzzle-solving preferences. With the number of images to be pieced together remaining constant, this effectively reduces the user's operation of selecting puzzle templates, thereby improving the efficiency of image pieced together.
[0132] Steps 301 to 304 above describe the process of stitching selected images together to obtain a jigsaw puzzle. Further, in some embodiments, the user replaces a selected image by dragging any image within the image selection area; this process includes step 305 below.
[0133] In step 305, in response to a drag operation on any image in the image selection area, if the endpoint of the drag operation is located in the first puzzle, the image already existing at the target position of the first puzzle is replaced with the image corresponding to the drag operation.
[0134] The terminal determines whether the endpoint of the drag operation is located within the first puzzle piece by detecting the endpoint of the drag operation. The target position refers to any position of the first puzzle piece displayed in the puzzle preview area.
[0135] Through step 305 above, the image at the target position of the first puzzle piece can be replaced by dragging. Users do not need to manually deselect the image first and then manually click to select a new image to replace it. The operation is more flexible and can save users' operating costs.
[0136] Steps 301 to 304 described above involve the terminal automatically determining a first jigsaw puzzle template based on the number of images to be stitched together, and then stitching the images together using that template. In this embodiment, the user can also select a jigsaw puzzle template, and the terminal will stitch the images together based on the user-selected template. In some embodiments, steps 306 to 308 are included after steps 301 to 305.
[0137] In step 306, in response to the click operation on the second puzzle template, the terminal determines a second number of images that match the second puzzle template, and determines a target number based on the first number and the second number. The first number refers to the number of images to be pieced together, and the second number refers to the number of images that match the second puzzle template.
[0138] The second puzzle template is any template in each group of puzzle templates. The first quantity can include the number of images selected in the image selection interface and the number of images selected in the image selection area. The target quantity is the difference between the first quantity and the second quantity, which is the difference between the number of images to be pieced together and the number of images that match the second puzzle template.
[0139] In step 307, the terminal updates the image to be stitched based on the first quantity and the second quantity, and obtains the updated image to be stitched.
[0140] It should be understood that the number of images matched by the second jigsaw puzzle template may not match the number of images to be pieced together. The terminal requires this second number of images to display the jigsaw puzzle in the preview area, based on the second template. When the user selects any of the multiple jigsaw puzzle templates, the terminal updates the number of images to be pieced together based on the first and second numbers, ensuring that the updated number of images to be pieced together matches the second number.
[0141] When the first quantity is greater than or equal to the second quantity, and the number of images that can be stitched together based on the second jigsaw puzzle template is less than or equal to the number of images to be stitched, the terminal needs to delete the target number of images from the images to be stitched before stitching can be performed based on the second jigsaw puzzle template. When the first quantity is less than the second quantity, and the number of images required to stitch together based on the second jigsaw puzzle template is greater than the number of images to be stitched, the terminal needs to add the target number of images from the target storage space as the images to be stitched before stitching can be performed based on the second jigsaw puzzle template. The following describes the process of updating the images to be stitched by the terminal in the above two cases.
[0142] In the first scenario: if the first quantity is greater than or equal to the second quantity, the terminal determines the target quantity of the first image from the images to be stitched, deletes the target quantity of the first image from the images to be stitched, and obtains the updated images to be stitched.
[0143] The process by which the terminal determines the target number of first images from the images to be stitched includes: determining the first image of the target number based on the selection order of the images to be stitched. For example, if the images to be stitched are A, B, C, D, and E, and the first number is 5, and the selection order of these 5 images is "1", "2", "3", "4", and "5" respectively, and the number of images matched by the second stitching template is 3 (meaning the second number is 3 and the target number is 2), the terminal determines the first two images in the selection order as the first images, i.e., images A and B are determined as the first images. The terminal then removes images A and B from the images to be stitched, obtaining images C, D, and E, which are the updated images to be stitched. In the above method, the images with the highest selection order are designated as the first images. Generally, users prefer to stitch together images with lower selection order. Therefore, after deleting the images with higher selection order from the images to be stitched, the likelihood of users reselecting the deleted images is relatively small, which can improve the effectiveness of updating the images to be stitched.
[0144] In the second scenario: if the first quantity is less than the second quantity, the terminal determines the target quantity of the second image from the target storage space, adds the target quantity of the second image as the image to be stitched, and obtains the updated image to be stitched.
[0145] The process by which the terminal determines the target number of second images from the target storage space includes at least one of the following three methods.
[0146] Method 1: Based on the order of the images to be stitched in the target storage space, the target number of images adjacent to the image to be stitched are determined as the second image. For example, with a target quantity of 1, and the images to be stitched in the storage space are in the order of "6th", "7th", and "8th", the second image is the image in the target storage space that is in the order of "9th". In the above method, adding images adjacent to the image to be stitched as the second image can quickly determine the second image from the target storage space without consuming too many computing resources.
[0147] Method 2: Based on image attribute conditions, determine the target number of second images from the target storage space. The image attribute conditions refer to the second images having the target image attributes.
[0148] For images in the target storage space, there are corresponding attribute fields that carry the image attributes. The terminal can obtain the image attributes by reading the image attribute fields.
[0149] In some embodiments, the target image attribute is determined based on the image attributes of the images to be stitched together. The process of determining the target image attribute includes: obtaining the image attributes of each image to be stitched together; and identifying the image attribute with the largest number of corresponding images as the target image attribute. For example, among five images to be stitched together, three images have the image attribute "food," one image has the image attribute "landscape," and one image has the image attribute "people." Since the "food" image attribute has the largest number of corresponding images, it is identified as the target image attribute. In the above embodiments, by analyzing the image attributes of each image to be stitched together, it is possible to determine which image attributes the user might have a need for stitching together. This allows newly added images to match the user's stitching preferences, reducing the user's manual selection of newly added images and improving the efficiency of image stitching.
[0150] Method 3: Based on the image date condition, determine the target number of target images from the target storage space. The image date condition refers to the image date of the second image being within the target time period.
[0151] The image date can refer to either the date the image was taken or the date it was saved. The target time period can be a historical period up to the current system time; that is, recently saved images can be identified as the second images. In some embodiments, the target time period can be the period between the time of the last image stitching operation and the current system time. Accordingly, the process by which the terminal determines the target number of second images from the target storage space includes: obtaining the time of the last stitching operation; and, based on the time of the operation and the image dates of each image to be stitched, filtering out the target number of second images from the target storage space whose image dates are after the time of the operation. The second images filtered out by the above method do not include images that have already been stitched, eliminating the need for users to manually filter the added images, reducing user operating costs, improving the effectiveness of updating the images to be stitched, and increasing the efficiency of image stitching.
[0152] It should be noted that the above three methods are merely exemplary descriptions of determining the target number of second images from the target storage space. The second images can also be determined in other ways, such as based on image quality conditions, etc. This application embodiment does not limit this.
[0153] In step 308, the terminal displays the second puzzle in the puzzle preview area based on the updated image to be pieced together and the second puzzle template.
[0154] Step 308 is the same as step 304 above, and will not be repeated here.
[0155] In some embodiments, a user can drag any image in the image selection area. If the endpoint of the drag operation is located in the second puzzle, the terminal replaces the existing image at the target position of the second puzzle with the image corresponding to the drag operation. This process is the same as step 305 and will not be described again.
[0156] Through steps 306 to 308 above, the images to be stitched can be automatically updated based on the user-selected jigsaw puzzle template, and the jigsaw puzzle can be displayed in the jigsaw puzzle preview area based on the updated images to be stitched. This can reduce the user's selection of images and improve the efficiency of image stitching.
[0157] In some embodiments, the image stitching method described above is applied to short video applications to create a composite image of multiple images from a work to be published, which can then be used as the cover of that work. The following is based on... Figures 4 to 6 An example is given of the operation process for obtaining the cover of a work based on the above image stitching method in short video applications.
[0158] First, we will introduce the operation process of the terminal responding to the triggering of the image stitching function in short video applications, displaying the image stitching interface. For example... Figure 4 As shown, Figure 4 This is a schematic diagram of an image selection interface provided in an embodiment of this application. The image selection interface includes an image selection area 401, an image preview area 402, and an interface jump control 403. The image selection area 401 is used to display multiple images in the target storage space, the image preview area 402 is used to preview the selected image, and the interface jump control is used to jump to other interfaces. Figure 5 As shown, Figure 5 This is a schematic diagram of an image editing interface provided in an embodiment of this application. The image editing interface includes an editing preview area 501 and multiple editing function controls, such as a cover editing function control 502. The editing preview area 501 is used to preview the image to be edited and the edited image. The cover editing function control is used to trigger the collage function and jump to the image collage interface. Clicking on at least one image displayed in the image selection area 401 selects the image, and the selected image is displayed in the image preview area 402. Clicking on the interface jump control 403 allows users to jump from the image selection area 401 to the image editing interface. Figure 4 The image selection interface shown will redirect to the following... Figure 5 The image editing interface is shown. The preview area 501 in the image editing interface displays the image selected in the image selection area 401. Clicking the cover editing function control 502 triggers the cover editing function of the short video application, from which... Figure 5 The image editing interface shown will redirect to the following... Figure 6 The image stitching interface shown in the middle left image.
[0159] The following describes the operation process for image stitching in the image stitching interface. For example... Figure 6 As shown, Figure 6 This is a schematic diagram of an image stitching interface provided in an embodiment of this application. The image stitching interface includes a stitching preview area 601, an image selection area 602, a template selection area 603, and editing controls 604. Figure 6 As shown in the left-middle image, the image preview area 601 previews the selected image in the image selection interface, the image selection area 602 displays six images from the target storage space, and the template selection area 603 displays multiple sets of jigsaw puzzle templates, each set including one jigsaw puzzle template. Figure 6 As shown in the image, clicking on four images in image selection area 601 selects all four images to be stitched together. The terminal determines the first stitching template based on the number of images (4) and selects it in template selection area 603. The terminal then displays the stitched image of the four images in the stitching preview area based on the four images and the first stitching template. Figure 6 As shown in the right image, clicking on a jigsaw puzzle template that matches five images in the template selection area causes the terminal to select an image adjacent to the images to be stitched from the target storage space as the new image to be stitched. The image to be stitched is then updated. Based on the jigsaw puzzle template that matches the five images, the jigsaw puzzle of five images is displayed in the jigsaw puzzle preview area 601. By clicking on the editing control 604, the image can be selected from... Figure 6 The image stitching interface shown will redirect to the following page: Figure 7 The image editing interface shown allows for further editing of the puzzle.
[0160] The following describes the process of editing the completed puzzle, using the edited puzzle as the cover image, and then publishing the artwork with the puzzle cover image. For example... Figure 7 As shown, Figure 7 This is a schematic diagram of an image editing interface provided in an embodiment of this application. Figure 7 The image editing interface shown is the same as Figure 5 The image editing interface shown can be the same interface, and will not be different. Figure 7 The image editing interface shown will be described in detail below. Clicking the editing control 604 displays the image editing interface on the terminal. The editing preview area 701 in the image editing interface displays the collage. The collage can be edited using the editing function controls, such as adding text, cropping, etc. Clicking the interface jump control 702 allows access to various functions. Figure 7 The image editing interface shown will redirect to the following... Figure 8 The interface for publishing works is shown below. Figure 8 As shown, Figure 8This is a schematic diagram of a work publishing interface provided in an embodiment of this application. On this interface, by clicking the publishing control 801, the jigsaw puzzle is published as the cover image along with the image selected in the image selection interface. Figure 9 As shown, Figure 9 This is a schematic diagram of a publishing history interface provided in an embodiment of this application, which displays a successfully published work 901 with a jigsaw puzzle cover. Figure 10 As shown, Figure 10 This is a schematic diagram of a work playback interface provided in an embodiment of this application. On this work playback interface, the work with the jigsaw puzzle cover can be played.
[0161] Using the methods described above, images can be selected from the image selection area in the image stitching interface. When users need to change the number of images to be stitched, they no longer need to jump back and forth. Furthermore, users can drag images in the image selection area to replace existing images at the target position of the stitching, which can flexibly adapt to the user's stitching needs and save the user's operating costs. In addition, based on the user's selected stitching template, the images to be stitched can be automatically updated, and the stitching can be displayed in the stitching preview area based on the updated images, which can reduce the user's image selection operations and improve the efficiency of image stitching.
[0162] Figure 11 This is a structural block diagram of an image stitching device provided in an embodiment of this application, such as... Figure 11 As shown, the device includes a display unit 1101, a first determining unit 1102, and a jigsaw puzzle unit 1103.
[0163] The display unit 1101 is configured to execute the display of an image stitching interface. The image stitching interface includes a stitching preview area, an image selection area, and a template selection area. The stitching preview area is used to preview the stitching. The image selection area is used to display multiple images in the target storage space. The template selection area is used to display multiple sets of stitching templates. Each set of stitching templates corresponds to a different number of images, and each set of stitching templates includes at least one stitching template.
[0164] The first determining unit 1102 is configured to perform a selection operation in response to at least one image in the image selection area to determine the images to be stitched together;
[0165] The jigsaw puzzle unit 1103 is configured to perform a first jigsaw puzzle display in the jigsaw puzzle preview area based on the images to be pieced together and a first jigsaw puzzle template, wherein the first jigsaw puzzle template is a jigsaw puzzle template that matches the first number of images to be pieced together among a plurality of jigsaw puzzle templates.
[0166] In one possible implementation, the device further includes:
[0167] The switching unit is configured to switch the images displayed in the image selection area in response to a swipe operation on the image selection area.
[0168] In one possible implementation, the device further includes:
[0169] The replacement unit is configured to perform a drag operation in response to any image in the image selection area, and if the endpoint of the drag operation is located in the first puzzle, replace the existing image at the target position of the first puzzle with the image corresponding to the drag operation.
[0170] In one possible implementation, the device further includes:
[0171] The second determining unit is configured to perform a click operation on the second puzzle template, determine a second number of images matching the second puzzle template, and determine a target number based on the first and second numbers;
[0172] The first update unit is configured to perform the following steps: if the first quantity is greater than or equal to the second quantity, determine the target quantity of the first image from the images to be stitched, delete the target quantity of the first image from the images to be stitched, and obtain the updated images to be stitched.
[0173] The second update unit is configured to perform the following steps: if the first quantity is less than the second quantity, determine the target quantity of the second image from the target storage space, add the target quantity of the second image as the image to be stitched, and obtain the updated image to be stitched.
[0174] The puzzle unit 1103 is also configured to display the second puzzle in the puzzle preview area based on the updated image to be pieced together and the second puzzle template.
[0175] In one possible implementation, the first update unit is configured to perform:
[0176] Based on the selection order of the images to be stitched, determine the first image in the previous target quantity.
[0177] In one possible implementation, the second update unit is configured to perform at least one of the following:
[0178] Based on the order of the images to be stitched in the target storage space, the number of images adjacent to the images to be stitched are determined as the second images;
[0179] Based on image attribute conditions, determine the target number of second images from the target storage space. The image attribute conditions refer to the second images having the target image attributes.
[0180] Based on the image date condition, a target number of second images are determined from the target storage space. The image date condition refers to the image date of the second images falling within the target time period.
[0181] In one possible implementation, the display unit 1101 is further configured to perform:
[0182] Displays an image selection interface, which is used to display multiple images in the target storage space;
[0183] In response to the selection of at least one image in the image selection interface, the image editing interface is displayed;
[0184] The image stitching interface includes:
[0185] When the collage function in the image editing interface is triggered, the image collage interface is displayed.
[0186] In one possible implementation, the display unit 1101 is further configured to perform:
[0187] Displays the application's functional interface, which includes a jigsaw puzzle control;
[0188] In response to a click on the puzzle control, the image selection interface is displayed;
[0189] The image stitching interface includes:
[0190] In response to the selection of at least one image in the image selection interface, the image stitching interface is displayed.
[0191] The image stitching device described above allows users to select images from the image selection area on the image stitching interface. Users no longer need to jump back and forth when they need to change the number of images to be stitched. Furthermore, users can drag images within the selection area to replace existing images at the target position in the stitching, flexibly adapting to user needs and saving operational costs. Moreover, the device can update the images to be stitched based on the user-selected stitching template, and display the stitched image in the preview area based on the updated images, reducing the need for image selection and improving stitching efficiency.
[0192] It should be noted that the image stitching device provided in the above embodiments is only illustrated by the division of the above functional modules when performing the corresponding steps. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the image stitching device and the image stitching method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.
[0193] In this application embodiment, an electronic device is also provided, which includes a processor and a memory. The memory is used to store at least one computer program, which is loaded and executed by the processor to implement the above-described image stitching method.
[0194] Taking electronic devices as terminals as an example, Figure 12 This is a structural block diagram of a terminal provided in an embodiment of this application, such as... Figure 12 As shown, terminal 1200 can be: a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. Terminal 1200 may also be referred to as user equipment, portable terminal, laptop terminal, desktop terminal, or other names.
[0195] Typically, terminal 1200 includes a processor 1201 and a memory 1202.
[0196] Processor 1201 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1201 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1201 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1201 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 1201 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0197] The memory 1202 may include one or more computer-readable storage media, which may be non-transitory. The memory 1202 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1202 are used to store at least one program code, which is executed by the processor 1201 to implement the terminal execution process in the image stitching method provided in the method embodiments of this application.
[0198] In some embodiments, the terminal 1200 may also optionally include a peripheral device interface 1203 and at least one peripheral device. The processor 1201, memory 1202, and peripheral device interface 1203 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 1203 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: radio frequency circuitry 1204, display screen 1205, camera assembly 1206, audio circuitry 1207, and power supply 1208.
[0199] Peripheral device interface 1203 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 1201 and memory 1202. In some embodiments, processor 1201, memory 1202 and peripheral device interface 1203 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 1201, memory 1202 and peripheral device interface 1203 can be implemented on separate chips or circuit boards, and this application embodiment does not limit this.
[0200] The radio frequency (RF) circuit 1204 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 1204 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 1204 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. In some embodiments, the RF circuit 1204 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 1204 can communicate with other terminals via at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: metropolitan area networks (MANs), various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks (WLANs), and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 1204 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.
[0201] Display screen 1205 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 1205 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 1201 for processing. In this case, display screen 1205 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 1205, disposed on the front panel of terminal 1200; in other embodiments, there may be at least two display screens, disposed on different surfaces of terminal 1200 or in a folded design; in still other embodiments, display screen 1205 may be a flexible display screen, disposed on a curved or folded surface of terminal 1200. Furthermore, display screen 1205 may be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The display screen 1205 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0202] The camera assembly 1206 is used to acquire images or videos. In some embodiments, the camera assembly 1206 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal, and the rear-facing camera is located on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 1206 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash is a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.
[0203] The audio circuit 1207 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting the sound waves into electrical signals that are input to the processor 1201 for processing, or input to the radio frequency circuit 1204 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each positioned at a different location on the terminal 1200. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 1201 or the radio frequency circuit 1204 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 1207 may also include a headphone jack.
[0204] Power supply 1208 is used to power the various components in terminal 1200. Power supply 1208 can be AC power, DC power, a disposable battery, or a rechargeable battery. When power supply 1208 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0205] In some embodiments, the terminal 1200 further includes one or more sensors 1209. The one or more sensors 1209 include, but are not limited to: an acceleration sensor 1210, a gyroscope sensor 1211, a pressure sensor 1212, an optical sensor 1213, and a proximity sensor 1214.
[0206] Accelerometer 1210 can detect the magnitude of acceleration on the three coordinate axes of a coordinate system established with terminal 1200. For example, accelerometer 1210 can be used to detect the components of gravitational acceleration on the three coordinate axes. Processor 1201 can control display screen 1205 to display the user page in landscape or portrait view based on the gravitational acceleration signal collected by accelerometer 1210. Accelerometer 1210 can also be used for games or for collecting user motion data.
[0207] The gyroscope sensor 1211 can detect the orientation and rotation angle of the terminal 1200. The gyroscope sensor 1211 can work in conjunction with the accelerometer sensor 1210 to collect the user's 3D movements on the terminal 1200. Based on the data collected by the gyroscope sensor 1211, the processor 1201 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.
[0208] The pressure sensor 1212 can be disposed on the side bezel of the terminal 1200 and / or on the lower layer of the display screen 1205. When the pressure sensor 1212 is disposed on the side bezel of the terminal 1200, it can detect the user's grip signal on the terminal 1200, and the processor 1201 can perform left / right hand recognition or quick operation based on the grip signal collected by the pressure sensor 1212. When the pressure sensor 1212 is disposed on the lower layer of the display screen 1205, the processor 1201 can control the operable controls on the UI page based on the user's pressure operation on the display screen 1205. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.
[0209] Optical sensor 1213 is used to collect ambient light intensity. In one embodiment, processor 1201 can control the display brightness of display screen 1205 based on the ambient light intensity collected by optical sensor 1213. Specifically, when the ambient light intensity is high, the display brightness of display screen 1205 is increased; when the ambient light intensity is low, the display brightness of display screen 1205 is decreased. In another embodiment, processor 1201 can also dynamically adjust the shooting parameters of camera assembly 1206 based on the ambient light intensity collected by optical sensor 1213.
[0210] The proximity sensor 1214, also known as a distance sensor, is typically located on the front panel of the terminal 1200. The proximity sensor 1214 is used to detect the distance between the user and the front of the terminal 1200. In one embodiment, when the proximity sensor 1214 detects that the distance between the user and the front of the terminal 1200 is gradually decreasing, the processor 1201 controls the display screen 1205 to switch from a screen-on state to a screen-off state; when the proximity sensor 1214 detects that the distance between the user and the front of the terminal 1200 is gradually increasing, the processor 1201 controls the display screen 1205 to switch from a screen-off state to a screen-on state.
[0211] Those skilled in the art will understand that Figure 12 The structure shown does not constitute a limitation on terminal 1200 and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0212] In this embodiment of the application, a computer-readable storage medium including program code is also provided, such as a memory 1202 including program code. The program code can be executed by the processor 1201 of the terminal 1200 to complete the image stitching method. Optionally, the computer-readable storage medium may be ROM (Read-Only Memory), RAM (Random Access Memory), CD-ROM (Compact-Disc Read-Only Memory), magnetic tape, floppy disk, and optical data storage device, etc.
[0213] In this application embodiment, a computer program product is also provided, including one or more instructions, which are executed by one or more processors of an electronic device, enabling the electronic device to perform the above-described image stitching method.
[0214] In some embodiments, the computer program involved in the present application embodiments may be deployed and executed on a computer device, or executed on multiple computer devices located in one location, or executed on multiple computer devices distributed in multiple locations and interconnected through a communication network. Multiple computer devices distributed in multiple locations and interconnected through a communication network may constitute a blockchain system.
[0215] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0216] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for image stitching, characterized in that, The method includes: The image stitching interface includes a stitching preview area, an image selection area, and a template selection area. The stitching preview area is used to preview the stitching. The image selection area is used to display multiple images in the target storage space. The template selection area is used to display multiple sets of stitching templates. Each set of stitching templates corresponds to a different number of images, and each set of stitching templates includes at least one stitching template. In response to the selection of at least one image in the image selection area, the images to be stitched are determined; Based on the images to be pieced together and the first puzzle template, a first puzzle is displayed in the puzzle preview area. The first puzzle template is a puzzle template that matches the first number of images to be pieced together among the multiple sets of puzzle templates. In response to a click operation on the second puzzle template, a second number of images matching the second puzzle template is determined, and a target number is determined based on the first number and the second number of images to be pieced together; If the first number of images to be stitched is greater than or equal to the second number, determine the target number of first images from the images to be stitched, delete the target number of first images from the images to be stitched, and obtain the updated images to be stitched. If the first number of images to be stitched is less than the second number, determine the target number of second images from the target storage space, add the target number of second images to the image to be stitched, and obtain the updated image to be stitched. Based on the updated image to be pieced together and the second puzzle template, the second puzzle piece is displayed in the puzzle preview area.
2. The image stitching method according to claim 1, characterized in that, After displaying the image stitching interface, the method further includes: In response to a swipe operation on the image selection area, the images displayed in the image selection area are switched.
3. The image stitching method according to claim 1, characterized in that, The method further includes, after displaying the first puzzle piece in the puzzle preview area based on the image to be pieced together and the first puzzle template: In response to a drag operation on any image in the image selection area, if the endpoint of the drag operation is located in the first puzzle, the image already existing at the target position of the first puzzle is replaced with the image corresponding to the drag operation.
4. The image stitching method according to claim 1, characterized in that, The step of determining the target number of first images from the images to be stitched includes: Based on the selection order of the images to be stitched, determine the first image in the previous target quantity.
5. The image stitching method according to claim 1, characterized in that, The second image used to determine the target number from the target storage space includes at least one of the following: Based on the order of the images to be stitched in the target storage space, the target number of images adjacent to the images to be stitched are determined as the second images; Based on image attribute conditions, the target number of second images are determined from the target storage space, wherein the image attribute conditions refer to the second images having target image attributes; Based on the image date condition, the target number of second images are determined from the target storage space, wherein the image date condition refers to the image date of the second images falling within the target time period.
6. The image stitching method according to claim 1, characterized in that, The method further includes: The image selection interface is used to display multiple images in the target storage space; In response to the selection of at least one image in the image selection interface, an image editing interface is displayed; The image stitching interface includes: When the image stitching function of the image editing interface is triggered, the image stitching interface is displayed.
7. The image stitching method according to claim 1, characterized in that, The method further includes: The application function interface is displayed, and the application function interface includes a jigsaw puzzle function control; In response to a click on the puzzle function control, an image selection interface is displayed; The image stitching interface includes: In response to the selection of at least one image in the image selection interface, the image stitching interface is displayed.
8. A picture stitching device, characterized in that, The device includes: The display unit is configured to execute the display of an image stitching interface. The image stitching interface includes a stitching preview area, an image selection area, and a template selection area. The stitching preview area is used to preview the stitching. The image selection area is used to display multiple images in the target storage space. The template selection area is used to display multiple sets of stitching templates. Each set of stitching templates corresponds to a different number of images, and each set of stitching templates includes at least one stitching template. The first determining unit is configured to perform a selection operation in response to at least one image in the image selection area to determine the images to be stitched together; The jigsaw puzzle unit is configured to perform the following: displaying a first jigsaw puzzle in the jigsaw puzzle preview area based on the images to be pieced together and a first jigsaw puzzle template, wherein the first jigsaw puzzle template is a jigsaw puzzle template that matches a first number of the images to be pieced together from the plurality of jigsaw puzzle templates; The second determining unit is configured to perform a click operation on the second puzzle template, determine a second number of images matching the second puzzle template, and determine a target number based on the first number and the second number of images to be pieced together; The first update unit is configured to perform the following steps: if the first number of images to be stitched is greater than or equal to the second number, determine the target number of first images from the images to be stitched, delete the target number of first images from the images to be stitched, and obtain the updated images to be stitched. The second updating unit is configured to perform the following steps: if the first number of images to be stitched is less than the second number, determine the target number of second images from the target storage space, add the target number of second images as images to be stitched, and obtain the updated images to be stitched. The puzzle unit is also configured to display a second puzzle piece in the puzzle preview area based on the updated image to be pieced together and the second puzzle template.
9. An electronic device, characterized in that, The electronic device includes: One or more processors; Memory used to store the executable program code of the processor; The processor is configured to execute the program code to implement the image stitching method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, When the program code in the computer-readable storage medium is executed by the processor of the electronic device, the electronic device is able to perform the image stitching method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Work processing method and device, electronic equipment and storage medium
CN112667835A