An image processing method, apparatus, terminal device, and storage medium
By obtaining user configuration information and sorting and synthesising pictures, the problem of viewing multiple pictures on mobile devices is solved, achieving convenient image comparison and time-saving effects.
Patent Information
- Application Number
- CN202010501570.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-04
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2040-06-04
AI Technical Summary
When viewing pictures on mobile devices such as mobile phones, it is difficult for users to view multiple pictures at the same time to compare them, which is difficult and wastes time.
By obtaining the configuration information entered by the user, including the number of pictures, sorting method and display mode, the original pictures to be viewed are sorted and synthesized according to these configurations, and a synthetic image is generated for users to view.
It realizes convenient viewing of multiple pictures on mobile devices. Each operation of the user can display large pictures of the target original picture combination of the corresponding number of pictures, simplifying the operation and saving time.
Smart Images

Figure CN111858985B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular, to an image processing method, apparatus, terminal device, and storage medium. Background Art
[0002] In the prior art, when viewing images on mobile devices such as mobile phones, only single images can be scrolled for viewing. When a user wants to view multiple images simultaneously for comparison, they need to scroll repeatedly, which is rather laborious and time-consuming. Summary of the Invention
[0003] In view of the above problems, embodiments of the present invention are provided to provide an image processing method, apparatus, terminal device, and storage medium that overcome the above problems or at least partially solve the above problems.
[0004] In a first aspect, embodiments of the present invention provide an image processing method, the method comprising:
[0005] Obtain configuration information input by a user, the configuration information including the number of images, sorting method, and display mode, wherein the number of images is the number of original images to be viewed at one time;
[0006] Sort the original images to be viewed according to the sorting method to obtain a sorted sequence of original images;
[0007] Obtain target original images corresponding to the number of images from the sorted sequence of original images;
[0008] Synthesize the target original images corresponding to the number of images according to the display mode to obtain a synthesized image.
[0009] Optionally, the synthesizing the target original images corresponding to the number of images according to the display mode to obtain a synthesized image includes:
[0010] Process the target original images to obtain target thumbnails corresponding to the target original images;
[0011] Synthesize the target thumbnails corresponding to the number of images according to the display mode to obtain a synthesized image.
[0012] Optionally, the method further comprises:
[0013] Receive a magnification instruction input by a user;
[0014] Magnify the target thumbnails in the synthesized image according to the magnification instruction to obtain magnified target images;
[0015] Judge the number of pixel points in the central area of the magnified target picture;
[0016] If the number of pixel points in the central area is less than a preset value, replace the target thumbnail in the composite picture with the target original picture corresponding to the target thumbnail.
[0017] Optionally, the replacing the target thumbnail in the composite picture with the target original picture corresponding to the target thumbnail includes:
[0018] Obtain the picture address of the target thumbnail in the composite picture or the picture identifier corresponding to the target thumbnail;
[0019] According to the picture address of the target thumbnail or the picture identifier corresponding to the target thumbnail, look up the picture address of the target original picture corresponding to the target thumbnail in a pre-established database, where the pre-established database includes the corresponding relationship between the picture address of the target original picture, the picture address of the target thumbnail, and the picture identifier;
[0020] According to the picture address of the target original picture, obtain the target original picture corresponding to the picture address of the target original picture;
[0021] Replace the target thumbnail in the composite picture with the target original picture.
[0022] Optionally, the sorting method includes at least time sorting, picture name sorting, and picture size sorting; the sorting of the original pictures to be viewed according to the sorting method to obtain a sorted sequence of original pictures includes:
[0023] Obtain the time information of the pictures to be viewed;
[0024] Sort the original pictures to be viewed according to the magnitude of the difference between the time information of the pictures to be viewed and a preset relative time to obtain a sorted sequence of original pictures sorted by time;
[0025] Or
[0026] Obtain the picture names of the pictures to be viewed;
[0027] Serialize the picture names to obtain serial numbers corresponding to the picture names;
[0028] Sort the original pictures to be viewed according to the magnitudes of the serial numbers to obtain a sorted sequence of original pictures sorted by picture name;
[0029] Or
[0030] Obtain the memory size occupied by the pictures to be viewed;
[0031] Sort the original images to be viewed according to the memory size to obtain a sequence of original images sorted by image size.
[0032] In a second aspect, an embodiment of the present invention provides an image processing device, which includes:
[0033] An acquisition module, configured to acquire configuration information input by a user, where the configuration information includes the number of images, a sorting method, and a display mode. Among them, the number of images is the number of original images viewed at one time;
[0034] A sorting module, configured to sort the original images to be viewed according to the sorting method to obtain a sorted sequence of original images;
[0035] An intercepting module, configured to obtain target original images corresponding to the number of images from the sorted sequence of original images;
[0036] A synthesis module, configured to synthesize the target original images corresponding to the number of images according to the display mode to obtain a synthesized image.
[0037] Optionally, the synthesis module is configured to:
[0038] Process the target original images to obtain target thumbnails corresponding to the target original images;
[0039] Synthesize the target thumbnails corresponding to the number of images according to the display mode to obtain a synthesized image.
[0040] Optionally, the device further includes an adjustment module, and the adjustment module is configured to:
[0041] Receive a magnification instruction input by a user;
[0042] Magnify the target thumbnail in the synthesized image according to the magnification instruction to obtain a magnified target image;
[0043] Judge the number of pixel points in the central area of the magnified target image;
[0044] If the number of pixel points in the central area is less than a preset value, replace the target thumbnail in the synthesized image with the target original image corresponding to the target thumbnail.
[0045] Optionally, the adjustment module is configured to:
[0046] Obtain the image address of the target thumbnail in the synthesized image or the image identifier corresponding to the target thumbnail;
[0047] According to the picture address of the target thumbnail or the picture identifier corresponding to the target thumbnail, look up in the pre-established database the picture address of the target original picture corresponding to the target thumbnail, wherein the pre-established database includes the corresponding relationship between the picture address of the target original picture, the picture address of the target thumbnail, and the picture identifier;
[0048] According to the picture address of the target original picture, obtain the target original picture corresponding to the picture address of the target original picture;
[0049] Replace the target thumbnail in the composite picture with the target original picture.
[0050] Optionally, the sorting method at least includes time sorting, picture name sorting, and picture size sorting; the sorting module is used for:
[0051] Obtain the time information of the picture to be viewed;
[0052] Sort the original pictures to be viewed according to the magnitude of the difference between the time information of the pictures to be viewed and the preset relative time, and obtain the sequence of original pictures sorted by time;
[0053] Or
[0054] Obtain the picture name of the picture to be viewed;
[0055] Serialize the picture name to obtain the serial number corresponding to the picture name;
[0056] Sort the original pictures to be viewed according to the magnitude of the serial number, and obtain the sequence of original pictures sorted by picture name;
[0057] Or
[0058] Obtain the memory size occupied by the picture to be viewed;
[0059] Sort the original pictures to be viewed according to the memory size, and obtain the sequence of original pictures sorted by picture size.
[0060] In a third aspect, an embodiment of the present invention provides a terminal device, including: at least one processor and a memory;
[0061] The memory stores a computer program; the at least one processor executes the computer program stored in the memory to implement the picture processing method provided in the first aspect.
[0062] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed, the picture processing method provided in the first aspect is implemented.
[0063] The embodiments of the present invention have the following advantages:
[0064] The picture processing method, device, terminal device and storage medium provided by the embodiments of the present invention include obtaining configuration information input by a user, where the configuration information includes the number of pictures, sorting method, and display mode. Among them, the number of pictures is the number of original pictures viewed at one time; sorting the original pictures to be viewed according to the sorting method to obtain a sorted sequence of original pictures; obtaining target original pictures corresponding to the number of pictures from the sorted sequence of original pictures; and synthesizing the target original pictures corresponding to the number of pictures according to the display mode to obtain a synthesized picture. In this way, multiple target original pictures can be displayed on one large picture. When the user views the pictures, each operation will display a large picture composed of a corresponding number of target original pictures, which is convenient for the user to make comparisons, with simple operations and time savings. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 is a flowchart of the steps of an embodiment of a picture processing method of the present invention;
[0066] Figure 2 is a flowchart of the steps of another embodiment of a picture processing method of the present invention;
[0067] Figure 3 is a block diagram of the structure of an embodiment of a picture processing system of the present invention;
[0068] Figure 4 is a block diagram of the structure of an embodiment of a picture processing device of the present invention;
[0069] Figure 5 is a schematic diagram of the structure of a terminal device of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0070] To make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0071] An embodiment of the present invention provides a picture processing method for combined display of pictures. The execution subject of this embodiment is a picture processing device, which is set on a terminal device. Among them, the terminal device can be a computer, a tablet computer, a mobile phone terminal, etc.
[0072] Referring to Figure 1 , a flowchart of the steps of an embodiment of a picture processing method of the present invention is shown, which specifically may include the following steps:
[0073] S101. Obtain the configuration information input by the user. The configuration information includes the number of pictures, the sorting method, and the display mode. Among them, the number of pictures is the number of original pictures viewed at one time;
[0074] Specifically, an embodiment of the present invention provides a picture viewer installed on a terminal device. The user inputs configuration information through the picture viewer. For example, the number of original pictures viewed at one time, which sorting method to use for the original pictures, and which method to use for display finally, etc. Among them, the number of original pictures viewed at one time can be set according to the user's needs, which can be 2 pictures or 4 pictures, etc.; options for the sorting method are provided on the picture viewer, such as sorting by time, sorting by picture name, and sorting by picture size, etc., and the user can select according to the needs; multiple display modes are preset on the picture viewer, such as setting two rows, with one picture on the top and two pictures on the bottom, or two pictures on the top and one picture on the bottom, or two pictures on the top and two pictures on the bottom, etc., and the user can select the display method according to the needs.
[0075] S102. Sort the original pictures to be viewed according to the sorting method to obtain a sorted sequence of original pictures;
[0076] Specifically, after the terminal device obtains the configuration information input by the user, it sorts the original pictures to be viewed according to the sorting method selected by the user. For example, sort the original pictures to be viewed according to time, or sort the original pictures to be viewed according to the picture name, or sort the original pictures to be viewed according to the picture size, to obtain a sorted sequence of original pictures.
[0077] S103. Obtain the target original pictures corresponding to the number of pictures from the sorted sequence of original pictures;
[0078] Specifically, the terminal device extracts the target original pictures corresponding to the number of pictures from the sorted sequence of original pictures. For example, if the user inputs that the number of original pictures viewed at one time is 3, then 3 target original pictures are extracted from the sorted sequence of original pictures.
[0079] S104. Synthesize the target original pictures corresponding to the number of pictures according to the display mode to obtain a synthesized picture.
[0080] Specifically, the terminal device synthesizes 3 target original pictures according to the display mode, such as the one - up - two - down mode, and displays them. When the user operates again, if it is a mobile terminal, it can be sliding the screen, then the synthesized picture of the next 3 target original pictures in the sorted sequence of original pictures is displayed, and the subsequent operations repeat the above steps; if it is a computer terminal, it can be that the user clicks the mouse, and then the above steps are executed to display the synthesized picture of the next 3 target original pictures.
[0081] The image processing method provided by an embodiment of the present invention obtains configuration information input by a user, where the configuration information includes the number of images, the sorting method, and the display mode. Among them, the number of images is the number of original images viewed at one time; sorts the original images to be viewed according to the sorting method to obtain a sorted sequence of original images; obtains target original images corresponding to the number of images from the sorted sequence of original images; synthesizes the target original images corresponding to the number of images according to the display mode to obtain a synthesized image. In this way, multiple target original images can be displayed on one large image. When the user views the images, each operation will display a large image composed of a corresponding number of target original image combinations, which is convenient for the user to make comparisons, with simple operations and time savings.
[0082] Another embodiment of the present invention further supplements and explains the image processing method provided in the above embodiment.
[0083] As Figure 2 shown, a flowchart of steps of another embodiment of the image processing method of the present invention is shown. The image processing method includes:
[0084] S201. Obtain configuration information input by a user, where the configuration information includes the number of images, the sorting method, and the display mode. Among them, the number of images is the number of original images viewed at one time;
[0085] Since step S201 is the same as step S101 in the embodiment shown in Figure 1 . Step S101 has been described in detail in Figure 1 , so step S201 will not be elaborated here.
[0086] Specifically, the sorting method at least includes sorting by time, sorting by image name, and sorting by image size; the step of sorting the original images to be viewed according to the sorting method to obtain a sorted sequence of original images can be executed by any one or more of the following three implementation manners, which are not specifically limited in the embodiments of the present invention.
[0087] As an optional implementation manner, S2021. Obtain the time information of the images to be viewed;
[0088] Sort the original images to be viewed according to the magnitude of the difference between the time information of the images to be viewed and a preset relative time to obtain a sequence of original images sorted by time.
[0089] Specifically, a relative time is preset in advance, the time information of the images to be viewed is compared with the preset relative time to obtain a plurality of time differences, and the original images to be viewed are sorted according to the magnitude of the time differences.
[0090] Exemplarily, the preset relative time is January 1, 1970, the time information of the obtained picture is January 1, 2020, calculate the difference between January 1, 2020 and January 1, 1970, convert it into seconds, and calculate the time information of multiple pictures in this way, and sort the differences.
[0091] As another alternative implementation, S2022: Obtain the picture name of the picture to be viewed;
[0092] Serialize the picture name to obtain a serial number corresponding to the picture name;
[0093] Sort the original pictures to be viewed according to the size of the serial number to obtain the original picture sequence sorted by picture name;
[0094] Specifically, the terminal device serializes the picture name, that is, encodes the picture name, and forms a serial number after encoding, and sorts the original pictures according to the size of the serial number.
[0095] As yet another alternative implementation, S2023: Obtain the memory size occupied by the picture to be viewed;
[0096] Sort the original pictures to be viewed according to the memory size to obtain the original picture sequence sorted by picture size.
[0097] S203: Obtain the target original pictures corresponding to the number of pictures from the sorted original picture sequence;
[0098] S204: Process the target original pictures to obtain target thumbnails corresponding to the target original pictures;
[0099] Specifically, in order to reduce the size of the generated composite picture, the terminal device processes the determined target original pictures. It can use a third-party thumbnail software to generate target thumbnails from the target original pictures, or through an algorithm, that is, reduce the length and width of the picture according to a preset reduction ratio to obtain target thumbnails corresponding to the target original pictures, such as generating 512*512, 256*256, 256*512, etc., which are not specifically limited in the embodiments of the present invention.
[0100] S205: Synthesize the target thumbnails corresponding to the number of pictures according to the display mode to obtain a composite picture.
[0101] Specifically, the terminal device synthesizes the target thumbnails according to the display mode to generate a composite picture.
[0102] S206: Receive the zoom-in instruction input by the user;
[0103] When the user wants to view a certain thumbnail in the synthesized image, the terminal device receives the zoom-in instruction input by the user.
[0104] S207. According to the zoom-in instruction, zoom in on the target thumbnail in the synthesized image to obtain an enlarged target image.
[0105] Specifically, the terminal device zooms in on the target thumbnail in the synthesized image according to the zoom-in instruction to obtain an enlarged target image. Correspondingly, the other thumbnails in the synthesized image are correspondingly reduced. Exemplarily, the synthesized image includes 3 thumbnails, namely thumbnail Figure 1 , thumbnail Figure 2 and thumbnail Figure 3 . When zooming in on thumbnail Figure 1 , thumbnail Figure 2 and thumbnail Figure 3 are correspondingly reduced; when zooming in on thumbnail Figure 2 , thumbnail Figure 1 and thumbnail Figure 3 are correspondingly reduced.
[0106] S208. Judge the number of pixel points in the central area of the enlarged target image.
[0107] S209. If the number of pixel points in the central area is less than a preset value, replace the target thumbnail in the synthesized image with the target original image corresponding to the target thumbnail.
[0108] Specifically, when zooming in on the thumbnail, if the number of pixel points in the central area is less than the preset value, it means that the enlarged image of the thumbnail is blurred, and the target thumbnail needs to be replaced with the target original image. Specifically, obtain the image address of the target thumbnail in the synthesized image or the image identifier corresponding to the target thumbnail.
[0109] According to the image address of the target thumbnail or the image identifier corresponding to the target thumbnail, search in the pre-established database for the image address of the target original image corresponding to the target thumbnail. Among them, the pre-established database includes the corresponding relationship between the image address of the target original image, the image address of the target thumbnail, and the image identifier; the target original image and the target thumbnail are saved on the terminal device, and the image addresses of the target original image and the target thumbnail are respectively the addresses of a certain folder in the memory space of the terminal device.
[0110] According to the image address of the target original image, obtain the target original image corresponding to the image address of the target original image.
[0111] Replace the target thumbnail in the synthesized image with the target original image.
[0112] Figure 3 It is a structural block diagram of an embodiment of an image processing system of the present invention, including an image counting module 301, a sorting module 302, a layout module 303, and a display module 304. Specifically:
[0113] The user inputs the number of images, the sorting method, and the display method through an image viewer. The terminal device calls the image counting module 301 to obtain the number of images, that is, the number of images taken at one time, n. The value of the number of images is cached in the storage medium. The sorting module 302 is called to re-sort the images. At the same time, the layout module 303 provides a corresponding layout model according to the number of images input by the user, that is, the number of images. After the user selects the layout model, the layout module 303 extracts the corresponding number of images from the sorted images according to the number of images input by the user and the layout model, that is, the display method, and arranges the images according to the layout model. After the layout is completed, a large image will be generated, and then this large image will be displayed.
[0114] The generation method of the large image is as follows:
[0115] 1. Generate a thumbnail for each original image.
[0116] 2. Then generate an image identifier for each thumbnail, that is, GUID (Globally Unique Identifier), which is a binary digital identifier with a length of 128 bits generated by an algorithm.
[0117] 3. Then store this GUID, the original image address, and the thumbnail address in the database of the image viewer.
[0118] 4. The image viewer combines the thumbnails to generate a large image.
[0119] 5. When the user operates a certain thumbnail in the large image alone, the original image will be retrieved from the database to replace the thumbnail, which ensures the clarity of the image.
[0120] 6. Subsequently, the above process will be repeated every time the user flips through the images.
[0121] Exemplarily, first, the user opens the image viewer, selects the sorting method, inputs the number of images n to be viewed simultaneously, and selects a photo display template. Then the terminal device will select n images nearby according to the sorting method selected by the user, and combine these n images into a large image according to the display template selected by the user. Subsequently, the user will automatically flip through n images every time they flip through the images.
[0122] For example, when the user opens the image viewer, the images are sorted by time first. Then, when the user inputs to preview 3 images simultaneously, the terminal device will take out 3 adjacent images each time to form a large image. The program will build in some templates for the user to choose the arrangement of the three large images. For example, when there are 3 images, it can be 1 on top and 2 at the bottom, or 1 on the left and 2 on the right, etc. When the user flips through each time, they will see the large image composed of three images combined. Each subsequent flip will show the three combined images in sequence.
[0123] It should be noted that for the method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the embodiments of the present invention are not limited by the described action sequences, because according to the embodiments of the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily essential for the embodiments of the present invention.
[0124] The image processing method provided by the embodiments of the present invention includes: obtaining configuration information input by the user, where the configuration information includes the number of images, sorting method, and display mode. Here, the number of images is the number of original images viewed at one time; sorting the original images to be viewed according to the sorting method to obtain a sorted sequence of original images; obtaining target original images corresponding to the number of images from the sorted sequence of original images; and synthesizing the target original images corresponding to the number of images according to the display mode to obtain a synthesized image. In this way, multiple target original images can be displayed on one large image. When the user views the images, each operation will display a large image composed of the corresponding number of target original images, which is convenient for the user to make comparisons, with simple operations and time savings.
[0125] Another embodiment of the present invention provides an image processing device for executing the image processing method provided by the above embodiments.
[0126] Referring to Figure 4 , a structural block diagram of an embodiment of an image processing device of the present invention is shown, which may specifically include the following modules: an acquisition module 401, a sorting module 402, a truncation module 403, and a synthesis module 404, where:
[0127] The acquisition module 401 is used to obtain configuration information input by the user, where the configuration information includes the number of images, sorting method, and display mode. Here, the number of images is the number of original images viewed at one time;
[0128] The sorting module 402 is used to sort the original images to be viewed according to the sorting method to obtain a sorted sequence of original images;
[0129] The extraction module 403 is used to obtain target original pictures corresponding to the number of pictures from the sorted original picture sequence;
[0130] The synthesis module 404 is used to synthesize the target original pictures corresponding to the number of pictures according to the display mode to obtain a synthesized picture.
[0131] The picture processing device provided by the embodiment of the present invention obtains configuration information input by a user, where the configuration information includes the number of pictures, a sorting method, and a display mode. Here, the number of pictures is the number of original pictures viewed at one time; sorts the original pictures to be viewed according to the sorting method to obtain a sorted original picture sequence; obtains target original pictures corresponding to the number of pictures from the sorted original picture sequence; synthesizes the target original pictures corresponding to the number of pictures according to the display mode to obtain a synthesized picture. In this way, multiple target original pictures can be displayed on one large picture. When the user views the pictures, each operation will display a large picture composed of the corresponding number of target original picture combinations, which is convenient for the user to make comparisons, with simple operations and time saving.
[0132] Another embodiment of the present invention further supplements the picture processing device provided in the above embodiment.
[0133] Optionally, the synthesis module 404 is used to:
[0134] Process the target original pictures to obtain target thumbnails corresponding to the target original pictures;
[0135] Synthesize the target thumbnails corresponding to the number of pictures according to the display mode to obtain a synthesized picture.
[0136] Optionally, the device further includes an adjustment module, and the adjustment module is used to:
[0137] Receive a magnification instruction input by the user;
[0138] Magnify the target thumbnails in the synthesized picture according to the magnification instruction to obtain magnified target pictures;
[0139] Judge the number of pixel points in the central area of the magnified target picture;
[0140] If the number of pixel points in the central area is less than a preset value, replace the target thumbnails in the synthesized picture with the target original pictures corresponding to the target thumbnails.
[0141] Optionally, the adjustment module is used to:
[0142] Obtain the picture address of the target thumbnails in the synthesized picture or the picture identifier corresponding to the target thumbnails;
[0143] According to the picture address of the target thumbnail or the picture identifier corresponding to the target thumbnail, look up in the pre-established database the picture address of the target original picture corresponding to the target thumbnail, wherein the pre-established database includes the correspondence between the picture address of the target original picture, the picture address of the target thumbnail, and the picture identifier;
[0144] According to the picture address of the target original picture, obtain the target original picture corresponding to the picture address of the target original picture;
[0145] Replace the target thumbnail in the composite picture with the target original picture.
[0146] Optionally, the sorting method at least includes time sorting, picture name sorting, and picture size sorting; the sorting module 402 is used for:
[0147] Obtain the time information of the picture to be viewed;
[0148] Sort the original pictures to be viewed according to the magnitude of the difference between the time information of the pictures to be viewed and the preset relative time, and obtain the sequence of original pictures sorted by time;
[0149] Or
[0150] Obtain the picture name of the picture to be viewed;
[0151] Serialize the picture name to obtain the serial number corresponding to the picture name;
[0152] Sort the original pictures to be viewed according to the magnitude of the serial number, and obtain the sequence of original pictures sorted by picture name;
[0153] Or
[0154] Obtain the memory size occupied by the picture to be viewed;
[0155] Sort the original pictures to be viewed according to the memory size, and obtain the sequence of original pictures sorted by picture size. It should be noted that in this embodiment, each implementable method can be implemented independently, or can be combined in any combination manner without conflict. This application does not make a limitation.
[0156] For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for the related parts, please refer to the partial description of the method embodiment.
[0157] The picture processing device provided by an embodiment of the present invention obtains configuration information input by a user, where the configuration information includes the number of pictures, the sorting method, and the display mode. Among them, the number of pictures is the number of original pictures viewed at one time; sorts the original pictures to be viewed according to the sorting method to obtain a sorted sequence of original pictures; obtains target original pictures corresponding to the number of pictures from the sorted sequence of original pictures; synthesizes the target original pictures corresponding to the number of pictures according to the display mode to obtain a synthesized picture. In this way, multiple target original pictures can be displayed on one large picture. When the user views pictures, each operation will display a large picture composed of the corresponding number of target original pictures, which is convenient for the user to make comparisons, with simple operations and time savings.
[0158] Another embodiment of the present invention provides a terminal device for executing the picture processing method provided by the above embodiment.
[0159] Figure 5 is a schematic structural diagram of a terminal device of the present invention, as Figure 5 shown, the terminal device includes: at least one processor 501 and a memory 502;
[0160] The memory stores a computer program; the at least one processor executes the computer program stored in the memory to implement the picture processing method provided by the above embodiment.
[0161] The terminal device provided by this embodiment obtains configuration information input by a user, where the configuration information includes the number of pictures, the sorting method, and the display mode. Among them, the number of pictures is the number of original pictures viewed at one time; sorts the original pictures to be viewed according to the sorting method to obtain a sorted sequence of original pictures; obtains target original pictures corresponding to the number of pictures from the sorted sequence of original pictures; synthesizes the target original pictures corresponding to the number of pictures according to the display mode to obtain a synthesized picture. In this way, multiple target original pictures can be displayed on one large picture. When the user views pictures, each operation will display a large picture composed of the corresponding number of target original pictures, which is convenient for the user to make comparisons, with simple operations and time savings.
[0162] Another embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed, it implements the picture processing method provided by any of the above embodiments.
[0163] A computer-readable storage medium according to this embodiment obtains configuration information input by a user. The configuration information includes the number of pictures, the sorting method, and the display mode. Among them, the number of pictures is the number of original pictures viewed at one time; according to the sorting method, the original pictures to be viewed are sorted to obtain a sorted sequence of original pictures; target original pictures corresponding to the number of pictures are obtained from the sorted sequence of original pictures; and the target original pictures corresponding to the number of pictures are synthesized according to the display mode to obtain a synthesized picture. In this way, multiple target original pictures can be displayed on a large picture. When the user views the pictures, each operation will display a large picture composed of a corresponding number of target original picture combinations, which is convenient for the user to make comparisons, with simple operations and time savings.
[0164] Each embodiment in this specification is described in a progressive manner. The key point of each embodiment is the difference from other embodiments. The same or similar parts among the embodiments can be referred to each other.
[0165] Those skilled in the art should understand that the embodiments of the present invention can be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention can take the form of completely hardware embodiments, completely software embodiments, or embodiments combining software and hardware aspects. Moreover, the embodiments of the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.
[0166] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of methods, electronic devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of processes and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing electronic devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing electronic devices generate a device for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0167] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing electronic devices to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0168] These computer program instructions can also be loaded onto a computer or other programmable electronic data processing device, so that a series of operation steps are executed on the computer or other programmable electronic device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable electronic device provide for implementing the steps of the function specified in a process Figure 1 a process or multiple processes and / or blocks Figure 1 or steps of the function specified in multiple blocks.
[0169] Although the preferred embodiments of the embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concepts. Therefore, the appended claims are intended to be construed as including the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present invention.
[0170] Finally, it should also be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or electronic device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or electronic device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or electronic device comprising the element.
[0171] The above has introduced in detail a picture processing method and a picture processing device provided by the present invention. Specific examples are used in this article to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A method for image processing, characterized in that, The method includes: Obtaining configuration information input by a user, where the configuration information includes the number of pictures, sorting method, and display mode. Among them, the number of pictures is the number of original pictures viewed at one time; Sorting the original pictures to be viewed according to the sorting method to obtain a sorted sequence of original pictures; Obtaining target original pictures corresponding to the number of pictures from the sorted sequence of original pictures; Synthesizing the target original pictures corresponding to the number of pictures according to the display mode to obtain a synthesized picture; The method further includes: Receiving a magnification instruction input by the user; Magnifying the target thumbnail in the synthesized picture according to the magnification instruction to obtain a magnified target picture; the target thumbnail is obtained by processing the target original picture; Judging the number of pixel points in the central area of the magnified target picture; If the number of pixel points in the central area is less than a preset value, replacing the target thumbnail in the synthesized picture with the target original picture corresponding to the target thumbnail; the replacing the target thumbnail in the synthesized picture with the target original picture corresponding to the target thumbnail includes: Obtaining the picture address of the target thumbnail in the synthesized picture or the picture identifier corresponding to the target thumbnail; According to the picture address of the target thumbnail or the picture identifier corresponding to the target thumbnail, searching in a pre-established database for the picture address of the target original picture corresponding to the target thumbnail, where the pre-established database includes the corresponding relationship between the picture address of the target original picture, the picture address of the target thumbnail, and the picture identifier; Obtaining the target original picture corresponding to the picture address of the target original picture according to the picture address of the target original picture; Replacing the target thumbnail in the synthesized picture with the target original picture.
2. The method according to claim 1, wherein The synthesizing the target original pictures corresponding to the number of pictures according to the display mode to obtain a synthesized picture includes: Processing the target original pictures to obtain target thumbnails corresponding to the target original pictures; Synthesizing the target thumbnails corresponding to the number of pictures according to the display mode to obtain a synthesized picture.
3. The method according to claim 1, characterized in that The sorting method at least includes sorting by time, sorting by picture name, and sorting by picture size; the sorting the original pictures to be viewed according to the sorting method to obtain a sorted sequence of original pictures includes: Obtaining the time information of the original pictures to be viewed; Sorting the original pictures to be viewed according to the magnitude of the difference between the time information of the original pictures to be viewed and a preset relative time to obtain a sorted sequence of original pictures sorted by time; Or Obtaining the picture names of the original pictures to be viewed; Serializing the picture names to obtain serial numbers corresponding to the picture names; Sorting the original pictures to be viewed according to the magnitudes of the serial numbers to obtain a sorted sequence of original pictures sorted by picture name; Or Obtaining the memory size occupied by the original pictures to be viewed; Sort the original images to be viewed according to the memory size to obtain a sequence of original images sorted by image size.
4. An image processing device, characterized in that, The device includes: An acquisition module, configured to acquire configuration information input by a user, where the configuration information includes the number of images, a sorting method, and a display mode, and where the number of images is the number of original images to be viewed at one time; A sorting module, configured to sort the original images to be viewed according to the sorting method to obtain a sorted sequence of original images; An interception module, configured to obtain target original images corresponding to the number of images from the sorted sequence of original images; A synthesis module, configured to synthesize the target original images corresponding to the number of images according to the display mode to obtain a synthesized image; The device further includes an adjustment module, and the adjustment module is configured to: Receive a magnification instruction input by a user; Magnify a target thumbnail in the synthesized image according to the magnification instruction to obtain a magnified target image; the target thumbnail is obtained by processing the target original image; Judge the number of pixel points in the central area of the magnified target image; If the number of pixel points in the central area is less than a preset value, replace the target thumbnail in the synthesized image with the target original image corresponding to the target thumbnail; The adjustment module is configured to: Obtain the image address of the target thumbnail in the synthesized image or the image identifier corresponding to the target thumbnail; According to the image address of the target thumbnail or the image identifier corresponding to the target thumbnail, look up the image address of the target original image corresponding to the target thumbnail in a pre-established database, where the pre-established database includes the corresponding relationship between the image address of the target original image, the image address of the target thumbnail, and the image identifier; Obtain the target original image corresponding to the image address of the target original image according to the image address of the target original image; Replace the target thumbnail in the synthesized image with the target original image.
5. The device according to claim 4, characterized in that, The synthesis module is configured to: Process the target original image to obtain a target thumbnail corresponding to the target original image; Synthesize the target thumbnails corresponding to the number of images according to the display mode to obtain a synthesized image.
6. A terminal device, characterized in that, Includes: At least one processor and a memory; The memory stores a computer program; The at least one processor executes the computer program stored in the memory to implement the image processing method according to any one of claims 1-3.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed, it implements the image processing method according to any one of claims 1-3.
Citation Information
Patent Citations
Image processing method and device and intelligent terminal
CN107015998A
Picture interaction method and device, terminal and storage medium
CN110196673A