Method, apparatus, device and program product for stitching images
By detecting the user's rotation angle and generating reminders, the problem of low efficiency in manually stitching images is solved, achieving efficient stitching and improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2026-03-24
AI Technical Summary
In existing technologies, users need to rely on their own judgment to adjust the rotation angle of images when manually stitching them together, resulting in low stitching efficiency. This is especially true for users who are not familiar with image stitching, who need to try multiple times, thus reducing the user experience.
By detecting the user's rotation angle of the image, it determines whether the preset conditions are met and generates a reminder to help the user adjust the image to the corresponding angle, including vibration or text reminders, thereby improving the convenience of user operation and stitching efficiency.
It achieves efficient image stitching when manually stitching images, and helps users accurately adjust the image angle through real-time feedback, thereby improving user experience and stitching efficiency.
Smart Images

Figure CN121724831A_ABST
Abstract
Description
Technical Field
[0001] This disclosure generally relates to the field of computers, and more specifically to methods, apparatus, electronic devices, and products for stitching images. Background Technology
[0002] Image stitching refers to the process of combining multiple individual images into a new image. Image stitching can be divided into automatic stitching and manual stitching. Automatic stitching is a technique that uses software to automatically process multiple photos and merge them into a single large image. This technique is commonly used to create panoramic photos, collages, or to seamlessly stitch multiple images together to form a larger image.
[0003] Manual image stitching refers to the process by which users combine multiple images into a single whole using image editing software or applications. This method allows users complete control over the final result, enabling them to adjust the position, size, rotation angle, and other aspects of each image according to their own ideas, thus realizing creative freedom. Summary of the Invention
[0004] Embodiments of this disclosure provide a method, apparatus, electronic device, and product for stitching images.
[0005] According to a first aspect of this disclosure, a method for stitching images is provided. The method includes detecting a user's rotation of a first image on a canvas, wherein the canvas includes at least a first image and a second image to be stitched. The method further includes determining a rotation angle of the first image in response to detecting rotation. The method also includes generating a notification in response to detecting that the rotation angle satisfies the preset condition. Furthermore, the method includes stitching the first image and the second image.
[0006] In a second aspect of this disclosure, an apparatus for stitching images is provided. The apparatus includes a rotation detection module configured to detect rotation of a first image on a canvas by a user, wherein the canvas includes at least a first image and a second image to be stitched. The apparatus also includes a rotation angle determination module configured to determine a rotation angle of the first image in response to the detection of rotation. The apparatus includes an alert module configured to generate an alert in response to the detection that the rotation angle meets a preset condition. Furthermore, the apparatus includes a stitching module configured to stitch the first and second images.
[0007] In a third aspect of this disclosure, an electronic device is provided. The electronic device includes a processor and a memory coupled to the processor, the memory having instructions stored therein, which, when executed by the processor, cause the electronic device to perform the method according to the first aspect.
[0008] In a fourth aspect of this disclosure, a computer program product is provided that stores computer-executable instructions thereon, wherein the computer-executable instructions are executed by a processor to implement the method of the first aspect.
[0009] The summary section is intended to present the chosen concepts in a simplified form, which will be further described in the detailed description below. The summary section is not intended to identify key or principal features of the claimed subject matter, nor is it intended to limit the scope of the claimed subject matter. Attached Figure Description
[0010] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:
[0011] Figure 1 A schematic diagram of an example environment in which some embodiments of this disclosure may be implemented is shown;
[0012] Figure 2 Flowcharts illustrating methods for stitching images according to some embodiments of this disclosure are shown;
[0013] Figures 3A-3C Schematic diagrams illustrating some embodiments of this disclosure for stitching images in free mode are shown;
[0014] Figures 4A-4E Schematic diagrams illustrating some embodiments of this disclosure for stitching images in a grid pattern are shown;
[0015] Figures 5A-5B The illustration shows some embodiments of the present disclosure for changing the grid ratio and displaying menu options when stitching images in a grid pattern;
[0016] Figure 6 The illustration shows some embodiments of the present disclosure for determining the existence of puzzle data and puzzle index when entering grid mode;
[0017] Figure 7 The illustration shows some embodiments of the present disclosure for determining whether an image is cropped when entering a grid mode;
[0018] Figure 8 Block diagrams of apparatus for stitching images according to some embodiments of the present disclosure are shown; and
[0019] Figure 9 Block diagrams of electronic devices according to some embodiments of the present disclosure are shown.
[0020] In all the accompanying figures, the same or similar reference numerals denote the same or similar elements. Detailed Implementation
[0021] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.
[0022] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0023] For example, upon receiving a user's proactive request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.
[0024] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0025] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0026] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0027] In the description of embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc., may refer to different or the same objects unless explicitly stated. Other explicit and implicit definitions may also be included below.
[0028] As mentioned above, manually stitching images offers greater creative freedom. Users can rotate images to different angles to create various layouts. Typically, based on user habits and expectations, users rotate images to specific or generally accepted angles. In related technologies, users must rely on their own judgment to determine the rotation angle. While this largely respects user creativity, it reduces efficiency because users unfamiliar with image stitching need to precisely adjust the angle each time, leading to additional time consumption and multiple attempts, thus degrading the user experience.
[0029] According to embodiments of this disclosure, the method of generating a reminder by determining whether the rotation angle of an image meets predetermined conditions can help users adjust the image to the corresponding angle, thereby improving the layout design of the puzzle. Furthermore, this reminder method can provide intuitive feedback to users who have difficulty accurately judging the angle in real time, improving the efficiency of image stitching and thus enhancing the user experience.
[0030] Figure 1 A schematic diagram of an example environment 100 in which some embodiments of this disclosure may be implemented is shown. For example... Figure 1 As shown, display interface 110 is a free-form image collage interface, with canvas 120 occupying the largest area. Canvas 120 displays three images imported by the user: image A 130, image B 140, and image C 150. It is understood that the number of images imported by the user is unlimited. Images A 130, B 140, and C 150 are stacked sequentially according to the order in which they were imported. For example, image A 130 could be the first image imported by the user or the first image selected during the import process. In some embodiments, when images A 130, B 140, and C 150 are stacked, their center points coincide with the center point of the canvas; this could also be the default screen displayed when the user enters display interface 110.
[0031] Continue to refer to Figure 1Users can freely adjust the stacking order, image size, or image arrangement angle of the images displayed on canvas 120. For example, with image C 150 selected, users can move the image freely; for instance, image C 150 may have been moved from the default center point of the canvas to the right side. Similarly, with image B 140 selected, users can long-press button 160 to move the image inwards to shrink it, or move it outwards to enlarge it. Long-pressing button 160 also allows users to rotate the image to a desired angle. In some embodiments, users can also rotate image B 140 by long-pressing with two fingers.
[0032] Continue to refer to Figure 1 During the process of the user rotating the image B 140 to a suitable angle, when the user rotates the image to, for example, 45 degrees (or a multiple of 45 degrees), a reminder can be issued to indicate that the current image angle 170 has reached a specific angle set by the system or a general angle (e.g., 45 degrees or a multiple of 45 degrees). This reminder could be a vibration alert or a text alert. In some embodiments, when the user rotates to a point close to a certain angle, for example, a set angle of 45 degrees, a reminder can also be issued when the user rotates to approximately 5 degrees around 45 degrees. This reminder could be a text alert such as "45 degrees" or "45°".
[0033] In some embodiments, assuming the set angle is 45 degrees, when the user rotates to 42 degrees and stops rotating, the image can be automatically corrected to 45 degrees. In some embodiments, the angle can be the rotation angle of the vertically upward line of symmetry of the image. In some embodiments, these angles can be multiples of 45 degrees. In visual arts, a 45-degree angle is often used to create a sense of movement or balance and is considered a relatively attractive angle. In some embodiments, it can also be 30 degrees, 60 degrees, or multiples of these angles; this disclosure does not limit this. In some embodiments, the rotation angle of the image rotated by the user can also be displayed in real time on the display interface 110, which makes it easier for the user to judge the remaining rotation.
[0034] Continue to refer to Figure 1 When the user is satisfied with the rotation angle of image B 140 and no further operation is needed, the image stitching can be completed, and the image can be saved and published by the publish button 190.
[0035] like Figure 1As shown, in the lower area 180 of the display interface 110, from left to right, there are options such as Add Slot, Collage, Background, and Keying. The Add Slot option can be used to add slots to the image, or it can be understood as adding more images. When the user clicks Collage 182, they can enter the grid collage page. On the grid collage page, the user can freely set the grid layout of the image, as well as the proportions of the grids and the canvas. The Background option allows the user to edit the image background. If the imported image involves a portrait, the Keying option can be used to copy the portrait layer from the image. In some embodiments, layers of any shape from the user-selected image can be copied. In some embodiments, before entering the grid collage page, the imported image can be cropped to obtain the desired image portion.
[0036] This method, which generates a reminder by determining whether the rotation angle of an image meets predetermined conditions, helps users adjust the image to the corresponding angle, thereby enhancing the layout design of the puzzle. Furthermore, this reminder method can provide real-time, intuitive feedback to users who have difficulty accurately judging angles, improving the efficiency of image stitching and thus enhancing the user experience.
[0037] The following will combine Figures 2 to 9 The process according to embodiments of this disclosure is described in detail. For ease of understanding, the specific data mentioned in the following description are exemplary and not intended to limit the scope of this disclosure. It is understood that the embodiments described below may also include additional actions not shown and / or actions shown may be omitted, and the scope of this disclosure is not limited in this respect.
[0038] Figure 2 A flowchart illustrating a method 200 for stitching images according to some embodiments of this disclosure is shown. (See also:) Figure 2 Method 200 includes blocks 202, 204, 206, and 208. The executing entity of method 200 can be a device for stitching images, which can be a server, such as a computing system, a single server, a distributed server, a server system configured in the cloud, or a standalone device or system. This device can be implemented in software and / or hardware. Method 200 will be described below with the executing entity being a device for stitching images.
[0039] In box 202, the user's rotation of the first image on the canvas is detected, wherein the canvas includes at least the first and second images to be stitched together. (Reference) Figure 1In free-form jigsaw puzzle mode, multiple images to be stitched together are displayed on canvas 120, including image A 130, image B 140, and image C 150. Users can perform various operations on the images on canvas 120 by hand. For example, for image B 140, by selecting the image, users can rotate it by long-pressing button 160. The rotation of image B 140 can be detected.
[0040] In box 204, in response to the detection of rotation, the rotation angle of the first image is determined. When rotation of image B 140 is detected, the angle 170 of rotation of image B 140 by the user can be calculated in real time. In some embodiments, this angle 170 may be the rotation angle of the vertically upward line of symmetry of image B 140.
[0041] In box 206, a reminder is generated in response to the detection that the rotation angle meets the preset conditions. When the rotation angle 170 of image B 140 meets the preset conditions, such as the angle 170 meeting the set 45-degree condition (or a multiple of 45 degrees), a vibration reminder or a text reminder can be issued, so that the user can know in real time that the current image rotation has reached 45 degrees (or a multiple of 45 degrees), improving the convenience of user operation.
[0042] In box 208, stitch the first and second images together. (Reference) Figure 1 In some embodiments, when the user clicks Figure 1 When the publish button 190 is selected, the images can be stitched together, and the stitched images A, B, and C can be saved and published.
[0043] In the embodiments of this disclosure, the method of generating a reminder by judging whether the rotation angle of an image meets a predetermined condition can help users adjust the image to the corresponding angle, thereby beautifying the layout design of the puzzle. Furthermore, this reminder method can provide intuitive feedback to users who have difficulty accurately judging the angle in real time, improving the efficiency of users stitching images and thus enhancing the user experience.
[0044] The following will combine Figures 3A-3C This will illustrate the situation where auxiliary lines appear when moving an image in free puzzle mode in some embodiments of this disclosure. Figure 3A A schematic diagram of a display interface 300A in free mode after a user imports an image, as shown in some embodiments of this disclosure, is illustrated. (See reference...) Figure 3AThe canvas 304A of the display interface 302A displays three images imported by the user: image A, image B, and image C. It is understandable that the layout of the images displayed on canvas 304A is not the default layout of the images imported into the display interface 302A.
[0045] Combination Figure 3B , Figure 3B A schematic diagram illustrating the appearance of a horizontal guide line 300B when moving an image in free mode, according to some embodiments of this disclosure, is shown. (See reference...) Figure 3B On the display interface 302B, the user can select image B and long-press to move image B to adjust its position. When image B is moved to align with the edge of image C, a horizontal auxiliary reference line 304B can be displayed at the upper edge of image B, and a horizontal auxiliary reference line 308B can be displayed at the lower edge of image C.
[0046] Similarly, combining Figure 3C , Figure 3C Schematic diagrams of some embodiments of this disclosure are provided for moving an image in free mode while simultaneously displaying horizontal and vertical auxiliary reference lines 300C. (See also...) Figure 3C In the display interface 302C, when image B is moved to align with the vertical edge of image C, auxiliary reference line 304C may appear. When aligned with the horizontal edge, auxiliary reference line 306C may appear simultaneously.
[0047] return Figure 3B When image B is moved to a position where its horizontal center line is almost aligned with that of image C, a horizontal auxiliary reference line 306B will also appear. Similarly, although not shown in the figure, it is understood that when image B is moved to a position where its vertical center line is almost aligned with that of image C, a vertical auxiliary reference line will also appear. It is understood that auxiliary reference lines can appear simultaneously when the images are aligned at both the edges and the center lines.
[0048] By displaying auxiliary reference lines in real time during the movement, users can easily determine whether the image still needs to be moved and ensure precise image alignment, thus improving the efficiency of image stitching and enhancing the user experience.
[0049] The following will combine Figures 4A-4E This will illustrate the case of image stitching in a grid pattern in some embodiments of this disclosure. Figure 4A A schematic diagram of some embodiments of this disclosure showing the display of a default grid page 400A when a user imports an image. (In conjunction with...) Figure 1 After the user imports an image, clicking the puzzle option 182 will take them to... Figure 4A Page 402A displays grid layout templates in area 104A. The number of grid cells in these templates corresponds to the number of imported images. For example, if three images are imported, a grid layout template with three cells will be displayed, as shown in area 404A. This could be a 3×1 layout, a 1×3 layout, etc. Area 406A displays templates where the user can select the grid ratio. For example, when the user taps to select a 1:1 ratio, the grid ratio and the overall grid layout ratio will become 1:1. In some embodiments, when an image is larger than the grid display area, it can be selected and dragged to display other areas of the image.
[0050] Figure 4B A schematic diagram of an interface 400B for selecting an image on a grid puzzle page, according to some embodiments of this disclosure, is shown. (See also:) Figure 4B In the display interface 402B, when the user touches the image B, a replacement button 404B will be displayed in the upper right corner of the image B. When the user clicks the replacement button 404B, the image B can be replaced. Figure 4C A schematic diagram illustrating the display of a newly replaced image 400C during a grid puzzle, according to some embodiments of this disclosure, is shown. Figure 4C As shown, in display interface 402C, the user selects to replace image D with [the desired image]. Figure 4B Image B in the image.
[0051] Figure 4D A schematic diagram illustrating the swapping of image positions 400D on a grid puzzle page, representing some embodiments of this disclosure, is shown. (See also: References) Figure 4D In the display interface 402D, the user can long-press image A and move it towards image D to swap the positions of images A and D. In some embodiments, the user can also long-press image A and move it towards image D to swap the positions of images A and D.
[0052] When the user swaps the positions of image D and image A, it can jump to... Figure 4E . Figure 4E A schematic diagram of an interface 400E after image position swapping on a grid puzzle page, representing some embodiments of this disclosure, is shown. For example... Figure 4E As shown, display interface 402E displays the interface after image A and image D have swapped positions. When the user no longer needs to perform any other operations on the images on display interface 402E, they can save the settings made by the user on the entire stitched image on interface 402E by tapping the OK button 404E in the lower right corner of display interface 402E.
[0053] In some embodiments, this data can be saved as a JSON data file, which includes the puzzle data and the puzzle index. For example, in a 1×3 grid, the origin can be set to the top-left corner of the grid, and the top-right corner (horizontally to the right) can be set to 1. Then, the height of each individual image slot (a single small grid) is 1 / 3, thus determining the coordinates of each point. This data can be stored in a JSON file. In some embodiments, if the user does not need to publish the spliced image as an effects template, it can be saved in a drafts folder, which can be local or in the cloud. It is understood that there is no specific order between replacing the image and moving its position.
[0054] The following will combine Figure 5B Figures 5A-5B The illustration shows some embodiments of the present disclosure for changing the grid ratio and displaying menu options when stitching images in a grid pattern. Figure 5A This diagram illustrates a user-configured jigsaw puzzle display interface 500A. (Reference) Figure 5A In the display interface 502A (i.e., the puzzle page), the user can adjust the overall proportion of the already pieced-together image 504A through area 506A. Understandably, the proportions of the images A, B, C, D, E, F, G, H, and I within the grid can also be adjusted accordingly.
[0055] Continue to refer to Figure 5A When the user taps the OK button 508A, it will jump to... Figure 5B . Figure 5B A schematic diagram illustrating the swapping of image positions 500B on a grid puzzle page, representing some embodiments of this disclosure, is shown. (See also: [reference]) Figure 5BIn the display interface 502B (i.e., the canvas), when the user taps image I, multiple buttons appear at the four top corners of image I, including a replace button 504B, a rotate button 506B, a copy button 508B, and a delete button 510B. Clicking the replace button 504B allows the user to replace image I. Clicking the rotate button 506B allows the user to zoom and rotate image I. In some embodiments, when the user rotates the image to a system-set angle, a vibration alert or a text alert may be displayed in real time. In some embodiments, when the user rotates the image to a system-set angle within a reasonable error range and stops rotating, the image angle can be corrected to the system-set angle. Clicking the copy button 508B copies image I, creating a new image I on the display interface 502B. Clicking the delete button 510B deletes image I. It is understood that in the free puzzle mode, these same multiple buttons will also appear at the four top corners of the image when the user taps it.
[0056] like Figure 5B As shown, when the user deems it unnecessary to further edit the stitched image, they can publish the edited stitched image as a special effects material using the publish button 514B. If the user wants to abandon editing the stitched image, they can do so using the exit button 512B in the upper left corner. Alternatively, in the pop-up options (not shown in the figure), they can confirm again to save it to a draft or abandon it directly.
[0057] By displaying a multi-functional button at the top corner of each image, users can start editing directly from that location without having to navigate through a deep menu structure. This not only simplifies the user's workflow but also enhances the overall user experience.
[0058] Figure 6 The illustration shows some embodiments of this disclosure for determining whether puzzle data and puzzle index 600 exist when entering grid mode. For example... Figure 6 As shown, when a user enters the puzzle from the canvas at step 602, an attempt can be made at step 604 to retrieve any data related to the puzzle and its index information. At this point, a determination can be made at step 606 to whether the puzzle data and index information were retrieved at step 604. The puzzle index can refer to the index used to identify and organize the images in each cell, while the puzzle data can be the entity content data of the assembled images.
[0059] Continue to refer to Figure 6If neither the puzzle data nor the puzzle index exists, then at step 608, it can be determined that the puzzle file is invalid; simply put, there is no data related to the puzzle. At step 610, you can access the puzzle page, which will display the default settings page. If the puzzle data exists, then at step 614, it can be determined that the puzzle file is valid. At step 616, when accessing the puzzle page, the user interface corresponding to the puzzle data can be restored, including the restored puzzle effect.
[0060] Continue to refer to Figure 6 If the puzzle index exists, then at step 612, it can be assumed that the user opened the puzzle file from a different device (e.g., from Android to iOS) or from the drafts folder. At this point, at step 618, it can be determined whether the image in the grid has been cropped. If it hasn't been cropped, then at step 620, the puzzle canvas can be accessed to display the image's arrangement in the grid. If it has been cropped, then at step 624, the coordinates of the cropped image can be calculated based on the image's coordinates and the vertex coordinates of each grid area, thus displaying the cropped image's display area in the grid at step 620.
[0061] Figure 7 Schematic diagrams illustrating some embodiments of this disclosure for determining whether an image has been cropped 700 degrees when entering grid mode. Reference Figure 7 In step 702, the puzzle is applied to the canvas, and then in step 704, the canvas ratio can be set according to the puzzle ratio. In some embodiments, when the user selects a 1:2 puzzle ratio, the overall canvas ratio will also become 1:2. To ensure that the cropped image can also be displayed correctly in the grid, it can be determined in step 706 whether the image has been cropped. If the image has been cropped, then in step 708, the cropping information of the image relative to the slot (grid) can be calculated based on the cropped image information. If the image has not been cropped, then in step 710, it can be concluded that the current image cropping information is the image cropping information relative to the slot, i.e., no conversion is required.
[0062] Continue to refer to Figure 7 In step 712, the cropping information of the image relative to the slot can be obtained. Then, in step 714, the puzzle data can be further set and processed, meaning that the relevant image can ultimately be displayed in the grid or slot based on the relevant information obtained in step 712. It is understandable that the conversion of the cropping information here can be based on coordinates.
[0063] This method of coordinate conversion allows cropped images to be displayed correctly in the image slot, enhancing the user's aesthetic experience.
[0064] Figure 8A block diagram of an apparatus 700 for stitching images, according to some embodiments of the present disclosure, is shown. Figure 8 As shown, the device 800 includes a rotation detection module 802 configured to detect rotation of a first image on a canvas by a user, wherein the canvas includes at least a first image and a second image to be stitched together. The device 800 also includes a rotation angle determination module 804 configured to determine the rotation angle of the first image in response to the detection of rotation. The device 800 includes an alert module 806 configured to generate an alert in response to the detection that the rotation angle meets a preset condition. Furthermore, the device 800 also includes a stitching module configured to stitch the first image and the second image together. Figure 9 A block diagram of an electronic device 900 according to some embodiments of the present disclosure is shown. Device 900 may be the device or apparatus described in the embodiments of the present disclosure. Figure 9 As shown, device 900 includes a central processing unit (CPU) and / or a graphics processing unit (GPU) 901, which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) 902 or loaded from storage unit 908 into random access memory (RAM) 903. The RAM 903 can also store various programs and data required for the operation of device 900. The CPU / GPU 901, ROM 902, and RAM 903 are interconnected via bus 904. Input / output (I / O) interface 905 is also connected to bus 904. Although not shown in... Figure 9 As shown, device 900 may also include a coprocessor.
[0065] Multiple components in device 900 are connected to I / O interface 905, including: input unit 906, such as keyboard, mouse, etc.; output unit 907, such as various types of monitors, speakers, etc.; storage unit 908, such as disk, optical disk, etc.; and communication unit 909, such as network card, modem, wireless transceiver, etc. Communication unit 909 allows device 900 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0066] The various methods or processes described above can be executed by CPU / GPU 901. For example, in some embodiments, the methods can be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program can be loaded and / or installed on device 900 via ROM 902 and / or communication unit 909. When the computer program is loaded into RAM 903 and executed by CPU / GPU 901, one or more steps or actions in the methods or processes described above can be performed.
[0067] In some embodiments, the methods and processes described above can be implemented as a computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of this disclosure.
[0068] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example, but not limited to, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0069] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, a local area network (LAN), a wide area network (WAN), and / or a wireless network, to an external computer or external storage device. The network may include copper cables, fiber optic cables, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0070] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages and conventional procedural programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.
[0071] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0072] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0073] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of devices, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0074] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical applications, or technical improvements to the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
[0075] The following are some example implementations of this disclosure.
[0076] Example 1. A method for stitching images, comprising:
[0077] Detect the user's rotation of a first image on a canvas, the canvas including at least the first image and the second image to be stitched together;
[0078] In response to the detection of the rotation, the rotation angle of the first image is determined;
[0079] In response to detecting that the rotation angle meets a preset condition, a reminder is generated; and
[0080] The first image and the second image are stitched together.
[0081] Example 2. According to the method of Example 1, the rotation angle is the rotation angle of a ray that diverges vertically upward from the center point of the first image, and the generation of a reminder in response to detecting that the rotation angle parameter meets a preset condition includes:
[0082] In response to the rotation angle satisfying the preset condition, and in response to detecting that the user has stopped rotating the first image, the user's rotation of the first image is corrected to a predetermined angle.
[0083] Example 3. The method according to any one of Examples 1-2 further includes:
[0084] In response to detecting movement of a user on a first image on the canvas, determine whether the first image is aligned with the second image in the vertical and / or horizontal directions at the image edges; and
[0085] In response to the detection of the alignment, a first auxiliary reference line is displayed in the vertical direction and / or the horizontal direction of the image edge.
[0086] Example 4. The method according to any one of Examples 1-3 further includes:
[0087] In response to detecting user movement on a first image on the canvas, determine whether the first image and the second image are aligned on a line of symmetry in the vertical and / or horizontal directions; and
[0088] In response to the detection of the alignment, a second auxiliary reference line is displayed on the line of symmetry in the vertical and / or horizontal directions of the image.
[0089] Example 5. The method according to any one of Examples 1-4 further includes:
[0090] In response to a user clicking a first option on the canvas, a grid corresponding to multiple stitched images is displayed in a first area, wherein the multiple stitched images are displayed in the first area in the order they were imported.
[0091] Example 6. The method according to any one of Examples 1-5 further includes
[0092] In response to detecting a user's selection of the first image, a replace button is displayed; and
[0093] In response to detecting a user's selection of the replace button, a third image is used to replace the first image.
[0094] Example 7. The method according to any one of Examples 1-6 further includes:
[0095] In response to detecting a user's long press movement of the first image toward the second image, the positions of the first image and the second image are swapped in the first area.
[0096] Example 8. The method according to any one of Examples 1-7 further includes:
[0097] In response to detecting a user's click on the "OK" button in the first area, the grid is displayed on the canvas;
[0098] In response to detecting a user's exit button on the canvas, the grid is saved; and
[0099] In response to detecting a user's click on the saved grid, the grid is redisplayed in the first area.
[0100] Example 9. The method according to any one of Examples 1-8, wherein displaying the grid on the canvas in response to detecting a user's click on a confirm button in the first area comprises:
[0101] In response to detecting a user's click on the first image, a plurality of buttons are displayed at the four top corners of the first image. The plurality of buttons include at least two of a delete button, a replace button, a rotate button, and a copy button. The delete button is used to delete the first image, the replace button is used to replace the first image, the rotate button is used to rotate and / or scale the first image, and the copy button is used to copy the first image.
[0102] Example 10. The method according to any one of Examples 1-9 further includes:
[0103] In response to the detection of the existence of puzzle data, a first area is displayed, and a user interface corresponding to the puzzle data is displayed in the first area;
[0104] In response to the detection that neither the puzzle data nor the puzzle index exists, the default settings for the canvas are restored and displayed; and
[0105] In response to the detection of the existence of the puzzle index, it is determined whether the image has been cropped.
[0106] Example 11. The method according to any one of Examples 1-10 further includes:
[0107] In response to the detection of the existence of puzzle data, a first area is displayed, and a user interface corresponding to the puzzle data is displayed in the first area;
[0108] In response to the detection that neither the puzzle data nor the puzzle index exists, the default settings for the canvas are restored and displayed; and
[0109] In response to the detection of the existence of the puzzle index, it is determined whether the image has been cropped.
[0110] Example 12. An apparatus for stitching images, comprising:
[0111] A rotation detection module is configured to detect the user's rotation of a first image on a canvas, the canvas including at least the first image and a second image to be stitched together;
[0112] A rotation angle determination module is configured to determine the rotation angle of the first image in response to detecting the rotation;
[0113] The reminder module is configured to generate a reminder in response to detecting that the rotation angle meets a preset condition; and
[0114] The stitching module is configured to stitch the first image and the second image.
[0115] Example 13. The apparatus according to Example 12, wherein the rotation angle is the rotation angle of a ray diverging vertically upward from the center point of the first image, and the reminder generation module includes:
[0116] The correction module is configured to correct the user's rotation of the first image to a predetermined angle in response to the rotation angle satisfying the preset condition and in response to detecting that the user has stopped rotating the first image.
[0117] Example 14. The apparatus according to any one of Examples 12-13 further includes:
[0118] A first determining module is configured to, in response to detecting movement of a user on a first image on the canvas, determine whether the first image is aligned with a second image in the vertical and / or horizontal direction at the image edges; and
[0119] A first display module is configured to display a first auxiliary reference line in the vertical direction and / or the horizontal direction of the image edge in response to detecting the alignment.
[0120] Example 15. The apparatus according to any one of Examples 12-14 further includes:
[0121] The second determining module is configured to, in response to detecting a user's movement of a first image on the canvas, determine whether the first image and the second image are aligned on a line of symmetry in the vertical and / or horizontal directions of the images; and
[0122] The second display module is configured to display a second auxiliary reference line on the line of symmetry in the vertical and / or horizontal direction of the image when the alignment is not detected.
[0123] Example 16. The apparatus according to any one of Examples 12-15 further includes:
[0124] The third display module is configured to display a grid corresponding to multiple stitched images in a first area in response to a user clicking a first option on the canvas, wherein the multiple stitched images are displayed in the first area in the order they were imported.
[0125] Example 17. The apparatus according to any one of Examples 12-16 further includes
[0126] The fourth display module is configured to display a replace button in response to detecting a user's selection of the first image; and
[0127] The replacement module is configured to replace the first image with a third image in response to detecting a user's selection of the replacement button.
[0128] Example 18. The apparatus according to any one of Examples 12-16 further includes:
[0129] The swapping module is configured to swap the positions of the first image and the second image in the first area in response to detecting a long press movement of the user toward the second image.
[0130] Example 19. The apparatus according to any one of Examples 12-18 further includes:
[0131] The fifth display module, in response to detecting a user's click on the confirm button in the first area, displays the grid on the canvas;
[0132] Saving includes being configured to save the grid in response to detecting a user's exit button on the canvas; and
[0133] The sixth display module, in response to detecting a user's click on the saved grid, redisplays the grid in the first area.
[0134] Example 20. The apparatus according to any one of Examples 12-19, wherein the fifth display module comprises:
[0135] The seventh display module is configured to display a plurality of buttons at the four top corners of the first image in response to detecting a user's click on the first image. The plurality of buttons include at least two of a delete button, a replace button, a rotate button, and a copy button. The delete button is used to delete the first image, the replace button is used to replace the first image, the rotate button is used to rotate and / or scale the first image, and the copy button is used to copy the first image.
[0136] Example 21. The apparatus according to any one of Examples 12-20 further includes:
[0137] The eighth display module is configured to display a first area in response to detecting the presence of puzzle data, and to display a user interface corresponding to the puzzle data in the first area;
[0138] The ninth display module is configured to, in response to detecting that neither the puzzle data nor the puzzle index exists, restore and display the default settings for the canvas; and
[0139] The third determining module is configured to determine whether the image has been cropped in response to the detection of the existence of the puzzle index.
[0140] Example 22. The apparatus according to any one of Examples 12-21 further includes:
[0141] The update module is configured to update the coordinate information of the cropped image in response to detecting that the image has been cropped; and
[0142] The tenth display module is configured to display the cropped image on the first area.
[0143] Example 23. An electronic device comprising:
[0144] Processor; and
[0145] A memory coupled to the processor, the memory having instructions stored therein, which, when executed by the processor, cause the electronic device to perform actions, the actions including:
[0146] Detect the user's rotation of a first image on a canvas, the canvas including at least the first image and the second image to be stitched together;
[0147] In response to the detection of the rotation, the rotation angle of the first image is determined;
[0148] In response to detecting that the rotation angle meets a preset condition, a reminder is generated; and
[0149] The first image and the second image are stitched together.
[0150] Example 24. The electronic device according to Example 23, wherein the rotation angle is the rotation angle of a ray radiating vertically upward from the center point of the first image, and in response to detecting that the rotation angle parameter meets a preset condition, generating a reminder includes:
[0151] In response to the rotation angle satisfying the preset condition, and in response to detecting that the user has stopped rotating the first image, the user's rotation of the first image is corrected to a predetermined angle.
[0152] Example 25. The electronic device according to any one of Examples 23-24 further includes:
[0153] In response to detecting movement of a user on a first image on the canvas, determine whether the first image is aligned with the second image in the vertical and / or horizontal directions at the image edges; and
[0154] In response to the detection of the alignment, a first auxiliary reference line is displayed in the vertical direction and / or the horizontal direction of the image edge.
[0155] Example 26. The electronic device according to any one of Examples 23-25 further includes:
[0156] In response to detecting user movement on a first image on the canvas, determine whether the first image and the second image are aligned on a line of symmetry in the vertical and / or horizontal directions; and
[0157] In response to the detection of the alignment, a second auxiliary reference line is displayed on the line of symmetry in the vertical and / or horizontal directions of the image.
[0158] Example 27. The electronic device according to any one of Examples 23-26 further includes:
[0159] In response to a user clicking a first option on the canvas, a grid corresponding to multiple stitched images is displayed in a first area, wherein the multiple stitched images are displayed in the first area in the order they were imported.
[0160] Example 28. The electronic device according to any one of Examples 23-27 further includes
[0161] In response to detecting a user's selection of the first image, a replace button is displayed; and
[0162] In response to detecting a user's selection of the replace button, a third image is used to replace the first image.
[0163] Example 29. The electronic device according to any one of Examples 23-28 further includes:
[0164] In response to detecting a user's long press movement of the first image toward the second image, the positions of the first image and the second image are swapped in the first area.
[0165] Example 30. The electronic device according to any one of Examples 23-29 further includes:
[0166] In response to detecting a user's click on the "OK" button in the first area, the grid is displayed on the canvas;
[0167] In response to detecting a user's exit button on the canvas, the grid is saved; and
[0168] In response to detecting a user's click on the saved grid, the grid is redisplayed in the first area.
[0169] Example 31. An electronic device according to any one of Examples 23-30, wherein displaying the grid on the canvas in response to detecting a user's click on a confirm button in the first area comprises:
[0170] In response to detecting a user's click on the first image, a plurality of buttons are displayed at the four top corners of the first image. The plurality of buttons include at least two of a delete button, a replace button, a rotate button, and a copy button. The delete button is used to delete the first image, the replace button is used to replace the first image, the rotate button is used to rotate and / or scale the first image, and the copy button is used to copy the first image.
[0171] Example 32. The electronic device according to any one of Examples 23-31 further includes:
[0172] In response to the detection of the existence of puzzle data, a first area is displayed, and a user interface corresponding to the puzzle data is displayed in the first area;
[0173] In response to the detection that neither the puzzle data nor the puzzle index exists, the default settings for the canvas are restored and displayed; and
[0174] In response to the detection of the existence of the puzzle index, it is determined whether the image has been cropped.
[0175] Example 33. The electronic device according to any one of Examples 23-32 further includes:
[0176] In response to detecting that the image has been cropped, the coordinate information of the cropped image is updated; and
[0177] The cropped image is displayed in the first region.
[0178] Example 34. A computer-readable storage medium having stored thereon computer-executable instructions, wherein the computer-executable instructions are executed by a processor to implement the method according to any one of Examples 1 to 11.
[0179] Example 35. A computer program product tangibly stored on a computer-readable medium and comprising computer-executable instructions that, when executed by a device, cause the device to perform the method according to any one of Examples 1 to 11.
[0180] Although this disclosure has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A method for stitching images, comprising: Detect the user's rotation of a first image on a canvas, the canvas including the first image and a second image; In response to the detected rotation, the rotation angle of the first image is determined; A reminder is generated in response to the detection that the rotation angle meets a preset condition; as well as The first image and the second image are stitched together.
2. The method according to claim 1, wherein the rotation angle is the rotation angle of a ray radiating vertically upwards from the center point of the first image, and generating a reminder in response to detecting that the rotation angle parameter meets a preset condition includes: In response to the rotation angle satisfying the preset condition, and in response to detecting that the user has stopped rotating the first image, the user's rotation of the first image is corrected to a predetermined angle.
3. The method according to claim 1, further comprising: In response to detecting a user's movement of a first image on the canvas, it is determined whether the first image is aligned with the second image in the vertical and / or horizontal direction at the image edges; as well as In response to the detection of the alignment, a first auxiliary reference line is displayed in the vertical direction and / or the horizontal direction of the image edge.
4. The method according to claim 1, further comprising: In response to detecting a user's movement of a first image on the canvas, determine whether the first image and the second image are aligned on a line of symmetry in the vertical and / or horizontal directions of the images; as well as In response to the detection of the alignment, a second auxiliary reference line is displayed on the line of symmetry in the vertical and / or horizontal directions of the image.
5. The method according to claim 1, further comprising: In response to a user clicking a first option on the canvas, a grid corresponding to multiple stitched images is displayed in a first area, wherein the multiple stitched images are displayed in the first area in the order they were imported.
6. The method of claim 5, further comprising: In response to detecting a user's selection of the first image, a replace button is displayed; and In response to detecting a user's selection of the replace button, the first image is replaced with a third image.
7. The method according to claim 5, further comprising: In response to detecting a user's long press movement of the first image toward the second image, the positions of the first image and the second image are swapped in the first area.
8. The method according to claim 7, further comprising: In response to detecting a user's click on the "OK" button in the first area, the grid is displayed on the canvas; In response to detecting a user's exit button on the canvas, the grid is saved; as well as In response to detecting a user's click on the saved grid, the grid is redisplayed in the first area.
9. The method of claim 8, wherein displaying the grid on the canvas in response to detecting a user's click on a confirm button in the first area comprises: In response to detecting a user's click on the first image, a plurality of buttons are displayed at the four top corners of the first image. The plurality of buttons include at least two of a delete button, a replace button, a rotate button, and a copy button. The delete button is used to delete the first image, the replace button is used to replace the first image, the rotate button is used to rotate and / or scale the first image, and the copy button is used to copy the first image.
10. The method according to claim 1, further comprising: In response to the detection of the existence of puzzle data, a first area is displayed, and a user interface corresponding to the puzzle data is displayed in the first area; In response to the detection that the puzzle data and puzzle index are both missing, the default settings for the canvas are restored and displayed; as well as In response to the detection of the existence of the puzzle index, it is determined whether the image has been cropped.
11. The method of claim 10, further comprising: In response to detecting that the image has been cropped, the coordinate information of the cropped image is updated; as well as The cropped image is displayed in the first region.
12. An apparatus for stitching images, the apparatus comprising: A rotation detection module is configured to detect the user's rotation of a first image on a canvas, the canvas including at least the first image and a second image to be stitched together; A rotation angle determination module is configured to determine the rotation angle of the first image in response to detecting the rotation; The reminder module is configured to generate a reminder in response to detecting that the rotation angle meets a preset condition; as well as The stitching module is configured to stitch the first image and the second image.
13. An electronic device, comprising: processor; as well as A memory coupled to the processor, the memory having instructions stored therein, which, when executed by the processor, cause the electronic device to perform the method according to any one of claims 1 to 11.
14. A computer program product comprising computer-executable instructions, wherein the computer-executable instructions are executed by a processor to implement the method according to any one of claims 1 to 11.