Movatterモバイル変換


[0]ホーム

URL:


CN105261044A - Similar picture identification method and device and electronic equipment - Google Patents

Similar picture identification method and device and electronic equipment
Download PDF

Info

Publication number
CN105261044A
CN105261044ACN201510587613.4ACN201510587613ACN105261044ACN 105261044 ACN105261044 ACN 105261044ACN 201510587613 ACN201510587613 ACN 201510587613ACN 105261044 ACN105261044 ACN 105261044A
Authority
CN
China
Prior art keywords
fingerprint
value
picture
pictures
pixel
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
CN201510587613.4A
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.)
Beijing Kingsoft Internet Security Software Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software 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 Beijing Kingsoft Internet Security Software Co LtdfiledCriticalBeijing Kingsoft Internet Security Software Co Ltd
Priority to CN201510587613.4ApriorityCriticalpatent/CN105261044A/en
Publication of CN105261044ApublicationCriticalpatent/CN105261044A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

The invention provides a method and a device for identifying similar pictures and electronic equipment, wherein the method for identifying similar pictures is applied to the electronic equipment and comprises the following steps: acquiring content information and color information of pictures to be compared; generating a content fingerprint according to the content information, and generating a color fingerprint according to the color information; generating a hybrid fingerprint from the content fingerprint and the color fingerprint; and judging whether the picture is a similar picture or not according to the mixed fingerprint and a preset threshold value. The method can improve the identification accuracy of the similar pictures.

Description

The recognition methods of similar pictures, device and electronic equipment
Technical field
The present invention relates to picture Processing Technique field, particularly relate to a kind of recognition methods of similar pictures, device and electronic equipment.
Background technology
Present society uses the user of mobile phone to get more and more, the frequency that people take pictures is more and more higher, and generally can take several photos continuously when people take a scenery, and photo similar on mobile phone can be a lot, occupy storage space greatly, cause a lot of mobile phone to occur the problem of insufficient space.Can deletion similar pictures in order to save storage space.In prior art, similar photo can be judged by the mode of color histogram, but, if two pictures background colours are identical, and content is that the position of consistent just content is inconsistent, judges that this two pictures is similar pictures, but be actually dissimilar by color histogram.
Summary of the invention
The present invention is intended to solve one of technical matters in correlation technique at least to a certain extent.
For this reason, one object of the present invention is the recognition methods proposing a kind of similar pictures, and the method can improve the recognition accuracy of similar pictures.
Another object of the present invention is the recognition device proposing a kind of similar pictures.
Another object of the present invention is to propose a kind of electronic equipment.
For achieving the above object, the recognition methods of the similar pictures that first aspect present invention embodiment proposes, comprising: the content information and the colouring information that obtain picture to be compared; According to described content information generating content fingerprint, generate color fingerprint according to described colouring information; According to described user supplied video content using fingerprints and described color fingerprint, generate mixed-fingerprint; According to described mixed-fingerprint and the threshold value preset, judge whether described picture is similar pictures.
Optionally, described content information is the gray-scale value of picture, described according to described content information generating content fingerprint, comprising: the every pictures in picture corresponding to be compared, according to the gray-scale value calculating mean value of each pixel in every pictures; Each pixel in corresponding every pictures, when the gray-scale value of described pixel is more than or equal to described mean value, described pixel characteristic of correspondence value is defined as 1, when the gray-scale value of described pixel is less than described mean value, described pixel characteristic of correspondence value is defined as 0; Corresponding every pictures, forms the eigenwert of described picture by each pixel characteristic of correspondence value step-by-step in described picture; By the eigenwert of bit comparison picture to be compared, obtain not identical number; By the ratio of the total number of pixel of not identical number and every pictures, be defined as user supplied video content using fingerprints.
Optionally, described colouring information is the rgb value of picture, described according to described colouring information generation color fingerprint, comprising: the every pictures in picture corresponding to be compared, carries out dimensionality reduction mapping, obtain new rgb value to the rgb value of each pixel in every pictures; Corresponding every pictures, according to the new rgb value of each pixel, adds up the number of pixels be mapped in the dimension at each new rgb value place, and using the number of pixels in each dimension as an element, the vector of the corresponding every pictures of composition; Vectorial cosine between vector corresponding for picture to be compared is defined as color fingerprint.
Optionally, described new rgb value be the rgb value before dimensionality reduction is mapped backward divided by preset value under round after the numerical value that obtains, wherein, described preset value be greater than 1 numerical value.
Optionally, described preset value is 64.
Optionally, described according to described user supplied video content using fingerprints and described color fingerprint, the computing formula generating mixed-fingerprint is: mixed-fingerprint=k1* user supplied video content using fingerprints+k2* color fingerprint; Wherein, k1 and k2 default is more than or equal to 0, is less than or equal to the value of 1, and k1+k2=1.
Optionally, described according to described mixed-fingerprint and the threshold value preset, judge whether described picture is similar pictures, comprising: when described mixed-fingerprint is less than or equal to default threshold value, judge that described picture is similar pictures.
Optionally, described default threshold value be less than or equal to 1 value.
Optionally, described method also comprises: the storage space obtaining the electronic equipment at described similar pictures place uses information; And, according to described use information prompting user, cleaning operation is carried out to described similar pictures.
Optionally, described method also comprises: the size of all similar pictures in calculating electronic equipment, obtains similar pictures total amount information; When getting the file clean-up request of user for described electronic equipment, in docuterm for clearance, show described total amount information.
The recognition methods of the similar pictures that first aspect present invention embodiment proposes, by obtaining content information and colouring information, and generate mixed-fingerprint according to content information and colouring information, similar pictures is determined whether according to mixed-fingerprint, content and color can be considered when similar pictures identification, relative to the mode of single consideration color histogram, the recognition accuracy of similar pictures can be improved.
For achieving the above object, the recognition device of the similar pictures that second aspect present invention embodiment proposes, comprising: acquisition module, for obtaining content information and the colouring information of picture to be compared; First generation module, for according to described content information generating content fingerprint, generates color fingerprint according to described colouring information; Second generation module, for according to described user supplied video content using fingerprints and described color fingerprint, generates mixed-fingerprint; Judge module, for according to described mixed-fingerprint and the threshold value preset, judges whether described picture is similar pictures.
Optionally, described content information is the gray-scale value of picture, described first generation module comprises: for the first module according to described content information generating content fingerprint, described first module specifically for every pictures in corresponding picture to be compared, according to the gray-scale value calculating mean value of each pixel in every pictures; Each pixel in corresponding every pictures, when the gray-scale value of described pixel is more than or equal to described mean value, described pixel characteristic of correspondence value is defined as 1, when the gray-scale value of described pixel is less than described mean value, described pixel characteristic of correspondence value is defined as 0; Corresponding every pictures, forms the eigenwert of described picture by each pixel characteristic of correspondence value step-by-step in described picture; By the eigenwert of bit comparison picture to be compared, obtain not identical number; By the ratio of the total number of pixel of not identical number and every pictures, be defined as user supplied video content using fingerprints.
Optionally, described colouring information is the rgb value of picture, described first generation module comprises the second unit for generating color fingerprint according to described colouring information, described second unit is specifically for every pictures in corresponding picture to be compared, dimensionality reduction mapping is carried out to the rgb value of each pixel in every pictures, obtains new rgb value; Corresponding every pictures, according to the new rgb value of each pixel, adds up the number of pixels be mapped in the dimension at each new rgb value place, and using the number of pixels in each dimension as an element, the vector of the corresponding every pictures of composition; Vectorial cosine between vector corresponding for picture to be compared is defined as color fingerprint.
Optionally, described new rgb value be the rgb value before dimensionality reduction is mapped backward divided by preset value under round after the numerical value that obtains, wherein, described preset value be greater than 1 numerical value.
Optionally, described preset value is 64.
Optionally, described second generation module generates mixed-fingerprint specifically for adopting following formula: mixed-fingerprint=k1* user supplied video content using fingerprints+k2* color fingerprint; Wherein, k1 and k2 default is more than or equal to 0, is less than or equal to the value of 1, and k1+k2=1.
Optionally, described judge module specifically for: when described mixed-fingerprint is less than or equal to default threshold value, judge that described picture is similar pictures.
Optionally, described default threshold value be less than or equal to 1 value.
Optionally, also comprise: cleaning module, use information for the storage space obtaining the electronic equipment at described similar pictures place; And, according to described use information prompting user, cleaning operation is carried out to described similar pictures.
Optionally, also comprise: display module, for the size of similar pictures all in calculating electronic equipment, obtain similar pictures total amount information; When getting the file clean-up request of user for described electronic equipment, in docuterm for clearance, show described total amount information.
The recognition device of the similar pictures that second aspect present invention embodiment proposes, by obtaining content information and colouring information, and generate mixed-fingerprint according to content information and colouring information, similar pictures is determined whether according to mixed-fingerprint, content and color can be considered when similar pictures identification, relative to the mode of single consideration color histogram, the recognition accuracy of similar pictures can be improved.
For achieving the above object, the electronic equipment that third aspect present invention embodiment proposes, comprising: housing, processor, storer, circuit board and power circuit, wherein, circuit board is placed in the interior volume that housing surrounds, and processor and storer are arranged on circuit boards; Power circuit, for powering for each circuit of electronic equipment or device; Storer is used for stores executable programs code; Processor runs the program corresponding with executable program code by reading the executable program code stored in storer, for execution following steps: the content information and the colouring information that obtain picture to be compared; According to described content information generating content fingerprint, generate color fingerprint according to described colouring information; According to described user supplied video content using fingerprints and described color fingerprint, generate mixed-fingerprint; According to described mixed-fingerprint and the threshold value preset, judge whether described picture is similar pictures.
Optionally, described content information is the gray-scale value of picture, described according to described content information generating content fingerprint, comprising: the every pictures in picture corresponding to be compared, according to the gray-scale value calculating mean value of each pixel in every pictures; Each pixel in corresponding every pictures, when the gray-scale value of described pixel is more than or equal to described mean value, described pixel characteristic of correspondence value is defined as 1, when the gray-scale value of described pixel is less than described mean value, described pixel characteristic of correspondence value is defined as 0; Corresponding every pictures, forms the eigenwert of described picture by each pixel characteristic of correspondence value step-by-step in described picture; By the eigenwert of bit comparison picture to be compared, obtain not identical number; By the ratio of the total number of pixel of not identical number and every pictures, be defined as user supplied video content using fingerprints.
Optionally, described colouring information is the rgb value of picture, described according to described colouring information generation color fingerprint, comprising: the every pictures in picture corresponding to be compared, carries out dimensionality reduction mapping, obtain new rgb value to the rgb value of each pixel in every pictures; Corresponding every pictures, according to the new rgb value of each pixel, adds up the number of pixels be mapped in the dimension at each new rgb value place, and using the number of pixels in each dimension as an element, the vector of the corresponding every pictures of composition; Vectorial cosine between vector corresponding for picture to be compared is defined as color fingerprint.
Optionally, described new rgb value be the rgb value before dimensionality reduction is mapped backward divided by preset value under round after the numerical value that obtains, wherein, described preset value be greater than 1 numerical value.
Optionally, described preset value is 64.
Optionally, described according to described user supplied video content using fingerprints and described color fingerprint, the computing formula generating mixed-fingerprint is: mixed-fingerprint=k1* user supplied video content using fingerprints+k2* color fingerprint; Wherein, k1 and k2 default is more than or equal to 0, is less than or equal to the value of 1, and k1+k2=1.
Optionally, described according to described mixed-fingerprint and the threshold value preset, judge whether described picture is similar pictures, comprising: when described mixed-fingerprint is less than or equal to default threshold value, judge that described picture is similar pictures.
Optionally, described default threshold value be less than or equal to 1 value.
Optionally, described method also comprises: the storage space obtaining the electronic equipment at described similar pictures place uses information; And, according to described use information prompting user, cleaning operation is carried out to described similar pictures.
Optionally, described method also comprises: the size of all similar pictures in calculating electronic equipment, obtains similar pictures total amount information; When getting the file clean-up request of user for described electronic equipment, in docuterm for clearance, show described total amount information.
The electronic equipment that third aspect present invention embodiment proposes, by obtaining content information and colouring information, and generate mixed-fingerprint according to content information and colouring information, similar pictures is determined whether according to mixed-fingerprint, content and color can be considered when similar pictures identification, relative to the mode of single consideration color histogram, the recognition accuracy of similar pictures can be improved.
The aspect that the present invention adds and advantage will part provide in the following description, and part will become obvious from the following description, or be recognized by practice of the present invention.
Accompanying drawing explanation
The present invention above-mentioned and/or additional aspect and advantage will become obvious and easy understand from the following description of the accompanying drawings of embodiments, wherein:
Fig. 1 is the schematic flow sheet of the recognition methods of the similar pictures that one embodiment of the invention proposes;
Fig. 2 is the schematic flow sheet according to content information generating content fingerprint in the embodiment of the present invention;
Fig. 3 is the schematic flow sheet generating color fingerprint in the embodiment of the present invention according to colouring information;
Fig. 4 is the schematic flow sheet of the recognition methods of the similar pictures that another embodiment of the present invention proposes;
Fig. 5 is the structural representation of the recognition device of the similar pictures that another embodiment of the present invention proposes;
Fig. 6 is the structural representation of the recognition device of the similar pictures that another embodiment of the present invention proposes;
Fig. 7 is the structural representation of the electronic equipment that another embodiment of the present invention proposes.
Embodiment
Be described below in detail embodiments of the invention, the example of described embodiment is shown in the drawings, and wherein same or similar label represents same or similar module or has module that is identical or similar functions from start to finish.Being exemplary below by the embodiment be described with reference to the drawings, only for explaining the present invention, and can not limitation of the present invention being interpreted as.On the contrary, embodiments of the invention comprise fall into attached claims spirit and intension within the scope of all changes, amendment and equivalent.
Fig. 1 is the schematic flow sheet of the recognition methods of the similar pictures that one embodiment of the invention proposes, and the method comprises:
S11: the content information and the colouring information that obtain picture to be compared.
For the comparison of two pictures, suppose that two pictures to be compared are called the first picture and second picture, then can obtain content information and the colouring information of the first picture respectively, and obtain content information and the colouring information of second picture.
In some embodiments, content information is such as gray-scale value, and colouring information is such as rgb value.
For the first picture, suppose the first picture to be pixel be the thumbnail of n*n, then this thumbnail can be converted to the gray-scale value of n*n, thus obtain content information.In addition, the rgb value of the thumbnail of all right extracting directly n*n, thus obtain colouring information.
S12: according to described content information generating content fingerprint, generates color fingerprint according to described colouring information.
In some embodiments, see Fig. 2, described content information is the gray-scale value of picture, described according to described content information generating content fingerprint, comprising:
S21: the every pictures in picture corresponding to be compared, according to the gray-scale value calculating mean value of each pixel in every pictures.
For the first picture, because the first picture comprises n*n pixel, and S11 can obtain the gray-scale value of each pixel, therefore, by calculating the mean value that can obtain the gray-scale value of n*n pixel.
S22: each pixel in corresponding every pictures, when the gray-scale value of described pixel is more than or equal to described mean value, described pixel characteristic of correspondence value is defined as 1, when the gray-scale value of described pixel is less than described mean value, described pixel characteristic of correspondence value is defined as 0.
Such as, the first picture comprises n*n pixel, then by this computing, the eigenwert that each pixel obtains is 1 or 0, thus can obtain n*n eigenwert, and each eigenwert is 1 or 0.
S23: corresponding every pictures, forms the eigenwert of described picture by each pixel characteristic of correspondence value step-by-step in described picture.
Such as, can the step-by-step arrangement of line by line or by column pixel, the eigenwert that n*n pixel characteristic of correspondence value forms picture can be obtained.
Such as, suppose the n=6 of the first picture, then the eigenwert of the first picture can be:
000001100011000110011100111001100111
S24: by the eigenwert of bit comparison picture to be compared, obtain not identical number.
Such as, as implied above, can obtain the eigenwert of the first picture, this eigenwert is made up of 36 binary numbers.Similar, the eigenwert of second picture also can be expressed as and be made up of 36 binary numbers.
Therefore, compare for two pictures, by these two groups of binary numbers of bit comparison, can obtain not identical number, such as, the 1st of the eigenwert of the first picture is 0, if the 1st of the eigenwert of second picture the is 1, then show not identical, if the 1st of the eigenwert of second picture the is 0, then show identical.
S25: by the ratio of the total number of pixel of not identical number and every pictures, be defined as user supplied video content using fingerprints.
Suppose that not identical number represents with m, then user supplied video content using fingerprints contentFinger=m/ (n*n).
In some embodiments, see Fig. 3, described colouring information is the rgb value of picture, described according to described colouring information generation color fingerprint, comprising:
S31: the every pictures in picture corresponding to be compared, carries out dimensionality reduction mapping to the rgb value of each pixel in every pictures, obtains new rgb value.
Wherein, described new rgb value be the rgb value before dimensionality reduction is mapped backward divided by preset value under round after the numerical value that obtains, wherein, described preset value be greater than 1 numerical value.
Optionally, described preset value is 64.
Such as, obtain the thumbnail of n*n, each pixel in this picture is made up of RGB, and the numerical value of R, G, B is all 0 ~ 255, therefore, can generate the vector of 256*256*256 length, and computational complexity can be very high, is difficult to use in engineering project.
Can dimension-reduction treatment in order to reduce operand, such as, be mapped as 0 ~ 3 by 0 ~ 255, the dimension of rgb value new so has just dropped to 4*4*4, and relative to 256*256*256, computation complexity reduces a lot.
Concrete, be 64 for preset value, dimensionality reduction mapping equation can be expressed as:
Wherein, newRed, newGreen, newBlue are the value in new rgb value in R, G, B dimension respectively, and red, green, blue are the value in the initial rgb value before mapping in R, G, B dimension respectively,represent downward rounding operation.
Suppose that initial rgb value is respectively: red=62, green=85, blue=69, then through dimensionality reduction map after, new rgb value respectively:
newRed=0,newGreen=1,newBlue=1。
S32: corresponding every pictures, according to the new rgb value of each pixel, adds up the number of pixels be mapped in the dimension at each new rgb value place, and using the number of pixels in each dimension as an element, the vector of the corresponding every pictures of composition.
Using the dimension at each new rgb value place as an element, can the vector of a total 4*4*4=64 element composed as follows:
[000,001,002,003,010,011,012,013,…,330,331,332,333]
In every pictures, then according to the new rgb value of each pixel, the number of pixels in each dimension in above-mentioned vector can be added up.Such as, new rgb value=011 of a pixel in above-mentioned example, then, when adding up, the number of the pixel in 011 this dimension can add 1.
In every pictures, through statistics, can obtain new rgb value is respectively 000,001,002 ... the number of pixel, suppose to use m1 respectively, m2 ... mn represents, then these values can form the vector of one 64 dimension, such as corresponding first picture, and this vector representation is:
n1=[m1,m2,m3,…mn]。
Similar, the vector that second picture is corresponding can represent with n2, and n2 is also the vector of one 64 dimension.
S33: the vectorial cosine between vector corresponding for picture to be compared is defined as color fingerprint.
Such as, for two vectors that two pictures are corresponding, color fingerprint is formulated as:
colorFinger=(n1*n2')/(|n1|*|n2|)
Wherein, colorFinger represents color fingerprint, and n2' represents the transposition of n2, || represent modulo operation, * represents multiplication operation.
S13: according to described user supplied video content using fingerprints and described color fingerprint, generates mixed-fingerprint.
Such as, following computing formula can be adopted, generate mixed-fingerprint:
mixtureFinger=k1*contentFinger+k2*colorFinger
Wherein, mixtureFinger represents mixed-fingerprint, and contentFinger represents user supplied video content using fingerprints, and colorFinger represents color fingerprint, k1 and k2 default is more than or equal to 0, is less than or equal to the value of 1, and k1+k2=1.
S14: according to described mixed-fingerprint and the threshold value preset, judge whether described picture is similar pictures.
In some embodiments, see Fig. 4, described according to described mixed-fingerprint and the threshold value preset, judge whether described picture is similar pictures, comprising:
S41: when described mixed-fingerprint is less than or equal to default threshold value, judges that described picture is similar pictures.
Such as, compare for two pictures, during mixtureFinger>k3, show that two pictures are dissimilar pictures, during mixtureFinger<=k3, show that two pictures are similar pictures.
Wherein, k3 is predetermined threshold value, can be k3<=1.
In some embodiments, the method can also comprise:
The storage space obtaining the electronic equipment at described similar pictures place uses information; And
According to described use information prompting user, cleaning operation is carried out to described similar pictures.
Such as, when this use information is greater than preset value, to the message of user's display for pointing out cleaning, thus when similar pictures takies larger space, can point out the similar pictures of user's Delete superfluous.
In some embodiments, the method can also comprise:
The size of all similar pictures in calculating electronic equipment, obtains similar pictures total amount information;
When getting the file clean-up request of user for described electronic equipment, in docuterm for clearance, show described total amount information.
Such as, the total amount information that can obtain similar pictures in mobile phone is how many M etc., and in text item for clearance, show this total amount information, thus user can be facilitated to know the total quantity of similar pictures, clears up as required or does not clear up unnecessary similar pictures.
In the present embodiment, by obtaining content information and colouring information, and generate mixed-fingerprint according to content information and colouring information, similar pictures is determined whether according to mixed-fingerprint, content and color can be considered when similar pictures identification, relative to the mode of single consideration color histogram, the recognition accuracy of similar pictures can be improved.
Fig. 5 is the structural representation of the recognition device of the similar pictures that another embodiment of the present invention proposes, and be applied to electronic equipment, this device 50 comprises:
Acquisition module 51, for obtaining content information and the colouring information of picture to be compared;
For the comparison of two pictures, suppose that two pictures to be compared are called the first picture and second picture, then can obtain content information and the colouring information of the first picture respectively, and obtain content information and the colouring information of second picture.
In some embodiments, content information is such as gray-scale value, and colouring information is such as rgb value.
For the first picture, suppose the first picture to be pixel be the thumbnail of n*n, then this thumbnail can be converted to the gray-scale value of n*n, thus obtain content information.In addition, the rgb value of the thumbnail of all right extracting directly n*n, thus obtain colouring information.
First generation module 52, for according to described content information generating content fingerprint, generates color fingerprint according to described colouring information;
In some embodiments, see Fig. 6, described content information is the gray-scale value of picture, and described first generation module 52 comprises: for the first module 521 according to described content information generating content fingerprint, described first module 521 specifically for:
Every pictures in picture corresponding to be compared, according to the gray-scale value calculating mean value of each pixel in every pictures;
For the first picture, because the first picture comprises n*n pixel, and S11 can obtain the gray-scale value of each pixel, therefore, by calculating the mean value that can obtain the gray-scale value of n*n pixel.
Each pixel in corresponding every pictures, when the gray-scale value of described pixel is more than or equal to described mean value, described pixel characteristic of correspondence value is defined as 1, when the gray-scale value of described pixel is less than described mean value, described pixel characteristic of correspondence value is defined as 0;
Such as, the first picture comprises n*n pixel, then by this computing, the eigenwert that each pixel obtains is 1 or 0, thus can obtain n*n eigenwert, and each eigenwert is 1 or 0.
Corresponding every pictures, forms the eigenwert of described picture by each pixel characteristic of correspondence value step-by-step in described picture;
Such as, can the step-by-step arrangement of line by line or by column pixel, the eigenwert that n*n pixel characteristic of correspondence value forms picture can be obtained.
Such as, suppose the n=6 of the first picture, then the eigenwert of the first picture can be:
000001100011000110011100111001100111
By the eigenwert of bit comparison picture to be compared, obtain not identical number;
Such as, as implied above, can obtain the eigenwert of the first picture, this eigenwert is made up of 36 binary numbers.Similar, the eigenwert of second picture also can be expressed as and be made up of 36 binary numbers.
Therefore, compare for two pictures, by these two groups of binary numbers of bit comparison, can obtain not identical number, such as, the 1st of the eigenwert of the first picture is 0, if the 1st of the eigenwert of second picture the is 1, then show not identical, if the 1st of the eigenwert of second picture the is 0, then show identical.
By the ratio of the total number of pixel of not identical number and every pictures, be defined as user supplied video content using fingerprints;
Suppose that not identical number represents with m, then user supplied video content using fingerprints contentFinger=m/ (n*n).
In some embodiments, see Fig. 6, described colouring information is the rgb value of picture, and described first generation module 52 comprises the second unit 522 for generating color fingerprint according to described colouring information, described second unit 522 specifically for:
Every pictures in picture corresponding to be compared, carries out dimensionality reduction mapping to the rgb value of each pixel in every pictures, obtains new rgb value;
Wherein, described new rgb value be the rgb value before dimensionality reduction is mapped backward divided by preset value under round after the numerical value that obtains, wherein, described preset value be greater than 1 numerical value.
Optionally, described preset value is 64.
Such as, obtain the thumbnail of n*n, each pixel in this picture is made up of RGB, and the numerical value of R, G, B is all 0 ~ 255, therefore, can generate the vector of 256*256*256 length, and computational complexity can be very high, is difficult to use in engineering project.
Can dimension-reduction treatment in order to reduce operand, such as, be mapped as 0 ~ 3 by 0 ~ 255, the dimension of rgb value new so has just dropped to 4*4*4, and relative to 256*256*256, computation complexity reduces a lot.
Concrete, be 64 for preset value, dimensionality reduction mapping equation can be expressed as:
Wherein, newRed, newGreen, newBlue are the value in new rgb value in R, G, B dimension respectively, and red, green, blue are the value in the initial rgb value before mapping in R, G, B dimension respectively,represent downward rounding operation.
Suppose that initial rgb value is respectively: red=62, green=85, blue=69, then through dimensionality reduction map after, new rgb value respectively:
newRed=0,newGreen=1,newBlue=1。
Corresponding every pictures, according to the new rgb value of each pixel, adds up the number of pixels be mapped in the dimension at each new rgb value place, and using the number of pixels in each dimension as an element, the vector of the corresponding every pictures of composition;
Using the dimension at each new rgb value place as an element, can the vector of a total 4*4*4=64 element composed as follows:
[000,001,002,003,010,011,012,013,…,330,331,332,333]
In every pictures, then according to the new rgb value of each pixel, the number of pixels in each dimension in above-mentioned vector can be added up.Such as, new rgb value=011 of a pixel in above-mentioned example, then, when adding up, the number of the pixel in 011 this dimension can add 1.
In every pictures, through statistics, can obtain new rgb value is respectively 000,001,002 ... the number of pixel, suppose to use m1 respectively, m2 ... mn represents, then these values can form the vector of one 64 dimension, such as corresponding first picture, and this vector representation is:
n1=[m1,m2,m3,…mn]。
Similar, the vector that second picture is corresponding can represent with n2, and n2 is also the vector of one 64 dimension.
Vectorial cosine between vector corresponding for picture to be compared is defined as color fingerprint;
Such as, for two vectors that two pictures are corresponding, color fingerprint is formulated as:
colorFinger=(n1*n2')/(|n1|*|n2|)
Wherein, colorFinger represents color fingerprint, and n2' represents the transposition of n2, || represent modulo operation, * represents multiplication operation.
Second generation module 53, for according to described user supplied video content using fingerprints and described color fingerprint, generates mixed-fingerprint;
Such as, described second generation module 53 generates mixed-fingerprint specifically for adopting following formula:
Mixed-fingerprint=k1* user supplied video content using fingerprints+k2* color fingerprint;
Wherein, k1 and k2 default is more than or equal to 0, is less than or equal to the value of 1, and k1+k2=1.
Judge module 54, for according to described mixed-fingerprint and the threshold value preset, judges whether described picture is similar pictures.
Such as, described judge module 54 specifically for:
When described mixed-fingerprint is less than or equal to default threshold value, judge that described picture is similar pictures.
Such as, compare for two pictures, during mixtureFinger>k3, show that two pictures are dissimilar pictures, during mixtureFinger<=k3, show that two pictures are similar pictures.
Wherein, k3 is predetermined threshold value, can be k3<=1.
In some embodiments, see Fig. 6, also comprise:
Cleaning module 54, uses information for the storage space obtaining the electronic equipment at described similar pictures place; And, according to described use information prompting user, cleaning operation is carried out to described similar pictures.
Such as, when this use information is greater than preset value, to the message of user's display for pointing out cleaning, thus when similar pictures takies larger space, can point out the similar pictures of user's Delete superfluous.
In some embodiments, see Fig. 6, also comprise:
Display module 55, for the size of similar pictures all in calculating electronic equipment, obtains similar pictures total amount information; When getting the file clean-up request of user for described electronic equipment, in docuterm for clearance, show described total amount information.
Such as, the total amount information that can obtain similar pictures in mobile phone is how many M etc., and in text item for clearance, show this total amount information, thus user can be facilitated to know the total quantity of similar pictures, clears up as required or does not clear up unnecessary similar pictures.
In the present embodiment, by obtaining content information and colouring information, and generate mixed-fingerprint according to content information and colouring information, similar pictures is determined whether according to mixed-fingerprint, content and color can be considered when similar pictures identification, relative to the mode of single consideration color histogram, the recognition accuracy of similar pictures can be improved.
The embodiment of the present invention also proposed a kind of electronic equipment, and this electronic equipment is such as mobile device, as mobile phone etc., can also be PC (PersonalComputer, PC) etc.See Fig. 7, this electronic equipment 70 comprises: housing 71, processor 72, storer 73, circuit board 74 and power circuit 75, and wherein, circuit board 74 is placed in the interior volume that housing 71 surrounds, and processor 72 and storer 73 arrange on circuit boards; Power circuit 74, for powering for each circuit of electronic equipment or device; Storer 73 is for stores executable programs code; Processor 72 runs the program corresponding with executable program code by reading the executable program code stored in storer 73, for execution following steps:
S11 ': the content information and the colouring information that obtain picture to be compared.
For the comparison of two pictures, suppose that two pictures to be compared are called the first picture and second picture, then can obtain content information and the colouring information of the first picture respectively, and obtain content information and the colouring information of second picture.
In some embodiments, content information is such as gray-scale value, and colouring information is such as rgb value.
For the first picture, suppose the first picture to be pixel be the thumbnail of n*n, then this thumbnail can be converted to the gray-scale value of n*n, thus obtain content information.In addition, the rgb value of the thumbnail of all right extracting directly n*n, thus obtain colouring information.
S12 ': according to described content information generating content fingerprint, generates color fingerprint according to described colouring information.
In some embodiments, described content information is the gray-scale value of picture, described according to described content information generating content fingerprint, comprising:
S21 ': the every pictures in picture corresponding to be compared, according to the gray-scale value calculating mean value of each pixel in every pictures.
For the first picture, because the first picture comprises n*n pixel, and S11 can obtain the gray-scale value of each pixel, therefore, by calculating the mean value that can obtain the gray-scale value of n*n pixel.
S22 ': each pixel in corresponding every pictures, when the gray-scale value of described pixel is more than or equal to described mean value, described pixel characteristic of correspondence value is defined as 1, when the gray-scale value of described pixel is less than described mean value, described pixel characteristic of correspondence value is defined as 0.
Such as, the first picture comprises n*n pixel, then by this computing, the eigenwert that each pixel obtains is 1 or 0, thus can obtain n*n eigenwert, and each eigenwert is 1 or 0.
S23 ': corresponding every pictures, forms the eigenwert of described picture by each pixel characteristic of correspondence value step-by-step in described picture.
Such as, can the step-by-step arrangement of line by line or by column pixel, the eigenwert that n*n pixel characteristic of correspondence value forms picture can be obtained.
Such as, suppose the n=6 of the first picture, then the eigenwert of the first picture can be:
000001100011000110011100111001100111
S24 ': by the eigenwert of bit comparison picture to be compared, obtain not identical number.
Such as, as implied above, can obtain the eigenwert of the first picture, this eigenwert is made up of 36 binary numbers.Similar, the eigenwert of second picture also can be expressed as and be made up of 36 binary numbers.
Therefore, compare for two pictures, by these two groups of binary numbers of bit comparison, can obtain not identical number, such as, the 1st of the eigenwert of the first picture is 0, if the 1st of the eigenwert of second picture the is 1, then show not identical, if the 1st of the eigenwert of second picture the is 0, then show identical.
S25 ': by the ratio of the total number of pixel of not identical number and every pictures, be defined as user supplied video content using fingerprints.
Suppose that not identical number represents with m, then user supplied video content using fingerprints contentFinger=m/ (n*n).
In some embodiments, described colouring information is the rgb value of picture, described according to described colouring information generation color fingerprint, comprising:
S31 ': the every pictures in picture corresponding to be compared, carries out dimensionality reduction mapping to the rgb value of each pixel in every pictures, obtains new rgb value.
Wherein, described new rgb value be the rgb value before dimensionality reduction is mapped backward divided by preset value under round after the numerical value that obtains, wherein, described preset value be greater than 1 numerical value.
Optionally, described preset value is 64.
Such as, obtain the thumbnail of n*n, each pixel in this picture is made up of RGB, and the numerical value of R, G, B is all 0 ~ 255, therefore, can generate the vector of 256*256*256 length, and computational complexity can be very high, is difficult to use in engineering project.
Can dimension-reduction treatment in order to reduce operand, such as, be mapped as 0 ~ 3 by 0 ~ 255, the dimension of rgb value new so has just dropped to 4*4*4, and relative to 256*256*256, computation complexity reduces a lot.
Concrete, be 64 for preset value, dimensionality reduction mapping equation can be expressed as:
Wherein, newRed, newGreen, newBlue are the value in new rgb value in R, G, B dimension respectively, and red, green, blue are the value in the initial rgb value before mapping in R, G, B dimension respectively,represent downward rounding operation.
Suppose that initial rgb value is respectively: red=62, green=85, blue=69, then through dimensionality reduction map after, new rgb value respectively:
newRed=0,newGreen=1,newBlue=1。
S32 ': corresponding every pictures, according to the new rgb value of each pixel, adds up the number of pixels be mapped in the dimension at each new rgb value place, and using the number of pixels in each dimension as an element, the vector of the corresponding every pictures of composition.
Using the dimension at each new rgb value place as an element, can the vector of a total 4*4*4=64 element composed as follows:
[000,001,002,003,010,011,012,013,…,330,331,332,333]
In every pictures, then according to the new rgb value of each pixel, the number of pixels in each dimension in above-mentioned vector can be added up.Such as, new rgb value=011 of a pixel in above-mentioned example, then, when adding up, the number of the pixel in 011 this dimension can add 1.
In every pictures, through statistics, can obtain new rgb value is respectively 000,001,002 ... the number of pixel, suppose to use m1 respectively, m2 ... mn represents, then these values can form the vector of one 64 dimension, such as corresponding first picture, and this vector representation is:
n1=[m1,m2,m3,…mn]。
Similar, the vector that second picture is corresponding can represent with n2, and n2 is also the vector of one 64 dimension.
S33 ': the vectorial cosine between vector corresponding for picture to be compared is defined as color fingerprint.
Such as, for two vectors that two pictures are corresponding, color fingerprint is formulated as:
colorFinger=(n1*n2')/(|n1|*|n2|)
Wherein, colorFinger represents color fingerprint, and n2' represents the transposition of n2, || represent modulo operation, * represents multiplication operation.
S13 ': according to described user supplied video content using fingerprints and described color fingerprint, generates mixed-fingerprint.
Such as, following computing formula can be adopted, generate mixed-fingerprint:
mixtureFinger=k1*contentFinger+k2*colorFinger
Wherein, mixtureFinger represents mixed-fingerprint, and contentFinger represents user supplied video content using fingerprints, and colorFinger represents color fingerprint, k1 and k2 default is more than or equal to 0, is less than or equal to the value of 1, and k1+k2=1.
S14 ': according to described mixed-fingerprint and the threshold value preset, judge whether described picture is similar pictures.
In some embodiments, described according to described mixed-fingerprint and the threshold value preset, judge whether described picture is similar pictures, comprising:
S41 ': when described mixed-fingerprint is less than or equal to default threshold value, judges that described picture is similar pictures.
Such as, compare for two pictures, during mixtureFinger>k3, show that two pictures are dissimilar pictures, during mixtureFinger<=k3, show that two pictures are similar pictures.
Wherein, k3 is predetermined threshold value, can be k3<=1.
In some embodiments, the method can also comprise:
The storage space obtaining the electronic equipment at described similar pictures place uses information; And
According to described use information prompting user, cleaning operation is carried out to described similar pictures.
Such as, when this use information is greater than preset value, to the message of user's display for pointing out cleaning, thus when similar pictures takies larger space, can point out the similar pictures of user's Delete superfluous.
In some embodiments, the method can also comprise:
The size of all similar pictures in calculating electronic equipment, obtains similar pictures total amount information;
When getting the file clean-up request of user for described electronic equipment, in docuterm for clearance, show described total amount information.
Such as, the total amount information that can obtain similar pictures in mobile phone is how many M etc., and in text item for clearance, show this total amount information, thus user can be facilitated to know the total quantity of similar pictures, clears up as required or does not clear up unnecessary similar pictures.
In the present embodiment, by obtaining content information and colouring information, and generate mixed-fingerprint according to content information and colouring information, similar pictures is determined whether according to mixed-fingerprint, content and color can be considered when similar pictures identification, relative to the mode of single consideration color histogram, the recognition accuracy of similar pictures can be improved.
It should be noted that, in describing the invention, term " first ", " second " etc. only for describing object, and can not be interpreted as instruction or hint relative importance.In addition, in describing the invention, except as otherwise noted, the implication of " multiple " refers at least two.
Describe and can be understood in process flow diagram or in this any process otherwise described or method, represent and comprise one or more for realizing the module of the code of the executable instruction of the step of specific logical function or process, fragment or part, and the scope of the preferred embodiment of the present invention comprises other realization, wherein can not according to order that is shown or that discuss, comprise according to involved function by the mode while of basic or by contrary order, carry out n-back test, this should understand by embodiments of the invention person of ordinary skill in the field.
Should be appreciated that each several part of the present invention can realize with hardware, software, firmware or their combination.In the above-described embodiment, multiple step or method can with to store in memory and the software performed by suitable instruction execution system or firmware realize.Such as, if realized with hardware, the same in another embodiment, can realize by any one in following technology well known in the art or their combination: the discrete logic with the logic gates for realizing logic function to data-signal, there is the special IC of suitable combinational logic gate circuit, programmable gate array (PGA), field programmable gate array (FPGA) etc.
Those skilled in the art are appreciated that realizing all or part of step that above-described embodiment method carries is that the hardware that can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, this program perform time, step comprising embodiment of the method one or a combination set of.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing module, also can be that the independent physics of unit exists, also can be integrated in a module by two or more unit.Above-mentioned integrated module both can adopt the form of hardware to realize, and the form of software function module also can be adopted to realize.If described integrated module using the form of software function module realize and as independently production marketing or use time, also can be stored in a computer read/write memory medium.
The above-mentioned storage medium mentioned can be ROM (read-only memory), disk or CD etc.
In the description of this instructions, specific features, structure, material or feature that the description of reference term " embodiment ", " some embodiments ", " example ", " concrete example " or " some examples " etc. means to describe in conjunction with this embodiment or example are contained at least one embodiment of the present invention or example.In this manual, identical embodiment or example are not necessarily referred to the schematic representation of above-mentioned term.And the specific features of description, structure, material or feature can combine in an appropriate manner in any one or more embodiment or example.
Although illustrate and describe embodiments of the invention above, be understandable that, above-described embodiment is exemplary, can not be interpreted as limitation of the present invention, and those of ordinary skill in the art can change above-described embodiment within the scope of the invention, revises, replace and modification.

Claims (10)

CN201510587613.4A2015-09-152015-09-15Similar picture identification method and device and electronic equipmentPendingCN105261044A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201510587613.4ACN105261044A (en)2015-09-152015-09-15Similar picture identification method and device and electronic equipment

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201510587613.4ACN105261044A (en)2015-09-152015-09-15Similar picture identification method and device and electronic equipment

Publications (1)

Publication NumberPublication Date
CN105261044Atrue CN105261044A (en)2016-01-20

Family

ID=55100715

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201510587613.4APendingCN105261044A (en)2015-09-152015-09-15Similar picture identification method and device and electronic equipment

Country Status (1)

CountryLink
CN (1)CN105261044A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106021542A (en)*2016-05-262016-10-12珠海市魅族科技有限公司Image display method and image server, terminal
CN107819664A (en)*2016-09-122018-03-20阿里巴巴集团控股有限公司A kind of recognition methods of spam, device and electronic equipment
CN108549702A (en)*2018-04-172018-09-18厦门美图之家科技有限公司A kind of method for cleaning and mobile terminal of the picture library of mobile terminal
CN111353552A (en)*2020-03-132020-06-30杭州趣维科技有限公司Image similarity contrast method based on perceptual hash algorithm

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JPH04270982A (en)*1991-01-081992-09-28Furuno Electric Co LtdDetection image color display device
CN102930537A (en)*2012-10-232013-02-13深圳市宜搜科技发展有限公司Image detection method and system
CN104636488A (en)*2015-02-262015-05-20北京奇艺世纪科技有限公司Method and device for determining duplicate video files on basis of pictures
CN104899820A (en)*2014-03-112015-09-09腾讯科技(北京)有限公司Method, system and device for adding tag to image

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JPH04270982A (en)*1991-01-081992-09-28Furuno Electric Co LtdDetection image color display device
CN102930537A (en)*2012-10-232013-02-13深圳市宜搜科技发展有限公司Image detection method and system
CN104899820A (en)*2014-03-112015-09-09腾讯科技(北京)有限公司Method, system and device for adding tag to image
CN104636488A (en)*2015-02-262015-05-20北京奇艺世纪科技有限公司Method and device for determining duplicate video files on basis of pictures

Cited By (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106021542A (en)*2016-05-262016-10-12珠海市魅族科技有限公司Image display method and image server, terminal
CN107819664A (en)*2016-09-122018-03-20阿里巴巴集团控股有限公司A kind of recognition methods of spam, device and electronic equipment
CN108549702A (en)*2018-04-172018-09-18厦门美图之家科技有限公司A kind of method for cleaning and mobile terminal of the picture library of mobile terminal
CN108549702B (en)*2018-04-172020-11-06厦门美图之家科技有限公司Method for cleaning picture library of mobile terminal and mobile terminal
CN111353552A (en)*2020-03-132020-06-30杭州趣维科技有限公司Image similarity contrast method based on perceptual hash algorithm

Similar Documents

PublicationPublication DateTitle
Zhou et al.Coverless image steganography using partial-duplicate image retrieval
CN104902254B (en)For the method and device that the disparity map of stereo-picture is estimated
CN104866755B (en)Setting method and device for background picture of application program unlocking interface and electronic equipment
CN110008997B (en)Image texture similarity recognition method, device and computer readable storage medium
CN109726481B (en)Auxiliary method and device for robot construction and terminal equipment
EP3410685A1 (en)Image processing device, image processing method, and program
CN105261044A (en)Similar picture identification method and device and electronic equipment
CN111105337A (en)Watermark processing method, information display method and related device
CN103649999A (en)Content-adaptive systems, methods and apparatus for determining optical flow
CN110189384B (en)Image compression method, device, computer equipment and storage medium based on Unity3D
CN106204552A (en)The detection method of a kind of video source and device
US20210166073A1 (en)Image generation method and computing device
US9679220B2 (en)Method, apparatus and computer program product for disparity estimation in images
CN100359535C (en) Video Frame Correlation for Motion Estimation
US9489741B2 (en)Method, apparatus and computer program product for disparity estimation of foreground objects in images
JP2013502147A (en) System and method for artifact reduction based on region of interest of image sequence
US20130322748A1 (en)Method for creating thumbnail images of videos and an electronic device for display thereof
CN103268320A (en)Method and device for storing image
US20110193873A1 (en)Device and method for generating mosaic image including text
CN104504653A (en)Image enhancing method and device
CN110990846B (en)Information storage method, device and computer readable storage medium
CN113098545A (en)Control method, device and equipment of radio frequency device and storage medium
CN107222746A (en)Video Key location positioning method and device
CN117112090A (en)Business page theme generation method, device, computer equipment, medium and product
CN115767073A (en)Transcoding performance test method and device, electronic equipment and readable storage medium

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication
RJ01Rejection of invention patent application after publication

Application publication date:20160120


[8]ページ先頭

©2009-2025 Movatter.jp