Picture sorting method and apparatus, terminal device, and storage medium

By acquiring and calculating the color values ​​of images, and utilizing RGB-HSL conversion and sorting of multiple color values, the problem of visually uncomfortable image sorting in existing technologies has been solved, and user-friendly color sorting and filtering functions have been achieved.

CN113961741BActive Publication Date: 2026-02-13SPREADTRUM COMM (TIANJIN) INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111269018.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-29
Publication Date
2026-02-13
Estimated Expiration
2041-10-29

AI Technical Summary

Technical Problem

Existing image sorting methods mainly rely on timelines or storage size, which cannot meet users' needs for visual comfort and aesthetics, especially for users who value organization and aesthetics, as there is a lack of accurate and convenient color sorting methods.

Method used

By obtaining the color values ​​of the target image, converting RGB values ​​to HSL values, calculating standard hue values, hue error values, standard saturation values, and brightness values, obtaining the sorting order according to the preset image color value sorting method, and sorting and displaying the images on the terminal device.

Benefits of technology

It achieves a visually comfortable and balanced sorting of images, making it easy for users to quickly categorize and filter by color, thus improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113961741B_ABST
    Figure CN113961741B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a picture sorting method and device, terminal equipment and storage medium. The picture sorting method comprises: obtaining picture color values of each target picture; obtaining sorting orders of the target pictures according to the picture color values of the target pictures according to a preset picture color value sorting mode; and sorting the target pictures according to the sorting orders.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Embodiments of the present application relate to the technical field of picture sorting, and in particular to a picture sorting method and device, a terminal device, and a storage medium.

[0002] Existing picture sorting methods mainly arrange pictures according to a time line, such as from oldest to newest (newest to oldest), or according to the storage size of the pictures, or according to the source of the pictures. For users who focus on visual perception and focus on organizing and aesthetics, there is an urgent need to provide a sorting method that can achieve visual comfort and balance when pictures are displayed.

[0003] Embodiments of the present application provide a picture sorting method, device, terminal device, and storage medium, which can improve user visual comfort and balance for picture display.

[0004] In a first aspect, embodiments of the present application provide a picture sorting method applied to a terminal device having a display screen, the terminal device being preconfigured with a picture color value sorting method, and the method comprising:

[0005] In response to a picture sorting instruction, obtaining picture color values of target pictures, the picture color values being used to represent the color situation of each target picture, and the target pictures being part or all of the stored pictures;

[0006] According to the preconfigured picture color value sorting method, obtaining the sorting order of the target pictures according to the picture color values of each target picture;

[0007] Sorting the target pictures according to the sorting order.

[0008] The first aspect has the following beneficial effects: in the above picture sorting method, by obtaining the picture color values of each target picture, obtaining the sorting order of the target pictures according to the picture color values of each target picture according to the preconfigured picture color value sorting method, and sorting the target pictures according to the sorting order, the method facilitates users to quickly classify pictures of the same type by color.

[0009] In a possible implementation, the picture color values include standard hue values, the standard hue values being used to represent the hue values of each target picture, and the obtaining of the picture color values of the target pictures comprising:

[0010] ​​​performing the following steps on each of the target pictures to obtain a standard hue value of each of the target pictures: obtaining an RGB value of each pixel in the target picture and converting the RGB value into a color mode HSL value of each pixel, the HSL value of each pixel in the target picture comprising a hue value of each pixel, and performing a first operation on the hue values in the HSL values of all pixels of the target picture to obtain the standard hue value of the target picture;

[0011] The obtaining of the sorting order of each of the target pictures according to the picture color value of each of the target pictures in the preset picture color value sorting manner comprises:

[0012] The obtaining of the sorting order of each of the target pictures according to the picture color value of each of the target pictures in the preset picture color value sorting manner comprises:

[0013] In a possible implementation, the picture color value further comprises a hue error value, the hue error value being used to represent an error value of the hue value in the HSL value of each pixel of each of the target pictures and the standard hue value, and the obtaining of the picture color value of each of the target pictures further comprises:

[0014] performing the following steps on each of the target pictures to obtain a hue error value of each of the target pictures: performing a second operation on the standard hue value and the hue value in the HSL value of each pixel of the target picture to obtain the hue error value;

[0015] The obtaining of the sorting order of each of the target pictures according to the picture color value of each of the target pictures in the preset picture color value sorting manner further comprises:

[0016] When the standard hue value is equal, obtaining a sorting order of each of the target pictures according to a size of the hue error value.

[0017] In a possible implementation, the picture color value further comprises a standard saturation value and a standard brightness value, the standard saturation value being used to represent a saturation value of each of the target pictures, and the standard brightness value being used to represent a brightness value of each of the target pictures, and the obtaining of the picture color value of each of the target pictures further comprises:

[0018] performing the following steps on each of the target pictures to obtain a standard saturation value and a standard brightness value of each of the target pictures: the HSL value of each pixel of the target picture comprising a saturation value and a brightness value of each pixel, performing a third operation on the saturation values in the HSL values of all pixels of the target picture to obtain the standard saturation value of the target picture, and performing a fourth operation on the brightness values in the HSL values of all pixels of the target picture to obtain the standard brightness value of the target picture;

[0019] The sorting order of the target pictures according to the preset picture color value sorting mode is further obtained according to the picture color value of each target picture.

[0020] When the hue error value is equal, the sorting order of the target pictures according to at least one of the following modes is obtained: sorting according to the size of the standard saturation value, sorting according to the size of the standard brightness value, and sorting according to the early or late of the picture creation time.

[0021] In a possible implementation, the method further comprises:

[0022] Displaying part or all of the sorted target pictures on the display interface of the terminal device.

[0023] In a possible implementation, the method further comprises:

[0024] Obtaining a first picture screening instruction, the first picture screening instruction comprising a first hue value for picture screening;

[0025] In response to the first picture screening instruction, screening a first candidate picture with the standard hue value being the first hue value from the target pictures, and displaying the first candidate picture on the display interface of the terminal device according to the sorting order.

[0026] In a possible implementation, the method further comprises: when there is no first candidate picture with the standard hue value being the first hue value in the target pictures, converting the first hue value into a second hue value, the second hue value being adjacent to the first hue value and corresponding to a hue value of the target pictures, taking the target picture with the standard hue value being the second hue value as the first candidate picture, and displaying the first candidate picture on the display interface of the terminal device according to the sorting order.

[0027] In a possible implementation, the display interface of the terminal device displays a hue screening graph with a hue color gradient, the order of the hue color gradient of the hue screening graph corresponding to the sorting order of the standard hue value in the preset picture color value sorting mode, and the obtaining of the first picture screening instruction comprising:

[0028] When a user selects a target hue color in the hue screening graph, the first picture screening instruction comprising a first hue value corresponding to the target hue color is obtained.

[0029] In a possible implementation, the method further comprises:

[0030] Obtaining a second picture screening instruction, the second picture screening instruction comprising a first saturation value and a first brightness value for picture screening.

[0031] In response to the second picture screening instruction, the range of the first hue value is expanded to a third hue value range, the target picture with the standard hue value in the third hue value range is taken as a second candidate picture, the range of the first saturation value is expanded to a second saturation value range, the range of the first brightness value is expanded to a second brightness value range, the target picture with the standard saturation value in the second saturation value range and the standard brightness value in the second brightness value range is screened out from the second candidate picture as a third candidate picture, and the third candidate picture is displayed on the display interface of the terminal device in the sorting order.

[0032] In a possible implementation, the display interface of the terminal device displays a saturation and brightness screening graph with color gradient, the saturation color gradient range in the saturation and brightness screening graph corresponds to the screening range of the saturation value, and the brightness color gradient range corresponds to the screening range of the brightness value, and the second picture screening instruction includes:

[0033] When the user selects a target saturation color and a target brightness color in the saturation and brightness screening graph, the second image picture screening instruction is obtained, and the second picture screening instruction includes the first saturation value corresponding to the target saturation color and the first brightness value corresponding to the target brightness color.

[0034] In a second aspect, the embodiments of the present application provide a picture sorting device applied to a terminal device with a display screen, the terminal device stores a plurality of pictures, the terminal device is preconfigured with a picture color value sorting manner, and the device includes:

[0035] A picture color acquisition module is configured to acquire picture color values of target pictures in response to a picture sorting instruction, the picture color values are used to represent color conditions of each of the target pictures, and the target pictures are part or all of the stored plurality of pictures;

[0036] A sorting order acquisition module is configured to acquire sorting orders of the target pictures according to the picture color values of each of the target pictures in the preconfigured picture color value sorting manner;

[0037] A picture order sorting module is configured to sort the target pictures according to the sorting orders.

[0038] In a possible implementation, the picture color values include a standard hue value, the standard hue value is used to represent a hue value of each of the target pictures, and the picture color acquisition module includes:

[0039] The standard hue value obtaining unit is configured to obtain a standard hue value of each target picture by performing the following steps on each target picture: obtaining the RGB value of each pixel in the target picture and converting the RGB value into the color mode HSL value of each pixel, wherein the HSL value of each pixel in the target picture comprises the hue value of each pixel, and performing a first operation on the hue value in the HSL value of all pixels in the target picture to obtain the standard hue value of the target picture.

[0040] The sorting order obtaining module comprises:

[0041] The standard hue value sorting unit is configured to obtain the sorting order of the target picture according to the size of the standard hue value.

[0042] In a possible implementation, the picture color value further comprises a hue error value, the hue error value is used to represent the error value of the hue value in the HSL value of all pixels in each target picture and the standard hue value, and the picture color obtaining module further comprises:

[0043] The hue error value obtaining unit is configured to obtain the hue error value of each target picture by performing the following steps on each target picture: performing a second operation on the standard hue value of the target picture and the hue value in the HSL value of all pixels to obtain the hue error value.

[0044] The sorting order obtaining module further comprises:

[0045] The hue error value sorting unit is configured to obtain the sorting order of the target picture according to the size of the hue error value when the standard hue value is equal.

[0046] In a possible implementation, the picture color value further comprises a standard saturation value and a standard brightness value, the standard saturation value is used to represent the saturation value of each target picture, and the standard brightness value is used to represent the brightness value of each target picture, and the picture color obtaining module further comprises:

[0047] The other color value obtaining unit is configured to obtain the standard saturation value and the standard brightness value of each target picture by performing the following steps on each target picture: the HSL value of each pixel in the target picture comprises the saturation value and the brightness value of each pixel, performing a third operation on the saturation value in the HSL value of all pixels in the target picture to obtain the standard saturation value of the picture, and performing a fourth operation on the brightness value in the HSL value of all pixels in the target picture to obtain the standard brightness value of the target picture.

[0048] The sorting order obtaining module further comprises:

[0049] other color value ordering units, configured to obtain an ordering sequence in which the target pictures are ordered in at least one of the following manners: according to the size of the standard saturation value, according to the size of the standard brightness value, and according to the early or late of the picture creation time, when the hue error values are equal.

[0050] In a possible implementation, the apparatus further includes:

[0051] a picture sequential display module, configured to display part or all of the ordered target pictures on a display interface of the terminal device.

[0052] In a possible implementation, the apparatus further includes:

[0053] a first instruction obtaining module, configured to obtain a first picture screening instruction, the first picture screening instruction including a first hue value used for picture screening;

[0054] a first instruction responding module, configured to respond to the first picture screening instruction, screen a first candidate picture with the standard hue value being the first hue value from the target pictures, and display the first candidate picture on the display interface of the terminal device according to the ordering sequence.

[0055] In a possible implementation, the first instruction responding module is further configured to: when there is no first candidate picture with the standard hue value being the first hue value in the target pictures, convert the first hue value into a second hue value, the second hue value being adjacent to the first hue value and corresponding to a hue value of the target pictures, take the target picture with the standard hue value being the second hue value as the first candidate picture, and display the first candidate picture on the display interface of the terminal device according to the ordering sequence.

[0056] In a possible implementation, the display interface of the terminal device displays a hue screening graph with a hue color gradient, the hue color gradient sequence of the hue screening graph corresponding to the standard hue value ordering sequence in the preset picture color value ordering manner, and the first instruction obtaining module is specifically configured to:

[0057] obtain the first picture screening instruction when a user selects a target hue color in the hue screening graph, the first picture screening instruction including a first hue value corresponding to the target hue color.

[0058] In a possible implementation, the apparatus further includes:

[0059] a second instruction obtaining module, configured to obtain a second picture screening instruction, the second picture screening instruction including a first saturation value and a first brightness value used for picture screening;

[0060] The second instruction response module is configured to, in response to a second image screening instruction, expand the range of the first hue value to a third hue value range, take the target image with the standard hue value in the third hue value range as a second candidate image, expand the range of the first saturation value to a second saturation value range, expand the range of the first brightness value to a second brightness value range, screen the target image with the standard saturation value in the second saturation value range and the standard brightness value in the second brightness value range from the second candidate image as a third candidate image, and display the third candidate image on the display interface of the terminal device according to the sorting order.

[0061] In a possible implementation, the display interface of the terminal device displays a saturation and brightness screening graph with color gradient, the saturation and brightness screening graph has a saturation color gradient range corresponding to the screening range of the saturation value and a brightness color gradient range corresponding to the screening range of the brightness value, and the second instruction response module is specifically configured to:

[0062] When the user selects a target saturation color and a target brightness color in the saturation and brightness screening graph, a second image screening instruction is obtained, the second image screening instruction includes the first saturation value corresponding to the target saturation color and the first brightness value corresponding to the target brightness color.

[0063] In a third aspect, an embodiment of the present application provides a terminal device, including at least one processor and at least one memory connected with the processor, wherein:

[0064] The memory stores program instructions executable by the processor, and the processor invoking the program instructions can execute the image sorting method provided in the first aspect.

[0065] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, the computer readable storage medium stores computer instructions, and the computer instructions make the computer execute the image sorting method provided in the first aspect.

[0066] It should be understood that the second to fourth aspects of the embodiments of the present application are consistent with the technical solution of the first aspect of the embodiments of the present application, and the beneficial effects obtained by each aspect and the corresponding feasible implementation manner are similar, and will not be repeated.

DRAWINGS

[0067] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0068] Figure 1 A flowchart illustrating an image sorting method provided in an embodiment of this application;

[0069] Figure 2 A flowchart illustrating another image sorting method provided in an embodiment of this application;

[0070] Figure 3 A flowchart illustrating another image sorting method provided in an embodiment of this application;

[0071] Figure 4 A flowchart illustrating another image sorting method provided in an embodiment of this application;

[0072] Figure 5 A flowchart illustrating yet another image sorting method provided in an embodiment of this application;

[0073] Figure 6 A schematic diagram illustrating a page display for entering a sorting options interface, provided as an embodiment of this application;

[0074] Figure 7 A schematic diagram illustrating a page display for entering a color sorting option interface, provided as an embodiment of this application;

[0075] Figure 8 This application provides an example of a page display with sorted images.

[0076] Figure 9 A schematic diagram of a page display for filtering images by hue value, provided as an embodiment of this application;

[0077] Figure 10 A schematic diagram of a page display for filtering images by saturation and brightness, provided as an embodiment of this application;

[0078] Figure 11 This is a schematic diagram of the structure of an image sorting device provided in an embodiment of this application;

[0079] Figure 12 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application.

Detailed Implementation Methods

[0080] To better understand the technical solutions in this specification, the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0081] It should be noted that the described embodiments are merely some of the embodiments of the present specification, rather than all the embodiments. Based on the embodiments in the present specification, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present specification.

[0082] The terms used in the embodiments of the present application are merely for the purpose of describing the specific embodiments, and are not intended to limit the present specification. The singular forms "a", "an" and "the" used in the embodiments of the present application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0083] The existing terminal equipment picture sorting method mainly arranges pictures according to time line, such as from oldest to newest or newest to oldest, or arranges pictures according to storage size, and does not provide a more accurate and convenient color sorting method, which is not very convenient for some users.

[0084] Based on the above problems, the embodiments of the present application provide a picture sorting method, device, terminal equipment and computer readable storage medium to solve the above problems.

[0085] Figure 1 A flowchart of a picture sorting method provided by the embodiments of the present application is applied to a terminal equipment with a display screen, the terminal equipment stores a plurality of pictures, and the terminal equipment is preconfigured with a picture color value sorting method, such as Figure 1 As shown, the picture sorting method can include:

[0086] Step 101: In response to a picture sorting instruction, obtaining a picture color value of a target picture, the picture color value is used to represent the color condition of each target picture, and the target picture is part or all of the stored pictures;

[0087] Step 102: According to the preconfigured picture color value sorting method, the sorting order of each target picture is obtained according to the picture color value of each target picture;

[0088] Step 103: The target pictures are sorted according to the sorting order.

[0089] It should be noted that the target pictures sorted in the embodiment can be pictures in a certain album, pictures in a certain folder, or part of the pictures in the album, and the location and quantity of the target pictures are not limited. In addition, the target pictures can be single pictures or multiple pictures, and the quantity of the target pictures will not affect the picture sorting method, but the sorting of single pictures cannot show the sorting effect. The terminal device mentioned in the embodiment can include but is not limited to the following devices: PC, smart phone, smart watch, VR device, etc., and the type of the terminal device is not limited.

[0090] The preset picture color value sorting manner can sort the color values from large to small or from small to large, or can sort the color values according to the preset sorting logic according to the size of the multiple color values, and the preset picture color sorting manner is not limited.

[0091] In the above picture sorting method, the color value of the target picture is obtained, the sorting order of the multiple target pictures is obtained according to the preset picture color value sorting manner and the color value of each target picture, and the target pictures are sorted according to the sorting order, which facilitates the user to quickly classify the same type of pictures by color.

[0092] In some embodiments, after the multiple target pictures are sorted according to the sorting order, part or all of the sorted target pictures can be displayed to facilitate the user to view.

[0093] Figure 2 Another flowchart of a picture sorting method provided by the embodiment of the present application is shown in Figure 2 The picture sorting method further includes Figure 1

[0094] Step 201: Part or all of the sorted target pictures are displayed on the display interface of the terminal device.

[0095] For example, after selecting an album folder, the pictures are sorted, that is, all the pictures in the folder are taken as target pictures, the target pictures in the folder are sorted according to the preset picture color value sorting manner, and finally the sorted pictures are displayed on the display interface of the terminal device, which can achieve visual comfort and balance. It is a very convenient operation for users who pay attention to arrangement and beauty.

[0096] ​In some embodiments, the picture color value can be expressed in various ways, such as RGB value, HSL value, etc. In the present embodiment, the pictures are sorted and displayed in the order of hue circle to achieve visual comfort and balance. The picture color value can include a standard hue value for representing the hue value of each target picture.

[0097] Figure 3 Another picture sorting method provided by the present embodiment is shown in the flowchart of FIG. 10. Figure 3 As shown in the embodiment of FIG. 10, step 101 of obtaining the picture color value of the target picture can include: Figure 1

[0098] Step 1011: For each target picture, the following steps are performed to obtain the standard hue value of each target picture: obtaining the RGB value of each pixel in the target picture and converting it into the color mode HSL value of each pixel, the HSL value of each pixel of the target picture including the hue value of each pixel, and performing a first operation on the hue value in the HSL value of all pixels of the target picture to obtain the standard hue value of the target picture.

[0099] Step 102: According to the pre-set picture color value sorting method, the sorting order of each target picture is obtained according to the picture color value of each target picture.

[0100] Step 1021: Obtain the sorting order of the target picture according to the size of the standard hue value.

[0101] It should be noted that the picture information stored in the system includes the RGB value of the picture, and the RGB value of the picture is the RGB value of each pixel in the picture. The RGB value of the picture is generally read from the data in the system. For example, in the Android system, the RGB value of the picture is obtained in the following way: based on the interface provided by the Android system library to obtain the RGB value, such as the interface PixelGrabber, the RGB value of each pixel of the picture is read through the PixelGrabber interface provided by the system library. Each RGB value corresponds to a color mode HSL value. The existing technology has a conversion formula for converting RGB value to HSL value, so the existing method can be used to convert the RGB value of each pixel of the picture to HSL value.

[0102] ​HSL value includes: hue (H): the color reflected from the object or projected from the object. On the standard hue ring of 0 to 360° (expressed by 0-360 integers), the hue is measured by position, and in common use, the hue is identified by color names such as red, orange or green. Saturation (S): refers to the purity of the color, the higher the color is purer, and the lower the color is gradually gray, taking 0-100% value. Brightness (L): taking 0-100%. Table 1 below is an example of part of the RGB value corresponding to the HSL value.

[0103]

[0104] Table 1 RGB value and HSL value correspondence table

[0105] It should be noted that the standard hue value is used to represent the hue value of each target picture, and the hue value in the HSL value of all pixels of the target picture is subjected to a first operation to obtain the standard hue value of the target picture. The first operation here can have multiple operation methods, for example, the most frequently occurring hue value in the HSL value of all pixels of the target picture can be calculated as the standard hue value of the target picture, or the average value of the hue value in the HSL value of all pixels of the target picture can be calculated as the standard hue value of the target picture. In actual scenarios, the method of the first operation can be set according to the user's demand or the demand of the use scenario, and therefore the method of the first operation is not limited here.

[0106] It can be understood that the sorting order of the target pictures obtained according to the size of the standard hue value includes at least two orders, one of which is the order of the standard hue value from large to small, and the other of which is the order of the standard hue value from small to large. These two ways of sorting meet the sorting of the hue ring, and the display effect is better, but there are not only these two ways of sorting. In actual scenarios, the method of sorting can be set according to the user's demand or the demand of the use scenario, and therefore the method of sorting according to the size of the standard hue value is not limited here.

[0107] For example, the picture color value further includes a hue error value, and the hue error value is used to represent the error value of the hue value in the HSL value of all pixels of each target picture and the standard hue value. Step 101 of obtaining the picture color value of the target picture further includes:

[0108] Step 1012: performing the following steps on each target picture to obtain the hue error value of each target picture: performing a second operation on the standard hue value of the target picture and the hue value in the HSL value of all pixels to obtain the hue error value;

[0109] The step 102 comprises:

[0110] 1022: When the standard hue value is equal, the sorting order of the target pictures according to the size of the hue error value is obtained.

[0111] It should be noted that the hue error value is used to represent the error value of the hue value in the HSL value of all pixels of each target picture and the standard hue value. Since the hue value of each pixel on each picture is different, and the standard hue value only represents the hue value of the target picture, which is a hue value calculated by a certain calculation method, the standard hue value and the hue value of all pixels of the picture must have an error. The smaller the error is, the closer the overall color of the picture is to the hue color corresponding to the standard hue value. The larger the error is, the greater the gap between the overall color of the picture and the hue color corresponding to the standard hue value. The hue error value can represent the closeness of the overall hue value of the target picture and the standard hue value.

[0112] The second operation is performed on the standard hue value of the target picture and the hue value in the HSL value of all pixels to obtain the hue error value. The second operation can have multiple operation methods, for example, the difference between the hue value of each pixel and the standard hue value can be calculated to obtain the hue difference value of each pixel, and the hue difference value of each pixel is added to obtain the hue error value. The pixels with the hue value equal to the standard hue value and the hue value equal to the standard hue value ± 5 degrees can be regarded as core pixels, and the difference between the hue value of each core pixel and the standard hue value is calculated to obtain the hue difference value of each core pixel. The hue difference value of all core pixels is added to obtain the hue error value. In actual scenarios, the method of the second operation can be set according to the user's demand or the demand of the use scenario, and therefore the method of the second operation is not limited here.

[0113] It can be understood that after we sort multiple target pictures according to the size of the standard hue value, there can be a case that the standard hue values of multiple target pictures are equal, and therefore these pictures can be sorted again according to the hue error value, for example, the pictures can be sorted from large to small according to the hue error value, or sorted from small to large according to the hue error value, but not only these two methods. In actual scenarios, the method of sorting according to the size of the hue error value can be set according to the user's demand or the demand of the use scenario, and therefore the method of sorting according to the size of the hue error value is not limited in this embodiment.

[0114] For example, the HSL value of each pixel of the target picture includes a saturation value and a brightness value of each pixel, the picture color value further includes a standard saturation value and a standard brightness value, the standard saturation value is used to represent the saturation value of each target picture, and the standard brightness value is used to represent the brightness value of each target picture. The color value of the target picture obtained in step 101 further includes the following steps:

[0115] Step 1013: The following steps are performed on each target picture to obtain the standard saturation value and the standard brightness value of each target picture: performing a third operation on the saturation values in the HSL values of all pixels of the target picture to obtain the standard saturation value of the picture, and performing a fourth operation on the brightness values in the HSL values of all pixels of the target picture to obtain the standard brightness value of the target picture.

[0116] Step 102: According to a preset picture color value sorting manner, the sorting order of the target picture is obtained according to the picture color value of each target picture, and the sorting order of the target picture obtained according to the picture color value of each target picture further includes the following steps:

[0117] Step 1023: When the hue error value is equal, the sorting order of the target picture sorted according to at least one of the following manners is obtained: the size of the standard saturation value, the size of the standard brightness value, and the early or late of the picture creation time.

[0118] It should be noted that the standard saturation value is used to represent the saturation value of each target picture, and the third operation is performed on the saturation values in the HSL values of all pixels of the target picture to obtain the standard saturation value of the picture. The third operation can have multiple operation methods, for example, the saturation value with the highest frequency in the HSL values of all pixels of the target picture can be calculated as the standard saturation value of the target picture, the average value of the saturation values in the HSL values of all pixels of the target picture can be calculated as the standard saturation value of the target picture, or the same method as the first operation can be directly used. In actual scenarios, the method of the third operation can be set according to the user's demand or the demand of the use scenario, and therefore the method of the third operation is not limited in this embodiment.

[0119] The standard brightness value is used to represent the brightness value of each target picture. The brightness value in the HSL value of all pixels of the target picture is subjected to a fourth operation to obtain the standard brightness value of the target picture. The fourth operation can have various operation methods. For example, the brightness value with the highest occurrence frequency in the HSL value of all pixels of the target picture can be calculated as the standard brightness value of the target picture. The average value of the brightness value in the HSL value of all pixels of the target picture can be calculated as the standard brightness value of the target picture. The same method as the first operation can be directly used for calculation. In actual scenarios, the method of the fourth operation can be set according to the demand of the user or the demand of the use scenario. Therefore, the method of the fourth operation is not limited in this embodiment.

[0120] It can be understood that after we sort multiple target pictures according to the standard hue value and the hue error value, there can be a case that the standard hue value and the hue error value of multiple target pictures are equal. Then, the sorting can be performed according to the standard saturation value, the standard brightness value or the picture creation time. One of the methods can be used for sorting. The multiple methods can be combined for sorting. For example, the picture with a low standard saturation value is sorted in front, the picture with a high standard brightness value is sorted in front, and the picture with the same standard saturation value and standard brightness value and with a late picture creation time is sorted in front. However, there are not only these methods. In actual scenarios, the sorting method can be set according to the demand of the user or the demand of the use scenario. Therefore, the method of sorting according to the size of the standard saturation value, the size of the standard brightness value and the early or late of the picture creation time is not limited in this embodiment.

[0121] The application scenario of the picture sorting method provided in the embodiment is illustrated below. After a terminal device opens a photo album and receives a picture sorting instruction, the terminal device processes as follows: (1) reading a system media library Image mapping table; (2) reading all picture record information Imageinfo_list; (3) initializing an array Imageinfo_list[i], which is used to describe information of a single picture and includes a thumbnail Imageinfo_list[i].thumb, a standard hue value, which is used to indicate to which hue value the picture is classified, and HSL[pi][0-2], where pi represents an i-th pixel, HSL[0] is a hue value, HSL[1] is a saturation value, and HSL[2] is a brightness value; (4) packaging the picture record information into an algorithm; (5) analyzing picture RGB values and recording the three component values of the image RGB values into the array Imageinfo_list[i]; (6) converting the RGB values into HSL color domain values according to a preset conversion formula and recording the HSL color domain values into Imageinfo_list[i], that is, assigning values to HSL[pi][0-2]; (7) analyzing the highest proportion of the hue value in HSL[pi][0-2] as the standard hue value, calculating HUE_EaValue, and the smaller the HUE_EaValue, the closer the overall color of the picture is to the standard hue value; (8) completing the assignment of the calculation results to obtain the complete Imageinfo_list[i]; (9) sorting the pictures according to a preset sorting rule table, establishing a sorting table, and displaying the pictures of the corresponding colors on the photo album UI according to the sorting table.

[0122] The preset sorting rule table is as follows: (1) sorting according to the standard hue value from large to small, (2) sorting according to the hue error value for the same standard hue value, with the value being small in the front, (3) sorting according to the saturation value and the brightness value for the same hue error value, with the saturation value being low and the brightness value being high in the front, and (4) sorting according to the creation time for the same saturation value and brightness value, with the newest being in the front.

[0123] In some embodiments, a more convenient and professional filtering mechanism is provided for pictures of the same color system, that is, manually filtering according to colors to more accurately find pictures by colors.

[0124] Figure 4 The flowchart of another picture sorting method provided in the embodiment is shown in Figure 4 The picture sorting method provided in the embodiment shown in Figure 1 The picture sorting method provided in the embodiment shown in

[0125] In step 301, a first picture screening instruction is obtained, the first picture screening instruction including a first hue value for picture screening; in response to the first picture screening instruction, a first candidate picture having the standard hue value as the first hue value is screened out from the target picture, and the first candidate picture is displayed on the display interface of the terminal device in the sorting order.

[0126] Preferably, when there is no first candidate picture having the standard hue value as the first hue value in the target picture, the first hue value is converted into a second hue value, the second hue value being adjacent to the first hue value and corresponding to a hue value of the target picture, the target picture having the standard hue value as the second hue value is taken as the first candidate picture, and the first candidate picture is displayed on the display interface of the terminal device in the sorting order.

[0127] It should be noted that the first picture screening instruction is used to screen out the target picture meeting the hue value condition and display the target picture on the display interface of the terminal device, without changing the sorting order of the target picture in the system. Therefore, the first picture screening instruction is an instruction for screening pictures by inputting colors, and after the system receives the first picture screening instruction, the picture having the hue value as the first hue value is displayed on the display interface in the sorting order, facilitating the user to view.

[0128] In some special cases, the input first hue value can have no corresponding picture, and then the first hue value needs to be converted into an adjacent second hue value, and the second hue value corresponds to a picture, so as to ensure that the display interface has a picture to be displayed, and improve the user experience and help the user to find a picture closest to the desired color.

[0129] In some embodiments, in order to facilitate the user to input the first picture screening instruction including the first hue value, a hue screening graph having a hue color gradient is displayed on the display interface of the terminal device, the hue color gradient order of the hue screening graph corresponding to the standard hue value sorting order in the preset picture color value sorting manner, and the first picture screening instruction is obtained when the user selects a target hue color in the hue screening graph, the first picture screening instruction including a first hue value corresponding to the target hue color.

[0130] It should be noted that since the color phase color display is more intuitive and beautiful than the color phase value display, the user can conveniently click the color to be input. In the embodiment, the color phase filtering pattern-based sorting display function is provided in the album or the picture folder, the pictures are sequentially arranged according to the numerical value (integer of 360 degrees-0 degrees) of the standard color phase value, and the color gradient of the color phase filtering pattern is also displayed according to the color corresponding to the numerical value (integer of 360 degrees-0 degrees) of the color phase. When the user clicks any color on the color phase filtering pattern, a first picture filtering instruction is issued, the first picture filtering instruction includes a first color phase value for picture filtering, the system filters out the target picture with the standard color phase value as the first color phase value as the first candidate picture, and displays the first candidate picture on the display interface of the terminal device according to the sorting order. When the target picture corresponding to the first color phase value is 0, the first color phase value can be enlarged by ±5 degrees to obtain a second color phase value range, the system filters out the target picture with the standard color phase value as the second color phase value range as the first candidate picture, and displays the first candidate picture on the display interface of the terminal device according to the sorting order.

[0131] In the embodiment, the color phase filtering pattern can be a color gradient color phase color bar, and can be arranged on the right side of the display interface. The color phase filtering pattern can also be other color gradient patterns, as long as the same color filtering effect can be achieved, any pattern is acceptable, and the position can also be changed. Therefore, the shape and position of the color phase filtering pattern are not limited in the embodiment.

[0132] In some embodiments, a more convenient and professional filtering mechanism is provided for the pictures of the same color system, that is, the pictures in the same color phase color range are manually filtered according to the standard saturation value and the standard brightness value of the picture color value.

[0133] Figure 5 Another picture sorting method provided in the embodiment is shown in a flowchart as shown in Figure 5 In the embodiment shown in Figure 4 The picture sorting method shown in the embodiment further includes:

[0134] Step 401: obtaining a second picture screening instruction, the second picture screening instruction including a first saturation value and a first brightness value for picture screening; in response to the second picture screening instruction, expanding the range of the first hue value to a third hue value range, taking the target picture with the standard hue value in the third hue value range as a second candidate picture, expanding the range of the first saturation value to a second saturation value range, expanding the range of the first brightness value to a second brightness value range, screening the target picture with the standard saturation value in the second saturation value range and the standard brightness value in the second brightness value range from the second candidate picture as a third candidate picture, and displaying the third candidate picture in the display interface of the terminal device according to the sorting order.

[0135] It should be noted that the second picture screening instruction is used to screen the target picture that meets the saturation value and brightness value requirements under the current hue value condition and display the target picture in the display interface of the terminal device, without changing the sorting order of the target picture in the system. Therefore, the second picture screening instruction is an instruction for screening the picture by inputting the saturation value and the brightness value. After receiving the second picture screening instruction, the system displays the target picture with the standard hue value in the third hue value range, the standard saturation value in the second saturation value range, and the standard brightness value in the second brightness value range in the display interface according to the sorting order, thereby facilitating the user to view.

[0136] In some embodiments, in order to facilitate the user to input the second picture screening instruction including the first saturation value and the first brightness value, a color gradient saturation and brightness screening graph is displayed in the display interface of the terminal device, the saturation color gradient range in the saturation and brightness screening graph corresponds to the screening range of the saturation value, and the brightness color gradient range corresponds to the screening range of the brightness value. The obtaining of the second picture screening instruction includes: obtaining the second picture screening instruction when the user selects a target saturation color and a target brightness color in the saturation and brightness screening graph, the second picture screening instruction including the first saturation value corresponding to the target saturation color and the first brightness value corresponding to the target brightness color.

[0137] It should be noted that, since the way of displaying color is more intuitive and beautiful than the way of displaying numerical value, the sorting display function based on the saturation and brightness filtering graph is provided in the photo album or the picture folder, that is, the picture filtering function based on the brightness value and the saturation value is provided after the hue value is selected, which can also be called the specific filtering mechanism under the same hue range, and the manual filtering is performed according to the range of the saturation value and the brightness value of the picture color value. The saturation color gradient range in the saturation and brightness filtering graph corresponds to the filtering range of the saturation value, and the brightness color gradient range corresponds to the filtering range of the brightness value. The filtering range of the saturation value is 0-100, and the filtering range of the brightness value is 0-100. When the user clicks any color point in the saturation and brightness filtering graph, the color point corresponds to a saturation value and a brightness value, that is, a second picture filtering instruction is issued. Since it is a re-filtering based on the input hue value, the system first expands the current first hue value by ±5 to obtain a third hue value range, filters out the target picture with the standard hue value in the third hue value range as the second candidate picture, and then performs the following filtering on the second candidate picture, that is, the system expands the first saturation value range by ±5 to obtain a second saturation value range, expands the first brightness value range by ±5 to obtain a second brightness value range, and then the system filters out the target picture with the standard saturation value in the second saturation value range and the standard brightness value in the second brightness value range from the second candidate picture as a third candidate picture, and displays the third candidate picture in the display interface of the terminal device according to the sorting order.

[0138] In the embodiment, the saturation and brightness filtering graph can be a color gradient triangle, and can be arranged in the middle of the display interface. The saturation and brightness filtering graph can also be other color gradient graphs, as long as the same saturation and brightness filtering effect can be achieved, any graph is acceptable, and the position can also be changed. Therefore, the shape and position of the saturation and brightness filtering graph are not limited in the embodiment.

[0139] The following illustrates the application scenario of the picture sorting method provided in the embodiment, that is, the display of the display interface corresponding to the operation instruction of the user after the terminal device opens the photo album. In the embodiment, album 1 is taken as an example for description.

[0140] Figure 6 A page display schematic diagram for entering the sorting option interface is provided in the embodiment. First, enter the gallery, select the "album" option button, and present the album display page as shown in FIG. a. Then click "album 1", and present the album 1 display page as shown in FIG. b. The "more" option button (three dot icon) is provided in the title bar of the album 1 display page. Click the "more" option button, and present the album 1 display page as shown in FIG. c. Figure 6 Figure 6 Figure 6 ​​c shows a page display of multiple options, including the "sort" function option.

[0141] Figure 7 A page display schematic diagram of entering a color sorting option interface is provided for the embodiment of the present application. Figure 6 c shows a page display of multiple options, including the "sort" function option. Figure 7 c shows a page display of multiple options, including the "sort" function option.

[0142] Figure 8 A page display schematic diagram of entering a color sorting option interface is provided for the embodiment of the present application. Figure 7 c shows a page display of multiple options, including the "sort" function option. Figure 8 c shows a page display of multiple options, including the "sort" function option.

[0143] Figure 9 A page display schematic diagram of entering a color sorting option interface is provided for the embodiment of the present application. Figure 8 c shows a page display of multiple options, including the "sort" function option. Figure 9 c shows a page display of multiple options, including the "sort" function option. Figure 9 c shows a page display of multiple options, including the "sort" function option.

[0144] The corresponding system processing process includes: (1) refreshing the color of the magnifier control according to the Hue color value to which the slider is slid; (2) displaying the pictures of the corresponding color on the album UI according to the sorting table.

[0145] Figure 10 A page display schematic diagram of picture screening by saturation and brightness is provided for the embodiments of the present application. In the browsing process, double-click (or long-press) the color amplifier to enter the specific screening page for the color. When entering the specific screening page, to expand the screening range, the hue value of the color can be expanded to the previous and next 5 values of the color value. In the page, a triangular color saturation and color brightness filter, i.e., a saturation and brightness screening figure, is provided. The color saturation and color brightness filter provides the color range of the lightness (Light) and saturability (Saturability) corresponding to the hue color. The range of the saturability is 0 to 100, and the range of the lightness is 1-100. The user can reduce the selection range by dragging the "dot" in the triangle, and each "dot" represents a lightness value and a saturability value. When matching the pictures, the selected lightness value and saturability value can be expanded by 5 values. Figure 9 a is the display page when the saturability value and the lightness value are not selected, and there are many pictures, Figure 9 b is the display page after the saturability value and the lightness value are selected, and the page only displays the pictures matching the selected saturability value and lightness value.

[0146] Among them, the corresponding system processing process includes: (1) entering the specific screening page of the color, (2) initializing the color saturation and color brightness filter, the current hue value curHueIndex range is [curHueIndex-5, curHueIndex+5], curHueIndex is the current hue value, (3) screening out the pictures corresponding to the curHueIndex range from Imageinfo_list, establishing a mapping relationship curHueLinkedList, to facilitate the user to click the item to link, (4) receiving the user click event, the user double-clicks or long-presses the color amplifier, and the triangular color saturation and color brightness filter is popped up, (5) according to the user-selected S saturability value L lightness value, searching and screening out the picture list TargetMapList meeting the saturability and brightness requirements in curHueLinkedList, wherein the user-selected SL value can also be increased in range to facilitate matching, (6) displaying the TargetMapList pictures.

[0147] For example, the hue value of color A is 330, when entering the specific screening page of the color, the pictures with the standard hue value of 325 to 335 are displayed, and then the pictures are matched according to the user-selected lightness value and saturability value. For example, the lightness value represented by the "dot" selected by the user is 50, and the saturability value is 40, then the pictures with the lightness value of 45 to 55 and the saturability value of 35 to 45 can be expanded to match, and the matched pictures are displayed on the display interface in the order.

[0148] In addition, the display interface further provides a "close" button, and when the close button is clicked, the previous color sorting page of the album 1 is returned. The system processing flow when closing includes: ① finishing the current interface and cleaning up the memory, and ② returning to the album 1 display interface and displaying the Imageinfo_list.

[0149] It can be understood that the above picture sorting method can be executed by a chip or a chip module.

[0150] Figure 11 A structural schematic diagram of a picture sorting device provided by an embodiment of the present application is applied to a terminal device with a display screen. The terminal device stores a plurality of pictures, and the terminal device is preset with a picture color value sorting mode, such as that shown in the above embodiment. Figure 11 The picture sorting device includes a picture color acquisition module 51, a sorting order acquisition module 52, and a picture order sorting module 53.

[0151] The picture color acquisition module 51 is configured to acquire picture color values of target pictures in response to a picture sorting instruction. The picture color values are used to represent color conditions of each of the target pictures, and the target pictures are part or all of the stored pictures.

[0152] The sorting order acquisition module 52 is configured to acquire sorting orders of the target pictures according to picture color values of each of the target pictures according to the preset picture color value sorting mode.

[0153] The picture order sorting module 53 is configured to sort the target pictures according to the sorting orders.

[0154] The picture color values include standard hue values, and the standard hue values are used to represent hue values of each of the target pictures. The picture color acquisition module 51 includes:

[0155] A standard hue value acquisition unit is configured to acquire standard hue values of each of the target pictures by performing the following steps: acquiring RGB values of each pixel in the target picture and converting the RGB values into HSL values of each pixel, the HSL values of each pixel in the target picture including a hue value of each pixel, and performing a first operation on the hue values in the HSL values of all pixels in the target picture to obtain the standard hue value of the target picture.

[0156] The sorting order acquisition module 52 includes:

[0157] A standard hue value sorting unit is configured to acquire a sorting order of the target pictures according to sizes of the standard hue values.

[0158] The picture color value further comprises a hue error value, the hue error value is used for representing an error value of a hue value in the HSL value of each pixel of each target picture and a standard hue value, and the picture color acquisition module 51 further comprises:

[0159] A hue error value acquisition unit is configured to obtain the hue error value of each target picture by performing the following steps on each target picture: performing a second operation on the standard hue value of the target picture and the hue value in the HSL value of each pixel to obtain the hue error value.

[0160] The sorting order acquisition module 52 further comprises:

[0161] A hue error value sorting unit is configured to obtain a sorting order of the target pictures according to the size of the hue error value when the standard hue value is equal.

[0162] The picture color value further comprises a standard saturation value and a standard brightness value, the standard saturation value is used for representing a saturation value of each target picture, and the standard brightness value is used for representing a brightness value of each target picture, and the picture color acquisition module 51 further comprises:

[0163] A other color value acquisition unit is configured to obtain the standard saturation value and the standard brightness value of each target picture by performing the following steps on each target picture: the HSL value of each pixel of the target picture comprises a saturation value and a brightness value of each pixel, performing a third operation on the saturation value in the HSL value of all pixels of the target picture to obtain the standard saturation value of the picture, the standard saturation value is used for representing a saturation value of each target picture, and performing a fourth operation on the brightness value in the HSL value of all pixels of the target picture to obtain the standard brightness value of the target picture.

[0164] The sorting order acquisition module 52 further comprises:

[0165] A other color value sorting unit is configured to obtain a sorting order of the target pictures according to at least one of the following when the hue error value is equal: sorting according to the size of the standard saturation value, sorting according to the size of the standard brightness value, and sorting according to the early or late of the picture creation time.

[0166] The picture sorting device further comprises:

[0167] A picture order display module is configured to display part or all of the sorted target pictures on a display interface of the terminal device.

[0168] The picture sorting device further comprises:

[0169] The first instruction obtaining module is configured to obtain a first picture screening instruction, the first picture screening instruction comprising a first hue value used for picture screening.

[0170] The first instruction response module is configured to, in response to the first picture screening instruction, screen out a first candidate picture having the standard hue value as the first hue value from the target pictures, and display the first candidate picture in the display interface of the terminal device according to the sorting order.

[0171] The first instruction response module is further configured to, when there is no first candidate picture having the standard hue value as the first hue value in the target pictures, convert the first hue value into a second hue value, the second hue value being adjacent to the first hue value and corresponding to a hue value of the target pictures, take the target picture having the standard hue value as the second hue value as the first candidate picture, and display the first candidate picture in the display interface of the terminal device according to the sorting order.

[0172] The display interface of the terminal device displays a hue screening graph having a hue color gradient, the hue color gradient order of the hue screening graph corresponding to the standard hue value sorting order in the preset picture color value sorting manner, and the first instruction obtaining module is specifically configured to, when a user selects a target hue color in the hue screening graph, obtain the first picture screening instruction, the first picture screening instruction comprising a first hue value corresponding to the target hue color.

[0173] The picture sorting apparatus further comprises:

[0174] The second instruction obtaining module is configured to obtain a second picture screening instruction, the second picture screening instruction comprising a first saturation value and a first brightness value used for picture screening. The second instruction response module is configured to, in response to the second picture screening instruction, expand the first hue value range into a third hue value range, take the target picture having the standard hue value in the third hue value range as a second candidate picture, expand the first saturation value range into a second saturation value range, expand the first brightness value range into a second brightness value range, screen out a target picture having a standard saturation value in the second saturation value range and a standard brightness value in the second brightness value range from the second candidate picture as a third candidate picture, and display the third candidate picture in the display interface of the terminal device according to the sorting order.

[0175] The display interface of the terminal device displays a saturation and brightness screening pattern with color gradient, a saturation color gradient range in the saturation and brightness screening pattern corresponds to a screening range of saturation values, and a brightness color gradient range corresponds to a screening range of brightness values. The second instruction response module is specifically configured to: when a user selects a target saturation color and a target brightness color in the saturation and brightness screening pattern, obtain a second image picture screening instruction, and the second picture screening instruction includes the first saturation value corresponding to the target saturation color and the first brightness value corresponding to the target brightness color.

[0176] It can be understood that the picture sorting apparatus may, for example, be a chip or a chip module. The various modules / sub-modules / units included in each apparatus and product described in the above embodiments may, for example, be software modules / sub-modules / units, hardware modules / sub-modules / units, or partly software modules / sub-modules / units and partly hardware modules / sub-modules / units. For example, for each apparatus and product applied to or integrated in a chip, the various modules / sub-modules / units included therein may, for example, all be implemented in the form of hardware such as a circuit, or at least some of the modules / sub-modules / units may, for example, be implemented in the form of a software program running on a processor integrated in the chip, and the remaining (if any) modules / sub-modules / units may, for example, be implemented in the form of hardware such as a circuit. For each apparatus and product applied to or integrated in a chip module, the various modules / sub-modules / units included therein may, for example, all be implemented in the form of hardware such as a circuit, and different modules / sub-modules / units may, for example, be located in the same component (for example, a chip, a circuit module, or the like) or different components of the chip module, or at least some of the modules / sub-modules / units may, for example, be implemented in the form of a software program running on a processor integrated in the chip module, and the remaining (if any) modules / sub-modules / units may, for example, be implemented in the form of hardware such as a circuit. For each apparatus and product applied to or integrated in a terminal, the various modules / sub-modules / units included therein may, for example, all be implemented in the form of hardware such as a circuit, and different modules / sub-modules / units may, for example, be located in the same component (for example, a chip, a circuit module, or the like) or different components of the terminal, or at least some of the modules / sub-modules / units may, for example, be implemented in the form of a software program running on a processor integrated in the terminal, and the remaining (if any) modules / sub-modules / units may, for example, be implemented in the form of hardware such as a circuit.

[0177] Figure 11 The picture sorting apparatus provided by the illustrated embodiments can be used to execute the method embodiments described in the present specification Figures 1-10 The technical solutions of the method embodiments, the implementation principles, and the technical effects can be further referred to the related descriptions in the method embodiments.

[0178] Figure 12 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application, such as... Figure 12 As shown, the aforementioned terminal device may include: at least one processor, and at least one memory communicatively connected to the processor, wherein: the memory stores program instructions executable by the processor, and the processor, by invoking the program instructions, can perform actions such as... Figures 1 to 10 The image sorting method provided in the embodiment.

[0179] The aforementioned terminal device can be a smart terminal device such as a smartphone, tablet computer, or laptop computer. This embodiment does not limit the form of the aforementioned terminal device.

[0180] For example, Figure 12 A schematic diagram of the terminal device structure is shown using a smartphone as an example, such as... Figure 12 As shown, the terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a display screen 130, buttons 140, etc.

[0181] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the terminal device 100. In other embodiments of this application, the terminal device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0182] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.

[0183] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.

[0184] The processor 110 can also have internal memory for the storage of instructions and data. In some embodiments, the internal memory of the processor 110 is a cache memory. This memory can hold instructions or data that the processor 110 has recently accessed or is likely to access again. If the processor 110 needs to use that instruction or data again, it can be retrieved directly from the cache memory. This avoids repeated accesses to the main memory, reducing the latency of the processor 110 and thus improving the efficiency of the system.

[0185] The processor 110 performs various functional applications and data processing by running programs stored in the internal memory 121, such as implementing the image sorting method provided by the embodiments shown in the present application. Figures 1-10 The embodiments shown provide an image sorting method.

[0186] In some embodiments, the processor 110 can include one or more interfaces. The interfaces can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0187] The terminal device 100 implements display functions through the GPU, the display screen 130, and the application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 130 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs that execute program instructions to generate or change display information.

[0188] The display screen 130 is configured to display images, videos, and the like. The display screen 130 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light emitting diodes (QLED), or the like. In some embodiments, the terminal device 100 can include one or N display screens 130, where N is a positive integer greater than 1.

[0189] The external memory interface 120 can be configured to connect an external memory card, such as a Micro SD card, to extend the storage capacity of the terminal device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.

[0190] The internal memory 121 can be configured to store computer executable program codes including instructions. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, and the like), and the like. The data storage area can store data (such as audio data, a phone book, and the like) created during use of the terminal device 100, and the like. In addition, the internal memory 121 can include a high-speed random access memory, and can further include a non-volatile memory.

[0191] The keys 140 include a power-on key, a volume key, and the like. The keys 140 can be mechanical keys. Alternatively, the keys 140 can be touch keys. The terminal device 100 can receive key inputs and generate key signal inputs related to user settings and function control of the terminal device 100.

[0192] The embodiments of the present application provide a computer readable storage medium storing computer instructions, which cause the computer to execute the method of the present application. Figures 1 to 10 The embodiments of the present application provide a picture sorting method.

[0193] The computer readable storage medium can be implemented using any appropriate combination of computer readable media. The computer readable media can be computer readable storage media or computer readable signal media. The computer readable storage media can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage media include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, the computer readable storage media can be any tangible medium that can contain, or store computer readable program code for use by or in connection with an instruction execution system, apparatus, or device.

[0194] The computer readable signal media can include a computer readable program code propagated across a network, for example, the Internet. The computer readable program code can be transmitted using any appropriate medium, including but not limited to wireless, wire line, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0195] The computer readable program code contained in the computer readable media can be transmitted using any appropriate medium, including but not limited to wireless, wire line, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0196] Computer program code for carrying out operations of the present specification can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0197] The above description of specific embodiments of the specification has been presented for the purpose of illustration. Other embodiments are within the scope of the following claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve desirable results. Additionally, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous.

[0198] In the description of embodiments of the present application, references have been made to descriptive terms such as "one embodiment", "some embodiments", "an example", "a specific example" or "some examples" etc. Such terminology means that a particular feature, structure, material or characteristic being described in connection with such embodiments or examples can be included in, or be excluded from, one or more embodiments or examples of the specification. In other words, any particular feature, structure, material or characteristic described in relation to one embodiment or example can be included within, or excluded from, any one or more embodiments or examples of the specification. In addition, such terminology can not necessarily refer to the same embodiment or example. Furthermore, such terminology can be used interchangeably with, or to have the same meaning as, one or more other terminology such as "aspects", "embodiments" and the like. Moreover, the use of such terminology does not necessarily exclude, or require, other embodiments or examples of the specification.

[0199] In addition, the terms "first", "second", and the like, do not necessarily indicate any order, quantity, or importance, but rather are used to nomenclature different components and / or structures. Thus, a "first" and / or "second" feature can include one or more of either the feature. In the description of the specification, the meaning of "a plurality" is at least two, such as two, three, etc., unless otherwise specifically defined.

[0200] Any processes or methods described in the flowcharts or elsewhere in this specification can be understood as representing one or more modules, segments, or portions of code that include executable instructions for implementing the specified logical functions (or steps). A preferred embodiment of the application thus includes alternative implementations comprising one or more of the following: a process that performs the functions described in the illustrated order, a process that performs the functions described out of order, a process that performs the functions concurrently, a process that performs the functions at different times, or a process that performs the functions as individual processes rather than as an integrated process.

[0201] The word "if" can be interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [a stated condition or event] is detected" can be interpreted to mean "upon determining" or "in response to determining" or "upon detecting," or "in response to detecting," depending on the context.

[0202] It should be noted that the terminal involved in the embodiments of the present application can include, but is not limited to, a personal computer (PC), a personal digital assistant (PDA), a wireless handheld device, a tablet computer, a mobile phone, an MP3 player, an MP4 player, and the like.

[0203] In several embodiments provided in the present specification, it should be understood that the disclosed system, device and method can be implemented in other manners. For example, the described device embodiments are merely schematic. For example, the division of the units is only a logical function division. There can be another division manner for the actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.

[0204] In addition, each functional unit in the various embodiments of the present specification can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware, or in the form of hardware plus software function units.

[0205] The integrated unit implemented in the form of software function unit can be stored in a computer readable storage medium. The software function unit is stored in a storage medium, and includes a plurality of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute part of steps of the method described in various embodiments of the present specification. The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various storage medium capable of storing program codes.

[0206] The above merely describes the preferred embodiments of the present specification and is not intended to limit the present specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the protection scope of the present specification.

Claims

1. An image sorting method, applied to a terminal device with a display screen, characterized in that, The terminal device stores multiple images, and the terminal device has a preset image color value sorting method. The method includes: In response to an image sorting instruction, the image color value of the target image is obtained. The image color value is used to characterize the color of each target image. The target image is some or all of the stored multiple images. According to a preset image color value sorting method, the sorting order of the target images is obtained based on the image color value of each target image; Sort the target images according to the stated sorting order; The image color values ​​include standard hue values, which are used to characterize the hue value of each target image. Obtaining the image color values ​​of the target image includes: The following steps are performed on each target image to obtain the standard hue value of each target image: the RGB value of each pixel in the target image is obtained and converted into the color mode HSL value of each pixel, wherein the HSL value of each pixel in the target image includes the hue value of each pixel, and a first operation is performed on the hue values ​​in the HSL values ​​of all pixels in the target image to obtain the standard hue value of the target image; The step of obtaining the sorting order of the target images according to the preset image color value sorting method includes: Obtain the sorting order of the target images according to the size of their standard hue values; The image color value also includes a hue error value, which characterizes the error between the hue value and the standard hue value in the HSL values ​​of all pixels in each target image. Obtaining the image color value of the target image further includes: The following steps are performed on each of the target images to obtain the hue error value of each target image: a second operation is performed on the standard hue value of the target image and the hue value in the HSL value of all pixels to obtain the hue error value; The step of obtaining the sorting order of the target images according to the image color value of each target image, based on a preset image color value sorting method, further includes: When the standard hue values ​​are equal, the target images are sorted according to the size of their hue error values.

2. The method according to claim 1, characterized in that, The image color values ​​also include standard saturation values ​​and standard brightness values. The standard saturation value is used to characterize the saturation value of each target image, and the standard brightness value is used to characterize the brightness value of each target image. Obtaining the color values ​​of the target image also includes: For each target image, the following steps are performed to obtain the standard saturation value and standard brightness value of each target image: the HSL value of each pixel of the target image includes the saturation value and brightness value of each pixel; a third operation is performed on the saturation value of all pixels in the HSL value of the target image to obtain the standard saturation value of the image; a fourth operation is performed on the brightness value of all pixels in the HSL value of the target image to obtain the standard brightness value of the target image. The step of obtaining the sorting order of the target images according to the image color value of each target image, based on a preset image color value sorting method, further includes: When the hue error values ​​are equal, the target images are sorted in a sorting order according to at least one of the following methods: sorted by standard saturation value, sorted by standard brightness value, and sorted by the time the images were created.

3. The method according to claim 1, characterized in that, The method further includes: The sorted target images are displayed, in part or in all, on the display interface of the terminal device.

4. The method according to claim 2, characterized in that, The method further includes: A first image filtering instruction is obtained, wherein the first image filtering instruction includes a first hue value for image filtering; In response to the first image filtering instruction, a first candidate image with the standard hue value of the first hue value is filtered out from the target image, and the first candidate image is displayed on the display interface of the terminal device according to the sorting order.

5. The method according to claim 4, characterized in that, The method further includes: when there is no first candidate image with a standard hue value of the first hue value in the target image, converting the first hue value to a second hue value, wherein the second hue value is the hue value that is adjacent to the first hue value and corresponds to the target image, using the target image with the standard hue value of the second hue value as the first candidate image, and displaying the first candidate images on the display interface of the terminal device according to the sorting order.

6. The method according to claim 4, characterized in that, The terminal device's display interface shows a hue filter graphic with hue gradients. The hue gradient order of the hue filter graphic corresponds to the standard hue value sorting order in the preset image color value sorting method. The first image filter instruction includes: When a user selects a target hue color in the hue filter graphic, the user obtains the first image filter instruction, which includes a first hue value corresponding to the target hue color.

7. The method according to claim 4, characterized in that, The method further includes: A second image filtering instruction is obtained, the second image filtering instruction including a first saturation value and a first brightness value for image filtering; In response to the second image filtering instruction, the range of the first hue value is expanded to a third hue value range. The target image whose standard hue value falls within the third hue value range is selected as the second candidate image. The range of the first saturation value is expanded to a second saturation value range. The range of the first brightness value is expanded to a second brightness value range. Target images with standard saturation values ​​and standard brightness values ​​within the second saturation value range and within the second brightness value range are selected from the second candidate images as the third candidate images. The third candidate images are then displayed on the display interface of the terminal device according to the sorting order.

8. The method according to claim 7, characterized in that, The terminal device's display interface shows a color gradient saturation and brightness filtering graphic. The saturation color gradient range in the saturation and brightness filtering graphic corresponds to the filtering range of saturation values, and the brightness color gradient range corresponds to the filtering range of brightness values. The instruction to obtain the second image filtering includes: When a user selects a target saturation color and a target brightness color in the saturation and brightness filter graphic, a second image filtering instruction is obtained. The second image filtering instruction includes the first saturation value corresponding to the target saturation color and the first brightness value corresponding to the target brightness color.

9. An image sorting device, applied to a terminal device with a display screen, characterized in that, The terminal device stores multiple images, and the terminal device has a preset image color value sorting method. The device includes: The image color acquisition module is used to acquire the image color value of the target image in response to the image sorting instruction. The image color value is used to characterize the color situation of each target image. The target image is some or all of the stored multiple images. The sorting order acquisition module obtains the sorting order of the target images according to a preset image color value sorting method and based on the image color value of each target image. The image sorting module sorts the target images according to the specified sorting order; The image color values ​​include standard hue values, which are used to characterize the hue value of each target image. The image color acquisition module includes: A standard hue value acquisition unit is used to perform the following steps on each of the target images to obtain the standard hue value of each target image: acquire the RGB value of each pixel in the target image and convert it into the color mode HSL value of each pixel, wherein the HSL value of each pixel in the target image includes the hue value of each pixel, and perform a first operation on the hue values ​​in the HSL values ​​of all pixels in the target image to obtain the standard hue value of the target image; The sorting order acquisition module includes: A standard hue value sorting unit is used to obtain the sorting order of the target image according to the size of the standard hue value; The image color value also includes a hue error value, which characterizes the error between the hue value and the standard hue value in the HSL values ​​of all pixels in each target image. The image color acquisition module further includes: The hue error value acquisition unit is used to perform the following steps on each of the target images to obtain the hue error value of each target image: perform a second operation on the standard hue value of the target image and the hue value in the HSL value of all pixels to obtain the hue error value; The sorting order acquisition module also includes: The hue error value sorting unit is used to obtain the sorting order of the target images according to the size of the hue error values ​​when the standard hue values ​​are equal.

10. The apparatus according to claim 9, characterized in that, The image color values ​​also include standard saturation values ​​and standard brightness values. The standard saturation value is used to characterize the saturation value of each target image, and the standard brightness value is used to characterize the brightness value of each target image. The image color acquisition module also includes: Other color value acquisition units are used to perform the following steps on each of the target images to obtain the standard saturation value and standard brightness value of each target image: the HSL value of each pixel of the target image includes the saturation value and brightness value of each pixel; a third operation is performed on the saturation value in the HSL values ​​of all pixels of the target image to obtain the standard saturation value of the image; a fourth operation is performed on the brightness value in the HSL values ​​of all pixels of the target image to obtain the standard brightness value of the target image. The sorting order acquisition module also includes: Other color value sorting units are used to obtain the sorting order of the target image according to at least one of the following methods when the hue error values ​​are equal: sorting according to the size of the standard saturation value, sorting according to the size of the standard brightness value, and sorting according to the time of image creation.

11. The apparatus according to claim 9, characterized in that, The device further includes: The image order display module is used to display some or all of the sorted target images on the display interface of the terminal device.

12. The apparatus according to claim 10, characterized in that, The device further includes: The first instruction acquisition module is used to acquire a first image filtering instruction, wherein the first image filtering instruction includes a first hue value for image filtering. The first instruction response module is used to respond to the first image filtering instruction, filter out the first candidate image whose standard hue value is the first hue value from the target image, and display the first candidate image on the display interface of the terminal device according to the sorting order.

13. The apparatus according to claim 12, characterized in that, The first instruction response module is further configured to: when there is no first candidate image with a standard hue value of the first hue value in the target image, convert the first hue value to a second hue value, wherein the second hue value is the hue value that is adjacent to the first hue value and corresponds to the target image, use the target image with the standard hue value of the second hue value as the first candidate image, and display the first candidate image on the display interface of the terminal device in the sorting order.

14. The apparatus according to claim 12, characterized in that, The terminal device's display interface shows a hue filter graphic with hue gradients. The hue gradient order of the hue filter graphic corresponds to the standard hue value sorting order in the preset image color value sorting method. The first instruction acquisition module is specifically used for: When a user selects a target hue color in the hue filter graphic, the user obtains the first image filter instruction, which includes a first hue value corresponding to the target hue color.

15. The apparatus according to claim 12, characterized in that, The device further includes: The second instruction acquisition module is used to acquire a second image filtering instruction, the second image filtering instruction including a first saturation value and a first brightness value for image filtering; The second instruction response module is used to respond to the second image filtering instruction by expanding the range of the first hue value to a third hue value range, selecting the target image whose standard hue value is within the third hue value range as the second candidate image, expanding the range of the first saturation value to a second saturation value range, expanding the range of the first brightness value to a second brightness value range, filtering the target image whose standard saturation value is within the second saturation value range and whose standard brightness value is within the second brightness value range from the second candidate image as the third candidate image, and displaying the third candidate image on the display interface of the terminal device according to the sorting order.

16. The apparatus according to claim 15, characterized in that, The terminal device's display interface shows a color gradient saturation and brightness filtering graphic. The saturation color gradient range in the saturation and brightness filtering graphic corresponds to the filtering range of saturation values, and the brightness color gradient range corresponds to the filtering range of brightness values. The second instruction response module is specifically used for: When a user selects a target saturation color and a target brightness color in the saturation and brightness filter graphic, a second image filtering instruction is obtained. The second image filtering instruction includes the first saturation value corresponding to the target saturation color and the first brightness value corresponding to the target brightness color.

17. A terminal device, characterized in that, include: At least one processor, and at least one memory communicatively connected to said processor, wherein: The memory stores program instructions that can be executed by the processor, and the processor can execute the image sorting method as described in any one of claims 1 to 8 by calling the program instructions.

18. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause the computer to perform the image sorting method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Image sorting method and device, electronic equipment and storage medium

    CN111324254A