[go: up one dir, main page]

CN109460771B - Trademark similarity judging method and device based on sliding window and storage medium - Google Patents

Trademark similarity judging method and device based on sliding window and storage medium Download PDF

Info

Publication number
CN109460771B
CN109460771B CN201811106692.2A CN201811106692A CN109460771B CN 109460771 B CN109460771 B CN 109460771B CN 201811106692 A CN201811106692 A CN 201811106692A CN 109460771 B CN109460771 B CN 109460771B
Authority
CN
China
Prior art keywords
trademark
monitored
image
hue
trademark image
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.)
Active
Application number
CN201811106692.2A
Other languages
Chinese (zh)
Other versions
CN109460771A (en
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.)
Guangzhou Qituteng Technology Co ltd
Original Assignee
Guangzhou Qituteng 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 Guangzhou Qituteng Technology Co ltd filed Critical Guangzhou Qituteng Technology Co ltd
Priority to CN201811106692.2A priority Critical patent/CN109460771B/en
Publication of CN109460771A publication Critical patent/CN109460771A/en
Application granted granted Critical
Publication of CN109460771B publication Critical patent/CN109460771B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a trademark similarity judging method based on a sliding window, which comprises the following steps of: establishing a standard character string library of a trademark image to be monitored; establishing a black-and-white character string comparison library of the trademark image to be compared: and (3) comparison: comparing the character strings of each level in the black-and-white character string comparison library of each trademark image to be compared with the character strings of the corresponding level in the black-and-white character string standard library of the trademark image to be monitored, and judging the black-and-white similarity S1 according to the consistency of the character strings of each level; judging whether the trademark image to be monitored is a color trademark image applied with a specified color or not; if not, the comparison is finished; if yes, comparing the colors. The method judges the similarity of the trademarks by simulating the principle of artificial visual judgment after the trademark images are subjected to fuzzification processing, has higher reliability on the judgment of the similarity of the trademarks, reduces the workload of artificial retrieval comparison analysis, and improves the retrieval comparison efficiency.

Description

Trademark similarity judging method and device based on sliding window and storage medium
Technical Field
The invention relates to the technical field of image recognition, in particular to a trademark similarity judging method based on a sliding window, electronic equipment and a computer readable storage medium.
Background
A trademark (trade mark) is a mark that can distinguish its own goods or services from those of others, and is an intangible asset of an enterprise, protected by law, and a registrant has exclusive rights.
In recent years, with rapid development of the world economy and society, the amount of value contained in trademarks has increased dramatically, and the number of trademarks registered has continued to increase. After the trademark is registered, the trademark owner usually queries and searches the registered trademark published by the trademark office in a fixed period by himself or a proxy agency on the maintenance of the legal interest of the trademark, so as to discover the similar new registered trademark in time and purposefully propose objections and rights. Because the number of the new checked trademarks updated by the trademark office every week is more than 1 ten thousand, most of the search query and similarity comparison work is manual comparison at present, relatively speaking, the query of the character trademarks and the numbers is simple, the query and comparison work of the graphic trademarks is large and difficult, and the extremely complicated query and search process needs to consume a large amount of manpower and material resources to complete.
Disclosure of Invention
In order to overcome the defects of the prior art, one of the objectives of the present invention is to provide a trademark similarity determination method based on a sliding window, which determines the trademark similarity by simulating the principle of artificial visual determination after blurring the trademark image, so that the trademark similarity determination has high reliability, the workload of artificial search, comparison and analysis is reduced, and the search and comparison efficiency is improved.
Another object of the present invention is to provide an electronic device, which judges trademark similarity by simulating the principle of artificial visual judgment after blurring a trademark image, has high reliability in judging trademark similarity, reduces the workload of artificial search, comparison and analysis, and improves search and comparison efficiency.
The invention also aims to provide a computer-readable storage medium, wherein a program stored in the storage medium is subjected to fuzzification processing on a trademark image during running, and then the trademark similarity is judged by simulating the principle of artificial visual judgment, so that the judgment on the trademark similarity has high reliability, the workload of artificial retrieval comparison and analysis is reduced, and the retrieval and comparison efficiency is improved.
One of the purposes of the invention is realized by adopting the following technical scheme:
a trademark similarity judging method based on a sliding window comprises the following steps:
establishing a standard character string library of the trademark image to be monitored:
judging whether the trademark image to be monitored is a color trademark image applied with a specified color or not; if yes, establishing a black-and-white character string standard library and a color character string standard library of the trademark image to be monitored; if not, only establishing a black-and-white character string standard library of the trademark image to be monitored;
establishing a black and white character string standard library of a trademark image to be monitored:
(1) and (3) gray level binarization processing:
acquiring a trademark image to be monitored, and carrying out binarization processing on the trademark image to be monitored so as to convert the trademark image to be monitored into a black-and-white image of the trademark to be monitored;
(2) normalization treatment:
dividing the black-and-white trademark image to be monitored into M × M grids according to the size of the trademark image to be monitored, and extracting hue H values in color HSB values of each grid to obtain an M-level hue H value matrix, wherein M is a positive integer; on a trademark image to be monitored divided into M × M grids, taking N × N grids as a sliding window, re-determining the hue H value of the first grid of the sliding window according to the hue H values of all the grids in the sliding window according to a preset rule, sliding the sliding window one by one to re-obtain the hue H values of (M-N +1) × (M-N +1) grids, reducing the trademark image to be monitored from M × M grids into new images of (M-N +1) × (M-N +1) grids, extracting the hue H value of each grid, and obtaining an M-N +1 level (M-N +1) × (M-N +1) hue H value matrix;
successively reducing the black-and-white image of the trademark to be monitored by a normalization method based on a sliding window to obtain a new image of the black-and-white image of the trademark to be monitored, and obtaining a hue H value matrix of a level corresponding to the obtained new image of the black-and-white image of the trademark to be monitored each time;
calculating a hash value through each hue H value matrix to obtain a unique character string corresponding to each hue H value matrix, storing each character string according to the hierarchy to which each hue H value matrix belongs, and establishing a black-and-white character string standard library of the trademark image to be monitored;
establishing a color character string standard library corresponding to the trademark image to be monitored:
acquiring the trademark image to be monitored, dividing the trademark image to be monitored into M grids, and extracting hue H values in color HSB values of each grid to obtain an M-level hue H value matrix, wherein M is a positive integer;
successively reducing the trademark image to be monitored by a normalization method based on a sliding window to obtain a new image of the trademark image to be monitored, and obtaining a hue H value matrix of a level corresponding to the new image of the trademark image to be monitored obtained each time;
calculating a hash value through each hue H value matrix to obtain a unique character string corresponding to each hue H value matrix, storing each character string according to the hierarchy to which each hue H value matrix belongs, and establishing a color character string standard library of the trademark image to be monitored;
establishing a black-and-white character string comparison library of the trademark image to be compared:
establishing a black-and-white character string comparison library of the trademark image to be compared according to a method for establishing a black-and-white character string standard library of the trademark image to be monitored;
and (3) comparison:
comparing the character strings of each level in the black-and-white character string comparison library of each trademark image to be compared with the character strings of the corresponding level in the black-and-white character string standard library of the trademark image to be monitored, and judging the black-and-white similarity S1 according to the consistency of the character strings of each level;
judging whether the trademark image to be monitored is a color trademark image applied with a specified color or not;
if not, the comparison is finished;
if yes, extracting the color trademark images in the trademark images to be compared, wherein the black-white similarity S1 is more than a preset threshold value, and establishing a color character string comparison library of each trademark image to be compared according to a method for establishing a color character string standard library of the trademark image to be monitored; comparing each character string in the color character string standard library of the trademark image to be monitored with the character strings of the corresponding levels in the color character string comparison library of the color trademark image to be compared, and judging the color similarity S2 according to the consistency of the character strings of the levels to be compared.
Further, N is equal to 2, i.e. the sliding window is 2 × 2 squares.
Further, when the processing object is a to-be-monitored trademark black-and-white image, the specifically determining the hue H value of the first square grid of the sliding window again according to the hue H values of all the square grids in the sliding window and according to the preset rule is: calculating the average value of the hue H values of all pixel points in 2 × 2 grids of the sliding window, and performing binarization processing on the average value, and then taking the processing result value as the hue H value of the first grid of the 2 × 2 grids of the sliding window, wherein the binarization processing mode is the same as the binarization processing mode in the gray level binarization processing step;
when the processing object is the trademark image to be detected, the specifically determining the hue H value of the first square grid of the sliding window again according to the hue H values of all the square grids in the sliding window and the preset rule is as follows: and calculating the average value of the hue H values of all the pixel points in the 2 x 2 grids of the sliding window, and taking the average value as the hue H value of the first grid of the 2 x 2 grids of the sliding window.
Further, the step of performing binarization processing on the trademark image to be monitored so as to convert the trademark image to be monitored into a black-and-white trademark image to be monitored specifically comprises: and with a certain threshold as a limit, converting the gray value of the pixel point with the gray value higher than the threshold in the trademark image to be monitored into 255, and converting the gray value of the pixel point with the gray value lower than the threshold in the trademark image to be monitored into 0.
Further, the threshold is 128.
Further, the judgment formula of the similarity S is as follows:
Figure GDA0002816035560000051
the similarity S can be black-white similarity S1 or color similarity S2, X is the highest level of consistency of the character string of the trademark image to be monitored and the character string of the trademark image to be compared, Y is the total number of levels of comparison between the trademark image to be monitored and the trademark image to be compared, and X and Y are positive integers.
The second purpose of the invention is realized by adopting the following technical scheme:
an electronic device, the electronic device comprising: the trademark similarity judging method based on the sliding window comprises a processor and a memory, wherein the memory stores a computer program capable of running on the processor, and the processor realizes the trademark similarity judging method based on the sliding window when executing the computer program.
The third purpose of the invention is realized by adopting the following technical scheme:
a computer-readable storage medium, in which an executable computer program is stored, is provided, and when the computer program runs, the method for determining trademark similarity based on sliding window can be implemented.
Compared with the prior art, the invention has the beneficial effects that:
the trademark similarity judging method based on the sliding window comprises the steps of establishing a black and white character string standard library and a color character string standard library of a trademark image to be monitored, then periodically obtaining a published new audit trademark image according to announcement time of a trademark office, establishing a black and white character string comparison library and a color character string comparison library of the new audit trademark image, comparing the black and white character string standard library and the color character string standard library of the trademark image to be monitored with character strings of corresponding levels in the black and white character string comparison library and the color character string comparison library of the new audit trademark image, and judging the similarity of the new audit trademark image and the trademark image to be monitored; according to the method, after the trademark image is subjected to fuzzification processing, the trademark similarity is judged by simulating the principle of artificial visual judgment, automatic comparison is realized, the reliability of judgment on the trademark similarity is high, the workload of manual retrieval comparison analysis is reduced, and the retrieval comparison efficiency is improved.
Drawings
Fig. 1 is a schematic flow chart of a trademark similarity determination method based on a sliding window according to the present invention;
FIG. 2 is a schematic flow chart of the process for creating a standard library of black and white character strings of the trademark image to be monitored in FIG. 1;
FIG. 3 is a schematic flow chart of establishing a standard library of color strings of a trademark image to be monitored in FIG. 1;
fig. 4 is an exemplary pattern of the trademark image division grid provided by the present invention.
Detailed Description
The present invention will be further described with reference to the accompanying drawings and the detailed description, and it should be noted that any combination of the embodiments or technical features described below can be used to form a new embodiment without conflict.
Referring to fig. 1 to 3, a method for determining trademark similarity based on a sliding window includes the following steps:
s1, establishing a standard character string library of the trademark image to be monitored:
judging whether the trademark image to be monitored is a color trademark image applied with a specified color or not; if yes, establishing a black-and-white character string standard library and a color character string standard library of the trademark image to be monitored; if not, only establishing a black-and-white character string standard library of the trademark image to be monitored;
s11, establishing a black and white character string standard library of the trademark image to be monitored:
(1) and (3) gray level binarization processing:
s111, acquiring a trademark image to be monitored, and performing binarization processing on the trademark image to be monitored so as to convert the trademark image to be monitored into a black-and-white image of the trademark to be monitored; through binarization processing, the gray value of the trademark image is converted into 0 or 255, namely black and white figures, by taking a certain threshold value as a limit, and redundant background and noise are eliminated. Specifically, the present invention has a conversion of 255 above 128 and 0 below 128.
(2) Normalization treatment:
and S112, dividing the black-and-white image of the trademark to be monitored into M × M grids according to the size of the image of the trademark to be monitored, and extracting the hue H value in the color HSB value of each grid to obtain an M-level hue H value matrix, wherein M is a positive integer. For example, dividing the trademark image into 10 × 10 grid regions according to the size of the trademark image to obtain a matrix of 100 grid regions; dividing the grid into 100 × 100 grid areas to obtain a matrix of 10000 grid areas; or divided into 200 × 200, 500 × 500, 1000 × 1000 grid regions, and the like, specifically how many grid regions are divided, and determined by adjusting the size of the trademark image and the determination effect after the division, and a matrix of the grid regions is created using squares regardless of the shape of the trademark image. Specifically, the number of the more appropriate squares to be divided is estimated, whether the number of the squares can achieve the expected better effect is judged through the calculated recognition effect, if the number of the squares cannot be increased or decreased, the number of the squares is tested, and the number of the squares is correspondingly used for dividing until the operation speed and the calculation result are considered more appropriately. The irregular trademark is also divided by the number of squares set correspondingly, but the trademark is placed at a fixed position from the first point, and the irregular area without the image corresponds to the blank squares.
S113, successively reducing the black-and-white image of the trademark to be monitored by a sliding window-based normalization method to obtain a new image of the black-and-white image of the trademark to be monitored, and obtaining a hue H value matrix of a level corresponding to the new image of the black-and-white image of the trademark to be monitored obtained each time;
s114, calculating a hash value through each hue H value matrix to obtain a unique character string corresponding to each hue H value matrix, storing each character string according to the level to which each hue H value matrix belongs, and establishing a black-and-white character string standard library of the trademark image to be monitored;
s12, establishing a color character string standard library corresponding to the trademark image to be monitored:
s121, acquiring a trademark image to be monitored, dividing the trademark image to be monitored into M squares, and extracting hue H values in color HSB values of each square to obtain an M-level hue H value matrix, wherein M is a positive integer;
s122, successively reducing the trademark image to be monitored by a sliding window-based normalization method to obtain a new image of the trademark image to be monitored, and obtaining a hue H value matrix of a hierarchy corresponding to the new image of the trademark image to be monitored, which is obtained each time;
s123, calculating a hash value through each hue H value matrix to obtain a unique character string corresponding to each hue H value matrix, storing each character string according to the level to which each hue H value matrix belongs, and establishing a color character string standard library of the trademark image to be monitored;
s2, establishing a black-and-white character string comparison library of the trademark images to be compared:
the method specifically comprises the following steps as well as establishing a black and white character string standard library of the trademark image to be monitored:
(1) a gray level binarization processing step:
acquiring a new audit trademark image regularly, carrying out binarization processing on the new audit trademark image, and converting the new audit trademark image into a black and white image of the new audit trademark;
(2) normalization processing step:
dividing the black-and-white image of the new audit trademark into N × N grids according to the size of the image of the new audit trademark, and extracting hue H values in color HSB values of each grid to obtain an N × N hue H value matrix;
gradually reducing the black-and-white image of the new audit trademark by a sliding window method to obtain a new image of the black-and-white image of the new audit trademark, and obtaining a hue H value matrix of a hierarchy corresponding to the new image of the black-and-white image of the new audit trademark obtained each time;
calculating a hash value through each hue H value matrix to obtain a unique character string corresponding to each hue H value matrix, storing each character string according to the level to which each hue H value matrix belongs, and establishing a black-white character string comparison library of the new examined trademark image;
and (3) comparison:
s3, comparing the character strings of all levels in the black-and-white character string comparison library of each trademark image to be compared with the character strings of the corresponding levels in the black-and-white character string standard library of the trademark image to be monitored, and judging the black-and-white similarity according to the consistency of the character strings of all levels in comparison S1; in addition, the trademark images to be compared are sorted according to the black-white similarity S1 from high to low;
s4, judging whether the trademark image to be monitored is a color trademark image applied for a specified color;
s5, if not, the comparison is finished;
s6, if yes, comparing the colors, specifically: extracting the color trademark image in the trademark image to be compared, of which the black-white similarity S1 is more than a preset threshold, preferably, the preset threshold can be set to 80%, and establishing a color character string comparison library of each trademark image to be compared according to a method for establishing a color character string standard library of the trademark image to be monitored, namely: replacing the trademark image to be monitored with a color trademark image to be compared, executing the steps S121 to S123, and generating a color character string comparison library; comparing each character string in the color character string standard library of the trademark image to be monitored with the character strings of the corresponding levels in the color character string comparison library of the color trademark image to be compared, judging the color similarity S2 according to the consistency of the character strings of the levels to be compared, and sequencing the color trademark images to be compared according to the color similarity S2.
The trademark similarity judging method based on the sliding window comprises the steps of establishing a black and white character string standard library and a color character string standard library of a trademark image to be monitored, then periodically obtaining a published new audit trademark image according to announcement time of a trademark office, establishing a black and white character string comparison library and a color character string comparison library of the new audit trademark image, comparing the black and white character string standard library and the color character string standard library of the trademark image to be monitored with character strings of corresponding levels in the black and white character string comparison library and the color character string comparison library of the new audit trademark image, and judging the similarity of the new audit trademark image and the trademark image to be monitored; the trademark automatic monitoring and comparison is realized, the reliability of trademark similarity judgment is high, newly checked trademark images are arranged according to the similarity sequence, the workload of manual searching, comparison and analysis is reduced, the searching and comparison efficiency is improved, a user can directly check each similar trademark according to the similarity list, objections are timely mentioned to a trademark office for trademarks with high similarities, and the legal rights and interests of the trademark are maintained.
As a preferred embodiment, in step S113 and step S122, the trademark image to be monitored (the trademark image to be monitored is a black-and-white image of the trademark to be monitored obtained through grayscale binarization or an original image of the trademark image to be monitored) is successively reduced by a normalization method based on a sliding window to obtain a new image of the trademark image to be monitored, and the obtaining of the hue H value matrix of the hierarchy corresponding to the new image of the trademark image to be monitored obtained each time is specifically:
on a trademark image to be monitored divided into M × M grids, taking N × N grids as a sliding window, re-determining the hue H value of the first grid of the sliding window according to the hue H values of all the grids in the sliding window according to a preset rule, sliding the sliding window one by one to re-obtain the hue H values of (M-N +1) × (M-N +1) grids, reducing the trademark image to be monitored from M × M grids into new images of (M-N +1) × (M-N +1) grids, extracting the hue H value of each grid, and obtaining an M-N +1 level (M-N +1) × (M-N +1) hue H value matrix; preferably, N is equal to 2, i.e. the sliding window is 2 x 2 squares. That is, 2 × 2 grids are used as sliding windows, the windows slide from top to bottom and from left to right, the content in every 2 × 2 grids is continuously fuzzified, namely, the hue H value of the 1 st grid is continuously determined again according to the hue H value of each pixel point in every 2 × 2 grid area and a preset rule, so that a new hue H value matrix of (M-1) × (M-1) grids is finally obtained; the trademark image to be monitored is reduced continuously according to the method to obtain grids from (M-1) × (M-1) to ((M-1) -1) × (M-1) -1) to only 1 × 1 left at last, and a hue H value matrix of a plurality of levels is obtained.
As a preferred embodiment, when the processing object is a black-and-white image of the trademark to be monitored, the re-determining the hue H value of the first square grid of the sliding window according to the hue H values of all the square grids in the sliding window according to the preset rule specifically includes: and calculating the average value of the hue H values of all pixel points in 2 x 2 grids of the sliding window, and performing binarization processing on the average value, wherein the processing result value is the hue H value of the first grid of the 2 x 2 grids of the sliding window, and the binarization processing mode is the same as the binarization processing mode in the gray level binarization processing step. Since the binarization processing is performed by taking 128 as a boundary, when the hue H value is greater than 128, the conversion is performed to 255, and when the hue H value is less than 128, the conversion is performed to 0, that is, when the number of squares with the hue H value of 255 in 2 × 2 squares is greater than 2, the average value of the hue H values in all the squares is certainly greater than 128, and therefore, the hue H value of the first square in the 2 × 2 squares is 255; when the number of squares with a hue H value of 255 in 2 × 2 squares is less than or equal to 2, and the hue H value in all the squares is less than 128, the hue H value of the first square in the 2 × 2 squares is set to 0, for this case, 0 and 255 may correspond to codes 0 and 1 of the computer, and when the hue H value of the first square in the sliding window is determined again, it is only necessary to determine that more than 2 pieces of 1 in the data corresponding to each square take a value of 1, that is, the hue H value is 255, otherwise, the hue H value is 0, that is, the hue H value is 0.
When the processing object is the trademark image to be detected, the specifically determining the hue H value of the first square grid of the sliding window again according to the hue H values of all the square grids in the sliding window and the preset rule is as follows: and calculating the average value of the hue H values of all the pixel points in the 2 x 2 grids of the sliding window, and taking the average value as the hue H value of the first grid of the 2 x 2 grids of the sliding window.
Specifically, taking a trademark image as an example, referring to fig. 4, a matrix (1) of 40000 grid regions is obtained by performing a homogenization process on the trademark image, dividing the trademark image into 200 × 200 grid regions, and a hue H value in each grid region is extracted, so that a hue H value matrix of 40000 grids can be obtained. Sliding from top to bottom and from left to right, according to the average value of the hue H values of all the pixels in every 2 × 2 grid regions in the matrix (1) (for example, four abcd grid regions in the matrix (1)), if the average value is a black-and-white image, the result of binarization processing on the average value is required to re-determine the hue H value of the 1 st grid (namely, the corresponding grid a1 in the matrix (2)), and if the average value is a color image, the hue H value of the 1 st grid is directly used; according to the method, the hue H value of the first grid (namely, the 2 nd grid b1 in the grid of the matrix (2)) of the sliding window is determined again by taking the hue H value of the point in the bedf four grid areas in the matrix (1) as the number of 255, the method is repeated continuously, so that a matrix with 39601 grid areas in the grid areas such as 199 and 199 of the matrix (2) is obtained, and the hue H value in each grid is extracted, so that a hue H value matrix of 39601 grids is obtained. The method is repeated continuously, the trademark image to be monitored is reduced continuously to establish a grid area with 198 × 198 and 197 × 197 … … grids until only a grid area with 1 × 1 grid is obtained finally, the hue H value of each grid in the grid matrix obtained each time is extracted, and a hue H value matrix with 200 levels can be obtained in total.
As a preferred embodiment, the formula for determining the similarity S is as follows:
Figure GDA0002816035560000121
the similarity S can be black-white similarity S1 or color similarity S2, X is the highest level of consistency of the character string of the trademark image to be monitored and the character string of the trademark image to be compared, Y is the total number of levels of comparison between the trademark image to be monitored and the trademark image to be compared, and X and Y are positive integers.
For example, when the number of the levels of the trademark image to be monitored and the new trademark image to be checked is 200, Y is 200, and when the comparison is consistent at the level of 200 × 200, X is 200, and the similarity is 100%; when the alignment is consistent at 199 × 199, X is 199, the similarity is 199/200 × 100%, i.e., the similarity is 99.5%, and so on. When the number of the layers of the trademark image to be monitored is not consistent with that of the new audit trademark image, for example, the number of the layers of the trademark image to be monitored is 128, and the number of the layers of the new audit trademark image is 64, that is, the layers below 64 × 64 of the trademark image to be monitored can be compared with the corresponding layers of the new audit trademark image, and the layers 128 × 128 to 65 × 65 do not have corresponding layers in the new audit trademark image, so that the comparison cannot be performed, at this time, Y is 64, and when the comparison of the layers 64 × 64 is consistent, X is 64, and the similarity is 100%; when the alignment at 63 × 63 was consistent, X was 63 and the similarity was 63/64 × 100%, i.e., the similarity was 98.4%. The number of levels of the newly reviewed brand images is greater than the number of levels of brand images to be monitored, and so on.
The present invention also provides an electronic device, comprising: the processor is used for executing the computer program to realize the trademark similarity judging method based on the sliding window.
In addition, the invention also provides a computer readable storage medium, wherein the computer readable storage medium stores an executable computer program, and when the computer program runs, the trademark similarity judging method based on the sliding window can be realized.
The above embodiments are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited thereby, and any insubstantial changes and substitutions made by those skilled in the art based on the present invention are within the protection scope of the present invention.

Claims (8)

1. A trademark similarity judging method based on a sliding window is characterized by comprising the following steps:
establishing a standard character string library of the trademark image to be monitored:
judging whether the trademark image to be monitored is a color trademark image applied with a specified color or not; if yes, establishing a black-and-white character string standard library and a color character string standard library of the trademark image to be monitored; if not, only establishing a black-and-white character string standard library of the trademark image to be monitored;
establishing a black and white character string standard library of a trademark image to be monitored:
(1) and (3) gray level binarization processing:
acquiring a trademark image to be monitored, and carrying out binarization processing on the trademark image to be monitored so as to convert the trademark image to be monitored into a black-and-white image of the trademark to be monitored;
(2) normalization treatment:
dividing the black-and-white trademark image to be monitored into M × M grids according to the size of the trademark image to be monitored, and extracting hue H values in color HSB values of each grid to obtain an M-level hue H value matrix, wherein M is a positive integer; on a trademark image to be monitored divided into M × M grids, taking N × N grids as a sliding window, re-determining the hue H value of the first grid of the sliding window according to the hue H values of all the grids in the sliding window according to a preset rule, sliding the sliding window one by one to re-obtain the hue H values of (M-N +1) × (M-N +1) grids, reducing the trademark image to be monitored from M × M grids into new images of (M-N +1) × (M-N +1) grids, extracting the hue H value of each grid, and obtaining an M-N +1 level (M-N +1) × (M-N +1) hue H value matrix;
successively reducing the black-and-white image of the trademark to be monitored by a normalization method based on a sliding window to obtain a new image of the black-and-white image of the trademark to be monitored, and obtaining a hue H value matrix of a level corresponding to the obtained new image of the black-and-white image of the trademark to be monitored each time;
calculating a hash value through each hue H value matrix to obtain a unique character string corresponding to each hue H value matrix, storing each character string according to the hierarchy to which each hue H value matrix belongs, and establishing a black-and-white character string standard library of the trademark image to be monitored;
establishing a color character string standard library corresponding to the trademark image to be monitored:
acquiring the trademark image to be monitored, dividing the trademark image to be monitored into M grids, and extracting hue H values in color HSB values of each grid to obtain an M-level hue H value matrix, wherein M is a positive integer;
successively reducing the trademark image to be monitored by a normalization method based on a sliding window to obtain a new image of the trademark image to be monitored, and obtaining a hue H value matrix of a level corresponding to the new image of the trademark image to be monitored obtained each time;
calculating a hash value through each hue H value matrix to obtain a unique character string corresponding to each hue H value matrix, storing each character string according to the hierarchy to which each hue H value matrix belongs, and establishing a color character string standard library of the trademark image to be monitored;
establishing a black-and-white character string comparison library of the trademark image to be compared:
establishing a black-and-white character string comparison library of the trademark image to be compared according to a method for establishing a black-and-white character string standard library of the trademark image to be monitored;
and (3) comparison:
comparing the character strings of each level in the black-and-white character string comparison library of each trademark image to be compared with the character strings of the corresponding level in the black-and-white character string standard library of the trademark image to be monitored, and judging the black-and-white similarity S1 according to the consistency of the character strings of each level;
judging whether the trademark image to be monitored is a color trademark image applied with a specified color or not;
if not, the comparison is finished;
if yes, extracting the color trademark images in the trademark images to be compared, wherein the black-white similarity S1 is more than a preset threshold value, and establishing a color character string comparison library of each trademark image to be compared according to a method for establishing a color character string standard library of the trademark image to be monitored; comparing each character string in the color character string standard library of the trademark image to be monitored with the character strings of the corresponding levels in the color character string comparison library of the color trademark image to be compared, and judging the color similarity S2 according to the consistency of the character strings of the levels to be compared.
2. The trademark similarity judging method based on the sliding window as claimed in claim 1, wherein N is equal to 2, that is, the sliding window is 2 x 2 squares.
3. The trademark similarity judging method based on the sliding window according to claim 2, wherein when the processing object is a black-and-white trademark image to be monitored, the re-determining the hue H value of the first square grid of the sliding window according to the hue H values of all the square grids in the sliding window according to the preset rule specifically comprises: calculating the average value of the hue H values of all pixel points in 2 × 2 grids of the sliding window, and performing binarization processing on the average value, and then taking the processing result value as the hue H value of the first grid of the 2 × 2 grids of the sliding window, wherein the binarization processing mode is the same as the binarization processing mode in the gray level binarization processing step;
when the processing object is the trademark image to be detected, the specifically determining the hue H value of the first square grid of the sliding window again according to the hue H values of all the square grids in the sliding window and the preset rule is as follows: and calculating the average value of the hue H values of all the pixel points in the 2 x 2 grids of the sliding window, and taking the average value as the hue H value of the first grid of the 2 x 2 grids of the sliding window.
4. The sliding-window-based trademark similarity judging method according to any one of claims 1 to 3, wherein the binarization processing of the trademark image to be monitored so as to convert the trademark image to be monitored into the black-and-white trademark image to be monitored is specifically as follows: and taking a certain threshold as a limit, converting the gray value of the pixel point with the gray value higher than the threshold in the trademark image to be monitored into 255, and converting the gray value of the pixel point with the gray value lower than the threshold in the trademark image to be monitored into 0.
5. The sliding-window-based trademark similarity judging method according to claim 4, wherein the threshold value is 128.
6. The trademark similarity judging method based on the sliding window as claimed in claim 4, wherein the judgment formula of the similarity S is as follows:
Figure FDA0002816035550000041
the similarity S can be black-white similarity S1 or color similarity S2, X is the highest level of consistency of the character string of the trademark image to be monitored and the character string of the trademark image to be compared, Y is the total number of levels of comparison between the trademark image to be monitored and the trademark image to be compared, and X and Y are positive integers.
7. An electronic device, characterized in that the electronic device comprises: a processor and a memory, the memory storing a computer program operable on the processor, the processor implementing the sliding window based trademark similarity determination method according to any one of claims 1 to 6 when executing the computer program.
8. A computer-readable storage medium storing an executable computer program which, when running, implements the sliding-window-based trademark similarity determination method according to any one of claims 1 to 6.
CN201811106692.2A 2018-09-21 2018-09-21 Trademark similarity judging method and device based on sliding window and storage medium Active CN109460771B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811106692.2A CN109460771B (en) 2018-09-21 2018-09-21 Trademark similarity judging method and device based on sliding window and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811106692.2A CN109460771B (en) 2018-09-21 2018-09-21 Trademark similarity judging method and device based on sliding window and storage medium

Publications (2)

Publication Number Publication Date
CN109460771A CN109460771A (en) 2019-03-12
CN109460771B true CN109460771B (en) 2021-02-02

Family

ID=65606814

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811106692.2A Active CN109460771B (en) 2018-09-21 2018-09-21 Trademark similarity judging method and device based on sliding window and storage medium

Country Status (1)

Country Link
CN (1) CN109460771B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110472002B (en) * 2019-08-14 2022-11-29 腾讯科技(深圳)有限公司 Text similarity obtaining method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101162470A (en) * 2007-11-16 2008-04-16 北京交通大学 Video frequency advertisement recognition method based on layered matching
CN102622420A (en) * 2012-02-22 2012-08-01 哈尔滨工程大学 Trademark image retrieval method based on color features and shape contexts
CN102819582A (en) * 2012-07-26 2012-12-12 华数传媒网络有限公司 Quick searching method for mass images
CN106126572A (en) * 2016-06-17 2016-11-16 中国科学院自动化研究所 Image search method based on area validation
CN106375847A (en) * 2015-07-23 2017-02-01 无锡天脉聚源传媒科技有限公司 Template generation method, template generation device, video updating method and video updating device
CN107610106A (en) * 2017-08-31 2018-01-19 移康智能科技(上海)股份有限公司 A kind of detection method, device, electronic equipment and computer-readable recording medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8150150B2 (en) * 2009-03-02 2012-04-03 Himax Technologies Limited Method and system of extracting a perceptual feature set

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101162470A (en) * 2007-11-16 2008-04-16 北京交通大学 Video frequency advertisement recognition method based on layered matching
CN102622420A (en) * 2012-02-22 2012-08-01 哈尔滨工程大学 Trademark image retrieval method based on color features and shape contexts
CN102819582A (en) * 2012-07-26 2012-12-12 华数传媒网络有限公司 Quick searching method for mass images
CN106375847A (en) * 2015-07-23 2017-02-01 无锡天脉聚源传媒科技有限公司 Template generation method, template generation device, video updating method and video updating device
CN106126572A (en) * 2016-06-17 2016-11-16 中国科学院自动化研究所 Image search method based on area validation
CN107610106A (en) * 2017-08-31 2018-01-19 移康智能科技(上海)股份有限公司 A kind of detection method, device, electronic equipment and computer-readable recording medium

Also Published As

Publication number Publication date
CN109460771A (en) 2019-03-12

Similar Documents

Publication Publication Date Title
US10049291B2 (en) Image-processing apparatus, image-processing method, and computer program product
CN106529550B (en) Multi-dimensional characteristic quantity extraction method and device based on connected domain analysis
JP4494563B2 (en) Image processing method and apparatus using image segmentation by tokenization
CN101042735A (en) Image binarization method and device
JP2008067387A (en) Method and system for identifying text in digital images
JP4266030B2 (en) Method and system for detecting areas of a digital image
CN113642576A (en) Method and device for generating training image set in target detection and semantic segmentation task
CN118051908A (en) Malicious code homology detection method, device, equipment and storage medium
CN111507411A (en) Image comparison method and system
CN109460771B (en) Trademark similarity judging method and device based on sliding window and storage medium
JP4527127B2 (en) System for detecting areas of digital images
CN111881998A (en) White screen detection method
CN109299295B (en) Blue printing layout database searching method
CN117934417B (en) Method, device, equipment and medium for identifying apparent defects of road based on neural network
CN113888561A (en) A method and system for image recognition of fire fighting equipment based on deep learning
CN113505784A (en) Automatic nail annotation analysis method and device, electronic equipment and storage medium
CN118228044A (en) Data enhancement method, model training method, device and electronic equipment
CN116992446A (en) Malicious code family detection method and device, electronic equipment and storage medium
CN114638596B (en) Natural resource business process examination method, system, equipment and medium
CN116166842A (en) Method and system for fast screening and attribute comparison based on AI technology
Karthika et al. A novel approach for document image binarization using bit-plane slicing
CN116309489B (en) Image restoration degree detection method and related equipment
CN109670072B (en) Trademark similarity comparison method based on interval extraction
Liang et al. A trash detection model based on yolov7
CN113068045A (en) Data storage method, apparatus, electronic device, and computer-readable storage medium

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
GR01 Patent grant
GR01 Patent grant