A method and apparatus for image processing, an electronic device, and a storage medium
By optimizing image sorting and generating transition animations based on visual feature parameters, the problem of visual fragmentation caused by monotonous image sorting in existing technologies is solved, thus improving the user experience.
Patent Information
- Application Number
- CN202411751078.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2026-05-29
AI Technical Summary
In existing image processing technologies, the sorting method for images in a photo album is too simplistic, resulting in a fragmented visual experience when users switch between images while browsing the album, leading to a poor user experience.
The image order is determined based on the feature parameters of the images in the visual feature dimension, and an album is generated based on this order. The image sorting is optimized to improve the content continuity between adjacent images, and the switching animation between adjacent images in the album is generated to reduce the sense of screen disjointedness.
It improves the visual continuity of images in the album, reduces the sense of disjointedness during image switching, and enhances the user experience.
Smart Images

Figure CN122112296A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data processing technology, and in particular relates to an image processing method, apparatus, electronic device and storage medium. Background Technology
[0002] With the continuous development of multimedia technology, the camera function of electronic devices is becoming more and more powerful. Users can use the camera module equipped on electronic devices to take pictures to record beautiful moments in work and life, and store the captured images in the electronic device's gallery.
[0003] Existing image processing technologies can divide images in a photo library into different albums based on the content captured. However, the images within these albums are often arranged chronologically based on the shooting time, resulting in a monotonous sorting method and significant differences between adjacent images. This leads to a fragmented visual experience due to frequent changes in the displayed content when browsing the album. Therefore, current image processing technologies suffer from a lack of continuity in image sorting within albums and a poor user experience during image transitions. Summary of the Invention
[0004] This application provides an image processing method, apparatus, electronic device, and storage medium, which can solve the problems of existing image processing technologies, such as the single sorting method of images in the album, and the visual content being fragmented during the image switching process when browsing the album, resulting in a poor user experience.
[0005] In a first aspect, embodiments of this application provide an image processing method, including:
[0006] In response to the user's first action, acquire multiple images;
[0007] For any image among the plurality of images, the image order among the plurality of images is determined based on the feature parameters of the image in at least one visual feature dimension;
[0008] An album is generated based on the image order of the multiple images, wherein each image in the album is sorted according to the image order.
[0009] Implementing the embodiments of this application has the following beneficial effects: After receiving the first operation initiated by the user, multiple images corresponding to the first operation can be selected from the gallery, and the image order of the image in the multiple images can be determined according to the feature parameters of each image in the preset visual image dimension. This enables the sorting of images in the album to be determined based on the degree of difference between visual image dimensions, improves the similarity of image content between adjacent images, thereby improving the continuity of switching between different images in the album, reducing the sense of screen fragmentation, and improving the user experience.
[0010] In one possible implementation of the first aspect, the at least one visual feature dimension includes at least one of the following: a color dimension, a region proportion dimension of the visual element, and a pose dimension of the visual element.
[0011] In one possible implementation of the first aspect, the characteristic parameters of the color dimension include at least one of: brightness value, hue value, and grayscale value of any primary color.
[0012] In one possible implementation of the first aspect, the first operation is used to generate an album corresponding to a theme type specified by the first operation; the plurality of images are images in the gallery associated with the theme type.
[0013] In one possible implementation of the first aspect, the plurality of images are images in a gallery that are associated with the subject type and meet the image quality conditions.
[0014] In one possible implementation of the first aspect, the image quality condition includes at least one of the following:
[0015] The brightness value is within the preset brightness range;
[0016] There are no abnormal areas, which include at least one of the following: blurred areas, red-eye areas, and glare areas;
[0017] The highest aesthetic score is achieved among at least two images with a similarity greater than a preset similarity threshold.
[0018] In one possible implementation of the first aspect, in the album, N consecutive images satisfy at least one of the following:
[0019] The image brightness changes from dark to light;
[0020] The image brightness changes from bright to dark;
[0021] The proportion of the common target visual element in the N images increases from small to large.
[0022] The proportion of the common target visual element in the N images is from largest to smallest;
[0023] The pose changes of the visual elements in the N images conform to the pose change trajectory.
[0024] The N images are arranged in the order of visiting the corresponding attractions;
[0025] N is a positive integer greater than 1. Optionally, N can be a positive integer greater than 2.
[0026] In one possible implementation of the first aspect, the album further includes M consecutive images, the first image of the M images being adjacent to the last image of the N images; the sorting pattern of the M images is the opposite of the sorting pattern of the N images; M is a positive integer greater than 1; optionally, M can specifically be a positive integer greater than 2.
[0027] For example, if N images follow the order of brightness from darkest to brightest, then M images follow the order of brightness from darkest to brightest.
[0028] For example, if N images conform to the sorting rule of the region proportion of the common target visual element from small to large, then M images conform to the sorting rule of the region proportion of the common target visual element from large to small.
[0029] In one possible implementation of the first aspect, in the album, N consecutive images satisfy at least one of the following:
[0030] The visual elements in the N images belong to the same pose type;
[0031] The N images correspond to the same scenic spot;
[0032] The N images include the same main visual element; N is a positive integer greater than 1, and optionally, M can be a positive integer greater than 2.
[0033] In one possible implementation of the first aspect, the plurality of images comprises images from a plurality of image sets;
[0034] The step of determining the image order of any image among the plurality of images based on feature parameters of the image in at least one visual feature dimension includes:
[0035] For any given image, the order of the image in its respective image set is determined based on the feature parameters of the image in at least one visual feature dimension, and the image order of the image in the plurality of images is determined based on the order of the image in its respective image set and the order of the image set in the plurality of image sets.
[0036] In one possible implementation of the first aspect, each image set corresponds to a pose type, and for any image set, the order of the image sets in the plurality of image sets is determined based on the order of the pose types corresponding to the image sets on the pose change trajectory.
[0037] In one possible implementation of the first aspect, each image set corresponds to a scenic spot, and for any image set, the order of the image sets in the plurality of image sets is determined based on the order of visits to the scenic spots corresponding to the image sets on the scenic spot tour route.
[0038] In one possible implementation of the first aspect, determining the image order of any image among the plurality of images based on feature parameters of the image in at least one visual feature dimension includes:
[0039] The correlation coefficient between any two images is calculated based on the feature parameters corresponding to the same visual elements contained in any two images in the visual feature dimension; the correlation coefficient is used to characterize the degree of correlation between any two images.
[0040] Based on the correlation coefficient, the image order of each image in the plurality of images is determined.
[0041] In one possible implementation of the first aspect, the visual feature dimension includes at least one of the following: texture, hue, shape, orientation, color, area proportion, and quantity.
[0042] In one possible implementation of the first aspect, after generating the album based on the image order of the multiple images, the method further includes:
[0043] Generate an image switching video corresponding to the album; the image switching video includes a first switching animation between two adjacent images in the album; the first switching animation is generated based on the same visual elements between the two adjacent images.
[0044] In one possible implementation of the first aspect, the image transformation operation included in the first switching animation is determined based on target features of the same visual element in two adjacent images; the image transformation operation includes at least one of scaling, rotation, and movement; the target feature includes at least one of pose, size, and / or position.
[0045] In one possible implementation of the first aspect, the feature is that it further includes:
[0046] Based on the second switching animation between two adjacent images in the album, thumbnails of each image and the corresponding image tags are displayed sequentially; the second switching animation is generated based on the image tags corresponding to the two adjacent images.
[0047] In one possible implementation of the first aspect, the step of sequentially displaying thumbnails of each image and image tags corresponding to the images based on a second switching animation between two adjacent images in the album includes:
[0048] Based on the second switching animation, preview screens corresponding to each image are displayed sequentially; the preview screens include thumbnails of the images and at least one image tag corresponding to the images.
[0049] In one possible implementation of the first aspect, the second switching animation is used to display the transformation process of different image labels between the preview screens corresponding to the two images and the transformation process between the thumbnails of the two adjacent images.
[0050] In one possible implementation of the first aspect, the preview screen includes a ring centered on the thumbnail; each of the image tags is displayed on the ring; or
[0051] The preview screen includes two or more concentric rings centered on the thumbnail; each image label is displayed on the corresponding concentric ring according to its label association with the image.
[0052] In one possible implementation of the first aspect, the second switching animation is used to display the connection process of thumbnails of the two adjacent images connected by the same image label between the two adjacent images.
[0053] In one possible implementation of the first aspect, the step of sequentially displaying thumbnails of each image and image tags corresponding to the images based on a second switching animation between two adjacent images in the album includes:
[0054] During the process of generating the image switching video corresponding to the album, based on the second switching animation between two adjacent images in the album, thumbnails of each image and the image tags corresponding to the images are displayed sequentially.
[0055] In a second aspect, an image processing apparatus includes:
[0056] The image acquisition unit is used to acquire multiple images in response to a first operation initiated by the user;
[0057] An image sorting unit is used to determine the image order of any image in the plurality of images based on the feature parameters of the image in at least one visual feature dimension.
[0058] An album generation unit is used to generate an album based on the image order of the multiple images, wherein each image in the album is sorted according to the image order.
[0059] In one possible implementation of the second aspect, the at least one visual feature dimension includes at least one of the following: a color dimension, a region proportion dimension of the visual element, and a pose dimension of the visual element.
[0060] In one possible implementation of the second aspect, the characteristic parameters of the color dimension include at least one of: brightness value, hue value, and grayscale value of any primary color.
[0061] In one possible implementation of the second aspect, the first operation is used to generate an album corresponding to a theme type specified by the first operation; the plurality of images are images in the gallery associated with the theme type.
[0062] In one possible implementation of the second aspect, the plurality of images are images in the image library that are associated with the subject type and meet the image quality conditions.
[0063] In one possible implementation of the second aspect, the image quality condition includes at least one of the following:
[0064] The brightness value is within the preset brightness range;
[0065] There are no abnormal areas, which include at least one of the following: blurred areas, red-eye areas, and glare areas;
[0066] The highest aesthetic score is achieved among at least two images with a similarity greater than a preset similarity threshold.
[0067] In one possible implementation of the second aspect, in the album, N consecutive images satisfy at least one of the following:
[0068] The image brightness changes from dark to light;
[0069] The image brightness changes from bright to dark;
[0070] The proportion of the common target visual element in the N images increases from small to large.
[0071] The proportion of the common target visual element in the N images is from largest to smallest;
[0072] The pose changes of the visual elements in the N images conform to the pose change trajectory.
[0073] The N images are ordered according to the visiting order of the corresponding attractions; N is a positive integer greater than 1.
[0074] In one possible implementation of the second aspect, the album further includes M consecutive images, the first image of the M images being adjacent to the last image of the N images; the sorting pattern of the M images is the opposite of the sorting pattern of the N images, and M is a positive integer greater than 1.
[0075] In one possible implementation of the second aspect, the album contains N consecutive images that satisfy at least one of the following:
[0076] The visual elements in the N images belong to the same pose type;
[0077] The N images correspond to the same scenic spot;
[0078] The N images include the same main visual element; N is a positive integer greater than 1.
[0079] In one possible implementation of the second aspect, the plurality of images includes images from a plurality of image sets;
[0080] The image sorting unit is specifically used to: for any image, determine the order of the image in its respective image set based on the feature parameters of the image in at least one visual feature dimension, and determine the image order of the image in the multiple image sets based on the order of the image in its respective image set and the order of the image set in the multiple image sets.
[0081] In one possible implementation of the second aspect, each image set corresponds to a pose type, and for any image set, the order of the image sets in the plurality of image sets is determined based on the order of the pose types corresponding to the image sets on the pose change trajectory.
[0082] In one possible implementation of the second aspect, each image set corresponds to a scenic spot, and for any image set, the order of the image sets in the plurality of image sets is determined based on the order of visits to the scenic spots corresponding to the image sets on the scenic spot tour route.
[0083] In one possible implementation of the second aspect, the image sorting unit is specifically used to: calculate the correlation coefficient between any two images based on the feature parameters corresponding to the visual feature dimension of the same visual elements contained between any two images in the plurality of images; the correlation coefficient is used to characterize the degree of correlation between any two images; and based on the correlation coefficient, determine the image order of each image in the plurality of images.
[0084] In one possible implementation of the second aspect, the visual feature dimension includes at least one of the following: texture, hue, shape, orientation, color, area proportion, and quantity.
[0085] In one possible implementation of the second aspect, the apparatus further includes:
[0086] A video generation unit is used to generate an image switching video corresponding to the album; the image switching video includes a first switching animation between two adjacent images in the album; the first switching animation is generated based on the same visual elements between the two adjacent images.
[0087] In one possible implementation of the second aspect, the image transformation operation included in the first switching animation is determined based on target features of the same visual element in two adjacent images; the image transformation operation includes at least one of scaling, rotation, and movement; the target feature includes at least one of pose, size, and / or position.
[0088] In one possible implementation of the second aspect, the apparatus further includes:
[0089] An animation display unit is used to sequentially display thumbnails of each image and image tags corresponding to the images based on a second switching animation between two adjacent images in the album; the second switching animation is generated based on the image tags corresponding to the two adjacent images.
[0090] In one possible implementation of the second aspect, the animation display unit is specifically used to: display preview screens corresponding to each image in sequence based on the second switching animation; the preview screens include thumbnails corresponding to the images and at least one image tag corresponding to the images.
[0091] In one possible implementation of the second aspect, the second switching animation is used to display the transformation process of different image labels between the preview screens corresponding to the two images and the transformation process between the thumbnails of the two adjacent images.
[0092] In one possible implementation of the second aspect, the preview screen includes a ring centered on the thumbnail; each of the image tags is displayed on the ring; or
[0093] The preview screen includes two or more concentric rings centered on the thumbnail; each image label is displayed on the corresponding concentric ring according to its label association with the image.
[0094] In one possible implementation of the second aspect, the second switching animation is used to display the connection process of thumbnails of the two adjacent images connected by the same image label between the two adjacent images.
[0095] In one possible implementation of the second aspect, the animation display unit is specifically used to include: during the process of generating the image switching video corresponding to the album, based on the second switching animation between two adjacent images in the album, sequentially displaying thumbnails of each image and the image tags corresponding to the images.
[0096] Thirdly, embodiments of this application provide an image processing method, including:
[0097] In response to the first operation, an image sequence is acquired; the image sequence includes multiple images.
[0098] Generate an image switching video corresponding to the image sequence; the image switching video includes a first switching animation between two adjacent images in the image sequence; the first switching animation is generated based on the same visual elements between the two adjacent images.
[0099] In this embodiment of the application, by using the same visual elements between adjacent images, a switching animation between two adjacent images is generated, thereby improving the smoothness of the image switching video, enhancing the user's reading experience, and reducing the sense of disjointed content during the image switching process.
[0100] In one possible implementation of the third aspect, the image transformation operation included in the first switching animation is determined based on target features of the same visual element in two adjacent images; the image transformation operation includes at least one of scaling, rotation, and movement; the target feature includes at least one of pose, size, and / or position.
[0101] In one possible implementation of the third aspect, the image sequence is an album based on a theme type specified by the first operation; the multiple images are images in a gallery associated with the theme type.
[0102] In one possible implementation of the third aspect, the acquisition of the image sequence in response to the first operation includes:
[0103] For any image among the plurality of images, the image order among the plurality of images is determined based on the feature parameters of the image in at least one visual feature dimension;
[0104] The album is obtained based on the image order of the multiple images, wherein each image in the album is sorted according to the image order.
[0105] In one possible implementation of the third aspect, the at least one visual feature dimension includes at least one of the following: color dimension, region proportion dimension of visual element, and pose dimension of visual element.
[0106] In one possible implementation of the third aspect, the characteristic parameters of the color dimension include at least one of: brightness value, hue value, and grayscale value of any primary color.
[0107] In one possible implementation of the third aspect, the plurality of images are images in the image library that are associated with the subject type and meet the image quality conditions.
[0108] In one possible implementation of the third aspect, the image quality condition includes at least one of the following:
[0109] The brightness value is within the preset brightness range; there are no abnormal areas, including at least one of the following: blurred areas, red-eye areas, and glare areas.
[0110] The highest aesthetic score is achieved among at least two images with a similarity greater than a preset similarity threshold.
[0111] In one possible implementation of the third aspect, the album contains N consecutive images that satisfy at least one of the following:
[0112] The image brightness changes from dark to light;
[0113] The image brightness changes from bright to dark;
[0114] The proportion of the common target visual element in the N images increases from small to large.
[0115] The proportion of the common target visual element in the N images is from largest to smallest;
[0116] The pose changes of the visual elements in the N images conform to the pose change trajectory.
[0117] The N images are ordered according to the visiting order of the corresponding attractions; N is a positive integer greater than 1.
[0118] In one possible implementation of the third aspect, the album further includes M consecutive images, the first image of the M images being adjacent to the last image of the N images;
[0119] The sorting pattern of the M images is the opposite of that of the N images; M is a positive integer greater than 1.
[0120] In one possible implementation of the third aspect, the N consecutive images in the album satisfy at least one of the following:
[0121] The visual elements in the N images belong to the same pose type;
[0122] The N images correspond to the same scenic spot;
[0123] The N images include the same main visual element; N is a positive integer greater than 1.
[0124] In one possible implementation of the third aspect, the multiple images include images from multiple image sets;
[0125] The step of determining the image order of any image among the plurality of images based on feature parameters of the image in at least one visual feature dimension includes:
[0126] For any given image, the order of the image in its respective image set is determined based on the feature parameters of the image in at least one visual feature dimension, and the image order of the image in the plurality of images is determined based on the order of the image in its respective image set and the order of the image set in the plurality of image sets.
[0127] In one possible implementation of the third aspect, each image set corresponds to a pose type, and for any image set, the order of the image sets in the plurality of image sets is determined based on the order of the pose types corresponding to the image sets on the pose change trajectory.
[0128] In one possible implementation of the third aspect, each image set corresponds to a scenic spot, and for any image set, the order of the image sets in the plurality of image sets is determined based on the order of visits to the scenic spots corresponding to the image sets on the scenic spot tour route.
[0129] In one possible implementation of the third aspect, determining the image order of any image among the plurality of images based on feature parameters of the image in at least one visual feature dimension includes:
[0130] The correlation coefficient between any two images is calculated based on the feature parameters corresponding to the same visual elements contained in any two images in the visual feature dimension; the correlation coefficient is used to characterize the degree of correlation between any two images.
[0131] Based on the correlation coefficient, the image order of each image in the plurality of images is determined.
[0132] In one possible implementation of the third aspect, the visual feature dimensions include at least one of the following: texture, hue, shape, orientation, color, area proportion, and quantity.
[0133] One possible implementation of the third aspect also includes:
[0134] Based on the second switching animation between two adjacent images in the album, thumbnails of each image and the corresponding image tags are displayed sequentially; the second switching animation is generated based on the image tags corresponding to the two adjacent images.
[0135] In one possible implementation of the third aspect, the step of sequentially displaying thumbnails of each image and the corresponding image tags based on the second switching animation between two adjacent images in the album includes:
[0136] Based on the second switching animation, preview screens corresponding to each image are displayed sequentially; the preview screens include thumbnails of the images and at least one image tag corresponding to the images.
[0137] In one possible implementation of the third aspect, the second switching animation is used to display the transformation process of different image labels between the preview screens corresponding to the two images and the transformation process between the thumbnails of the two adjacent images.
[0138] In one possible implementation of the third aspect, the preview screen includes a ring centered on the thumbnail; each of the image tags is displayed on the ring; or
[0139] The preview screen includes two or more concentric rings centered on the thumbnail; each image label is displayed on the corresponding concentric ring according to its label association with the image.
[0140] In one possible implementation of the third aspect, the second switching animation is used to display the connection process of thumbnails of the two adjacent images connected by the same image label between the two adjacent images.
[0141] In one possible implementation of the third aspect, the step of sequentially displaying thumbnails of each image and the corresponding image tags based on the second switching animation between two adjacent images in the album includes:
[0142] During the process of generating the image switching video corresponding to the album, based on the second switching animation between two adjacent images in the album, thumbnails of each image and the image tags corresponding to the images are displayed sequentially.
[0143] Fourthly, this application provides an image processing apparatus, comprising:
[0144] An image sequence acquisition unit is used to acquire an image sequence in response to a first operation; the image sequence includes multiple images.
[0145] A video generation unit is used to generate an image switching video corresponding to the image sequence; the image switching video includes a first switching animation between two adjacent images in the image sequence; the first switching animation is generated based on the same visual elements between the two adjacent images.
[0146] In one possible implementation of the fourth aspect, the image transformation operation included in the first switching animation is determined based on target features of the same visual element in two adjacent images; the image transformation operation includes at least one of scaling, rotation, and movement; the target feature includes at least one of pose, size, and / or position.
[0147] In one possible implementation of the fourth aspect, the image sequence is an album based on a theme type specified by the first operation; the multiple images are images in a gallery associated with the theme type.
[0148] In one possible implementation of the fourth aspect, the image sequence acquisition unit includes:
[0149] An image sorting unit is used to determine the image order of any image in the plurality of images based on the feature parameters of the image in at least one visual feature dimension.
[0150] An album generation unit is used to generate the album based on the image order of the multiple images, wherein each image in the album is sorted according to the image order.
[0151] In one possible implementation of the fourth aspect, the at least one visual feature dimension includes at least one of the following: color dimension, region proportion dimension of visual element, and pose dimension of visual element.
[0152] In one possible implementation of the fourth aspect, the characteristic parameters of the color dimension include at least one of: brightness value, hue value, and grayscale value of any primary color.
[0153] In one possible implementation of the fourth aspect, the plurality of images are images in the image library that are associated with the subject type and meet the image quality conditions.
[0154] In one possible implementation of the fourth aspect, the image quality condition includes at least one of the following:
[0155] The brightness value is within the preset brightness range;
[0156] There are no abnormal areas, which include at least one of the following: blurred areas, red-eye areas, and glare areas;
[0157] The highest aesthetic score is achieved among at least two images with a similarity greater than a preset similarity threshold.
[0158] In one possible implementation of the fourth aspect, the album contains N consecutive images that satisfy at least one of the following:
[0159] The image brightness changes from dark to light;
[0160] The image brightness changes from bright to dark;
[0161] The proportion of the common target visual element in the N images increases from small to large.
[0162] The proportion of the common target visual element in the N images is from largest to smallest;
[0163] The pose changes of the visual elements in the N images conform to the pose change trajectory.
[0164] The N images are ordered according to the visiting order of the corresponding attractions; N is a positive integer greater than 1.
[0165] In one possible implementation of the fourth aspect, the album further includes M consecutive images, the first image of the M images being adjacent to the last image of the N images; the sorting pattern of the M images is the opposite of the sorting pattern of the N images; and M is a positive integer greater than 1.
[0166] In one possible implementation of the fourth aspect, the N consecutive images in the album satisfy at least one of the following:
[0167] The visual elements in the N images belong to the same pose type;
[0168] The N images correspond to the same scenic spot;
[0169] The N images include the same main visual element; N is a positive integer greater than 1.
[0170] In one possible implementation of the fourth aspect, the plurality of images includes images from a plurality of image sets;
[0171] The image sorting unit includes: for any image, determining the order of the image in its respective image set based on the feature parameters of the image in at least one visual feature dimension, and determining the image order of the image in the multiple image sets based on the order of the image in its respective image set and the order of the image set in the multiple image sets.
[0172] In one possible implementation of the fourth aspect, each image set corresponds to a pose type, and for any image set, the order of the image sets in the plurality of image sets is determined based on the order of the pose types corresponding to the image sets on the pose change trajectory.
[0173] In one possible implementation of the fourth aspect, each image set corresponds to a scenic spot, and for any image set, the order of the image sets in the plurality of image sets is determined based on the order of visits to the scenic spots corresponding to the image sets on the scenic spot tour route.
[0174] In one possible implementation of the fourth aspect, the image sorting unit is specifically used for:
[0175] The correlation coefficient between any two images is calculated based on the feature parameters corresponding to the same visual elements contained in any two images in the visual feature dimension; the correlation coefficient is used to characterize the degree of correlation between any two images.
[0176] Based on the correlation coefficient, the image order of each image in the plurality of images is determined.
[0177] In one possible implementation of the fourth aspect, the visual feature dimension includes at least one of the following: texture, hue, shape, orientation, color, area proportion, and quantity.
[0178] One possible implementation of the fourth aspect also includes:
[0179] The switching animation display unit is used to sequentially display thumbnails of each image and the image tags corresponding to the images based on a second switching animation between two adjacent images in the album; the second switching animation is generated based on the image tags corresponding to the two adjacent images.
[0180] In one possible implementation of the fourth aspect, the switching animation display unit is specifically used to: display preview screens corresponding to each image in sequence based on the second switching animation; the preview screens include thumbnails corresponding to the images and at least one image tag corresponding to the images.
[0181] In one possible implementation of the fourth aspect, the second switching animation is used to display the transformation process of different image labels between the preview screens corresponding to the two images and the transformation process between the thumbnails of the two adjacent images.
[0182] In one possible implementation of the fourth aspect, the preview screen includes a ring centered on the thumbnail; each of the image tags is displayed on the ring; or
[0183] The preview screen includes two or more concentric rings centered on the thumbnail; each image label is displayed on the corresponding concentric ring according to its label association with the image.
[0184] In one possible implementation of the fourth aspect, the second switching animation is used to display the connection process of thumbnails of the two adjacent images connected by the same image label between the two adjacent images.
[0185] In one possible implementation of the fourth aspect, the switching animation display unit is specifically used to: during the process of generating the image switching video corresponding to the album, based on the second switching animation between two adjacent images in the album, sequentially display the thumbnails of each image and the image tags corresponding to the images.
[0186] Fifthly, this application provides an image processing apparatus, comprising:
[0187] In response to the first operation, a photo album specified by the first operation is generated; the photo album includes multiple images;
[0188] During the generation of the album, thumbnails of each image and their corresponding image tags are displayed sequentially based on a second switching animation between the images. This second switching animation is generated based on the image tags corresponding to two adjacent images in the display order. The display order can be the order within the album or the default order of multiple images in the gallery.
[0189] In this embodiment of the application, during the response to the first operation, images associated with the theme type can be rotated, and during the rotation, a second switching animation can be used to achieve the transition between different images. Since the second switching animation is based on the image tags of the images, it is convenient for users to further determine the specific content included in the theme type based on the tags, which improves the fun of the waiting process.
[0190] In one possible implementation of the fifth aspect, during the process of generating the album, based on the second switching animation between images, the thumbnails of each image and the image tags corresponding to the images are displayed sequentially, including:
[0191] Based on the second switching animation, preview screens corresponding to each image are displayed sequentially; the preview screens include thumbnails of the images and at least one image tag corresponding to the images.
[0192] In one possible implementation of the fifth aspect, the second switching animation is used to display the transformation process of different image labels between the preview screens corresponding to the two images and the transformation process between the thumbnails of the two adjacent images.
[0193] In one possible implementation of the fifth aspect, the preview screen includes a ring centered on the thumbnail; each of the image tags is displayed on the ring; or
[0194] The preview screen includes two or more concentric rings centered on the thumbnail; each image label is displayed on the corresponding concentric ring according to its label association with the image.
[0195] In one possible implementation of the fifth aspect, the second switching animation is used to display the connection process of thumbnails of the two adjacent images connected by the same image label between the two adjacent images.
[0196] In one possible implementation of the fifth aspect, it further includes: generating an image switching video corresponding to the album; the image switching video includes a first switching animation between two adjacent images in the album; the first switching animation is generated based on the same visual elements between the two adjacent images.
[0197] In one possible implementation of the fifth aspect, the first operation is used to generate an image transition video for the album, wherein during the generation of the album, based on a second transition animation between images, thumbnails of each image and image tags corresponding to the images are displayed sequentially, including:
[0198] During the generation of the album and the image switching video, based on the second switching animation between two adjacent images in the album, thumbnails of each image and the corresponding image tags are displayed sequentially.
[0199] In one possible implementation of the fifth aspect, the image transformation operation included in the first switching animation is determined based on target features of the same visual element in two adjacent images; the image transformation operation includes at least one of scaling, rotation, and movement; the target feature includes at least one of pose, size, and / or position.
[0200] In one possible implementation of the fifth aspect, generating the album specified by the first operation in response to the first operation includes:
[0201] In response to the first operation, multiple images are acquired;
[0202] For any image among the plurality of images, the image order among the plurality of images is determined based on the feature parameters of the image in at least one visual feature dimension;
[0203] An album is generated based on the image order of the multiple images, wherein each image in the album is sorted according to the image order.
[0204] In one possible implementation of the fifth aspect, the at least one visual feature dimension includes at least one of the following: color dimension, region proportion dimension of visual element, and pose dimension of visual element.
[0205] In one possible implementation of the fifth aspect, the characteristic parameters of the color dimension include at least one of: brightness value, hue value, and grayscale value of any primary color.
[0206] In one possible implementation of the fifth aspect, the first operation is used to generate an album corresponding to a theme type specified by the first operation; the plurality of images are images in the gallery associated with the theme type.
[0207] In one possible implementation of the fifth aspect, the plurality of images are images in the image library that are associated with the subject type and meet the image quality conditions.
[0208] In one possible implementation of the fifth aspect, the image quality condition includes at least one of the following:
[0209] The brightness value is within the preset brightness range;
[0210] There are no abnormal areas, which include at least one of the following: blurred areas, red-eye areas, and glare areas;
[0211] The highest aesthetic score is achieved among at least two images with a similarity greater than a preset similarity threshold.
[0212] In one possible implementation of the fifth aspect, in the album, N consecutive images satisfy at least one of the following:
[0213] The image brightness changes from dark to bright; the image brightness changes from bright to dark.
[0214] The proportion of the common target visual element in the N images increases from small to large.
[0215] The proportion of the common target visual element in the N images is from largest to smallest;
[0216] The pose changes of the visual elements in the N images conform to the pose change trajectory; the order of the N images conforms to the tour order of the corresponding scenic spots; and N is a positive integer greater than 1.
[0217] In one possible implementation of the fifth aspect, the album further includes M consecutive images, the first image of the M images being adjacent to the last image of the N images; the sorting pattern of the M images is the opposite of the sorting pattern of the N images; and M is a positive integer greater than 1.
[0218] In one possible implementation of the fifth aspect, the N consecutive images in the album satisfy at least one of the following:
[0219] The visual elements in the N images belong to the same pose type;
[0220] The N images correspond to the same scenic spot;
[0221] The N images include the same main visual element; N is a positive integer greater than 1.
[0222] In one possible implementation of the fifth aspect, the plurality of images includes images from a plurality of image sets;
[0223] The step of determining the image order of any image among the plurality of images based on feature parameters of the image in at least one visual feature dimension includes:
[0224] For any given image, the order of the image in its respective image set is determined based on the feature parameters of the image in at least one visual feature dimension, and the image order of the image in the plurality of images is determined based on the order of the image in its respective image set and the order of the image set in the plurality of image sets.
[0225] In one possible implementation of the fifth aspect, each image set corresponds to a pose type, and for any image set, the order of the image sets in the plurality of image sets is determined based on the order of the pose types corresponding to the image sets on the pose change trajectory.
[0226] In one possible implementation of the fifth aspect, each of the image sets corresponds to a scenic spot, and for any image set, the order of the image sets in the plurality of image sets is determined based on the order of the scenic spot corresponding to the image set on the scenic spot tour route.
[0227] In one possible implementation of the fifth aspect, determining the image order of any image among the plurality of images based on feature parameters of the image in at least one visual feature dimension includes:
[0228] The correlation coefficient between any two images is calculated based on the feature parameters corresponding to the same visual elements contained in any two images in the visual feature dimension; the correlation coefficient is used to characterize the degree of correlation between any two images.
[0229] Based on the correlation coefficient, the image order of each image in the plurality of images is determined.
[0230] In one possible implementation of the fifth aspect, the visual feature dimension includes at least one of the following: texture, hue, shape, orientation, color, area proportion, and quantity.
[0231] Sixthly, this application provides an image processing apparatus, comprising:
[0232] An album generation unit is configured to generate an album specified by the first operation in response to a first operation; the album includes multiple images.
[0233] An animation display unit is used to sequentially display thumbnails of each image and their corresponding image tags based on a second switching animation between images during the generation of the album. The second switching animation is generated based on the image tags corresponding to two adjacent images in the display order. The display order can be the order within the album or the default order of multiple images in the gallery.
[0234] In one possible implementation of the sixth aspect, the animation display unit is specifically used to: display preview screens corresponding to each image in sequence based on the second switching animation; the preview screens include thumbnails corresponding to the images and at least one image tag corresponding to the images.
[0235] In one possible implementation of the sixth aspect, the second switching animation is used to display the transformation process of different image labels between the preview screens corresponding to the two images and the transformation process between the thumbnails of the two adjacent images.
[0236] In one possible implementation of the sixth aspect, the preview screen includes a ring centered on the thumbnail; each of the image tags is displayed on the ring; or
[0237] The preview screen includes two or more concentric rings centered on the thumbnail; each image label is displayed on the corresponding concentric ring according to its label association with the image.
[0238] In one possible implementation of the sixth aspect, the second switching animation is used to display the connection process of thumbnails of the two adjacent images connected by the same image label between the two adjacent images.
[0239] In one possible implementation of the sixth aspect, the apparatus further includes:
[0240] A video generation unit is used to generate an image switching video corresponding to the album; the image switching video includes a first switching animation between two adjacent images in the album; the first switching animation is generated based on the same visual elements between the two adjacent images.
[0241] In one possible implementation of the sixth aspect, the first operation is used to generate the image switching video of the album, specifically: during the process of generating the album and the image switching video, based on the second switching animation between two adjacent images in the album, the thumbnails of each image and the image tags corresponding to the images are displayed sequentially.
[0242] In one possible implementation of the sixth aspect, the image transformation operation included in the first switching animation is determined based on target features of the same visual element in two adjacent images; the image transformation operation includes at least one of scaling, rotation, and movement; the target feature includes at least one of pose, size, and / or position.
[0243] In one possible implementation of the sixth aspect, the album generation unit includes:
[0244] An image acquisition unit is configured to acquire multiple images in response to the first operation;
[0245] An image sorting unit is used to determine the image order of any image in the plurality of images based on the feature parameters of the image in at least one visual feature dimension.
[0246] An album determination unit is used to generate an album based on the image order of the multiple images, wherein each image in the album is sorted according to the image order.
[0247] In one possible implementation of the sixth aspect, the at least one visual feature dimension includes at least one of the following: a color dimension, a region proportion dimension of the visual element, and a pose dimension of the visual element.
[0248] In one possible implementation of the sixth aspect, the characteristic parameters of the color dimension include at least one of: brightness value, hue value, and grayscale value of any primary color.
[0249] In one possible implementation of the sixth aspect, the first operation is used to generate an album corresponding to a theme type specified by the first operation; the plurality of images are images in the gallery associated with the theme type.
[0250] In one possible implementation of the sixth aspect, the plurality of images are images in the image library that are associated with the subject type and meet the image quality conditions.
[0251] In one possible implementation of the sixth aspect, the image quality condition includes at least one of the following:
[0252] The brightness value is within the preset brightness range;
[0253] There are no abnormal areas, which include at least one of the following: blurred areas, red-eye areas, and glare areas;
[0254] The highest aesthetic score is achieved among at least two images with a similarity greater than a preset similarity threshold.
[0255] In one possible implementation of the sixth aspect, in the album, N consecutive images satisfy at least one of the following:
[0256] The image brightness changes from dark to light;
[0257] The image brightness changes from bright to dark;
[0258] The proportion of the common target visual element in the N images increases from small to large.
[0259] The proportion of the common target visual element in the N images is from largest to smallest;
[0260] The pose changes of the visual elements in the N images conform to the pose change trajectory.
[0261] The N images are ordered according to the visiting order of the corresponding attractions; N is a positive integer greater than 1.
[0262] In one possible implementation of the sixth aspect, the album further includes M consecutive images, the first image of the M images being adjacent to the last image of the N images; the sorting pattern of the M images is the opposite of the sorting pattern of the N images; and M is a positive integer greater than 1.
[0263] In one possible implementation of the sixth aspect, the album contains N consecutive images that satisfy at least one of the following:
[0264] The visual elements in the N images belong to the same pose type;
[0265] The N images correspond to the same scenic spot;
[0266] The N images include the same main visual element; N is a positive integer greater than 1.
[0267] In one possible implementation of the sixth aspect, the plurality of images includes images from a plurality of image sets;
[0268] The image sorting unit is specifically used to: for any image, determine the order of the image in its respective image set based on the feature parameters of the image in at least one visual feature dimension, and determine the image order of the image in the multiple image sets based on the order of the image in its respective image set and the order of the image set in the multiple image sets.
[0269] In one possible implementation of the sixth aspect, each image set corresponds to a pose type, and for any image set, the order of the image sets in the plurality of image sets is determined based on the order of the pose types corresponding to the image sets on the pose change trajectory.
[0270] In one possible implementation of the sixth aspect, each of the image sets corresponds to a scenic spot, and for any image set, the order of the image sets in the plurality of image sets is determined based on the order of visits to the scenic spots corresponding to the image sets on the scenic spot tour route.
[0271] In one possible implementation of the sixth aspect, the image sorting unit is specifically used for:
[0272] The correlation coefficient between any two images is calculated based on the feature parameters corresponding to the same visual elements contained in any two images in the visual feature dimension; the correlation coefficient is used to characterize the degree of correlation between any two images.
[0273] Based on the correlation coefficient, the image order of the image among the multiple images is determined.
[0274] In one possible implementation of the sixth aspect, the visual feature dimension includes at least one of the following: texture, hue, shape, orientation, color, area proportion, and quantity.
[0275] In a seventh aspect, embodiments of this application provide a terminal device, including: a memory, a processor, and a program stored in the memory, wherein the processor executes the program to implement the steps of the image processing method described in any one of the first aspects, the steps of the image processing method described in any one of the third aspects, and / or the steps of the image processing method described in any one of the fifth aspects.
[0276] Eighthly, embodiments of this application provide a readable storage medium storing a program that, when executed by a processor, implements the steps of the image processing method described in any one of the first aspects, the third aspect, and / or the fifth aspect.
[0277] Ninthly, embodiments of this application provide a program product that, when run on a device, causes the device to perform the steps of the display method described in any one of the first aspects, the steps of the image processing method described in any one of the third aspects, and / or the steps of the image processing method described in any one of the fifth aspects.
[0278] Other implementations can refer to the aforementioned aspects and will not be elaborated further.
[0279] The beneficial effects of the above aspects can be referenced from each other, and will not be elaborated further here. Attached Figure Description
[0280] Figure 1 This is an illustration of an existing themed photo album;
[0281] Figure 2 This is a flowchart illustrating the implementation of an image processing method according to an embodiment of this application;
[0282] Figure 3 This is a schematic diagram illustrating the triggering of the first operation provided in an embodiment of this application;
[0283] Figure 4 This is a flowchart illustrating the operation of secondary image filtering according to an embodiment of this application;
[0284] Figure 5 This is a schematic diagram of image filtering provided in an embodiment of this application;
[0285] Figure 6 This is a schematic diagram of image classification based on object pose provided in another embodiment of this application;
[0286] Figure 7 This is a schematic diagram of determining the first sequence based on brightness values according to an embodiment of this application;
[0287] Figure 8 This is a schematic diagram illustrating the determination of the first order based on the region proportion provided in an embodiment of this application;
[0288] Figure 9 A flowchart illustrating the implementation of determining image order based on visual elements according to an embodiment of this application is shown;
[0289] Figure 10 A schematic diagram illustrating the determination of correlation coefficients provided in an embodiment of this application is shown;
[0290] Figure 11 This is a schematic diagram illustrating the determination of the order of each image set based on scenic spots, according to an embodiment of this application.
[0291] Figure 12 This is a schematic diagram illustrating the sorting of an image set based on activity, according to an embodiment of this application.
[0292] Figure 13 This is a schematic diagram illustrating the sorting of images in a multi-image set scene according to an embodiment of this application;
[0293] Figure 14 This is a schematic diagram illustrating the determination of image order in a multi-image-set scenario according to an embodiment of this application;
[0294] Figure 15 This is a schematic diagram illustrating a photo album displayed using an image list based on an embodiment of this application;
[0295] Figure 16 This is a schematic diagram of the image switching video generation process provided in an embodiment of this application;
[0296] Figure 17 This is a schematic diagram illustrating the generation of a first switching animation provided in an embodiment of this application;
[0297] Figure 18 This is a schematic diagram illustrating the generation of a first switching animation provided in another embodiment of this application;
[0298] Figure 19 This is a schematic diagram illustrating the generation of a first switching animation provided in another embodiment of this application;
[0299] Figure 20 This is a schematic diagram of the display timing of an image switching video provided in an embodiment of this application;
[0300] Figure 21 This is a schematic diagram of an album name provided in one embodiment of this application;
[0301] Figure 22 This is a schematic diagram of a waiting interface provided in an embodiment of this application;
[0302] Figure 23 This is a schematic diagram illustrating the display of a preview screen on a waiting interface according to an embodiment of this application;
[0303] Figure 24 This is a schematic diagram illustrating the display of a preview screen on a waiting interface, provided in another embodiment of this application.
[0304] Figure 25 This is a timing diagram of an image processing method provided in an embodiment of this application;
[0305] Figure 26 This is a structural block diagram of an image processing apparatus provided in an embodiment of this application;
[0306] Figure 27 This is a flowchart illustrating the implementation of an image processing method provided in another embodiment of this application;
[0307] Figure 28 This is a structural block diagram of another image processing apparatus provided in the embodiments of this application;
[0308] Figure 29 This is a flowchart illustrating the implementation of an image processing method according to another embodiment of this application;
[0309] Figure 30 This is a structural block diagram of another image processing apparatus provided in the embodiments of this application;
[0310] Figure 31 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0311] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0312] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0313] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0314] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrases "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0315] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0316] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0317] As the storage capacity of electronic devices continues to increase, and the performance of camera modules on these devices continues to improve, the number of images stored in the image libraries of electronic devices is also increasing. To facilitate users in viewing images on a specific theme from this vast collection, images in the image library can be categorized according to theme type, forming different albums. Users can click on the corresponding album to view images with the same theme. For example, Figure 1 This shows a schematic diagram of an existing themed photo album. See also Figure 1 As shown in (a), a smartphone can have a gallery app installed. Users can access the gallery app's interface by clicking the corresponding icon on the smartphone, such as... Figure 1 As shown in (a), the gallery interface can include album interfaces categorized by theme. These album interfaces display multiple albums categorized by theme, such as album 11 containing user A's photo, with a cover image of user A's face. This album area can also contain album 12 representing a specific location (e.g., Beijing), named "Beijing Trip" to indicate its theme. To view images within a specific album, such as album 11, a user can click on album 11 to enter its display area. Figure 1 As shown in (b) in the image. The album 11 contains multiple thumbnails of images containing the face of user A, such as thumbnails 111 and 113 containing a single face, and may also contain thumbnails 112 containing multiple faces, etc.
[0318] In the aforementioned album 11, the order of each thumbnail in album 11 can be determined based on the acquisition time of its corresponding image. For example, the acquisition time of thumbnail 111 is later than that of thumbnail 112, and since users are generally allowed to view the most recently acquired photos first, the later the image was acquired, the earlier its corresponding image is ranked. That is, the order of thumbnail 111 in album 11 will be before that of thumbnail 112. The order of other thumbnails can also be arranged according to their acquisition time.
[0319] However, the existing sorting method described above has the following problems:
[0320] First, when users browse images in the album, because the images are sorted chronologically, there may be instances where the content continuity between adjacent images is low, thus affecting the user experience. For example, when a user clicks on thumbnail 111 above and previews the image corresponding to thumbnail 111, they get... Figure 1 As shown in (c) of the preview interface, users can switch between different images by swiping left or right. For example, swiping right will preview the image corresponding to thumbnail 112, resulting in... Figure 1 The preview interface shown in (d) is problematic. Because the two images contain different numbers of people, the differences between them are significant. This creates a disconnect between the two images when switching between them. If the user continues to swipe right, they will preview a single-person image again. This results in constantly changing image composition, potentially requiring switching between single-person and multi-person images, or interspersing portrait images between landscape images, leading to low continuity between adjacent images. Furthermore, when users need to view related images within the album, such as a single-person image in album 11, they must click on each corresponding thumbnail or navigate through multi-person images, reducing user efficiency and increasing operational difficulty.
[0321] Secondly, each album sorts images based on time, resulting in a single sorting method and a lack of diversity. In some use cases, sorting images based on time is not the best sorting method. For example, in the scenario mentioned above, where there are portrait and landscape images, sorting based on portraits first and then landscapes can improve the user's operating efficiency.
[0322] It is evident that existing image sorting technologies only sort images in an album based on time, resulting in low continuity of content between adjacent images, fragmentation of content between frames, and a single sorting method. In some scenarios, this can reduce user efficiency and increase operational difficulty, thereby affecting the user experience.
[0323] Example 1:
[0324] To address the problem of difficult user operation and poor user experience caused by the time-based sorting of images in photo albums in image processing technology, this application provides an image processing method. After obtaining the corresponding image set according to the theme type, the method can determine the order of each image in the album based on the feature parameters corresponding to the visual image dimension. This allows images with high content relevance to be arranged in adjacent positions, making it easier for users to continuously browse images with similar content. It also reduces the fragmentation of content when switching images, thereby improving the user experience.
[0325] The image processing method described above can be applied to electronic devices, including smartphones, tablets, laptops, desktop computers, and other devices with display capabilities. The electronic device can be equipped with a storage unit that can store multiple images. Based on user actions, the electronic device can sort some or all of the images stored in the image library to obtain a photo album sorted based on content relevance.
[0326] For example, Figure 2 A flowchart illustrating the implementation of an image processing method according to an embodiment of this application is shown. See also... Figure 2 As shown, this image processing method is specifically used to generate a photo album by sorting images based on visual image dimensions. Specifically, the image processing method includes the following steps:
[0327] In S201, multiple images are acquired in response to the first operation initiated by the user.
[0328] In this embodiment, the first operation is specifically a user-initiated operation to generate a photo album. Upon detecting that the user has initiated the first operation, the electronic device can retrieve multiple images corresponding to that first operation from the image library.
[0329] In some implementations, the first operation described above can be an operation of selecting images from a gallery, meaning the user can manually select multiple images from the gallery to generate a photo album. In this case, the electronic device can record the images selected by the user, generate an image set from the selected images, and generate a corresponding photo album based on the image set. Optionally, after determining the image set, the electronic device can determine the theme type corresponding to the image set based on the image tags of each image in the image set.
[0330] In some implementations, the first operation can be used to specify a theme type. In this case, the electronic device can retrieve multiple images associated with the theme type from the gallery based on the theme type specified by the user.
[0331] In some implementations, the first operation described above can be used to select at least one theme keyword associated with a theme type, and the electronic device can determine the theme type corresponding to the theme album based on the theme keyword specified in the first operation.
[0332] For example, Figure 3 A schematic diagram illustrating the triggering of a first operation according to an embodiment of this application is shown. See also Figure 3 As shown in (a), the electronic device can be a smartphone, whose main interface can display application icons for locally installed applications. Among these application icons is an icon 31 for a photo gallery application. Users can access the photo gallery application's interface by clicking icon 31, as shown below. Figure 3 As shown in (b), the photo album application's interface includes two sub-interfaces: a photo interface 32 for displaying all photos in the gallery, and a photo album interface 33 for displaying albums categorized by theme. The photo album interface 33 may include existing albums categorized by theme, such as the "Last Month" album 34, as well as controls for personalized albums generated based on user actions, such as the "Magic Album" control 35. Users can generate personalized themed albums by clicking on the aforementioned control 35.
[0333] In this embodiment, when the user clicks the aforementioned control 35, a selection interface for generating associated users can be displayed, such as... Figure 3 As shown in (c) above. The user association selection interface is generated based on the face images recorded in the stored images in the gallery. The electronic device can create a selection control for face images belonging to different users, such as control 36 mentioned above. Each control can correspond to a user (i.e., a face image). The user can select one or more as the associated users for the personalized album generated this time. For example, in this embodiment, the user selects two face images, control 36 (corresponding to a male user) and control 37 (corresponding to a female user), as the associated users for this personalized album. This means that the user needs to generate a personalized album based on images containing the faces of the two users. The electronic device can use the images containing the faces of the two users as an image set. After completing the user association selection operation, the user can click the next control 38 to further determine the theme type, resulting in the following... Figure 3The theme selection interface is shown in (d) above. In this theme selection interface, one or more candidate theme types can be determined based on the images of the associated users selected by the user. Taking the selection of a male and a female user as an example, since the image set contains multiple photos of the faces of the two users together, the electronic device can infer that the two users may be a couple. Therefore, the theme 39 "Honeymoon Trip" can be obtained. And based on the geographical location corresponding to the images containing the faces of the two users (such as multiple images in the image set corresponding to geographical locations in desert areas), the theme 310 "Desert Trip" can be obtained. Other theme types can be determined based on the image tags corresponding to the images containing the faces of the users, which will not be listed here.
[0334] In this embodiment, the user can select one of the multiple candidate theme types as the theme type for the personalized album to be generated. For example, selecting theme 310 as the theme type for the personalized album and clicking the generation control 311, the electronic device recognizes that the user has initiated the first operation and executes subsequent operation processes based on the first operation. If the first operation is the user manually selecting multiple images from the gallery, the electronic device can also determine one or more theme types based on the image tags corresponding to each image selected by the user. If multiple theme types are determined, the user can also select one of the one or more theme types as the theme type for the album to be generated.
[0335] In some possible implementations, the theme type can be used as the album name.
[0336] In this embodiment, the electronic device can obtain multiple images corresponding to the first operation from the image library.
[0337] In some possible implementations, when the first operation is the user manually selecting an image from the gallery, the aforementioned multiple images can be obtained directly based on the image specified in the first operation.
[0338] In some possible implementations, when the first operation is to specify a certain theme type, after the electronic device determines the theme type corresponding to the first operation, it can perform an initial screening of the images in the image library based on the theme type, that is, select images associated with the theme type from the image library to obtain the aforementioned multiple images.
[0339] In some implementations, each image in the image library can be assigned a corresponding image tag. The electronic device can calculate the correlation between each image tag and a topic type to determine whether the image is associated with that topic type. Specifically, if the electronic device calculates that the correlation between the image tag and the topic type of any image is greater than a preset correlation threshold, it identifies the image as associated with that topic type; conversely, if the calculated correlation between the image tag and the topic type of any image is less than or equal to the aforementioned correlation threshold, it identifies the image as not corresponding to that topic type.
[0340] In some implementations, each theme type can correspond to at least one visual element. The electronic device can perform image analysis on the images in the image library to determine whether the image contains the visual element corresponding to the theme type. If it does, the image is identified as the image corresponding to the theme type.
[0341] In some possible implementations, the multiple images acquired by the electronic device are specifically: images in the gallery that are associated with the theme type and meet the image quality conditions. That is, the user can select a set of images associated with the theme type from the gallery according to the theme type, and perform secondary filtering on the images in the set according to the image quality conditions. The images obtained after secondary filtering are used as multiple images for generating the album.
[0342] Specifically, Figure 4 A flowchart illustrating the operation of secondary image filtering according to an embodiment of this application is shown. See also... Figure 4 As shown, after receiving the first operation initiated by the user, the acquisition of multiple images may include the following steps:
[0343] In S401, a set of images associated with the subject type is determined in the gallery.
[0344] For example, Figure 5 A schematic diagram of image filtering according to an embodiment of this application is shown. See also Figure 5 As shown, the image library 51 can contain multiple images belonging to different theme types. After receiving the first operation initiated by the user, the electronic device can select images associated with the theme type specified in the first operation from the image library 51. For example, it can filter images containing facial images of user A and / or user B to obtain image set 52. Since image set 52 contains some images with poor imaging quality, such as images 53 that are too dark or images with blurry subjects, these abnormal images are generally not the focus of the user's browsing. Adding them to the theme album would increase a large number of invalid images, requiring switching operations on invalid images and reducing the browsing efficiency of the album.
[0345] In some shooting scenarios, users can also take multiple identical or similar images from the same location. For example, images 54 and 55 are exactly the same. If both of these images are added to the theme album, it will increase the proportion of redundant images in the album and also reduce the user's operating efficiency.
[0346] For the two types of images mentioned above, namely images with poor image quality and images that are repeatedly taken, the electronic device can perform a secondary screening of the images in the image set after determining an image set according to the theme type, so as to avoid images with poor image quality and redundant images from appearing in the theme album. That is, after screening the images according to the image quality conditions, image set 56 can be obtained.
[0347] In step S402, images within the image set are filtered based on preset image quality conditions to obtain multiple images. In this embodiment, the electronic device can be configured with at least one image quality condition. The electronic device can determine whether each image in the image set obtained according to the theme type meets the preset image quality condition. Specifically, if an image in the image set meets some or all of the image quality conditions, it is identified as an image that can be added to the theme album; conversely, if an image in the image set does not meet some or all of the image quality conditions, it is removed from the album, meaning it will not be added to the album subsequently, and its corresponding image order will not be determined. This not only reduces the number of images with poor image quality and redundant images in the theme album, but also reduces the number of images whose order needs to be determined later, thereby improving the generation efficiency of the theme album and reducing the user's waiting time.
[0348] When there are multiple image quality conditions, the electronic device can determine whether the second image meets all the image quality conditions. If it meets all the image quality conditions, the image is added to the image set. If the image does not meet any of the image quality conditions, the image is removed and not added to the album, thus achieving the purpose of secondary filtering.
[0349] In some implementations, the above image quality conditions may include at least one of the following:
[0350] Condition 1: The brightness value is within a preset brightness range. This condition allows for the filtering of images that are overexposed or underexposed. The electronic device can acquire the brightness values of each image in the image set associated with the theme type and determine whether the brightness value is within the preset brightness range. If the image's brightness value is within the preset range, it is identified as an image that can be added to the album, i.e., it belongs to the multiple images in S202; conversely, if the image's brightness value is not within the preset range, it is identified as not meeting the image quality conditions and is not added to the album.
[0351] Condition 2: No abnormal regions exist; abnormal regions include at least one of the following: blurred regions, red-eye regions, and glare regions. The electronic device can identify abnormal regions in an image, which may include blurred regions, red-eye regions, and glare regions, etc. If the image does not contain any of the above types of abnormal regions, it can be identified as meeting the above image quality conditions and can be added to the album; conversely, if the second image contains any of the above-mentioned abnormal regions, it is identified as not meeting the image quality conditions and will not be added to the album.
[0352] Condition 3: The image with the highest aesthetic score among at least two images with a similarity greater than a preset similarity threshold. The electronic device can calculate the similarity between images in the image set. If two or more images have a similarity greater than the preset similarity threshold, it can identify that these two or more images are identical or similar. The device can then select the image with the highest aesthetic score from these two or more images as the image to be added to the album, and remove similar or identical images, thereby reducing the number of redundant images in the album. For example, if three images all have a similarity greater than the similarity threshold, these three images are identified as duplicate images, and the aesthetic score corresponding to each of the three images is calculated. The image with the highest aesthetic score is then selected as the image to be added to the album.
[0353] In some implementations, since similar or identical images are often captured during continuous shooting, the electronic device can calculate the similarity between adjacent images. To reduce unnecessary similarity calculation operations, the electronic device can be equipped with a sliding window. The sliding window selects continuously captured images from the image set filtered based on theme type, and calculates the similarity between the continuous images within the sliding window. This allows the device to identify similar or identical images, select the image with the highest aesthetic score as the image to be added to the album, and remove other images.
[0354] It should be noted that the images added to the album can be images that meet one of the image quality conditions, or images that meet two or more image quality conditions at the same time.
[0355] See also Figure 5As shown, the electronic device can perform secondary filtering on the image set 52 according to the above image quality conditions. For example, it can remove the image 53 that is too dark, or retain the one with the highest aesthetic score from the same or similar images and remove the others. For example, if image 54 and image 55 are the same, and the aesthetic score of image 54 is higher than that of image 55, then image 55 can be removed and image 54 can be retained. After filtering the second image according to the image quality conditions, multiple images can be added to the album, namely image set 56.
[0356] In some implementations, multiple images may include images from multiple image sets. These image sets can be partitioned by the electronic device before the user initiates the first operation, or they can be partitioned after the user initiates the first operation and multiple images are acquired. The specific timing of image set partitioning can be determined based on the actual situation and is not limited here. Since different theme types have different semantic scopes, a theme type may include multiple image sets related to that theme type. When generating a photo album, these multiple images may include images from different image sets.
[0357] In some implementations, after the electronic device performs a secondary filtering on images corresponding to the theme type to obtain multiple images for generating the album, it can further classify these multiple images to obtain image sets corresponding to different categories. The classification method can be determined based on the multiple images obtained after the secondary filtering.
[0358] For example, if the multiple images obtained after secondary filtering include single-person images and multi-person images, the multiple images can be divided according to the number of people. For example, single-person images can be divided into one image set, two-person images into another image set, and group photos of three or more people can be divided into yet another image set.
[0359] For example, if the multiple images obtained after secondary filtering include landscape images and portraits, then the landscape images can be divided into one image set and the portraits into another image set.
[0360] For example, electronic devices can also classify multiple images based on the pose type of visual elements in the images, such as grouping images of standing poses into one image set and images of sitting poses into another image set.
[0361] For example, Figure 6 This illustration shows a schematic diagram of image set segmentation based on pose type according to another embodiment of this application. See also Figure 6As shown, images with multiple different poses are obtained through secondary filtering. Each image contains the visual element of "human figure." These images can then be classified according to the pose type corresponding to this visual element. For example, the objects in images 61-63 all have the left shoulder in front and the right shoulder behind, while images 64-65 have the left and right shoulders in a balanced pose, and images 66-68 have the right shoulder in front and the left shoulder behind. The images include both single-person and multi-person images. In this scenario, the electronic device can classify the images based on the pose type of the human figure, thus obtaining image sets corresponding to different pose types, such as image set 1 (corresponding to the left shoulder in front and the right shoulder behind pose), image set 2 (corresponding to the balanced left and right shoulders pose), and image set 3 (corresponding to the right shoulder in front and the left shoulder behind pose).
[0362] For example, the electronic device can also perform image recognition on visual elements in images to determine the scenic spot corresponding to each image. Then, the scenic spots corresponding to each image can be categorized into multiple images to obtain image sets corresponding to different scenic spots. The scenic spot corresponding to each image can be determined based on the visual elements in the image and the location information when the image was taken. For example, images corresponding to the Forbidden City can be grouped into one image set, and images corresponding to the Great Wall can be grouped into another image set.
[0363] In some implementation scenarios, electronic devices can also classify images based on two or more classification dimensions, and continue to classify them based on... Figure 6 Taking this as an example, an electronic device can group images belonging to the "left shoulder in front, right shoulder behind" and "single person" features into one image set, and images belonging to the "left shoulder in front, right shoulder behind" and "two people" features into another image set. That is, the above image set 1 can be further divided into image sets. Other image sets can also be further refined based on the above method. The specific classification method can be determined according to the graphic features contained in the images corresponding to the actual theme type, and is not limited here.
[0364] In S202, for any image among the plurality of images, the image order among the plurality of images is determined based on the feature parameters of the image in at least one visual feature dimension.
[0365] In this embodiment, the electronic device can determine the feature parameters corresponding to each image in the visual feature dimension according to the preset visual feature dimension, and determine the image order corresponding to each image in the multiple images based on the feature parameters.
[0366] In some implementations, the aforementioned visual feature dimensions may include at least one of the following: color dimension, region proportion dimension of visual element, and pose dimension of visual element.
[0367] Determining the image order of each image based on visual feature dimensions can include the following two methods:
[0368] Method 1: Determining image order based on a single visual feature dimension
[0369] In this embodiment, the electronic device can determine the visual feature dimension used for sorting the album from multiple candidate feature dimensions, obtain the feature parameters corresponding to the visual feature dimension, and determine the image order of each image in multiple images based on the feature parameters.
[0370] For example, an electronic device can obtain feature parameters corresponding to the color dimension of multiple images and sort the multiple images in ascending or descending order based on the feature parameters, thereby determining the image order of each image in the album.
[0371] In some possible implementations, the feature parameters of the aforementioned color dimension can be at least one of brightness value, hue value, and grayscale value of any primary color.
[0372] To illustrate, let's take brightness value as an example. Figure 7 This diagram illustrates an embodiment of determining image order based on brightness values according to this application. See also... Figure 7 As shown, the multiple images corresponding to the theme type are images 71 to 75. The brightness value of image 71 is 120, the brightness value of image 72 is 105, the brightness value of image 73 is 115, the brightness value of image 74 is 155, and the brightness value of image 75 is 108. The electronic device can determine the order of images 71 to 75 in the image set based on the ascending order of their brightness values. The resulting image sequence can be: image 74 (brightness value 155) → image 71 (brightness value 120) → image 73 (brightness value 115) → image 75 (brightness value 108) → image 72 (brightness value 105), thus enabling the sorting of multiple images from dark to bright.
[0373] For example, let's take the grayscale value corresponding to any color as an example. The aforementioned color can be one of the three primary colors RGB, such as red. The electronic device can determine the average grayscale value of each image on the red layer, use the average grayscale value of the red layer as the feature parameter corresponding to the image, and then sort the multiple images according to the ascending or descending order of the average grayscale values on the red layer, thereby determining the image order of each image.
[0374] For example, if multiple images contain a common visual element, the order of the images can be determined based on the proportion of the corresponding area of the common visual element in each image. Specifically, the visual element can be a foreground object or a background object in the image.
[0375] For example, Figure 8 This illustration shows a schematic diagram of determining image order based on region proportion according to an embodiment of this application. See also Figure 8 As shown, multiple images contain the visual element of mountain peaks, as follows: Figure 8 Images 81 to 84 are provided, and the specific proportions of mountain peaks in each image are as follows: Image 81 (mountain peak area 30%), Image 82 (mountain peak area 80%), Image 83 (mountain peak area 60%), and Image 84 (mountain peak area 40%). The electronic device can sort images 81 to 84 according to the ascending order of mountain peak area proportions, resulting in the image sequence: Image 81 (mountain peak area 30%) → Image 84 (mountain peak area 40%) → Image 83 (mountain peak area 60%) → Image 82 (mountain peak area 80%). This yields image sequence 85, ordered according to a visual element from far to near. In some implementations, image sequence 86 can also be obtained by ordering from near to far.
[0376] In this embodiment, the electronic device can determine the image order of multiple images based on the distance of visual elements such as scenery, users, or objects. This allows images with the same visual elements to change from far to near or from near to far during the process of previewing the images in the album in the above order, achieving a gradual change in distance and making the switching between images logical, thereby improving the user experience.
[0377] Method 2: Determining image order based on visual elements
[0378] Electronic devices can calculate the correlation coefficient between any two images based on the visual elements contained in the images, and then determine the image order of each image in the album based on the aforementioned correlation coefficient. Specifically, Figure 9 A flowchart illustrating the implementation of determining image order based on visual elements according to an embodiment of this application is shown. See also Figure 9 As shown, the method for determining image order based on visual elements can specifically include the following steps:
[0379] In S901, the correlation coefficient between any two images is calculated based on the feature parameters corresponding to the same visual elements contained in any two images in the visual feature dimension; the correlation coefficient is used to characterize the degree of correlation between any two images.
[0380] In this embodiment, the electronic device can identify the common visual elements contained in any two images from a set of multiple images. These visual elements include, but are not limited to, foreground objects and background objects. After identifying the common visual elements between two images, feature parameters of these visual elements in a preset visual image dimension can be obtained.
[0381] For example, Figure 10 A schematic diagram illustrating the determination of correlation coefficients according to an embodiment of this application is shown. See also... Figure 10 As shown, the above images include the following three images: image 101, image 102, and image 103. The electronic device can count the visual elements contained in these three images, as follows:
[0382] Image 101 includes: sky, desert, and bottle;
[0383] Image 102 includes: sky, desert, and houses;
[0384] Image 103 includes: sky, desert, and bottle.
[0385] When calculating the correlation coefficient between image 101 and image 102, it can be determined that the two images have the same visual elements, namely: sky and desert. The correlation coefficient between the two images can be calculated based on the feature parameters of the two visual elements in the two visual image dimensions of color and area proportion.
[0386] When calculating the correlation coefficient between image 101 and image 103, the common visual elements in the two images can be identified as: sky, desert, and bottle. For the background objects, sky and desert, feature parameters in two visual image dimensions, namely color and area proportion, can be used. For the foreground object, bottle, in addition to obtaining the feature parameters in the above two dimensions, feature parameters corresponding to the visual image dimensions such as the bottle's pose angle and contour in the image can also be obtained. Based on the feature parameters of each visual element in the preset visual image dimensions, the correlation coefficient can be calculated.
[0387] In some implementations, the correlation coefficient between any two images can be expressed as:
[0388]
[0389] Among them, R v (X,Y) represents the correlation coefficient between image X and image Y; label[r] i ] represents the visual elements contained in image X; label[r] j ] represents the visual elements contained in image Y; label[r] j ] = label[r j ] is used to represent the same visual elements between images X and Y; r i r is the i-th visual element in image X; j Let be the j-th visual element in image Y; N is the total number of visual elements that are the same between images X and Y; sim dim (r i ,r j ) represents the similarity of the feature parameters of the i-th visual element and the j-th visual element on the dim-th visual image dimension; DIM[r i ] represents the total number of visual image dimensions corresponding to the i-th visual element; α(r j Let be the weight value corresponding to the i-th visual element. The larger the value of this correlation coefficient, the higher the degree of correlation between the two images; conversely, the smaller the value of this correlation coefficient, the lower the degree of correlation between the two images.
[0390] In some possible implementations, if there are no identical visual elements between any two images, the correlation coefficient between the two images can be set to a preset value, which can be 0.
[0391] In S902, the image order of the image among the plurality of images is determined based on the correlation coefficient.
[0392] In this embodiment, after calculating the correlation coefficient between any two images among multiple images, the electronic device arranges the two images with larger correlation coefficient values in adjacent or close positions. That is, the two photos with larger correlation coefficients are closer in image order in the album; conversely, the two photos with smaller correlation coefficients are more different in image order in the album. By determining the image order based on the correlation coefficient and then determining the order of each image in the album based on the image order, the adjacent images in the album can have a strong correlation, thereby reducing the differences between image switching and improving the user's browsing experience.
[0393] In some possible implementations, when multiple images comprise images from multiple image sets, the electronic device can determine the order of each image within its corresponding image set based on feature parameters of the visual feature dimension, and determine the image order of each image in the album based on the order of each image within its corresponding image set and the order of that image set across multiple image sets. Specifically, this can be divided into the following two stages:
[0394] Phase 1: For any image set, determine the order of the image set within multiple image sets. The specific implementation process is as follows:
[0395] In this embodiment, the electronic device can determine the set type corresponding to each image set according to the classification method, and determine the order of the image set in multiple image sets based on the set type.
[0396] For example, the above classification method divides multiple images based on the pose of a visual object, so each image set corresponds to a pose type of the visual object. In this case, for any image set, the order of the image set among multiple image sets is determined by the order of the pose types corresponding to the image set on the pose change trajectory.
[0397] Continue with Figure 6 Taking this as an example, electronic devices can be set with posture change trajectories. For example, the process of human standing posture change is generally: "left shoulder in front, right shoulder behind" → "left and right shoulders in balance" → "right shoulder in front, left shoulder behind". That is, human standing posture cannot skip the state of "left and right shoulders in balance" and directly change from "left shoulder in front, right shoulder behind" to "right shoulder in front, left shoulder behind". It has a certain continuity of change. That is, the order of the above three image sets is: image set 1 → image set 2 → image set 3, so that the order of each of the above image sets in multiple image sets can be determined.
[0398] In some implementations, the aforementioned posture change trajectory can be determined based on the posture type corresponding to each image set. Specifically, the electronic device can obtain the aforementioned posture trajectory based on the transformation sequence between various posture types. For example, during the rotation of a human body, the posture change sequence of its shoulders can be: "left shoulder in front, right shoulder behind" → "left and right shoulders balanced" → "right shoulder in front, left shoulder behind", or it can be "left shoulder behind, right shoulder in front" → "left and right shoulders balanced" → "right shoulder behind, left shoulder in front". The electronic device selects one of the above two posture change sequences to obtain the aforementioned posture trajectory.
[0399] For example, multiple images corresponding to a theme type can be divided into three image sets: image set 1 corresponding to a lying posture, image set 2 corresponding to a sitting posture, and image set 3 corresponding to a standing posture. Generally, the user's posture changes in the order of lying posture → sitting posture → standing posture. Therefore, based on the above order, the corresponding posture change trajectory can be obtained, and then the secondary order of each image set in multiple image sets can be determined.
[0400] In some implementations, if the electronic device categorizes images based on different attractions—that is, different image sets correspond to different attractions—then for any given image set, the order of the image set within multiple image sets is determined based on the order in which the attractions corresponding to that image set are visited along the attraction tour route. Specifically, the electronic device can store tour routes corresponding to different attractions. The electronic device can determine the tour order for each attraction based on the tour routes, and then determine the order of each image set within multiple image sets based on the tour order of the attractions corresponding to each image set.
[0401] For example, Figure 11 This illustration shows a schematic diagram of an embodiment of the present application providing a method for determining the order of each image set based on scenic spots. See also... Figure 11 As shown, the user selected the theme album type "Huashan Day Trip". This album contains multiple images taken at different scenic spots on Huashan. The electronic device can determine the corresponding scenic spot for each image based on its shooting location and / or background area. It then divides the images into multiple image sets, each corresponding to a specific scenic spot. For example, it can create image set 1 (containing images of the South Peak) and image set 2 (containing images of the North Peak). Since the electronic device can recommend a Huashan tour route from South Peak to North Peak, it can determine the order of visits for each scenic spot. Image set 1 (corresponding to South Peak) will appear before image set 2 (corresponding to North Peak). In other words, the electronic device can use the order of visits to the scenic spots as the order for each image set.
[0402] Unlike existing image sorting methods, which typically sort images based on chronological order, users may visit the same attraction multiple times in different months, or take a round trip, passing the same attraction twice at different times. Both of these scenarios result in significant differences in the shooting time between different images of the same attraction. If images are sorted chronologically, the order of attractions in the album might be <Attraction A→Attraction B→Attraction A>, leading to discontinuous images of the same attraction and negatively impacting the user experience. This application's embodiment does not sort images based on time. Instead, it first clusters images based on attractions, creating image sets categorized by attraction. Then, based on the order of visits to each attraction, it determines the order of each image set within multiple image sets. This spatial sorting, rather than a temporal one, provides a sorting method that better aligns with users' image viewing habits, thereby improving the user experience.
[0403] In some implementations, if the classification dimension is geographic location, that is, multiple images are divided into multiple different image sets based on the geographic location corresponding to the image acquisition time, the electronic device can determine the order of each image set in multiple image sets according to the distance between the geographic location corresponding to each image set and the current location of the electronic device when the first operation is initiated. For example, the closer the geographic location corresponding to the image set is to the current location, the higher its corresponding order.
[0404] In some implementations, if the above classification dimension is activity type, that is, based on the different activity types of foreground objects in the image, multiple images corresponding to a theme type are divided into image sets corresponding to different activity types. Each image set can correspond to one activity type, and the electronic device can determine the order of each image set in multiple image sets according to the activity order corresponding to the activity type of each image set. Taking the above activity as learning to ride a bicycle as an example, for example, if the user selects the theme type "bicycle learning time", the associated images contain multiple stages of the user learning to ride a bicycle. For example, Figure 12 This illustration shows a schematic diagram of sorting an image set based on activity according to an embodiment of this application. See also Figure 12As shown, during the user's learning to ride a bicycle, multiple images (images 121-125) were taken. Images 121 and 124 show the user attempting to ride with support from behind, image 122 shows the user attempting to ride independently with one foot, and images 123 and 125 show the user riding freely. The electronic device can divide these images, corresponding to different activity types, into at least three image sets: image set 1 (based on images 121 and 124), image set 2 (based on image 122), and image set 3 (based on images 123 and 125). Based on the activity sequence of learning to ride a bicycle, which is generally <supported learning to ride → attempting to ride → independent riding>, the order of each image set corresponding to the activity type in the three image sets is determined as image set 1 → image set 2 → image set 3. This ensures that the order of images in the subsequent themed photo album conforms to the activity sequence and the logic of the activity behavior.
[0405] In this embodiment, images corresponding to a theme type are divided into different image sets. Then, based on the feature parameters of each image set, the order of each image set is determined, ensuring that the order of the image sets conforms to the user's browsing logic. This improves the rationality of the image sorting in the theme album. Since multiple images can be divided into different image sets, some consecutive images in the subsequent album will meet at least the following criteria:
[0406] Visual elements in some consecutive images in the album belong to the same pose type;
[0407] Some consecutive images in the album correspond to the same scenic spot;
[0408] Some consecutive images in the album share the same main visual element, which can be the subject of the photograph in the image.
[0409] For example, the album contains the following images: Image 1 (solo photo of User A), Image 2 (solo photo of User B), Image 3 (group photo of User A and User B), Image 4 (profile picture of User A), and Image 5 (group photo of User A, User C, and User D). There are four consecutive images in the album that contain User A (i.e., Image 1, Image 3, Image 4, and Image 5), meaning these four consecutive images contain the same main visual element (User A). The corresponding order could be: Image 1 → Image 4 → Image 3 → Image 5. Since Image 1 and Image 4 are both solo photos of User A, the correlation coefficient between these two images is relatively high, and their order is closer, thus creating a strong correlation between consecutive images in the album.
[0410] Phase 2: Sort the images within the image set
[0411] In this embodiment, in addition to determining the order corresponding to each image set, the electronic device can also determine the order of each image within each image set. The order of images in an image set is determined based on feature parameters of at least one visual feature dimension. As mentioned earlier, the order of an image in an image set can be determined based on a single visual feature dimension, or it can be determined based on the feature parameters corresponding to the same visual elements in the visual feature dimension. The specific implementation process can be referred to the previous descriptions and will not be repeated here.
[0412] In some possible implementations, different visual feature dimensions can be used to determine the order of images within different image sets. For example, multiple images corresponding to a theme type comprise two image sets, image set 1 and image set 2. Image set 1 contains images 11 to 15; image set 2 contains images 21 to 25. When determining the order of images 11 to 15 in image set 1, visual feature dimension A (such as color feature dimension) can be used; when determining the order of images 21 to 25 in image set 2, visual feature dimension B (such as the pose dimension of visual elements) can be used.
[0413] In some possible implementations, when an electronic device determines the order of each image in its image set by using correlation coefficients, it can calculate the correlation coefficient between any two images in the image set without having to calculate the correlation coefficient between two images belonging to different image sets. This reduces the number of correlation coefficient calculations and thus improves the sorting speed of images in the album.
[0414] In some implementations, the sorting rules for two adjacent image sets are opposite. For example, multiple images may contain two image sets, image set 1 and image set 2. The images in image set 1 are ordered in ascending order based on a certain visual feature dimension, while the images in image set 2 are ordered in descending order based on the same visual feature dimension.
[0415] For example, Figure 13 This illustration shows a schematic diagram of the image arrangement in a multi-image set scene according to an embodiment of this application. See also... Figure 13As shown, the multiple images associated with the theme type include at least three image sets, which are ordered as follows: Image Set 1, Image Set 2, and Image Set 3. The order of each image in each image set can be determined based on its brightness value. In image set 1, images 11 through 13 are sorted in ascending order of brightness value. Image 12 has the lowest brightness value and is sorted first, while image 13 has the highest brightness value and is sorted last. Since image set 1 is sorted in ascending order of brightness value, the sorting rule for the next image set 2 is the opposite, i.e., sorted in descending order of brightness value. Image 21 has the highest brightness value and is sorted first in image set 2, while image 22 has the lowest brightness value and is sorted last in image set 2. Similarly, the sorting rule for image set 3 is determined by the sorting rule of image set 2. Since the images in image set 2 are sorted in descending order of brightness value, the sorting rule for image set 3 is based on ascending order of brightness value. Image 33 has the lowest brightness value and is sorted first in image set 3, while image 32 has the highest brightness value and is sorted last in image set 3. The result is as follows: Figure 13 Image sequence 40 in the image.
[0416] In this embodiment of the application, the electronic device can reverse the sorting rules of adjacent image sets, so that the differences between images in different image sets are not too large. For example, if the images in each image set are sorted in ascending order based on brightness value, there will be a large difference in brightness value between adjacent images in different image sets. This will result in a large sense of separation between some images when the user browses the album, affecting the user's browsing experience and also causing poor continuity between some images.
[0417] In this embodiment, after determining the order of the image set in multiple image sets and the order of each image in its respective image set, the image order of each image in the album can be determined based on the above two orders.
[0418] For example, Figure 14 This illustration shows a schematic diagram of image order determination in a multi-image-set scene according to an embodiment of this application. See also Figure 14 As shown, the multiple images corresponding to the theme type can be divided into three image sets, namely image set 141, image set 142 and image set 143. The specific order of the above three image sets is: image set 141 → image set 142 → image set 143.
[0419] Each of the aforementioned image sets contains three images: image set 141 contains images 1411 to 1413, image set 142 contains images 1421 to 1423, and image set 143 contains images 1431 to 1432. Based on this, the electronic device can determine the order of each image set in the album according to the order corresponding to each image set, and combine this with the order of each image in its respective image set to determine the image order corresponding to each image, thereby obtaining the following... Figure 14 Image sequence 144.
[0420] In S203, an album is generated based on the image order of the multiple images, wherein each image in the album is sorted according to the image order.
[0421] In this embodiment, the images corresponding to each image on the electronic device are sorted in order to obtain a photo album with continuous content, thereby improving the user's operation efficiency when browsing images in the album and reducing the sense of disjointed content when switching between images in the album, thus improving the user experience.
[0422] In this embodiment, since the image order of each image in the album is determined based on the feature parameters of the visual feature dimension, some consecutive images in the generated album can conform to the following sorting rule:
[0423] Rule 1: The brightness of the image increases from dark to light;
[0424] Rule 2: The brightness of the image decreases from bright to dark;
[0425] like Figure 7 Taking the determination of image order by brightness value as an example, if the album contains the above images 71 to 75, the above 5 consecutive images will conform to the sorting rule of brightness from dark to light.
[0426] Rule 3: In the above-mentioned consecutive images, the proportion of the region containing the common target visual element increases from small to large;
[0427] Rule 4: In the above-mentioned consecutive images, the proportion of the region containing the common target visual element decreases from large to small.
[0428] like Figure 8 Taking the determination of image order by region proportion as an example, if the album contains the above images 81 to 84, the above four consecutive images will conform to the sorting rule of the mountain peaks from small to large region proportion (as in the case of image sequence 85), or the above four consecutive photos will conform to the sorting rule of the mountain peaks from large to small region proportion (as in the case of image sequence 86).
[0429] Rule 5: The pose changes of visual elements in the above-mentioned continuous images conform to the pose change trajectory;
[0430] like Figure 6 Taking the determination of image order by pose type as an example, in the album containing Figure 6 In the case of three image sets, the pose changes between consecutive images obtained conform to the pose change trajectory.
[0431] In some possible implementations, if a subset of consecutive images in an album correspond to the same pose type, then the pose angles of the same visual elements in these consecutive images conform to a pose change trajectory. For example, if the album contains images 1 to 3, and the portraits in these three images all have their left shoulder in front and right shoulder behind, the deflection pose of the portrait in image 1 is 60 degrees to the right, the deflection pose of the portrait in image 2 is 40 degrees to the right, and the deflection pose of the portrait in image 3 is 20 degrees to the right. That is, the deflection pose angles of these three consecutive images also conform to a continuous pose change trajectory. In other words, when determining the order of the images in the image set, the feature parameters of their pose dimension also conform to the pose change trajectory, that is, satisfying the sorting rule of gradually increasing or gradually decreasing pose angles.
[0432] Rule 6: The order of the consecutive images in the above section corresponds to the order of visiting the corresponding attractions.
[0433] Optionally, the aforementioned consecutive images can be three or more consecutive images from the album.
[0434] In this embodiment, after the electronic device obtains the album corresponding to the first operation, it can display thumbnails of the images contained in the album in a preset preview interface. The methods for displaying the album include the following two:
[0435] Display Method 1: Display as an image list
[0436] In this embodiment, after obtaining the photo album corresponding to the first operation, the electronic device can display thumbnails of each image in the album in a tiled format as an image list. The order of the images in the image list is determined based on the image order.
[0437] For example, Figure 15 This illustration shows a diagram of a photo album displayed using an image list based on an embodiment of this application. See also: Figure 15 As shown in (a), after the user selects the theme type of the theme album and clicks the aforementioned generation control 151, they can enter the generation waiting interface, as shown in (a). Figure 15As shown in (b). In the generation waiting interface, images associated with the topic type can be displayed in a carousel. These images can be the images before the second filtering or the images obtained after the second filtering.
[0438] After the electronic device generates a photo album, you can switch from the waiting screen to the preview screen, as shown below. Figure 15 As shown in (c), this preview interface can display thumbnails of multiple images contained in the album, and the order of the thumbnails is determined based on the image order. If a user needs to preview a specific image, they can click on the thumbnail corresponding to that image. For example, if a user clicks on image 152 above, they can enter the preview interface for image 152. Figure 15 As shown in (d) in the figure.
[0439] In this embodiment, displaying the album as an image list allows users to easily determine the number of images in the album and select the images they want to preview. In the preview interface, users can swipe left and right to view the images in the album. Since each image in the album is sorted based on feature parameters corresponding to the visual image dimension, similar images can be placed in adjacent or nearby positions, ensuring continuity of content between images within the album and reducing the probability of abrupt changes in content, thereby improving the user's album browsing experience.
[0440] Display Method 2: Display by switching between images and video.
[0441] In this embodiment, in addition to displaying the album as an image list, the electronic device can also display the album through image-switching videos. Since the image order of each image in the album is determined based on the feature parameters of the visual image dimension, meaning that adjacent images in the album have a certain correlation, the electronic device can generate a first switching animation between images based on the correlated visual elements, and then generate the corresponding image-switching video for the album based on the first switching animation.
[0442] For example, Figure 16 A schematic diagram illustrating the image switching video generation process according to an embodiment of this application is shown. See also Figure 16 As shown, generating the above image switching video may specifically include the following steps:
[0443] In S1601, an image switching video corresponding to the album is generated; the image switching video includes a first switching animation between two adjacent images in the album; the first switching animation is generated based on the same visual elements between the two adjacent images.
[0444] In this embodiment, since the images in the album are obtained based on the first sorting, there is a certain correlation between adjacent images. In order to improve the smoothness of switching between images, the electronic device can identify the same visual elements between two adjacent images. The aforementioned visual elements can be the same foreground object or the same background object between the two images. In some implementations, the aforementioned visual elements can also be color blocks of the same color in the two images.
[0445] In some implementations, if multiple identical visual elements exist between two images, the selection priority of each visual element can be determined, and the visual element used to generate the first transition animation can be determined based on this selection priority. This selection priority can be determined based on the proportion of the identical visual element's area in the image, or based on its compositional position within the image. For example, the larger the proportion of a visual element's area in the image, the higher its selection priority; conversely, the smaller the proportion, the lower its selection priority. Similarly, the closer the center of a visual element is to the center of the image within the image, the higher its selection priority; conversely, the farther away, the lower its selection priority. The specific method for determining the visual element to use can be set according to the actual situation and is not limited here.
[0446] In this embodiment, after the electronic device determines the same visual elements between two adjacent images, it can generate a first switching animation between the two images based on the two same visual elements. In the image switching video, the switching process between two adjacent images can be displayed through the first switching animation.
[0447] In some possible implementations, the image transformation operations included in the first switching animation are determined based on the target features of the same visual element in two adjacent images; the image transformation operations include at least one of scaling, rotation, and movement; the target features include at least one of pose, size, and / or position. Through the aforementioned image transformation operations, it is possible to ensure that, in the first switching animation, the visual element in the ending frame of the preceding image has the same target features as the visual element in the starting frame of the following image.
[0448] For example, Figure 17 This illustration shows a schematic diagram of the generation of a first switching animation provided in an embodiment of this application. This embodiment describes the implementation process of generating a switching animation between two images based on scaling the same visual elements. See also... Figure 17As shown, both images 171 and 172 contain the same visual element, a bottle. The posture, size, and position of the bottle in image 171 are the same as those in image 172. Therefore, by first enlarging image 171 to obtain image 173, and then shrinking image 173 to switch to image 172, since both images contain the visual element of a bottle, when the bottle is enlarged to cover the entire screen, the changes in content in other areas are imperceptible to the user, thereby improving the smoothness of image switching.
[0449] In some implementations, if there are differences in color features such as hue, color, contrast, and brightness between the same visual elements in the two images, then during the scaling of the visual elements, the color transformation between the same visual elements can be achieved through a gradient, thereby improving the smoothness of the switching process.
[0450] For example, Figure 18 This illustration shows a schematic diagram of the generation of a first switching animation according to another embodiment of this application. This embodiment describes the implementation process of generating a switching animation between two images based on rotating the same visual element. See also... Figure 18 As shown, both images 181 and 182 contain the same visual element, a bottle, but the two bottles have different poses in the two images. Therefore, to ensure that the visual element in the ending frame of the preceding image has the same target visual features (e.g., the same pose, position, and size) as the visual element in the starting frame of the following image, image 181 can be rotated so that the pose of the bottle in image 181 matches that in image 182, resulting in image 183. Then, by fading out the content in image 183 excluding the bottle, image 184 can be obtained. Finally, by fading out the content in image 182 excluding the bottle, the transition from image 181 to image 182 can be achieved. Since the two images contain the same visual elements, and after rotating image 181, its posture, position, and size are consistent with those in image 182, and the same visual elements are consistently visible, the user's attention will be focused on the same visual elements in both images. Furthermore, by fading out the rest of the content, the content switching becomes smoother, thus achieving a smooth transition between different images and improving the user experience.
[0451] For example, Figure 19 This illustration shows a schematic diagram of the generation of a first switching animation provided in another embodiment of this application. This embodiment describes the implementation process of generating a switching animation between two images based on rotating and scaling the same visual elements. See also... Figure 19As shown, both images 191 and 192 contain the same visual element, a bottle, but the two bottles have different postures in the two images. Based on this, during the process of rotating the bottle in image 191 (i.e., obtaining image 193), image 191 can be simultaneously enlarged, so that the posture of the bottle in image 194 (enlarged bottle) is consistent with that in image 192. Then, image 194 can be scaled down to switch back to image 192. By generating a switching animation between the two images through rotation and scaling, the switching animation can be smoother when there are posture differences between the same visual elements.
[0452] In this embodiment, after generating switching animations between adjacent images, the electronic device can generate an image switching video corresponding to the album based on each image and its corresponding first switching animation.
[0453] For example, Figure 20 This diagram illustrates the timing sequence of image switching video display according to an embodiment of this application. See also... Figure 20 As shown, when the above image switching video is played, the first image in the album, i.e., image 201, can be displayed first. After a certain period of time, the switching animation 20a between image 201 and image 202 can be displayed, thereby switching from image 201 to image 202, and so on, until the last image in the album, such as image 20N, is displayed.
[0454] In this embodiment of the application, by generating a first switching animation between adjacent images, and generating an image switching video corresponding to the album based on the first switching animation, the smoothness of the image switching video can be improved. Furthermore, since the images in the album are sorted according to the image order determined by visual features, the probability that adjacent images have the same or similar visual elements will also increase, thereby improving the smoothness of the image switching video.
[0455] In some implementations, after generating a photo album, the electronic device can generate a corresponding album name based on the images contained within the album. For example, the electronic device can use the theme type selected in the theme selection interface as the album name for that theme.
[0456] In some possible implementations, the electronic device can obtain the image tags corresponding to each image in the album, and then determine the target tags based on the frequency of each image tag. For example, it can select tags whose frequency exceeds a preset threshold, or select the top N tags with the highest frequency. The electronic device can then generate the album name mentioned above based on all the target tags.
[0457] For example, Figure 21A schematic diagram of an album name provided in an embodiment of this application is shown. Album 211 is based on... Figure 6 Images 61 to 68 were generated from the above 8 images. Since the user is standing in all of the above 8 images, that is, they have the same image tag "standing", the corresponding album name "Thinking and Standing" can be generated. That is, the album name is generated based on the image tag that appears most often.
[0458] In some implementations, if an electronic device displays a themed photo album as an image list, the device can determine not only the album name but also the collection names of each image set within that album. See also... Figure 21 As shown in album 212, this themed album is titled "Desert Symphony." It is divided into different image sets based on activity type: an image set depicting the journey into the desert ("Prologue: Singing Sand Gathering"), an image set depicting camel riding upon entering the desert ("Departure: Camel Bells"), and an image set depicting walking in the desert ("Middle Part: Desert Adventure"). The electronic device can generate the corresponding collection name for each image set based on its category, allowing users to quickly view images of a specific type and improving the browsing experience.
[0459] In some possible implementations, after receiving the first operation, the electronic device may display a waiting interface before completing the response process for the first operation. The response process for completing the first operation can be determined based on the content of the first operation. For example, if the first operation is used to generate an image list for a photo album, the waiting interface may be displayed before the album is obtained after being sorted according to the first order; if the first operation is used to generate an image switching video corresponding to the album, the waiting interface may be displayed before generating the image switching video.
[0460] In some possible implementations, the aforementioned waiting interface can be an interface for carouseling multiple images specified in the first operation. Since the filtering time required to obtain the images associated with the first operation is short, the waiting interface can display one or more images associated with the first operation after filtering, and then carousel them sequentially as more images associated with the first operation are subsequently obtained. This enhances the appeal of the waiting interface and provides users with a preview of the images contained in the themed album.
[0461] For example, Figure 22 A schematic diagram of a waiting interface provided in an embodiment of this application is shown. See also Figure 22As shown in (a), after the electronic device determines multiple images corresponding to a theme type, it can display thumbnails of the images (such as image 221) on the waiting screen and indicate that the album is being generated to indicate the current response progress. After image 221 has been displayed on the waiting screen for a preset duration, it can switch to other images, for example, by fading in and out from image 221 to image 222, as shown in (a). Figure 22 As shown in (b), based on the above method, images corresponding to the theme type can be rotated sequentially before obtaining the theme album.
[0462] In some possible implementations, during the carousel of images associated with the theme type, the aforementioned waiting interface can generate a corresponding second switching animation for each image. This second switching animation allows for the switching between different images during the carousel. Specifically, the second switching animation is generated based on the image tags between two adjacent images in the display order. Before generating the album, the display order can be the order of the images in the gallery; after generating the album, the display order can be the order of the images within the album. The electronic device can use the aforementioned second switching animation to switch between two images during the carousel.
[0463] Specifically, the methods for generating the second switching animation based on image tags can include the following two approaches:
[0464] Display Method 1: Single Image Carousel
[0465] In this embodiment, when the electronic device is displaying images associated with a theme type in a carousel, a preview screen of one of the multiple images is shown in the waiting interface each time. The preview screen may display a thumbnail of the image and the image tag of the image.
[0466] For example, Figure 23 This illustration shows a schematic diagram of displaying a preview screen on a waiting interface according to an embodiment of this application. See also: Figure 23 As shown in (a), the waiting interface can display a preview of image 231 corresponding to the theme type. The preview includes a thumbnail of image 231 and its associated image tags, such as image tag 232 for "couples" and image tag 233 for "anniversary". The aforementioned image tag for "anniversary" can be determined based on the anniversary information set by the user on the calendar. In some scenarios, it can also be determined based on the appearance of characters such as "anniversary" in the image. That is, the electronic device can determine its associated image tag based on the characters contained in the image.
[0467] In some implementations, the preview interface described above may include a ring centered on the thumbnail, on which the image label may be displayed.
[0468] In some implementations, the preview interface may include two or more rings. In this case, the electronic device can determine the ring containing an image label based on the label association degree between each image label and the image. The radius of the ring determines the label association degree between the image label on that ring and the image. Specifically, the smaller the ring radius, the greater the label association degree between the image label on that ring and the image; conversely, the larger the ring radius, the smaller the label association degree between the image label on that ring and the image. The electronic device can set a corresponding association degree range for each ring. If an image label falls within the association degree range of a ring, the label can be displayed on that ring.
[0469] In some implementations, the aforementioned tag relevance can be determined based on the corresponding object attributes in the image. These object attributes can include visual elements, shooting location, and shooting time, etc. Different object attributes can correspond to a weighting coefficient. Then, based on the correlation factor between the object attribute and the image, and the corresponding weighting coefficient, the aforementioned tag relevance can be calculated. For example, if an image is labeled "couples," and the corresponding object attribute is images of two opposite-sex users, the correlation factor between this object attribute and the image can be obtained by calculating the proportion of the images in the image. This correlation factor can then be superimposed with the weighting coefficient corresponding to the visual element to calculate the tag relevance for the "couples" tag.
[0470] Continue with Figure 23 Taking the above image tag 232 of "couple" as an example, it is located on ring 234, while the above image tag 233 of "anniversary" is located on ring 235. This means that the tag correlation between the image tag "couple" and the image is greater than the tag correlation between the image tag "anniversary" and the image. Other image tags can also determine their tag correlation with the image based on the ring they are located on.
[0471] In this embodiment, when the electronic device generates a second switching animation between two adjacent images, it can determine the different image tags between the two adjacent images. The second switching animation displays not only the transition from the thumbnail of the previous image to the thumbnail of the next image via a gradual fading effect, but also the transformation process between the different image tags of the two adjacent images. The switching process of the different image tags can be as follows: retaining the display positions of the same image tags in the two images in the preview screen, replacing them with different image tags, and the ring containing the replaced image tags can be determined based on the tag correlation degree corresponding to the replaced image tags.
[0472] Continue with Figure 23 For example, see [link to example]. Figure 23 As shown in (b), the image labels corresponding to image 236 include "couple" and "desert". The label "couple" is a common label with image 231. Therefore, the display position of the "couple" label is the same as that of image 231. Figure 23 The image label 232 for "couple" in (a) is displayed in the same position, therefore in Figure 23 The label is retained in (b) of the image, which is image label 232. Since image 236 does not contain the label "Anniversary," therefore, in Figure 23 In (b), the image tag will be removed and the image tag "desert" which is not included in image 231 will be added, that is, image tag 237 will be added. Other tags can also be added or deleted according to the process described above. The above switching animation can be used to display the transformation process of switching from the thumbnail of image 231 to the thumbnail of image 232, as well as the transformation process of the above image tags.
[0473] Display Method 2: Multiple Images Carousel
[0474] In this embodiment, when the electronic device is displaying images associated with a specific theme type in a carousel, it shows thumbnails of each image in the waiting interface each time. That is, the waiting interface can display thumbnails of multiple images simultaneously. These image thumbnails in the waiting interface can be displayed in a network format. Each image thumbnail can be connected to another image using the same image tag. Correspondingly, the second switching animation is specifically a process of connecting the thumbnails of two images using the same image tag.
[0475] For example, Figure 24 This illustration shows a preview screen displayed on a waiting interface, according to another embodiment of this application. See also... Figure 24 As shown in (a), the electronic device displays a thumbnail of one of the images in the theme album, such as image 241, in the waiting interface. Image 241 may be the first image in the theme album, or in some other scenarios, an image in a different order, which is not limited here.
[0476] The electronic device can determine the image tag of one of the displayed images, identify another image with the same image tag from the theme album, and display a thumbnail of the other image with the same image tag on the aforementioned waiting interface based on the same image tag.
[0477] Continue with Figure 24 Taking this as an example, after the electronic device displays image 241 on the waiting screen, it can display image labels identical to those between image 243, such as image label 242 for "couples," resulting in... Figure 24 In the interface shown in (b), after displaying the aforementioned image label 242, a connecting line can be drawn in the waiting interface to generate a thumbnail of another image with the common label "couple," namely image 243, resulting in the following: Figure 24 As shown in (c), the connection process between thumbnails of images with the same image label can be displayed through a second switching animation.
[0478] In this embodiment, the electronic device can connect the thumbnails of various images through a second switching animation between different images during the process of sequentially displaying thumbnails in the manner described above, and finally obtain an image relationship network based on image tags connecting different images, such as... Figure 24 As shown in (d) in the figure.
[0479] In this embodiment of the application, during the waiting process for the response to the first operation, the images in the theme album can be displayed in a carousel, and a second switching animation between the images can be shown. This can improve the user's waiting interface while waiting for the response, and provide a preview of the images in the theme album through the waiting interface, thereby improving the user experience.
[0480] To further illustrate the temporal relationships between the various stages and operations described above Figure 25 A timing diagram illustrating an image processing method according to an embodiment of this application is shown. See also Figure 25 As shown, the image processing method can be divided into an interface change process 251 and a data processing process 252 during execution. The data processing process 252 is specifically the process by which the electronic device processes the image; this process is invisible to the user, but the processing results can be displayed to the user through a display module. The interface change process 251 is the process visible to the user, and its various stages can be reflected through interface changes. For example, the interface can change based on user operations, or it can be presented based on the processing results obtained from the data processing process 252, allowing the user to easily determine the current processing progress.
[0481] Specifically, the aforementioned interface change process 251 may include the following stages: triggering stage 2511, waiting stage 2512, and album display stage 2513; the aforementioned data processing process 252 may include the following stages: image acquisition stage 2521, secondary filtering stage 2522, image classification stage 2523, image sorting stage 2524, album generation stage 2525, switching animation generation stage 2526, and switching video generation stage 2527. The operation content of each of the above stages is briefly described as follows:
[0482] Triggering phase 2511: This phase corresponds to the first operation initiated by the user in S201 above.
[0483] Waiting Phase 2512: This phase corresponds to the period before receiving the response result during the response to the first operation. This phase can be used to display a waiting interface, such as... Figures 22-24 The interface.
[0484] Album Display Stage 2513: After determining the album corresponding to the theme type, the electronic device can display the album through the display module. The image sequence can be displayed in at least two ways, one of which is to directly display the image list corresponding to the album. The specific timing logic is as follows: Figure 25 As shown in (a), there is no need to perform the image switching video generation operation; another method is to display the album by switching images to video, and the corresponding timing logic is as follows. Figure 25 As shown in (b) of the image. Depending on the presentation method of the album, the corresponding data processing procedure 252 will also differ; please refer to [link / reference]. Figure 25 The temporal relationships between the stages in the two sequential logics.
[0485] Image acquisition stage 2521: After receiving the first operation, the electronic device can select the image corresponding to the first operation from the image library.
[0486] Secondary filtering stage 2522: Since the images corresponding to the first operation may contain low-quality images (such as blurry, overexposed, etc.) and duplicate images, in order to avoid introducing the above two types of images when generating the album, a secondary filtering of the images corresponding to the first operation can be performed.
[0487] Image classification stage 2523: If images corresponding to the same subject type can include multiple image sets, then the order of each image set in the multiple image sets can be determined.
[0488] Image sorting stage 2524: Determine the image order of each image in a set of images.
[0489] Album generation stage 2525: Sort multiple images according to their order to obtain an album.
[0490] Transition animation generation stage 2526: In a scenario where the photo album displays images by switching between videos, a corresponding first transition animation can be generated for adjacent images.
[0491] Switching video generation stage 2527: Based on each image in the album and the corresponding switching animation, video synthesis is performed to obtain the image switching video corresponding to the theme album.
[0492] As can be seen from the above, in this embodiment of the application, after receiving the first operation initiated by the user, an image corresponding to the theme type specified by the first operation can be selected from the gallery, and the first order of the image in the image set can be determined according to the feature parameters of each image in the preset visual image dimension. This enables the sorting of images in the album to be determined based on the degree of difference between visual image dimensions, thereby improving the similarity of image content between adjacent images, and thus improving the continuity of switching between different images in the album, reducing the sense of screen fragmentation, and improving the user experience.
[0493] Example 2:
[0494] The implementation flow of an image processing method corresponding to Embodiment 1 above, Figure 26 This diagram illustrates a structural block diagram of an image processing apparatus provided in an embodiment of this application. For ease of explanation, only the parts relevant to the embodiments of this application are shown.
[0495] See Figure 26 As shown, the image processing apparatus described above includes:
[0496] Image acquisition unit 261 is used to acquire multiple images in response to a first operation initiated by the user;
[0497] Image sorting unit 262 is used to determine the image order of any image in the plurality of images based on the feature parameters of the image in at least one visual feature dimension.
[0498] The album generation unit 263 is used to generate an album based on the image order of the multiple images, wherein each image in the album is sorted according to the image order.
[0499] Optionally, the at least one visual feature dimension includes at least one of the following: color dimension, region proportion dimension of visual element, and pose dimension of visual element.
[0500] Optionally, the feature parameters of the color dimension include at least one of: brightness value, hue value, and grayscale value of any primary color.
[0501] Optionally, the first operation is used to generate an album corresponding to the theme type specified in the first operation; the multiple images are images in the gallery associated with the theme type.
[0502] Optionally, the multiple images are images from the image library that are associated with the topic type and meet the image quality conditions.
[0503] Optionally, the image quality conditions include at least one of the following: the brightness value is within a preset brightness range; there are no abnormal regions, the abnormal regions include at least one of the following: blurred regions, red-eye regions, and glare regions; and the image has the highest aesthetic score among at least two images with a similarity greater than a preset similarity threshold.
[0504] Optionally, in the album, N consecutive images meet at least one of the following criteria:
[0505] The image brightness changes from dark to light;
[0506] The image brightness changes from bright to dark;
[0507] The proportion of the common target visual element in the N images increases from small to large.
[0508] The proportion of the common target visual element in the N images is from largest to smallest;
[0509] The pose changes of the visual elements in the N images conform to the pose change trajectory.
[0510] The N images are ordered in accordance with the visiting order of their respective attractions.
[0511] Optionally, the album further includes M consecutive images, the first image of the M images being adjacent to the last image of the N images; the sorting pattern of the M images is the opposite of the sorting pattern of the N images.
[0512] Optionally, in the album, N consecutive images meet at least one of the following criteria:
[0513] The visual elements in the N images belong to the same pose type;
[0514] The N images correspond to the same scenic spot;
[0515] The N images all share the same main visual element.
[0516] Optionally, the multiple images include images from multiple image sets;
[0517] The image sorting unit is specifically used to: for any image, determine the order of the image in its respective image set based on the feature parameters of the image in at least one visual feature dimension, and determine the image order of the image in the multiple image sets based on the order of the image in its respective image set and the order of the image set in the multiple image sets.
[0518] Optionally, each image set corresponds to a pose type, and for any image set, the order of the image set in the plurality of image sets is determined based on the order of the pose types corresponding to the image set on the pose change trajectory.
[0519] Optionally, each image set corresponds to a scenic spot, and for any image set, the order of the image set in the plurality of image sets is determined based on the order of visiting the scenic spot corresponding to the image set on the scenic spot tour route.
[0520] Optionally, the image sorting unit is specifically used to: calculate the correlation coefficient between any two images based on the feature parameters corresponding to the visual feature dimension of the same visual elements contained between any two images in the plurality of images; the correlation coefficient is used to characterize the degree of correlation between any two images; and determine the image order of each image in the plurality of images based on the correlation coefficient.
[0521] Optionally, the visual feature dimensions include at least one of the following: texture, hue, shape, orientation, color, area proportion, and quantity.
[0522] Optionally, the device further includes:
[0523] A video generation unit is used to generate an image switching video corresponding to the album; the image switching video includes a first switching animation between two adjacent images in the album; the first switching animation is generated based on the same visual elements between the two adjacent images.
[0524] Optionally, the image transformation operation included in the first switching animation is determined based on the target features of the same visual element in the two adjacent images; the image transformation operation includes at least one of scaling, rotation, and movement; the target feature includes at least one of pose, size, and / or position.
[0525] Optionally, the device further includes:
[0526] An animation display unit is used to sequentially display thumbnails of each image and image tags corresponding to the images based on a second switching animation between two adjacent images in the album; the second switching animation is generated based on the image tags corresponding to the two adjacent images.
[0527] Optionally, the animation display unit is specifically used to: based on the second switching animation, sequentially display preview screens corresponding to each image; the preview screens include thumbnails corresponding to the images and at least one image tag corresponding to the images.
[0528] Optionally, the second switching animation is used to display the transformation process of different image labels between the preview screens corresponding to the two images and the transformation process between the thumbnails of the two adjacent images.
[0529] Optionally, the preview screen includes a ring centered on the thumbnail; each image label is displayed on the ring; or
[0530] The preview screen includes two or more concentric rings centered on the thumbnail; each image label is displayed on the corresponding concentric ring according to its label association with the image.
[0531] Optionally, the second switching animation is used to display the connection process of thumbnails of two adjacent images connected by the same image label between the two adjacent images.
[0532] Optionally, the animation display unit is specifically used to include: during the process of generating the image switching video corresponding to the album, based on the second switching animation between two adjacent images in the album, sequentially displaying thumbnails of each image and the image tags corresponding to the images.
[0533] Example 3
[0534] Compared to Embodiment 1, this application provides another image processing method. When the first operation is generating an image switching video, the image processing method provided in this embodiment can improve the smoothness of the switching animation between different images in the image switching video. Specifically, Figure 27 A flowchart illustrating the implementation of an image processing method according to an embodiment of this application is shown. See also... Figure 27 As shown, the image processing method specifically includes the following steps:
[0535] In S2701, in response to the first operation, an image sequence is acquired; the image sequence includes multiple images.
[0536] In some implementations, the image sequence can be a sequence of multiple images selected by the user from a gallery. In this case, the order of the images in the image sequence is determined according to the default order of each image in the gallery. The default order can be an order determined based on the shooting time, or it can be determined according to the selection order corresponding to each image, or it can be determined after sorting according to the feature parameters of the visual feature dimension in Embodiment 1.
[0537] In some implementations, the aforementioned image sequence can be a photo album corresponding to the theme type specified in the first operation. In this case, a detailed description of the first operation can be found in the relevant description of S201 in Embodiment 1.
[0538] In some implementations, the aforementioned album can be obtained by sorting the images based on the image order determined by the feature parameters of the visual feature dimension. For details on how to generate an album based on the image order, please refer to the relevant description in Embodiment 1, which will not be repeated here.
[0539] In S2702, an image switching video corresponding to the image sequence is generated; the image switching video includes a first switching animation between two adjacent images in the image sequence; the first switching animation is generated based on the same visual elements between the two adjacent images.
[0540] In this embodiment, to improve the smoothness of image switching in an image-switching video, the electronic device can generate a corresponding first switching animation for two adjacent images, so that the switching between the two images can be achieved through the first switching animation during the playback of the image-switching video. Specifically, the electronic device can identify common visual elements between adjacent images and generate the corresponding first switching animation based on these common visual elements. The method for generating the first switching animation can be found in the relevant description of S1601 in Embodiment 1, and will not be repeated here.
[0541] In this embodiment, the electronic device can generate an image switching video corresponding to the theme album based on each image and the first switching animation between each image. The method of generating the image switching video can be found in the relevant description of S1602 in Embodiment 1, and will not be repeated here.
[0542] In this embodiment of the application, by using the same visual elements between adjacent images, a switching animation between two adjacent images is generated, thereby improving the smoothness of the image switching video, enhancing the user's reading experience, and reducing the sense of disjointed content during the image switching process.
[0543] Optionally, the image transformation operation included in the first switching animation is determined based on the target features of the same visual element in the two adjacent images; the image transformation operation includes at least one of scaling, rotation, and movement; the target feature includes at least one of pose, size, and / or position.
[0544] Optionally, the image sequence is an album based on a theme type specified by the first operation; the multiple images are images in the gallery associated with the theme type.
[0545] Optionally, the step of acquiring the image sequence in response to the first operation includes:
[0546] For any image among the plurality of images, the image order among the plurality of images is determined based on the feature parameters of the image in at least one visual feature dimension;
[0547] The album is obtained based on the image order of the multiple images, wherein each image in the album is sorted according to the image order.
[0548] Optionally, the at least one visual feature dimension includes at least one of the following: color dimension, region proportion dimension of visual element, and pose dimension of visual element.
[0549] Optionally, the feature parameters of the color dimension include at least one of: brightness value, hue value, and grayscale value of any primary color.
[0550] Optionally, the multiple images are images from the image library that are associated with the topic type and meet the image quality conditions.
[0551] Optionally, the image quality conditions include at least one of the following: the brightness value is within a preset brightness range; there are no abnormal regions, the abnormal regions include at least one of the following: blurred regions, red-eye regions, and glare regions; and the image has the highest aesthetic score among at least two images with a similarity greater than a preset similarity threshold.
[0552] Optionally, in the album, N consecutive images meet at least one of the following criteria:
[0553] The image brightness changes from dark to light;
[0554] The image brightness changes from bright to dark;
[0555] The proportion of the common target visual element in the N images increases from small to large.
[0556] The proportion of the common target visual element in the N images is from largest to smallest;
[0557] The pose changes of the visual elements in the N images conform to the pose change trajectory.
[0558] The N images are ordered in accordance with the visiting order of their respective attractions.
[0559] Optionally, the album also includes M consecutive images, the first image of the M images being adjacent to the last image of the N images;
[0560] The sorting pattern of the M images is the opposite of that of the N images.
[0561] Optionally, in the album, N consecutive images meet at least one of the following criteria:
[0562] The visual elements in the N images belong to the same pose type;
[0563] The N images correspond to the same scenic spot;
[0564] The N images all share the same main visual element.
[0565] Optionally, the multiple images include images from multiple image sets;
[0566] The step of determining the image order of any image among the plurality of images based on feature parameters of the image in at least one visual feature dimension includes:
[0567] For any given image, the order of the image in its respective image set is determined based on the feature parameters of the image in at least one visual feature dimension, and the image order of the image in the plurality of images is determined based on the order of the image in its respective image set and the order of the image set in the plurality of image sets.
[0568] Optionally, each image set corresponds to a pose type, and for any image set, the order of the image set in the plurality of image sets is determined based on the order of the pose types corresponding to the image set on the pose change trajectory.
[0569] Optionally, each image set corresponds to a scenic spot, and for any image set, the order of the image set in the plurality of image sets is determined based on the order of visiting the scenic spot corresponding to the image set on the scenic spot tour route.
[0570] Optionally, determining the image order of any image among the plurality of images based on feature parameters of the image in at least one visual feature dimension includes:
[0571] The correlation coefficient between any two images is calculated based on the feature parameters corresponding to the same visual elements contained in any two images in the visual feature dimension; the correlation coefficient is used to characterize the degree of correlation between any two images.
[0572] Based on the correlation coefficient, the image order of each image in the plurality of images is determined.
[0573] Optionally, the visual feature dimensions include at least one of the following: texture, hue, shape, orientation, color, area proportion, and quantity.
[0574] Optionally, it also includes:
[0575] Based on the second switching animation between two adjacent images in the album, thumbnails of each image and the corresponding image tags are displayed sequentially; the second switching animation is generated based on the image tags corresponding to the two adjacent images.
[0576] Optionally, the second switching animation based on two adjacent images in the album, which sequentially displays thumbnails of each image and the image tags corresponding to the images, includes:
[0577] Based on the second switching animation, preview screens corresponding to each image are displayed sequentially; the preview screens include thumbnails of the images and at least one image tag corresponding to the images.
[0578] Optionally, the second switching animation is used to display the transformation process of different image labels between the preview screens corresponding to the two images and the transformation process between the thumbnails of the two adjacent images.
[0579] Optionally, the preview screen includes a ring centered on the thumbnail; each image label is displayed on the ring; or
[0580] The preview screen includes two or more concentric rings centered on the thumbnail; each image label is displayed on the corresponding concentric ring according to its label association with the image.
[0581] Optionally, the second switching animation is used to display the connection process of thumbnails of two adjacent images connected by the same image label between the two adjacent images.
[0582] Optionally, the second switching animation based on two adjacent images in the album, which sequentially displays thumbnails of each image and the image tags corresponding to the images, includes:
[0583] During the process of generating the image switching video corresponding to the album, based on the second switching animation between two adjacent images in the album, thumbnails of each image and the image tags corresponding to the images are displayed sequentially.
[0584] Example 4:
[0585] The implementation flow of an image processing method corresponding to Embodiment 3 above, Figure 28 This diagram illustrates a structural block diagram of an image processing apparatus provided in an embodiment of this application. For ease of explanation, only the parts relevant to the embodiments of this application are shown.
[0586] See Figure 28 As shown, the image processing apparatus described above includes:
[0587] Image sequence acquisition unit 281 is used to acquire an image sequence in response to a first operation; the image sequence includes multiple images;
[0588] The video generation unit 282 is used to generate an image switching video corresponding to the image sequence; the image switching video includes a first switching animation between two adjacent images in the image sequence; the first switching animation is generated based on the same visual elements between the two adjacent images.
[0589] Optionally, the image transformation operation included in the first switching animation is determined based on the target features of the same visual element in the two adjacent images; the image transformation operation includes at least one of scaling, rotation, and movement; the target feature includes at least one of pose, size, and / or position.
[0590] Optionally, the image sequence is an album based on a theme type specified by the first operation; the multiple images are images in the gallery associated with the theme type.
[0591] Optionally, the image sequence acquisition unit includes:
[0592] An image sorting unit is used to determine the image order of any image in the plurality of images based on the feature parameters of the image in at least one visual feature dimension.
[0593] An album generation unit is used to generate the album based on the image order of the multiple images, wherein each image in the album is sorted according to the image order.
[0594] Optionally, the at least one visual feature dimension includes at least one of the following: color dimension, region proportion dimension of visual element, and pose dimension of visual element.
[0595] Optionally, the feature parameters of the color dimension include at least one of: brightness value, hue value, and grayscale value of any primary color.
[0596] Optionally, the multiple images are images from the image library that are associated with the topic type and meet the image quality conditions.
[0597] Optionally, the image quality conditions include at least one of the following: the brightness value is within a preset brightness range; there are no abnormal regions, the abnormal regions include at least one of the following: blurred regions, red-eye regions, and glare regions; and the image has the highest aesthetic score among at least two images with a similarity greater than a preset similarity threshold.
[0598] Optionally, in the album, N consecutive images meet at least one of the following criteria:
[0599] The image brightness changes from dark to light;
[0600] The image brightness changes from bright to dark;
[0601] The proportion of the common target visual element in the N images increases from small to large.
[0602] The proportion of the common target visual element in the N images is from largest to smallest;
[0603] The pose changes of the visual elements in the N images conform to the pose change trajectory.
[0604] The N images are ordered in accordance with the visiting order of their respective attractions.
[0605] Optionally, the album further includes M consecutive images, the first image of the M images being adjacent to the last image of the N images; the sorting pattern of the M images is the opposite of the sorting pattern of the N images.
[0606] Optionally, in the album, N consecutive images meet at least one of the following criteria:
[0607] The visual elements in the N images belong to the same pose type;
[0608] The N images correspond to the same scenic spot;
[0609] The N images all share the same main visual element.
[0610] Optionally, the multiple images include images from multiple image sets;
[0611] The image sorting unit includes: for any image, determining the order of the image in its respective image set based on the feature parameters of the image in at least one visual feature dimension, and determining the image order of the image in the multiple image sets based on the order of the image in its respective image set and the order of the image set in the multiple image sets.
[0612] Optionally, each image set corresponds to a pose type, and for any image set, the order of the image set in the plurality of image sets is determined based on the order of the pose types corresponding to the image set on the pose change trajectory.
[0613] Optionally, each image set corresponds to a scenic spot, and for any image set, the order of the image set in the plurality of image sets is determined based on the order of visiting the scenic spot corresponding to the image set on the scenic spot tour route.
[0614] Optionally, the image sorting unit is specifically used to: calculate the correlation coefficient between any two images based on the feature parameters corresponding to the visual feature dimension of the same visual elements contained between any two images in the plurality of images; the correlation coefficient is used to characterize the degree of correlation between any two images; and determine the image order of each image in the plurality of images based on the correlation coefficient.
[0615] Optionally, the visual feature dimensions include at least one of the following: texture, hue, shape, orientation, color, area proportion, and quantity.
[0616] Optionally, it also includes:
[0617] The switching animation display unit is used to sequentially display thumbnails of each image and the image tags corresponding to the images based on a second switching animation between two adjacent images in the album; the second switching animation is generated based on the image tags corresponding to the two adjacent images.
[0618] Optionally, the switching animation display unit is specifically used to: based on the second switching animation, sequentially display preview screens corresponding to each image; the preview screens include thumbnails corresponding to the images and at least one image tag corresponding to the images.
[0619] Optionally, the second switching animation is used to display the transformation process of different image labels between the preview screens corresponding to the two images and the transformation process between the thumbnails of the two adjacent images.
[0620] Optionally, the preview screen includes a ring centered on the thumbnail; each image label is displayed on the ring; or
[0621] The preview screen includes two or more concentric rings centered on the thumbnail; each image label is displayed on the corresponding concentric ring according to its label association with the image.
[0622] Optionally, the second switching animation is used to display the connection process of thumbnails of two adjacent images connected by the same image label between the two adjacent images.
[0623] Optionally, the switching animation display unit is specifically used to: during the process of generating the image switching video corresponding to the album, based on the second switching animation between two adjacent images in the album, sequentially display the thumbnails of each image and the image tags corresponding to the images.
[0624] Example 5
[0625] Compared with Embodiments 1 and 3, this application provides another image processing method. During the electronic device's response to the first operation, thumbnails of images corresponding to the theme type can be displayed in a carousel on the waiting interface. The transition between different images can be achieved through a second switching animation during this carousel process. Since the second switching animation is based on image tags, it allows users to easily determine the specific content of the theme type based on the tags, thus increasing the enjoyment of the waiting process. Specifically, Figure 29 A flowchart illustrating the implementation of an image processing method according to an embodiment of this application is shown. See also... Figure 29 As shown, the image processing method specifically includes the following steps:
[0626] In S2901, in response to the first operation, an album specified by the first operation is generated; the album includes multiple images.
[0627] In this embodiment, a user can initiate the creation of a themed photo album of a specified theme type on an electronic device. After receiving the first operation, the electronic device can retrieve images corresponding to the theme type from the gallery. The specific implementation of image retrieval can be found in the relevant description of S201 in Embodiment 1, and will not be repeated here.
[0628] In S2902, during the process of generating the album, thumbnails of each image and their corresponding image tags are displayed sequentially based on a second switching animation between the images; the second switching animation is generated based on the image tags corresponding to two adjacent images in the display order. The display order can be the order within the album or the default order of multiple images in the gallery.
[0629] In this embodiment, the electronic device requires a certain amount of processing time during the album generation process, such as sorting images or generating image switching videos corresponding to the images. In this case, the user can carousel images of thematic types, that is, display the thumbnails corresponding to each image in sequence, and realize the switching process between thumbnails of different images through the second switching animation. The process of generating and displaying the second switching animation can be found in Embodiment 1. Figures 22-24 The relevant descriptions will not be repeated here.
[0630] In this embodiment of the application, during the response to the first operation, images associated with the theme type can be rotated, and during the rotation, a second switching animation can be used to achieve the transition between different images. Since the second switching animation is based on the image tags of the images, it is convenient for users to further determine the specific content included in the theme type based on the tags, which improves the fun of the waiting process.
[0631] Optionally, during the process of generating the album, based on the second switching animation between images, the thumbnails of each image and the image tags corresponding to the images are displayed sequentially, including:
[0632] Based on the second switching animation, preview screens corresponding to each image are displayed sequentially; the preview screens include thumbnails of the images and at least one image tag corresponding to the images.
[0633] Optionally, the second switching animation is used to display the transformation process of different image labels between the preview screens corresponding to the two images and the transformation process between the thumbnails of the two adjacent images.
[0634] Optionally, the preview screen includes a ring centered on the thumbnail; each image label is displayed on the ring; or
[0635] The preview screen includes two or more concentric rings centered on the thumbnail; each image label is displayed on the corresponding concentric ring according to its label association with the image.
[0636] Optionally, the second switching animation is used to display the connection process of thumbnails of two adjacent images connected by the same image label between the two adjacent images.
[0637] Optionally, it further includes: generating an image switching video corresponding to the album; the image switching video includes a first switching animation between two adjacent images in the album; the first switching animation is generated based on the same visual elements between the two adjacent images.
[0638] Optionally, the first operation is used to generate an image transition video for the album. During the generation of the album, based on a second transition animation between images, thumbnails of each image and their corresponding image tags are displayed sequentially, including:
[0639] During the generation of the album and the image switching video, based on the second switching animation between two adjacent images in the album, thumbnails of each image and the corresponding image tags are displayed sequentially.
[0640] Optionally, the image transformation operation included in the first switching animation is determined based on the target features of the same visual element in the two adjacent images; the image transformation operation includes at least one of scaling, rotation, and movement; the target feature includes at least one of pose, size, and / or position.
[0641] Optionally, generating the album specified by the first operation in response to the first operation includes:
[0642] In response to the first operation, multiple images are acquired;
[0643] For any image among the plurality of images, the image order among the plurality of images is determined based on the feature parameters of the image in at least one visual feature dimension;
[0644] An album is generated based on the image order of the multiple images, wherein each image in the album is sorted according to the image order.
[0645] Optionally, the at least one visual feature dimension includes at least one of the following: color dimension, region proportion dimension of visual element, and pose dimension of visual element.
[0646] Optionally, the feature parameters of the color dimension include at least one of: brightness value, hue value, and grayscale value of any primary color.
[0647] Optionally, the first operation is used to generate an album corresponding to the theme type specified in the first operation; the multiple images are images in the gallery associated with the theme type.
[0648] Optionally, the multiple images are images from the image library that are associated with the topic type and meet the image quality conditions.
[0649] Optionally, the image quality conditions include at least one of the following:
[0650] The brightness value is within the preset brightness range;
[0651] There are no abnormal areas, which include at least one of the following: blurred areas, red-eye areas, and glare areas;
[0652] The highest aesthetic score is achieved among at least two images with a similarity greater than a preset similarity threshold.
[0653] Optionally, in the album, N consecutive images meet at least one of the following criteria:
[0654] The image brightness changes from dark to light;
[0655] The image brightness changes from bright to dark;
[0656] The proportion of the common target visual element in the N images increases from small to large.
[0657] The proportion of the common target visual element in the N images is from largest to smallest;
[0658] The pose changes of the visual elements in the N images conform to the pose change trajectory.
[0659] The N images are ordered in accordance with the visiting order of their respective attractions.
[0660] Optionally, the album further includes M consecutive images, the first image of the M images being adjacent to the last image of the N images; the sorting pattern of the M images is the opposite of the sorting pattern of the N images.
[0661] Optionally, in the album, N consecutive images meet at least one of the following criteria:
[0662] The visual elements in the N images belong to the same pose type;
[0663] The N images correspond to the same scenic spot;
[0664] The N images all share the same main visual element.
[0665] Optionally, the multiple images include images from multiple image sets;
[0666] The step of determining the image order of any image among the plurality of images based on feature parameters of the image in at least one visual feature dimension includes:
[0667] For any given image, the order of the image in its respective image set is determined based on the feature parameters of the image in at least one visual feature dimension, and the image order of the image in the plurality of images is determined based on the order of the image in its respective image set and the order of the image set in the plurality of image sets.
[0668] Optionally, each image set corresponds to a pose type, and for any image set, the order of the image set in the plurality of image sets is determined based on the order of the pose types corresponding to the image set on the pose change trajectory.
[0669] Optionally, each image set corresponds to a scenic spot, and for any image set, the order of the image set in the plurality of image sets is determined based on the order of visiting the scenic spot corresponding to the image set on the scenic spot tour route.
[0670] Optionally, determining the image order of any image among the plurality of images based on feature parameters of the image in at least one visual feature dimension includes:
[0671] The correlation coefficient between any two images is calculated based on the feature parameters corresponding to the same visual elements contained in any two images in the visual feature dimension; the correlation coefficient is used to characterize the degree of correlation between any two images.
[0672] Based on the correlation coefficient, the image order of each image in the plurality of images is determined.
[0673] Optionally, the visual feature dimensions include at least one of the following: texture, hue, shape, orientation, color, area proportion, and quantity.
[0674] Example 6:
[0675] The implementation flow of an image processing method corresponding to Embodiment 5 above, Figure 30 This diagram illustrates a structural block diagram of an image processing apparatus provided in an embodiment of this application. For ease of explanation, only the parts relevant to the embodiments of this application are shown.
[0676] See Figure 30 As shown, the image processing apparatus described above includes:
[0677] The album generation unit 301 is configured to generate an album specified by the first operation in response to the first operation; the album includes multiple images.
[0678] The animation display unit 302 is used to sequentially display thumbnails of each image and their corresponding image tags based on a second switching animation between images during the generation of the album. The second switching animation is generated based on the image tags corresponding to two adjacent images in the display order. The display order can be the order in the album or the default order of multiple images in the gallery.
[0679] Optionally, the animation display unit is specifically used to: based on the second switching animation, sequentially display preview screens corresponding to each image; the preview screens include thumbnails corresponding to the images and at least one image tag corresponding to the images.
[0680] Optionally, the second switching animation is used to display the transformation process of different image labels between the preview screens corresponding to the two images and the transformation process between the thumbnails of the two adjacent images.
[0681] Optionally, the preview screen includes a ring centered on the thumbnail; each image label is displayed on the ring; or
[0682] The preview screen includes two or more concentric rings centered on the thumbnail; each image label is displayed on the corresponding concentric ring according to its label association with the image.
[0683] Optionally, the second switching animation is used to display the connection process of thumbnails of two adjacent images connected by the same image label between the two adjacent images.
[0684] Optionally, the device further includes:
[0685] A video generation unit is used to generate an image switching video corresponding to the album; the image switching video includes a first switching animation between two adjacent images in the album; the first switching animation is generated based on the same visual elements between the two adjacent images.
[0686] Optionally, the first operation is used to generate the image switching video of the album, specifically: during the process of generating the album and the image switching video, based on the second switching animation between two adjacent images in the album, the thumbnails of each image and the image tags corresponding to the images are displayed sequentially.
[0687] Optionally, the image transformation operation included in the first switching animation is determined based on the target features of the same visual element in the two adjacent images; the image transformation operation includes at least one of scaling, rotation, and movement; the target feature includes at least one of pose, size, and / or position.
[0688] Optionally, the album generation unit includes:
[0689] An image acquisition unit is configured to acquire multiple images in response to the first operation;
[0690] An image sorting unit is used to determine the image order of any image in the plurality of images based on the feature parameters of the image in at least one visual feature dimension.
[0691] An album determination unit is used to generate an album based on the image order of the multiple images, wherein each image in the album is sorted according to the image order.
[0692] Optionally, the at least one visual feature dimension includes at least one of the following: color dimension, region proportion dimension of visual element, and pose dimension of visual element.
[0693] Optionally, the feature parameters of the color dimension include at least one of: brightness value, hue value, and grayscale value of any primary color.
[0694] Optionally, the first operation is used to generate an album corresponding to the theme type specified in the first operation; the multiple images are images in the gallery associated with the theme type.
[0695] Optionally, the multiple images are images from the image library that are associated with the topic type and meet the image quality conditions.
[0696] Optionally, the image quality conditions include at least one of the following:
[0697] The brightness value is within the preset brightness range;
[0698] There are no abnormal areas, which include at least one of the following: blurred areas, red-eye areas, and glare areas;
[0699] The highest aesthetic score is achieved among at least two images with a similarity greater than a preset similarity threshold.
[0700] Optionally, in the album, N consecutive images meet at least one of the following criteria:
[0701] The image brightness changes from dark to light;
[0702] The image brightness changes from bright to dark;
[0703] The proportion of the common target visual element in the N images increases from small to large.
[0704] The proportion of the common target visual element in the N images is from largest to smallest;
[0705] The pose changes of the visual elements in the N images conform to the pose change trajectory.
[0706] The N images are ordered in accordance with the visiting order of their respective attractions.
[0707] Optionally, the album further includes M consecutive images, the first image of the M images being adjacent to the last image of the N images; the sorting pattern of the M images is the opposite of the sorting pattern of the N images.
[0708] Optionally, in the album, N consecutive images meet at least one of the following criteria:
[0709] The visual elements in the N images belong to the same pose type;
[0710] The N images correspond to the same scenic spot;
[0711] The N images all share the same main visual element.
[0712] Optionally, the multiple images include images from multiple image sets;
[0713] The image sorting unit is specifically used to: for any image, determine the order of the image in its respective image set based on the feature parameters of the image in at least one visual feature dimension, and determine the image order of the image in the multiple image sets based on the order of the image in its respective image set and the order of the image set in the multiple image sets.
[0714] Optionally, each image set corresponds to a pose type, and for any image set, the order of the image set in the plurality of image sets is determined based on the order of the pose types corresponding to the image set on the pose change trajectory.
[0715] Optionally, each image set corresponds to a scenic spot, and for any image set, the order of the image set in the plurality of image sets is determined based on the order of visiting the scenic spot corresponding to the image set on the scenic spot tour route.
[0716] Optionally, the image sorting unit is specifically used for:
[0717] The correlation coefficient between any two images is calculated based on the feature parameters corresponding to the same visual elements contained in any two images in the visual feature dimension; the correlation coefficient is used to characterize the degree of correlation between any two images.
[0718] Based on the correlation coefficient, the image order of each image in the plurality of images is determined.
[0719] Optionally, the visual feature dimensions include at least one of the following: texture, hue, shape, orientation, color, area proportion, and quantity.
[0720] Figure 31 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 31 As shown, the electronic device 31 of this embodiment includes: at least one processor 310 ( Figure 31 Only one processor is shown in the diagram, and the number of processors may match the actual number of chips included in the electronic device in the embodiment. Memory 311 and program 312 stored in memory 311 and executable on at least one processor 310, wherein the processor 310 executes program 312 to implement the steps in any of the above-described image processing method embodiments.
[0721] The electronic device 31 may be a smartphone, tablet computer, laptop computer, desktop computer, etc. This electronic device may include, but is not limited to, a processor 310 and a memory 311. Those skilled in the art will understand that... Figure 31 This is merely an example of electronic device 31 and does not constitute a limitation on electronic device 31. It may include more or fewer components than shown, or combine certain components, or different components. For example, it may also include input / output electronic devices, network access electronic devices, etc.
[0722] The processor 310 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0723] In some embodiments, the memory 311 may be an internal storage unit of the electronic device 31, such as a hard disk or memory of the electronic device 31. In other embodiments, the memory 311 may be an external storage device of the electronic device 31, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 31. Furthermore, the memory 311 may include both internal storage units and external storage devices of the electronic device 31. The memory 311 is used to store the operating system, applications, bootloader, data, and other programs, such as program code. The memory 311 can also be used to temporarily store data that has been output or will be output.
[0724] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0725] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0726] This application also provides an electronic device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor executes the computer program to implement the steps in any of the above method embodiments.
[0727] This application also provides a readable storage medium storing a program that, when executed by a processor, implements the steps described in the various method embodiments above.
[0728] This application provides a program product that, when run on an electronic device, enables the electronic device to perform the steps described in the various method embodiments above.
[0729] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a photographic device / electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0730] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0731] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. An image processing method, characterized in that, include: In response to the user's first action, acquire multiple images; For any image among the plurality of images, the image order among the plurality of images is determined based on the feature parameters of the image in at least one visual feature dimension; An album is generated based on the image order of the multiple images, wherein each image in the album is sorted according to the image order.
2. The method according to claim 1, characterized in that, The at least one visual feature dimension includes at least one of the following: color dimension, area proportion dimension of visual element, and posture dimension of visual element.
3. The method according to claim 2, characterized in that, The characteristic parameters of the color dimension include at least one of the following: brightness value, hue value, and grayscale value of any primary color.
4. The method according to any one of claims 1-3, characterized in that, The first operation is used to generate an album corresponding to the theme type specified in the first operation; the multiple images are images in the gallery associated with the theme type.
5. The method according to claim 4, characterized in that, The multiple images are images from the image library that are associated with the topic type and meet the image quality requirements.
6. The method according to claim 5, characterized in that, The image quality conditions include at least one of the following: The brightness value is within the preset brightness range; There are no abnormal areas, which include at least one of the following: blurred areas, red-eye areas, and glare areas; The highest aesthetic score is achieved among at least two images with a similarity greater than a preset similarity threshold.
7. The method according to any one of claims 1-6, characterized in that, In the album, N consecutive images meet at least one of the following criteria: The image brightness changes from dark to light; The image brightness changes from bright to dark; The proportion of the common target visual element in the N images increases from small to large. The proportion of the common target visual element in the N images is from largest to smallest; The pose changes of the visual elements in the N images conform to the pose change trajectory. The N images are ordered according to the visiting order of the corresponding attractions; N is a positive integer greater than 1.
8. The method according to claim 7, characterized in that, The album also includes M consecutive images, the first image of the M images being adjacent to the last image of the N images; The sorting pattern of the M images is the opposite of that of the N images, where M is a positive integer greater than 1.
9. The method according to any one of claims 1-8, characterized in that, In the album, N consecutive images meet at least one of the following criteria: The visual elements in the N images belong to the same pose type; The N images correspond to the same scenic spot; The N images include the same main visual element; N is a positive integer greater than 1.
10. The method according to any one of claims 1-9, characterized in that, The multiple images include images from multiple image sets; The step of determining the image order of any image among the plurality of images based on feature parameters of the image in at least one visual feature dimension includes: For any given image, the order of the image in its respective image set is determined based on the feature parameters of the image in at least one visual feature dimension, and the image order of the image in the plurality of images is determined based on the order of the image in its respective image set and the order of the image set in the plurality of image sets.
11. The method according to claim 10, characterized in that, Each image set corresponds to a pose type. For any image set, the order of the image set among the multiple image sets is determined based on the order of the pose types corresponding to the image set on the pose change trajectory.
12. The method according to claim 10, characterized in that, Each image set corresponds to a scenic spot. For any image set, the order of the image set among the multiple image sets is determined based on the order of visiting the scenic spot corresponding to the image set on the scenic spot tour route.
13. The method according to any one of claims 1-12, characterized in that, The step of determining the image order of any image among the plurality of images based on feature parameters of the image in at least one visual feature dimension includes: The correlation coefficient between any two images is calculated based on the feature parameters corresponding to the same visual elements contained in any two images in the visual feature dimension; the correlation coefficient is used to characterize the degree of correlation between any two images. Based on the correlation coefficient, the image order of each image among the multiple images is determined.
14. The method according to claim 13, characterized in that, The visual feature dimensions include at least one of the following: texture, hue, shape, orientation, color, area proportion, and quantity.
15. The method according to any one of claims 1-14, characterized in that, After generating the album based on the image order of the multiple images, the process further includes: Generate an image switching video corresponding to the album; the image switching video includes a first switching animation between two adjacent images in the album; the first switching animation is generated based on the same visual elements between the two adjacent images.
16. The method according to claim 15, characterized in that, The first switching animation includes image transformation operations determined based on target features of the same visual element in two adjacent images; the image transformation operations include at least one of scaling, rotation, and movement; the target features include at least one of pose, size, and / or position.
17. The method according to any one of claims 1-16, characterized in that, Also includes: Based on the second switching animation between two adjacent images in the album, thumbnails of each image and the corresponding image tags are displayed sequentially; The second switching animation is generated based on the image tags corresponding to the two adjacent images.
18. The method according to claim 17, characterized in that, The second switching animation based on two adjacent images in the album sequentially displays thumbnails of each image and the image tags corresponding to each image, including: Based on the second switching animation, preview screens corresponding to each image are displayed sequentially; the preview screens include thumbnails of the images and at least one image tag corresponding to the images.
19. The method according to claim 18, characterized in that, The second switching animation is used to display the transformation process of different image labels between the preview screens corresponding to the two images, as well as the transformation process between the thumbnails of the two adjacent images.
20. The method according to any one of claims 18 or 19, characterized in that, The preview screen includes a ring centered on the thumbnail; each image label is displayed on the ring; or The preview screen includes two or more concentric rings centered on the thumbnail; each image label is displayed on the corresponding concentric ring according to its label association with the image.
21. The method according to claim 17, characterized in that, The second switching animation is used to display the connection process of thumbnails of two adjacent images connected by the same image label between the two adjacent images.
22. The method according to any one of claims 17-21, characterized in that, The second switching animation based on two adjacent images in the album sequentially displays thumbnails of each image and the image tags corresponding to each image, including: During the process of generating the image switching video corresponding to the album, based on the second switching animation between two adjacent images in the album, thumbnails of each image and the image tags corresponding to the images are displayed sequentially.
23. A method for image processing, characterized in that, include: In response to the first operation, an image sequence is acquired; the image sequence includes multiple images. Generate an image switching video corresponding to the image sequence; the image switching video includes a first switching animation between two adjacent images in the image sequence; the first switching animation is generated based on the same visual elements between the two adjacent images.
24. The method according to claim 23, characterized in that, The first switching animation includes image transformation operations determined based on target features of the same visual element in two adjacent images; the image transformation operations include at least one of scaling, rotation, and movement; the target features include at least one of pose, size, and / or position.
25. The method according to claim 23, characterized in that, The image sequence is an album based on the theme type specified in the first operation.
26. The method according to any one of claims 23-25, characterized in that, The step of acquiring the image sequence in response to the first operation includes: For any image among the plurality of images, the image order among the plurality of images is determined based on the feature parameters of the image in at least one visual feature dimension; The image sequence is obtained based on the image order of the multiple images, wherein each image in the image sequence is sorted according to the image order.
27. An image processing method, characterized in that, include: In response to the first operation, a photo album specified by the first operation is generated; the photo album includes multiple images; During the process of generating the album, thumbnails of each image and the corresponding image tags are displayed sequentially based on the second switching animation between each image; the second switching animation is generated based on the image tags corresponding to two adjacent images in the display order.
28. The method according to claim 27, characterized in that, The step of generating the album specified by the first operation in response to the first operation includes: For any image among the plurality of images, the image order among the plurality of images is determined based on the feature parameters of the image in at least one visual feature dimension; The album is obtained based on the image order of the multiple images, wherein each image in the album is sorted according to the image order.
29. An electronic device, characterized in that, The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method as claimed in any one of claims 1 to 28.
30. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 28.
