CN116468912A - Picture rarity determining method and device, computing equipment and storage medium - Google Patents

Picture rarity determining method and device, computing equipment and storage medium Download PDF

Info

Publication number
CN116468912A
CN116468912A CN202310392803.5A CN202310392803A CN116468912A CN 116468912 A CN116468912 A CN 116468912A CN 202310392803 A CN202310392803 A CN 202310392803A CN 116468912 A CN116468912 A CN 116468912A
Authority
CN
China
Prior art keywords
target picture
picture
pixel
determining
pixel value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310392803.5A
Other languages
Chinese (zh)
Inventor
戴冰
刘磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Encryption Native Technology Co ltd
Original Assignee
Shanghai Encryption Native Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Encryption Native Technology Co ltd filed Critical Shanghai Encryption Native Technology Co ltd
Priority to CN202310392803.5A priority Critical patent/CN116468912A/en
Publication of CN116468912A publication Critical patent/CN116468912A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/72Data preparation, e.g. statistical preprocessing of image or video features

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Image Processing (AREA)

Abstract

The embodiment of the invention discloses a method, a device, computing equipment and a storage medium for determining rarity of pictures. The method comprises the following steps: determining a target picture from a picture set; determining the image difference degree between the target picture and each non-target picture in the picture set according to the pixel values of the two pictures; determining a preset statistical index value of the image difference degree between the target picture and each non-target picture; and determining the picture rarity of the target picture according to the preset statistical index value. According to the scheme, the image rarity is determined by taking the whole image as a processing object, so that the determination efficiency of the image rarity can be improved. The implementation process of the embodiment of the invention is simple and feasible, and the application range is wide.

Description

Picture rarity determining method and device, computing equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of image processing, in particular to a method and a device for determining rarity of pictures, computing equipment and a storage medium.
Background
In order to meet the personalized needs of users and improve the user retention of platforms, some platforms provide users with a picture-like digital perimeter. The picture-like digital periphery is usually obtained by fusing a plurality of elements (such as glasses elements, clothing elements, cap elements and the like), and the fusion of different elements can obtain different picture-like digital peripheries. Since the frequency adopted by different elements in the generation of the digital periphery is different, a certain difference exists in rarity of different picture type digital peripheries.
At present, a common rare degree determining mode is a determining mode of controlling element variables, namely dividing a picture into a plurality of elements, only preserving one element in the picture at a time, determining the rare degree of the element in all pictures, and finally determining the rare degree of the picture according to the rare degree of the element. However, in this method, when the number of elements is large, the data processing amount is greatly increased, and the image rarity determination efficiency is low.
Disclosure of Invention
In view of the technical problem of low efficiency of determining the rarity of the picture in the prior art, embodiments of the present invention are provided to provide a method, an apparatus, a computing device and a storage medium for determining the rarity of the picture, which overcome or at least partially solve the above problem.
According to a first aspect of an embodiment of the present invention, there is provided a method for determining rarity of a picture, including:
determining a target picture from a picture set;
determining the image difference degree between the target picture and each non-target picture in the picture set according to the pixel values of the two pictures;
determining a preset statistical index value of the image difference degree between the target picture and each non-target picture;
and determining the picture rarity of the target picture according to the preset statistical index value.
In an alternative embodiment, the image difference between the target picture and any non-target picture is obtained by:
determining the pixel value difference degree of the target picture and the non-target picture at each pixel position;
and determining the image difference degree between the target picture and the non-target picture according to the pixel value difference degree corresponding to each pixel position.
In an alternative embodiment, the pixel value difference between the target picture and the non-target picture at any pixel position is obtained by:
acquiring a first pixel value of a target picture at the pixel position, and acquiring a second pixel value of the non-target picture at the pixel position;
and determining the color difference between the first pixel value and the second pixel value, and determining the pixel value difference degree of the target picture and the non-target picture at the pixel position according to the color difference.
In an alternative embodiment, the first pixel value and the second pixel value are color values in an RGB color space;
the determining the color difference of the first pixel value and the second pixel value further comprises:
converting the first pixel value to a third pixel value of the LAB space and converting the second pixel value to a fourth pixel value of the LAB space;
And calculating the Euclidean distance between the third pixel value and the fourth pixel value, and taking the Euclidean distance as the color difference between the first pixel value and the second pixel value.
In an optional embodiment, the determining the pixel value difference degree of the target picture and the non-target picture at the pixel position according to the color difference further includes:
if the color difference is larger than a preset color difference threshold, taking the first color value difference degree as the pixel value difference degree of the target picture and the non-target picture at the pixel position;
and if the color difference is smaller than or equal to a preset color difference threshold, taking the second color value difference degree as the pixel value difference degree of the target picture and the non-target picture at the pixel position.
In an alternative embodiment, the preset color difference threshold is determined according to a minimum color difference resolved by human eyes.
In an optional embodiment, the determining the image difference between the target picture and the non-target picture according to the pixel value difference corresponding to each pixel position further includes:
and determining the sum or average value of the pixel value difference degrees corresponding to the pixel positions as the image difference degree between the target picture and the non-target picture.
In an alternative embodiment, the determining the pixel value difference between the target picture and the non-target picture at each pixel position; according to the pixel value difference degree corresponding to each pixel position, determining the image difference degree between the target picture and the non-target picture further comprises:
identifying anti-aliasing pixels in the target picture and the non-target picture;
recording the pixel position of each anti-aliasing pixel point;
removing the pixel positions of each anti-aliasing pixel point from the full pixel positions of the target picture and the non-target picture to obtain a target pixel position;
and determining the pixel value difference degree of the target picture and the non-target picture at each target pixel position, and determining the image difference degree between the target picture and the non-target picture according to the pixel value difference degree corresponding to each target pixel position.
In an alternative embodiment, the preset statistical index value comprises an average value.
In an optional embodiment, the determining the picture rarity of the target picture according to the preset statistical index value further includes:
acquiring the release quantity of the target pictures;
and determining the picture rarity of the target picture according to the release number and the preset statistical index value.
In an alternative embodiment, after said determining the picture rarity of the target picture, the method further comprises:
and ordering the pictures in the picture set according to the rarity of the pictures.
According to a second aspect of an embodiment of the present invention, there is provided a device for determining rarity of a picture, including:
the acquisition module is used for determining a target picture from the picture set;
the first determining module is used for determining the image difference degree between the target picture and each non-target picture in the picture set according to the pixel values of the two pictures; determining a preset statistical index value of the image difference degree between the target picture and each non-target picture;
and the second determining module is used for determining the picture rarity of the target picture according to the preset statistical index value.
In an alternative embodiment, the first determining module is configured to calculate a pixel value difference between the target picture and the non-target picture at each pixel position; and determining the image difference degree between the target picture and the non-target picture according to the pixel value difference degree corresponding to each pixel position.
In an alternative embodiment, the first determining module is configured to obtain a first pixel value of the target picture at the pixel location, and obtain a second pixel value of the non-target picture at the pixel location;
And determining the color difference between the first pixel value and the second pixel value, and determining the pixel value difference degree of the target picture and the non-target picture at the pixel position according to the color difference.
In an alternative embodiment, the first determining module is configured to use the first pixel value and the second pixel value as color values in the RGB color space;
converting the first pixel value to a third pixel value of the LAB space and converting the second pixel value to a fourth pixel value of the LAB space;
and calculating the Euclidean distance between the third pixel value and the fourth pixel value, and taking the Euclidean distance as the color difference between the first pixel value and the second pixel value.
In an optional embodiment, the first determining module is configured to use the first color value difference degree as the pixel value difference degree between the target picture and the non-target picture at the pixel position if the color difference is greater than a preset color difference threshold;
and if the color difference is smaller than or equal to a preset color difference threshold, taking the second color value difference degree as the pixel value difference degree of the target picture and the non-target picture at the pixel position.
In an alternative embodiment, the preset color difference threshold is determined according to a minimum color difference resolved by human eyes.
In an alternative embodiment, the first determining module is configured to determine a sum or an average value of pixel value differences corresponding to each pixel position as an image difference between the target picture and the non-target picture.
In an alternative embodiment, the first determining module is configured to identify anti-aliasing pixels in the target picture and the non-target picture;
recording the pixel position of each anti-aliasing pixel point;
removing the pixel positions of each anti-aliasing pixel point from the full pixel positions of the target picture and the non-target picture to obtain a target pixel position;
and determining the pixel value difference degree of the target picture and the non-target picture at each target pixel position, and determining the image difference degree between the target picture and the non-target picture according to the pixel value difference degree corresponding to each target pixel position.
In an alternative embodiment, the preset statistical index value comprises an average value.
In an optional implementation manner, the second determining module is used for acquiring the release number of the target picture;
and determining the picture rarity of the target picture according to the release number and the preset statistical index value.
In an alternative embodiment, the apparatus further comprises: and the ordering module is used for ordering the pictures in the picture set according to the picture rarity.
According to a third aspect of embodiments of the present invention, there is provided a computing device comprising: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete communication with each other through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the method for determining the rareness of the picture.
According to a fourth aspect of the embodiments of the present invention, there is provided a computer storage medium having stored therein at least one executable instruction for causing a processor to perform operations corresponding to the above-described method for determining picture rarity.
The embodiment of the invention determines a target picture from a picture set; determining the image difference degree between the target picture and each non-target picture in the picture set, and determining a preset statistical index value of the image difference degree between the target picture and each non-target picture; and determining the picture rarity of the target picture according to the preset statistical index value. Therefore, the scheme uses the whole picture as a processing object to determine the rarity of the picture, and the determining efficiency of the rarity of the picture can be improved. The implementation process of the embodiment of the invention is simple and feasible, and the application range is wide.
According to the embodiment of the invention, the image difference degree between the target picture and the non-target picture is determined according to the pixel value difference degree corresponding to each pixel position, and the calculation precision of the image difference degree is improved through the difference identification of the pixel granularity, so that the determination precision of the picture rarity is improved.
According to the embodiment of the invention, the pixel value difference degree of the corresponding pixel position is determined according to the color difference of the target picture and the non-target picture at the same pixel position, so that the determination accuracy of the pixel value difference degree can be improved.
According to the embodiment of the invention, the pixel values of the RGB color space are converted into the pixel values of the LAB color space, so that the calculated pixel value difference is matched with the actual visual experience of a user, and the user experience is improved.
The embodiment of the invention compares the chromatic aberration with the preset chromatic aberration threshold value, and limits the value of the pixel value difference degree to two fixed numerical values, thereby facilitating subsequent data processing and improving the overall execution efficiency.
According to the embodiment of the invention, the preset color difference threshold is determined according to the minimum color difference resolved by human eyes, so that the rarity of the finally obtained image is matched with the actual visual sense and sense of the user, and the user experience is improved.
The embodiment of the invention determines the sum or the average value of the pixel value difference degrees corresponding to the pixel positions as the image difference degree between the target picture and the non-target picture, simplifies the determination process of the image difference degree and saves the calculation resources.
According to the embodiment of the invention, the pixel positions of each anti-aliasing pixel point are removed from the full pixel positions of the target picture and the non-target picture to obtain the target pixel positions, and the image difference degree between the target picture and the non-target picture is determined according to the pixel value difference degree corresponding to each target pixel position, so that the interference of the anti-aliasing pixel point on the image difference degree can be avoided, and the calculation precision of the image difference degree is improved.
According to the embodiment of the invention, the rarity of the picture is comprehensively determined according to the release number of the picture and the preset statistical index value of the image difference degree between the picture and other non-target pictures, and the determination accuracy of the rarity of the picture is improved.
According to the embodiment of the invention, the pictures in the picture set are ordered according to the rareness of the pictures, so that a user can quickly and accurately acquire the rareness condition of each picture.
The foregoing description is only an overview of the technical solutions of the embodiments of the present invention, and may be implemented according to the content of the specification, so that the technical means of the embodiments of the present invention can be more clearly understood, and the following specific implementation of the embodiments of the present invention will be more apparent.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
fig. 1 is a schematic flow chart of a method for determining rarity of a picture according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of another method for determining rarity of a picture according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a pixel of a target picture and a non-target picture according to an embodiment of the present invention;
fig. 4 is a schematic flow chart of another method for determining rarity of a picture according to an embodiment of the present invention;
fig. 5 is a schematic flow chart of another method for determining rarity of a picture according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a device for determining rarity of a picture according to an embodiment of the present invention;
FIG. 7 illustrates a schematic diagram of a computing device provided by an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present invention are shown in the drawings, it should be understood that embodiments of the present invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the embodiments to those skilled in the art.
Fig. 1 is a flow chart illustrating a method for determining rarity of a picture according to an embodiment of the present invention. Specifically, as shown in fig. 1, the method includes the steps of:
step S110, determining a target picture from the picture set.
The picture set is a set containing a plurality of pictures, and the specific content, types and the like of the pictures in the picture set are not limited in the embodiment of the invention. For example, in an application scenario, the pictures contained in the picture set are picture type digital peripheries issued by the platform, and the picture type digital peripheries can be digital head images, digital dolls and the like, so that the rareness of the picture type digital peripheries can be determined through the embodiment of the invention; in still another application scene, the pictures contained in the picture set are original pictures recorded by the platform, so that the rarity of the original pictures can be determined through the embodiment of the invention.
The target picture is a picture to be subjected to picture rarity determination in the picture set, for example, one picture can be randomly selected from pictures to be subjected to picture rarity determination in the picture set to serve as the target picture, after the picture rarity of the current target picture is determined, the next picture to be subjected to picture rarity determination is selected from the target set to serve as a new target picture, and so on, the picture rarity of all pictures in the picture set can be obtained.
Step S120, determining the image difference degree between the target picture and each non-target picture in the picture set according to the pixel values of the two pictures.
The pictures in the picture set other than the target picture are non-target pictures. For each non-target picture, determining the image difference degree between the target picture and the non-target picture according to the pixel value of the picture, wherein the image difference degree reflects the difference degree of the target picture and the non-target picture, and the image difference degree is inversely related to the image similarity, namely the higher the image similarity between the target picture and the non-target picture is, the lower the image difference degree is; the lower the image similarity, the higher the image difference. The embodiment of the invention does not limit the specific calculation mode of the image difference degree.
Step S130, determining a preset statistical index value of the image difference between the target picture and each non-target picture.
The step S120 is capable of obtaining the image difference between the target picture and each non-target picture, and the step performs statistical processing on each image difference corresponding to the target picture to determine the overall characteristic of the image difference. Specifically, a preset statistical index value of the difference degree of each image corresponding to the target picture is calculated.
Preferably, the preset statistical index value may include an average value, so that an average degree of difference between the target picture and each non-target picture may be reflected by the preset statistical index value. The average value may be an arithmetic average value or a geometric average value. In addition, the preset statistical index value may be the sum, the mode, or the like of the difference degrees of the respective images corresponding to the target picture.
Step S140, determining the picture rarity of the target picture according to the preset statistical index value.
Specifically, the preset statistical index value of the target picture may be directly used as the picture rarity of the target picture, or further post-processing such as normalization processing may be performed on the preset statistical index value, and the index value obtained by the post-processing may be used as the picture rarity of the target picture.
Therefore, in the embodiment of the invention, the rarity of the picture is determined by taking the whole picture as the processing object, and compared with the mode of splitting elements and controlling element variables in the picture in the prior art, the rarity determining efficiency of the picture can be improved. The implementation process of the embodiment of the invention is simple and feasible, and the application range is wide.
Fig. 2 is a flow chart illustrating another method for determining rarity of a picture according to an embodiment of the present invention. Specifically, as shown in fig. 2, the method includes the steps of:
step S210, determining a target picture and a non-target picture from the picture set.
The specific implementation of this step may refer to the description in the embodiment of fig. 1, and will not be described herein.
Step S220, for any non-target picture, determines the pixel value difference between the target picture and the non-target picture at each pixel position.
In the implementation process, the non-target picture and the target picture are both in a bitmap format, and the picture in the bitmap format is formed by a plurality of pixels, and each pixel has a corresponding pixel position and a pixel value. The pixel value difference degree of the target picture and the non-target picture at each pixel position is determined by adopting a pixel-by-pixel comparison mode, and the pixel value difference degree characterizes the difference of the pixel values of the target picture and the non-target picture at the same pixel position.
Before determining the pixel value difference degree of the target picture and the non-target picture at each pixel position, the target picture and the non-target picture need to be set as bitmaps with consistent size and consistent resolution. Specifically, if the target picture or the non-target picture is a vector picture such as SVG, DWG, etc., the target picture or the non-target picture in the vector picture format is converted into a target picture or a non-target picture in the PNG, JPG, etc. bitmap format by a conversion algorithm or a conversion tool of the vector picture and the bitmap. If the size or resolution of the target picture is inconsistent with that of the non-target picture, the non-target picture is subjected to size scaling or resolution conversion and then kept consistent with that of the target picture.
In an alternative embodiment, the pixel value difference between the target picture and the non-target picture at any pixel position is specifically obtained by:
a first pixel value of the target picture at the pixel position is obtained, and a second pixel value of the non-target picture at the pixel position is obtained. The pixel value of the target picture at the pixel position is a first pixel value, and the pixel value of the non-target picture at the pixel position is a second pixel value. In the embodiment of the invention, the first pixel value and the second pixel value are color values in an RGB color space, so that RGBA information of each pixel in a picture can be stored in an array form in ImageData, imageData of the picture in the acquisition process, R corresponds to red (the value is usually 0-255), G corresponds to green (the value is usually 0-255), B corresponds to blue (the value is usually 0-255), A corresponds to an alpha channel (the value is usually 0-255, wherein 0 is transparent and 255 is completely visible), each four digits of RGBA information represent the color value of one pixel position, and the RGBA value of each pixel point can be obtained by dividing according to each four digits. It should be understood that this color value acquisition mode is only one possible implementation, and those skilled in the art may also use other acquisition modes according to practical situations, which are not limited by the embodiment of the present invention.
Further determining the color difference between the first pixel value and the second pixel value, and determining the pixel value difference degree of the target picture and the non-target picture at the pixel position according to the color difference. Therefore, the embodiment obtains the pixel value difference degree of the pixel value of the pixel position by using the color difference of the pixel values of the target picture and the non-target picture at the same pixel position, and the implementation process is simple and feasible and has higher calculation precision.
Further alternatively, the manner of determining the color difference between the first pixel value and the second pixel value may be one or more of the following manners:
in the first color difference determination mode, a euclidean distance between the first pixel value and the second pixel value is calculated, and the euclidean distance is used as a color difference between the first pixel value and the second pixel value. Specifically, the color difference between the first pixel value and the second pixel value is the euclidean distance of the two RGBA values. By adopting the mode, the chromatic aberration of the first pixel value and the second pixel value can be rapidly determined, and the overall execution efficiency is improved.
In the second color difference determining mode, in order to make the processing result of the rarity of the finally obtained picture more in line with the visual perception of the user, the first pixel value and the second pixel value are color values in the RGB color space, the first pixel value is converted into a third pixel value in the LAB space, and the second pixel value is converted into a fourth pixel value in the LAB space; and determining the Euclidean distance between the third pixel value and the fourth pixel value, and taking the Euclidean distance as the color difference between the first pixel value and the second pixel value. The pixel value obtained after the first pixel value is converted into the LAB space from the RGB color space is a third pixel value, and the pixel value obtained after the second pixel value is converted into the LAB space from the RGB color space is a fourth pixel value. As the LAB space is a color model based on the physiological characteristics of the human body, the color difference determined by the determination mode can be more in line with the visual perception of the user.
In yet another alternative embodiment, determining the pixel value difference degree between the target picture and the non-target picture at the pixel position according to the color difference between the first pixel value and the second pixel value may specifically adopt one or more of the following manners:
in the first mode of determining the pixel value difference, the color difference between the first pixel value and the second pixel value is used as the pixel value difference between the target picture and the non-target picture at the pixel position. In the determination mode, the color difference is directly used as the pixel value difference degree, so that the pixel value difference degree determination efficiency is improved. In addition, the normalized result of the color difference between the first pixel value and the second pixel value may be used as the pixel value difference degree.
A second pixel value difference degree determination mode, wherein if the color difference between the first pixel value and the second pixel value is larger than a preset color difference threshold value, the first color value difference degree is used as the pixel value difference degree of the target picture and the non-target picture at the pixel position; and if the color difference between the first pixel value and the second pixel value is smaller than or equal to a preset color difference threshold value, taking the second color value difference degree as the pixel value difference degree of the target picture and the non-target picture at the pixel position. The preset color difference threshold is determined according to the minimum color difference value which can be distinguished by human eyes. In this determination mode, the value of the pixel value difference at the pixel position is the first color value difference and the second color value difference, that is, the pixel value difference at the pixel position is the first color value difference when the human eye can distinguish the color difference, and the pixel value difference at the pixel position is the second color value difference when the human eye cannot distinguish the color difference. The first color value difference may be 1, and the second color value difference may be 0. According to the embodiment, on one hand, the processing result can be more in line with the visual perception of the user, and on the other hand, the subsequent data processing is simplified. Taking fig. 3 as an example, each square in fig. 3 represents a pixel, a corresponds to a target picture, B corresponds to a certain non-target picture, and at a pixel position of a first row and a first column, a color difference between the target picture a and the non-target picture B at the pixel position is smaller than a preset color difference threshold, and then a pixel value difference degree of the pixel position is 0; and at the pixel position of the first column of the third row, the color difference of the target picture A and the non-target picture B at the pixel position is larger than a preset color difference threshold value, and the pixel value difference degree of the pixel position is 1.
Step S230, determining the image difference degree between the target picture and the non-target picture according to the pixel value difference degree corresponding to each pixel position.
Through implementation of step S220, the pixel value difference degree corresponding to each pixel position can be obtained, and the image difference degree between the target picture and the non-target picture is determined according to the pixel value difference degree corresponding to each pixel position.
Specifically, the sum or average value of the pixel value difference degrees corresponding to the respective pixel positions may be determined as the image difference degree between the target picture and the non-target picture. Still taking fig. 3 as an example, the pixel value differences corresponding to the pixel positions are respectively: 0,0,0,0,0,0,1,0,0, the image difference between the target picture a and the non-target picture B may be 1 (the sum of the pixel value differences corresponding to the respective pixel positions).
In an optional implementation manner, if the size of the target picture is inconsistent with the size of the non-target picture or the resolution is inconsistent with the size of the non-target picture, that is, the size of the non-target picture is converted or the resolution of the non-target picture is changed according to the pixel value difference degree corresponding to each pixel position, when the image difference degree between the target picture and the non-target picture is determined, an adjustment factor may be generated according to the ratio of the size of the non-target picture to the size of the target picture and/or according to the ratio of the resolution of the non-target picture to the resolution of the target picture, where the adjustment factor is smaller than 1, and then the image difference degree between the target picture and the non-target picture is determined according to the pixel value difference degree corresponding to each pixel position and the adjustment factor. For example, after the sum or the average value of the pixel value difference degrees corresponding to the pixel positions is obtained through calculation, the product of the sum or the average value and the adjustment factor is used as the final image difference degree between the target picture and the non-target picture, so that the difference of the image size and the resolution is integrated into the image difference degree, and the accuracy of the image difference degree is further improved.
Step S240, determining an average value of the image difference degrees between the target picture and each non-target picture.
The image difference degree between the target picture and each non-target picture can be obtained through multiple implementations of step S230, and the average value of each image difference degree is further calculated.
Step S250, determining the picture rarity of the target picture according to the average value of the image difference degrees between the target picture and each non-target picture.
Specifically, an average value of image difference degrees between the target picture and each non-target picture is taken as a picture rarity of the target picture.
Therefore, the embodiment of the invention calculates the pixel value difference degree of the target picture and the non-target picture at each pixel position, and determines the image difference degree between the target picture and the non-target picture according to the pixel value difference degree corresponding to each pixel position, thereby improving the calculation precision of the image difference degree and further improving the determination precision of the picture rarity.
Fig. 4 is a flowchart illustrating another method for determining rarity of a picture according to an embodiment of the present invention. Specifically, as shown in fig. 4, the method includes the steps of:
in step S410, the target picture and the non-target picture are determined from the picture set.
The specific implementation of this step may refer to the description in the embodiment of fig. 1, and will not be described herein.
Step S420, for any non-target picture, identifying anti-aliasing pixels in the target picture and the non-target picture, recording the pixel positions of each anti-aliasing pixel, and removing the pixel positions of each anti-aliasing pixel from the total pixel positions of the target picture and the non-target picture to obtain the target pixel position.
In an actual implementation process, in order to implement smoothing of an image edge, an antialiasing (also referred to as antialiasing) method is generally adopted to process pixels of the image edge, where the antialiasing process specifically selects colors of a plurality of sample points in a certain grid coverage area and performs a mixed calculation to obtain the color of the grid as the color of the grid. However, although edge smoothing can be achieved in this way, there is a certain deviation between the pixel value of the antialiased pixel point after the antialiasing processing and the pixel value of the original picture. In view of this, in order to improve the image difference between the target image and the non-target image, the embodiment of the invention does not compare the pixel values of the anti-aliasing pixels.
Specifically, first, anti-aliasing pixels in a target picture and a non-target picture are identified. The pixels in the target picture and the non-target picture, which are subjected to antialiasing processing, are antialiasing pixels. The embodiment of the invention does not limit the specific recognition mode of the anti-aliasing pixel points, for example, the image edge can be detected, and if the pixel at the edge does not have corresponding saw teeth, the pixel at the edge is used as the anti-aliasing pixel point. The pixel positions of the anti-aliasing pixels are further recorded. For example, if the target picture has an anti-aliasing pixel 1 and the non-target picture has an anti-aliasing pixel 2, the pixel positions of the anti-aliasing pixels 1 and 2 are recorded. In addition, after the pixel positions of each anti-aliasing pixel point are recorded, the pixel positions are subjected to de-duplication processing so as to eliminate the pixel positions which repeatedly appear.
And further acquiring the full pixel positions of the target picture and the non-target picture. When the target picture and the non-target picture are compared, the resolution is the same due to the consistent size, so that all pixel positions of the target picture and the non-target picture are consistent, and all pixel positions in the target picture or the non-target picture are taken as full pixel positions.
And removing the pixel positions of the anti-aliasing pixels from the full pixel positions of the target picture and the non-target picture to obtain the target pixel position. The pixel position obtained by deleting the pixel position of the anti-aliasing pixel point from the full-scale pixel position is a target pixel position, namely the target pixel position does not contain the pixel position of the anti-aliasing pixel point, and the target pixel position is a subset in the full-scale pixel position set.
Step S430, determining the pixel value difference degree of the target picture and the non-target picture at each target pixel position, and determining the image difference degree between the target picture and the non-target picture according to the pixel value difference degree corresponding to each target pixel position.
The image difference degree between the target picture and the non-target picture is determined only according to the pixel value difference degree corresponding to the target pixel position, so that the obtained image difference degree can avoid the interference of anti-aliasing pixel points. Specifically, the image difference degree between the target picture and the non-target picture can be determined according to the average value of the pixel value difference degrees corresponding to the target pixel positions. The method for determining the pixel value difference between the target picture and the non-target picture at the target pixel position may refer to the method for determining the pixel value difference between the target picture and the non-target picture at any pixel position in other embodiments, and the embodiments of the present invention are not described herein.
In step S440, an average value of the image difference degrees between the target picture and each non-target picture is determined.
Step S450, determining the picture rarity of the target picture according to the average value of the image difference degrees between the target picture and each non-target picture.
Therefore, the embodiment of the invention obtains the target pixel position after eliminating the pixel positions of each anti-aliasing pixel point from the total pixel positions of the target picture and the non-target picture, and determines the image difference degree between the target picture and the non-target picture according to the pixel value difference degree corresponding to each target pixel position, thereby avoiding the interference of the anti-aliasing pixel point on the image difference degree and improving the calculation precision of the image difference degree.
Fig. 5 is a flowchart illustrating another method for determining rarity of a picture according to an embodiment of the present invention. Specifically, as shown in fig. 5, the method includes the steps of:
step S510, determining a target picture from a picture set, determining the image difference degree between the target picture and each non-target picture in the picture set according to the pixel values of the two, and determining a preset statistical index value of the image difference degree between the target picture and each non-target picture.
Step S520, the release number of the target picture is obtained.
Even when the distribution numbers of the pictures in the picture set are not uniform, the distribution number of the pictures can have a large influence on the rarity of the pictures. Thus, the present embodiment further obtains the release number of the target pictures, specifically, the number of the pictures released by the platform.
Step S530, determining the rarity of the target picture according to the release number and the preset statistic index value.
Specifically, calculating the ratio of the release number of the target pictures to the sum of the release numbers of all the pictures in the picture set, and determining the picture rarity of the target pictures according to the ratio and a preset statistical index value. For example, the product of the ratio and the preset statistical index value may be used as the picture rarity of the target picture.
In an alternative embodiment, a preset statistical index value of each picture in the picture set may be calculated and obtained, and then normalization processing may be performed on each preset statistical index value. Accordingly, normalization processing is carried out on the ratio of the distribution number of each picture in the picture set to the sum of the distribution number of each picture in the picture set, and finally, the picture rarity of the picture is determined according to the ratio after normalization processing and the preset statistic index value after normalization processing.
In addition, in yet another alternative embodiment, after obtaining the rarity of the pictures, the pictures in the picture set may be ordered according to the rarity of the pictures, so that the user can quickly and accurately learn the rarity of each picture.
Therefore, according to the embodiment of the invention, the rarity of the picture is comprehensively determined according to the release number of the pictures and the preset statistical index value of the image difference degree between the picture and other non-target pictures, and the determination accuracy of the rarity of the picture is improved.
In addition, in some alternative embodiments, automatic pricing of the picture class digital perimeter may be further achieved based on picture rarity after obtaining the picture rarity of the picture with other embodiments. The pricing negative of the picture class digital periphery is related to the picture rarity, namely, the higher the picture rarity of the picture class digital periphery is, the lower the pricing is; conversely, the lower the picture rarity of the picture class number perimeter, the higher the pricing. In the implementation process, a correlation function of pricing of the digital periphery and rareness of the picture can be generated, and automatic pricing of the digital periphery is achieved, so that pricing cost can be saved and pricing efficiency can be improved compared with a manual pricing mode.
Fig. 6 is a schematic structural diagram of a device for determining rarity of a picture according to an embodiment of the present invention. As shown in fig. 6, the apparatus 600 includes: an acquisition module 610, a first determination module 620, and a second determination module 630.
An obtaining module 610, configured to determine a target picture from a picture set;
a first determining module 620, configured to determine an image difference degree between the target picture and each non-target picture in the picture set according to the pixel values of the two pictures; determining a preset statistical index value of the image difference degree between the target picture and each non-target picture;
a second determining module 630, configured to determine a picture rarity of the target picture according to the preset statistical index value.
In an alternative embodiment, the first determining module 620 is configured to calculate a degree of difference between pixel values of the target picture and the non-target picture at each pixel position; and determining the image difference degree between the target picture and the non-target picture according to the pixel value difference degree corresponding to each pixel position.
In an alternative embodiment, the first determining module 620 is configured to obtain a first pixel value of the target picture at the pixel location, and obtain a second pixel value of the non-target picture at the pixel location;
And determining the color difference between the first pixel value and the second pixel value, and determining the pixel value difference degree of the target picture and the non-target picture at the pixel position according to the color difference.
In an alternative embodiment, the first determining module 620 is configured to use the first pixel value and the second pixel value as color values in the RGB color space;
converting the first pixel value to a third pixel value of the LAB space and converting the second pixel value to a fourth pixel value of the LAB space;
and calculating the Euclidean distance between the third pixel value and the fourth pixel value, and taking the Euclidean distance as the color difference between the first pixel value and the second pixel value.
In an alternative embodiment, the first determining module 620 is configured to, if the color difference is greater than a preset color difference threshold, use the first color value difference as the pixel value difference between the target picture and the non-target picture at the pixel position;
and if the color difference is smaller than or equal to a preset color difference threshold, taking the second color value difference degree as the pixel value difference degree of the target picture and the non-target picture at the pixel position.
In an alternative embodiment, the preset color difference threshold is determined according to a minimum color difference resolved by human eyes.
In an alternative embodiment, the first determining module 620 is configured to determine a sum or an average of pixel value differences corresponding to each pixel position as the image difference between the target picture and the non-target picture.
In an alternative embodiment, the first determining module 620 is configured to identify anti-aliasing pixels in the target picture and the non-target picture;
recording the pixel position of each anti-aliasing pixel point;
removing the pixel positions of each anti-aliasing pixel point from the full pixel positions of the target picture and the non-target picture to obtain a target pixel position;
and determining the pixel value difference degree of the target picture and the non-target picture at each target pixel position, and determining the image difference degree between the target picture and the non-target picture according to the pixel value difference degree corresponding to each target pixel position.
In an alternative embodiment, the preset statistical index value comprises an average value.
In an alternative embodiment, the second determining module 630 is configured to obtain the release number of the target picture;
and determining the picture rarity of the target picture according to the release number and the preset statistical index value.
In an alternative embodiment, the apparatus further comprises: a sorting module (not shown in the figure) for sorting the pictures in the picture set according to the rarity of the pictures.
Therefore, in the embodiment of the invention, the rarity of the picture is determined by taking the whole picture as the processing object, and compared with the mode of splitting elements and controlling element variables in the picture in the prior art, the rarity determining efficiency of the picture can be improved. The implementation process of the embodiment of the invention is simple and feasible, and the application range is wide.
FIG. 7 illustrates a schematic diagram of a computing device provided by an embodiment of the present invention. The specific embodiments of the present invention are not limited to a particular implementation of a computing device.
As shown in fig. 7, the computing device may include: a processor 702, a communication interface (Communications Interface), a memory 706, and a communication bus 708.
Wherein: processor 702, communication interface 704, and memory 706 perform communication with each other via a communication bus 708. Communication interface 704 is used to communicate with network elements of other devices, such as clients or other computing devices. The processor 702 is configured to execute the program 710, and may specifically perform relevant steps in the embodiment of the method for determining the rarity of a picture.
In particular, program 710 may include program code including computer-operating instructions.
The processor 702 may be a Central Processing Unit (CPU), or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement embodiments of the present invention. The one or more processors included by the computing device may be the same type of processor, such as one or more CPUs; but may also be different types of processors such as one or more CPUs and one or more ASICs.
Memory 706 for storing programs 710. The memory 706 may comprise high-speed RAM memory or may further comprise non-volatile memory (non-volatile memory), such as at least one disk memory. The program 710 may be specifically configured to cause the processor 702 to perform the method of any of the method embodiments described above.
An embodiment of the present invention provides a non-volatile computer storage medium storing at least one executable instruction that can perform the method for determining rarity of a picture in any of the above method embodiments.
The algorithms or displays presented herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general-purpose systems may also be used with the teachings herein. The required structure for a construction of such a system is apparent from the description above. In addition, embodiments of the present invention are not directed to any particular programming language. It will be appreciated that the teachings of embodiments of the present invention described herein may be implemented in a variety of programming languages, and the above description of specific languages is provided for disclosure of enablement and best mode of the embodiments of the present invention.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be construed as reflecting the intention that: i.e., an embodiment of the invention that is claimed, requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. The modules or units or components of the embodiments may be combined into one module or unit or component and, furthermore, they may be divided into a plurality of sub-modules or sub-units or sub-components. Any combination of all features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be used in combination, except insofar as at least some of such features and/or processes or units are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of embodiments of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that some or all of the functionality of some or all of the components according to embodiments of the present invention may be implemented in practice using a microprocessor or Digital Signal Processor (DSP). Embodiments of the present invention may also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for performing a portion or all of the methods described herein. Such a program embodying the embodiments of the present invention may be stored on a computer readable medium, or may have the form of one or more signals. Such signals may be downloaded from an internet website, provided on a carrier signal, or provided in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. Embodiments of the invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order. These words may be interpreted as names. The steps in the above embodiments should not be construed as limiting the order of execution unless specifically stated.

Claims (14)

1. A method for determining rarity of a picture, comprising:
determining a target picture from a picture set;
determining the image difference degree between the target picture and each non-target picture in the picture set according to the pixel values of the two pictures;
determining a preset statistical index value of the image difference degree between the target picture and each non-target picture;
and determining the picture rarity of the target picture according to the preset statistical index value.
2. The method according to claim 1, wherein the degree of image difference between the target picture and any non-target picture is obtained by:
determining the pixel value difference degree of the target picture and the non-target picture at each pixel position;
and determining the image difference degree between the target picture and the non-target picture according to the pixel value difference degree corresponding to each pixel position.
3. The method according to claim 2, wherein the pixel value difference between the target picture and the non-target picture at any one pixel position is obtained by:
acquiring a first pixel value of a target picture at the pixel position, and acquiring a second pixel value of the non-target picture at the pixel position;
And determining the color difference between the first pixel value and the second pixel value, and determining the pixel value difference degree of the target picture and the non-target picture at the pixel position according to the color difference.
4. The method of claim 3, wherein the first pixel value and the second pixel value are color values in an RGB color space;
the determining the color difference of the first pixel value and the second pixel value further comprises:
converting the first pixel value to a third pixel value of the LAB space and converting the second pixel value to a fourth pixel value of the LAB space;
and calculating the Euclidean distance between the third pixel value and the fourth pixel value, and taking the Euclidean distance as the color difference between the first pixel value and the second pixel value.
5. The method according to claim 3 or 4, wherein said determining a pixel value difference between the target picture and the non-target picture at the pixel location according to the color difference further comprises:
if the color difference is larger than a preset color difference threshold, taking the first color value difference degree as the pixel value difference degree of the target picture and the non-target picture at the pixel position;
and if the color difference is smaller than or equal to a preset color difference threshold, taking the second color value difference degree as the pixel value difference degree of the target picture and the non-target picture at the pixel position.
6. The method of claim 5, wherein the predetermined color difference threshold is determined based on a minimum color difference resolved by a human eye.
7. The method according to any one of claims 2-6, wherein determining the image difference between the target picture and the non-target picture according to the pixel value difference corresponding to each pixel position further comprises:
and determining the sum or average value of the pixel value difference degrees corresponding to the pixel positions as the image difference degree between the target picture and the non-target picture.
8. The method according to any one of claims 2-7, wherein the determining a degree of difference in pixel values of the target picture and the non-target picture at each pixel location; according to the pixel value difference degree corresponding to each pixel position, determining the image difference degree between the target picture and the non-target picture further comprises:
identifying anti-aliasing pixels in the target picture and the non-target picture;
recording the pixel position of each anti-aliasing pixel point;
removing the pixel positions of each anti-aliasing pixel point from the full pixel positions of the target picture and the non-target picture to obtain a target pixel position;
And determining the pixel value difference degree of the target picture and the non-target picture at each target pixel position, and determining the image difference degree between the target picture and the non-target picture according to the pixel value difference degree corresponding to each target pixel position.
9. The method according to any one of claims 1-8, wherein the preset statistical indicator value comprises an average value.
10. The method according to any one of claims 1-9, wherein the determining the picture rarity of the target picture according to the preset statistical index value further comprises:
acquiring the release quantity of the target pictures;
and determining the picture rarity of the target picture according to the release number and the preset statistical index value.
11. The method according to any one of claims 1-10, wherein after said determining the picture rarity of the target picture, the method further comprises:
and ordering the pictures in the picture set according to the rarity of the pictures.
12. A device for determining rarity of a picture, comprising:
the acquisition module is used for determining a target picture from the picture set;
the first determining module is used for determining the image difference degree between the target picture and each non-target picture in the picture set according to the pixel values of the two pictures; determining a preset statistical index value of the image difference degree between the target picture and each non-target picture;
And the second determining module is used for determining the picture rarity of the target picture according to the preset statistical index value.
13. A computing device, comprising: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete communication with each other through the communication bus;
the memory is configured to store at least one executable instruction, where the executable instruction causes the processor to perform operations corresponding to the method for determining rarity of pictures according to any one of claims 1-11.
14. A computer storage medium having stored therein at least one executable instruction for causing a processor to perform operations corresponding to the method of determining picture rarity according to any one of claims 1-11.
CN202310392803.5A 2023-04-12 2023-04-12 Picture rarity determining method and device, computing equipment and storage medium Pending CN116468912A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310392803.5A CN116468912A (en) 2023-04-12 2023-04-12 Picture rarity determining method and device, computing equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310392803.5A CN116468912A (en) 2023-04-12 2023-04-12 Picture rarity determining method and device, computing equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116468912A true CN116468912A (en) 2023-07-21

Family

ID=87184953

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310392803.5A Pending CN116468912A (en) 2023-04-12 2023-04-12 Picture rarity determining method and device, computing equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116468912A (en)

Similar Documents

Publication Publication Date Title
US20190347767A1 (en) Image processing method and device
CN108647634A (en) Framing mask lookup method, device, computer equipment and storage medium
CN110399842B (en) Video processing method and device, electronic equipment and computer readable storage medium
CN111028170B (en) Image processing method, image processing apparatus, electronic device, and readable storage medium
CN111160114B (en) Gesture recognition method, gesture recognition device, gesture recognition equipment and computer-readable storage medium
CN113724128B (en) Training sample expansion method
CN105681775A (en) White balance method and device
CN110599453A (en) Panel defect detection method and device based on image fusion and equipment terminal
CN113971644A (en) Image identification method and device based on data enhancement strategy selection
CN112016548B (en) Cover picture display method and related device
CN111803956B (en) Method and device for determining game plug-in behavior, electronic equipment and storage medium
CN111179245B (en) Image quality detection method, device, electronic equipment and storage medium
CN111862343A (en) Three-dimensional reconstruction method, device and equipment and computer readable storage medium
CN116798041A (en) Image recognition method and device and electronic equipment
CN116468912A (en) Picture rarity determining method and device, computing equipment and storage medium
CN111274145A (en) Relationship structure chart generation method and device, computer equipment and storage medium
CN108665455B (en) Method and device for evaluating image significance prediction result
CN113012030A (en) Image splicing method, device and equipment
CN116188917A (en) Defect data generation model training method, defect data generation method and device
CN115797267A (en) Image quality evaluation method, system, electronic device, and storage medium
CN113628286B (en) Video color gamut detection method, device, computing equipment and computer storage medium
CN111028313B (en) Table distribution image generation method and device
CN113674215A (en) Light spot identification method and device of photovoltaic panel and computer readable storage medium
CN113095147A (en) Skin area detection method, system, image processing terminal and storage medium
CN108665434B (en) Image synthesis method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination