A method, apparatus, electronic device and storage medium for detecting Taiwan logos

By acquiring local image features and matching them with the logo database, and filtering and processing mismatched features, the accuracy problem of logo detection in non-standard locations is solved, achieving higher detection accuracy.

CN114693916BActive Publication Date: 2025-10-31BEIJING YUANJIAN INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210320432.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-29
Publication Date
2025-10-31
Estimated Expiration
2042-03-29

AI Technical Summary

Technical Problem

Existing logo detection methods have low accuracy when logos are scaled, rotated, or have viewing angle deviations, making it difficult to effectively identify logos in non-standard positions.

Method used

By acquiring local features of the image to be detected, feature similarity matching is performed using a pre-set logo database. Local logo features with feature similarity greater than a threshold are selected, and the target logo is determined based on the number and similarity of features. Mismatched features are processed using homography matrix to improve detection accuracy.

Benefits of technology

It improves the accuracy of logo detection and can effectively identify scaling, rotation and viewing angle deviations of logos in non-standard positions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114693916B_ABST
    Figure CN114693916B_ABST
Patent Text Reader

Abstract

This disclosure provides a logo detection method, apparatus, electronic device, and storage medium. The method involves: acquiring an image to be detected; determining multiple local features corresponding to the image; for each of the multiple local features, determining the feature similarity between that local feature and each local feature in a preset logo database, wherein the logo database includes multiple sample logos and multiple local features corresponding to each sample logo; selecting multiple local features with a feature similarity greater than a preset similarity threshold as candidate local features; determining the sample logo corresponding to each candidate local feature as a candidate logo; and identifying candidate logos whose number of candidate local features exceeds a preset feature number threshold as target logos contained in the image to be detected, thereby improving the accuracy of logo detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of digital broadcast television technology, and more specifically, to a method, apparatus, electronic device, and storage medium for detecting station logos. Background Technology

[0002] With the continuous development and popularization of digital broadcasting technology, watching TV programs has become a part of people's daily lives. When TV stations broadcast full-length programs or commercials, they often add the station's logo to the corner of the program. Similarly, many self-media producers also use their own unique logos in online videos to indicate the source of the program's production. Therefore, in order to ensure that video programs are not stolen and to protect the digital assets of TV stations, it is often necessary to detect the station logos appearing in the programs.

[0003] In existing logo detection processes, edge detection or neural network learning are commonly used. These methods can only identify logos added to the corner areas of a program under standard conditions. However, in some cases, logos may appear in the program scene, such as attached to microphones, podiums, buildings, etc., to display the relevant unit. These logos often appear scaled, rotated, or have viewing angle deviations in the video presentation. In this case, the detection accuracy of traditional logo detection methods is low. Summary of the Invention

[0004] This disclosure provides at least one method, apparatus, electronic device, and storage medium for detecting counter logos, which can improve the accuracy of counter logo detection.

[0005] This disclosure provides a method for detecting logos, the method comprising:

[0006] Acquire the image to be detected;

[0007] Determine multiple local image features corresponding to the image to be detected;

[0008] For each of the plurality of image local features, the feature similarity between the image local feature and each logo local feature in a preset logo database is determined, wherein the logo database includes a plurality of sample logos and a plurality of logo local features corresponding to each sample logo;

[0009] Multiple local features of the logo with a similarity greater than a preset similarity threshold are selected as candidate local features of the logo, and the sample logo corresponding to each candidate local feature of the logo is determined as a candidate logo.

[0010] The candidate logos whose number of local features is greater than a preset feature number threshold are identified as the target logos contained in the image to be detected.

[0011] In an optional implementation, after selecting multiple local features of the logo with a feature similarity greater than a preset similarity threshold as candidate local features of the logo, and determining the sample logo corresponding to each candidate local feature of the logo as a candidate logo, the method further includes:

[0012] Among the multiple local image features whose feature similarity is greater than a preset similarity threshold, mismatched image features are filtered out.

[0013] In one optional implementation, the method for filtering the mismatched image features includes:

[0014] Determine the width and height corresponding to each of the candidate logos;

[0015] Based on the width and height of the candidate logo, determine the coordinates of the four corners of the image corresponding to the candidate logo;

[0016] For each candidate logo, determine the homography matrix between the candidate logo and multiple local image features whose feature similarity is greater than a preset similarity threshold;

[0017] The four corner coordinates of the image corresponding to the candidate logo are transformed according to the homography matrix to determine the mapping feature pattern;

[0018] When the mapped feature graph is a concave quadrilateral, the local image feature corresponding to the homography matrix is ​​determined to be the mismatched image feature.

[0019] In one optional implementation, the logo database is constructed based on the following method:

[0020] Obtain the sample logo for each type of logo;

[0021] For each of the sample station logos, determine a plurality of local features of the station logos corresponding to the sample station logo;

[0022] Filter out redundant local features included in multiple local features of the logo;

[0023] The sample station logo with the redundant local features filtered out, along with the multiple local features of the station logo corresponding to the sample station logo, are stored.

[0024] In an optional implementation, after determining the number of local features corresponding to each candidate marker and identifying candidate markers with a number of local features greater than a preset threshold as target markers, the method further includes:

[0025] Determine the similarity confidence level corresponding to the local features of each candidate station in the target station;

[0026] Based on the similarity confidence scores corresponding to the local features of all the candidate logos, the target similarity confidence score corresponding to the target logo is determined.

[0027] The target logo and the target similarity confidence score are sent to the user.

[0028] In an optional implementation, after determining the plurality of local features corresponding to each sample marker, the method further includes:

[0029] Obtain the position coordinates corresponding to each of the local features of the logo;

[0030] Cluster analysis is performed on the local features of the logo based on the location coordinates, dividing the sample logo into multiple feature regions;

[0031] For each of the aforementioned feature regions, determine the area of ​​the region corresponding to the feature region and the number of local features of the logo within the feature region;

[0032] The feature density corresponding to the feature region is determined based on the area of ​​the region and the number of local features of the logo.

[0033] For the feature regions where the feature density is greater than a preset density threshold, redundant local features are selected from multiple local features of the logo.

[0034] Filter out the redundant local features.

[0035] This disclosure also provides a logo detection device, the device comprising: an acquisition module for acquiring an image to be detected;

[0036] The first determining module is used to determine multiple local image features corresponding to the image to be detected;

[0037] The second determining module is used to determine, for each of the plurality of image local features, the feature similarity between the image local feature and each logo local feature in a preset logo database, wherein the logo database includes a plurality of sample logos and a plurality of logo local features corresponding to each sample logo;

[0038] The matching module is used to select multiple local features of the logo that have a feature similarity greater than a preset similarity threshold as candidate local features of the logo, and to determine the sample logo corresponding to each candidate local feature of the logo as a candidate logo.

[0039] The third determining module is used to determine the candidate logos whose number of local features is greater than a preset feature number threshold as target logos contained in the image to be detected.

[0040] In an optional embodiment, the logo detection device further includes a screening module, the screening module being used for:

[0041] Among the multiple local image features whose feature similarity is greater than a preset similarity threshold, mismatched image features are filtered out.

[0042] In an optional implementation, the filtering module is further configured to:

[0043] Determine the width and height corresponding to each of the candidate logos;

[0044] Based on the width and height of the candidate logo, determine the coordinates of the four corners of the image corresponding to the candidate logo;

[0045] For each candidate logo, determine the homography matrix between the candidate logo and multiple local image features whose feature similarity is greater than a preset similarity threshold;

[0046] The four corner coordinates of the image corresponding to the candidate logo are transformed according to the homography matrix to determine the mapping feature pattern;

[0047] When the mapped feature graph is a concave quadrilateral, the local image feature corresponding to the homography matrix is ​​determined to be the mismatched image feature.

[0048] In an optional embodiment, the logo detection device further includes a database construction module, which is used for:

[0049] Obtain the sample logo for each type of logo;

[0050] For each of the sample station logos, determine a plurality of local features of the station logos corresponding to the sample station logo;

[0051] Filter out redundant local features included in multiple local features of the logo;

[0052] The sample station logo with the redundant local features filtered out, along with the multiple local features of the station logo corresponding to the sample station logo, are stored.

[0053] In an optional embodiment, the logo detection device further includes a confidence level determination module, the confidence level determination module being used for:

[0054] Determine the similarity confidence level corresponding to the local features of each candidate station in the target station;

[0055] Based on the similarity confidence scores corresponding to the local features of all the candidate logos, the target similarity confidence score corresponding to the target logo is determined.

[0056] The target logo and the target similarity confidence score are sent to the user.

[0057] In an optional embodiment, the logo detection device further includes a feature processing module, which is used for:

[0058] Obtain the position coordinates corresponding to each of the local features of the logo;

[0059] Cluster analysis is performed on the local features of the logo based on the location coordinates, dividing the sample logo into multiple feature regions;

[0060] For each of the aforementioned feature regions, determine the area of ​​the region corresponding to the feature region and the number of local features of the logo within the feature region;

[0061] The feature density corresponding to the feature region is determined based on the area of ​​the region and the number of local features of the logo.

[0062] For the feature regions where the feature density is greater than a preset density threshold, redundant local features are selected from multiple local features of the logo.

[0063] Filter out the redundant local features.

[0064] This disclosure also provides an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the steps of the above-described logo detection method or any possible implementation of the above-described logo detection method are performed.

[0065] This disclosure also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the above-described logo detection method or any possible implementation thereof.

[0066] This disclosure provides a logo detection method, apparatus, electronic device, and storage medium. The method involves: acquiring an image to be detected; determining multiple local features corresponding to the image; for each of the multiple local features, determining the feature similarity between that local feature and each local feature in a preset logo database, wherein the logo database includes multiple sample logos and multiple local features corresponding to each sample logo; selecting multiple local features with a feature similarity greater than a preset similarity threshold as candidate local features; determining the sample logo corresponding to each candidate local feature as a candidate logo; and identifying candidate logos whose number of candidate local features exceeds a preset feature number threshold as target logos contained in the image to be detected, thereby improving the accuracy of logo detection.

[0067] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0068] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments will be briefly described below. These drawings are incorporated in and constitute a part of this specification. They illustrate embodiments conforming to this disclosure and, together with the specification, serve to explain the technical solutions of this disclosure. It should be understood that the following drawings only show some embodiments of this disclosure and should not be considered as limiting the scope. Those skilled in the art can obtain other related drawings based on these drawings without creative effort.

[0069] Figure 1 A flowchart of a label detection method provided in an embodiment of this disclosure is shown;

[0070] Figure 2 A flowchart of another logo detection method provided by an embodiment of this disclosure is shown;

[0071] Figure 3 A schematic diagram of the structure of a label detection device provided in an embodiment of this disclosure is shown;

[0072] Figure 4 A schematic diagram of an electronic device provided in an embodiment of the present disclosure is shown. Detailed Implementation

[0073] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. The components of the embodiments of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.

[0074] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0075] In this document, the term "and / or" merely describes a relationship, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.

[0076] Research has found that existing logo detection processes typically employ edge detection or neural network learning methods. These methods can only identify logos added to the corner areas of a program under standard conditions. However, in some cases, logos may appear in the program scene, such as attached to microphones, podiums, buildings, or other objects to display the relevant organization. These logos often exhibit scaling, rotation, and viewing angle deviations in the video presentation, resulting in low accuracy of traditional logo detection methods.

[0077] Based on the above research, this disclosure provides a logo detection method, apparatus, electronic device, and storage medium. The method involves: acquiring an image to be detected; determining multiple local features corresponding to the image; for each of the multiple local features, determining the feature similarity between that local feature and each local feature in a preset logo database, wherein the logo database includes multiple sample logos and multiple local features corresponding to each sample logo; selecting multiple local features with a feature similarity greater than a preset similarity threshold as candidate local features; determining the sample logo corresponding to each candidate local feature as a candidate logo; and identifying candidate logos whose number of candidate local features exceeds a preset feature number threshold as target logos contained in the image to be detected, thereby improving the accuracy of logo detection.

[0078] To facilitate understanding of this embodiment, a detailed description of the logo detection method disclosed in this disclosure is provided first. The execution entity of the logo detection method provided in this disclosure is generally a computer device with certain computing capabilities. This computer device may include, for example, a terminal device, a server, or other processing devices. The terminal device may be a user equipment (UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, in-vehicle device, wearable device, etc. In some possible implementations, the logo detection method can be implemented by a processor calling computer-readable instructions stored in memory.

[0079] See Figure 1 The diagram shows a flowchart of a logo detection method provided in an embodiment of this disclosure. The method includes steps S101 to S105, wherein:

[0080] S101. Obtain the image to be detected.

[0081] In this step, the image to be detected, which needs to be inspected for logo detection, is obtained.

[0082] Here, the image to be detected can be a frame from the broadcast of a video program, which contains the logo of the TV station broadcasting the video program or a personalized logo indicating the video producer. The source of the image can be the website broadcasting the video program.

[0083] S102. Determine multiple local image features corresponding to the image to be detected.

[0084] In this step, multiple local image features are extracted from the acquired image to be detected.

[0085] Here, local image features are the opposite of global image features. Global image features describe the overall characteristics of an image, including variance, color histograms, and other image features, but they cannot describe the details of the image. Local image features, on the other hand, mainly include edges, specks, and corners in the image, and can describe the details of the graphics contained within the image.

[0086] In practical implementation, methods for obtaining local image features can include: Scale-invariant feature transform (SIFT) algorithm, Speeded Up Robust Features (SURF) algorithm, Oriented Fast and Rotated BRIEF (ORB) algorithm, and Binary Robust Invariant Scalable Keypoints (BRISK) algorithm, etc. By using the above algorithms to extract local image features from the image to be detected, the coordinates and feature vectors corresponding to the local image features can be obtained.

[0087] The number of extracted local image features is related to the graphic content contained in the image to be detected, and the coordinates of the local image features are located at different positions in the image to be detected.

[0088] Since the local features of the image are only related to the graphic content at a local location in the image to be detected, the scaling, rotation, and viewpoint transformation of the image to be detected cannot affect the local features of the image to be detected. Therefore, using the local features of the image to be detected for logo detection can avoid the unrecognizable effects caused by scaling, rotation, and viewpoint transformation of the logo graphic in the image to be detected.

[0089] S103. For each of the plurality of image local features, determine the feature similarity between the image local feature and each logo local feature in a preset logo database, wherein the logo database includes a plurality of sample logos and a plurality of logo local features corresponding to each sample logo.

[0090] Here, for the multiple local features of the obtained image to be detected, the similarity of each local feature is compared with that of each local feature of the logo stored in the pre-established logo database to determine the feature similarity between each local feature of the image and each local feature of the logo.

[0091] Feature similarity can be represented by the Euclidean distance between the feature vectors corresponding to local features of the image and the feature vectors corresponding to local features of the logo.

[0092] In practice, the logo database is a pre-established database that stores sample images corresponding to all logos, as well as multiple local features of each logo corresponding to its image. In the logo database, each local feature of a logo corresponds to the logo ID of that local feature.

[0093] The image of the sample station logo can be obtained from the website broadcasting the video program, or it can be extracted from the corresponding file of the video program.

[0094] Optionally, the database used for the platform logo can be a relational database such as MySQL, Oracle, PostgreSQL, or SQL Server, or a non-relational database such as HBase, MongoDB, or Redis. The choice is made according to the specific implementation process and no specific restrictions are imposed here.

[0095] As one possible implementation, the logo database is constructed based on the following method: obtaining sample logos corresponding to each logo; for each sample logo, determining multiple logo local features corresponding to the sample logo; filtering out redundant local features included in the multiple logo local features; and storing the sample logos with the redundant local features filtered out and the multiple logo local features corresponding to the sample logos.

[0096] Here, redundant local features are obtained from the image to be detected.

[0097] As one possible implementation, in the process of constructing the logo database, after determining multiple local features corresponding to each sample logo, it is also necessary to organize the redundant local features included in the multiple local features obtained for each sample logo. This method specifically includes: obtaining the position coordinates corresponding to each local feature; performing cluster analysis on the local features based on the position coordinates to divide the sample logo into multiple feature regions; determining the area of ​​each feature region and the number of local features within that feature region; determining the feature density of the feature region based on the area and the number of local features; selecting redundant local features from the multiple local features for feature regions whose feature density is greater than a preset density threshold; and filtering the redundant local features.

[0098] Here, by performing cluster analysis on the location information corresponding to the local features of the station logo in the image of the sample station logo, the image of the sample station logo can be divided into multiple feature regions. In each feature region, by obtaining the area of ​​the region and the number of local features of the station logo contained therein, the local feature density of the station logo within each feature region can be obtained. For regions with high feature density, redundant local features that cannot clearly represent the graphic features of the sample station logo are filtered out and deleted.

[0099] One method for clustering the local features of the logos is k-means clustering. Redundant local features can be the local features of logos corresponding to local areas with low recognizability and distinguishability in the sample logos. In practical applications, this can be reflected as the presence rate of redundant local features in each of all sample logos exceeding a preset redundancy threshold. The redundancy threshold can be selected according to actual needs and is not specifically limited here. The preset density threshold can also be selected according to actual needs and is not specifically limited here.

[0100] In this way, by dividing the local features of the station logos obtained from the sample station logos into regions, redundant local features are deleted for regions with high feature density, so that the collected local features of the station logos are evenly distributed in all regions of the sample station logo image.

[0101] S104. Select multiple local features of the logo that have a similarity greater than a preset similarity threshold as candidate local features of the logo, and determine the sample logo corresponding to each candidate local feature of the logo as a candidate logo.

[0102] In this step, after calculating the feature similarity between each image local feature and each logo local feature, a pair of image local features and logo local features with a feature similarity greater than a preset feature similarity threshold are selected as candidate logo local features, and the sample logo corresponding to the candidate logo local feature is used as the candidate logo.

[0103] Here, if the feature similarity between the local features of the image and the local features of the logo is greater than the preset feature similarity threshold, it means that the local features of the image and the local features of the logo match. That is, the image to be detected contains a local graphic part that is similar to the local features of the sample logo in the logo database. Therefore, the logo local features among multiple pairs of local features of the image and logo with a feature similarity greater than the preset feature similarity threshold can be selected as candidate logo local features. In addition, since each logo local feature in the logo database corresponds to an ID corresponding to the logo local feature, the type of candidate logo corresponding to the candidate logo local features can be determined.

[0104] Among them, the candidate logos represent logo images that may appear in the image to be detected. Since there may be multiple local features of the image to be detected that can match the local features of the logos in the logo database, there are also multiple candidate logos that may appear in the image to be detected. Each candidate logo may include multiple local features of the candidate logos.

[0105] In this way, by identifying candidate logos, it is possible to preliminarily determine whether the image to be detected contains a logo image and the type of logo image it contains.

[0106] S105. The candidate logos whose number of local features is greater than a preset feature number threshold are determined as the target logos contained in the image to be detected.

[0107] In this step, since each candidate marker contains at least one candidate marker local feature that can match the local features of the image to be detected, the candidate marker containing a large number of candidate marker local features can be selected from multiple candidate markers as the target marker contained in the image to be detected, based on the preset feature quantity threshold.

[0108] Here, the more local features a candidate logo contains, the more local regions in the image to be detected that are highly similar to the candidate logo. In other words, the probability of the candidate logo appearing in the image to be detected is higher. Therefore, candidate logos with a number of local features greater than the preset feature number threshold are identified as target logos.

[0109] The preset threshold for the number of features can be selected according to actual needs, and no specific restrictions are imposed here.

[0110] As one possible implementation, after detecting the target logo, the detection confidence of the candidate logo appearing in the image to be detected can also be determined. The method is as follows: determine the similarity confidence of each candidate logo's local features in the target logo; based on the similarity confidence of all candidate logos' local features, determine the target similarity confidence of the target logo; and send the target logo and the target similarity confidence to the user for reference.

[0111] This disclosure provides a logo detection method that involves: acquiring an image to be detected; determining multiple local features corresponding to the image to be detected; for each of the multiple local features, determining the feature similarity between the local feature and each local feature in a preset logo database, wherein the logo database includes multiple sample logos and multiple local features corresponding to each sample logo; selecting multiple local features with a feature similarity greater than a preset similarity threshold as candidate local features, and determining the sample logo corresponding to each candidate local feature as a candidate logo; and determining the candidate logos whose number of candidate local features is greater than a preset feature number threshold as target logos contained in the image to be detected, thereby improving the accuracy of logo detection.

[0112] See Figure 2 The diagram shows a flowchart of another logo detection method provided in this embodiment of the present disclosure. The method includes steps S201 to S206, wherein:

[0113] S201. Obtain the image to be detected.

[0114] S202. Determine multiple local image features corresponding to the image to be detected.

[0115] S203. For each of the plurality of image local features, determine the feature similarity between the image local feature and each logo local feature in a preset logo database, wherein the logo database includes a plurality of sample logos and a plurality of logo local features corresponding to each sample logo.

[0116] S204. Select multiple local features of the logo that have a similarity greater than a preset similarity threshold as candidate local features of the logo, and determine the sample logo corresponding to each candidate local feature of the logo as a candidate logo.

[0117] S205. Among the multiple local image features whose feature similarity is greater than a preset similarity threshold, filter and exclude mismatched special features.

[0118] In this step, since the local features used to match the local features of the image to be detected with the local features of the logo reflect the details of the image, such as edges, spots, and corners, during the matching process, some local features in non-logo locations in the image to be detected may have a high similarity to a local feature of a logo stored in the logo database. However, the local features in these locations do not reflect the local features of the logo graphic in the image to be detected. Therefore, such mismatched features need to be screened and eliminated to avoid interfering with the subsequent steps of determining the target logo.

[0119] Here, the mismatch feature is a local feature of the image to be detected that has a high similarity to the local feature of the logo stored in the logo database. However, the local feature is not actually the local feature corresponding to the part of the image in the image to be detected that contains the logo, which is a case of false matching.

[0120] As one possible implementation, the following method is used to filter out mismatched features: determining the width and height corresponding to each candidate logo; determining the four-corner coordinates of the image corresponding to the candidate logo based on the width and height of the candidate logo; for each candidate logo, determining the homography matrix between the candidate logo and multiple local image features whose feature similarity is greater than a preset similarity threshold; transforming the four-corner coordinates of the image corresponding to the candidate logo based on the homography matrix to determine the mapped feature graphic; when the mapped feature graphic is a concave quadrilateral, determining the local image feature corresponding to the homography matrix as the mismatched image feature.

[0121] Here, the logos stored in the logo database are approximated as squares. Based on the width and height of the logos themselves, the position coordinates of the four corners of the candidate logos can be obtained. By obtaining the homography matrix between the candidate logos and multiple image local features with a feature similarity greater than a preset similarity threshold, and processing the four corner coordinates of the candidate logos based on the obtained homography matrix, a mapping feature graphic between the sample logos and multiple image local feature points in the image to be detected is obtained. After processing the mapping feature graphic, when the mapping feature graphic is a concave quadrilateral, the image local feature corresponding to the homography matrix is ​​taken as the mismatched image feature.

[0122] Preferably, the Random Sample Consensus (RANSAC) algorithm can be used to randomly select four matching points corresponding to the four corners of the candidate landmark from multiple local image features with feature similarity greater than a preset similarity threshold. The homography matrix between these four pairs of eight feature data is calculated, and iterative processing is continuously performed on all local image features with feature similarity greater than the preset similarity threshold until the mismatched image features are deleted from the local image features corresponding to the image to be detected.

[0123] In this embodiment, the homography matrix can describe the mapping relationship between two images taken from two different perspectives in the sample logo image in the logo database and the image to be detected, for the same logo.

[0124] Since the logos stored in the logo database are approximately square, the projected shape of the logo in the image to be detected after perspective transformation should be a convex quadrilateral. If mismatched image features are selected as the matching points corresponding to the four corners of the candidate logo, the mapped feature shape obtained after processing the coordinates of the four corners of the candidate logo using the obtained homography matrix is ​​a concave quadrilateral. This indicates that the local image features used when obtaining the homography matrix are mismatched image features.

[0125] S206. The candidate station logo whose number of local features is greater than a preset feature number threshold is determined as the target station logo.

[0126] Here, the methods described in steps S201-S204 and S206 are essentially the same as those described in steps S101-S105 and have the same implementation method, so they will not be described again here.

[0127] This disclosure provides a logo detection method that involves: acquiring an image to be detected; determining multiple local features corresponding to the image to be detected; for each of the multiple local features, determining the feature similarity between the local feature and each local feature in a preset logo database, wherein the logo database includes multiple sample logos and multiple local features corresponding to each sample logo; selecting multiple local features with a feature similarity greater than a preset similarity threshold as candidate local features, and determining the sample logo corresponding to each candidate local feature as a candidate logo; and determining the candidate logos whose number of candidate local features is greater than a preset feature number threshold as target logos contained in the image to be detected, thereby improving the accuracy of logo detection.

[0128] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0129] Based on the same inventive concept, this disclosure also provides a logo detection device corresponding to the logo detection method. Since the principle of the device in this disclosure is similar to the logo detection method described above, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0130] Please see Figure 3 , Figure 3 A schematic diagram of the structure of a label detection device 300 provided in an embodiment of this disclosure is shown. Figure 3As shown in the figure, the logo detection device 300 provided in this embodiment includes: an acquisition module 310; a first determination module 320; a second determination module 330; a matching module 340; and a third determination module 350.

[0131] The acquisition module 310 is used to acquire the image to be detected;

[0132] The first determining module 320 is used to determine multiple local image features corresponding to the image to be detected;

[0133] The second determining module 330 is used to determine the feature similarity between each of the plurality of image local features and each logo local feature in a preset logo database, wherein the logo database includes a plurality of sample logos and a plurality of logo local features corresponding to each sample logo;

[0134] Matching module 340 is used to select multiple local features of the logo that have a feature similarity greater than a preset similarity threshold as candidate local features of the logo, and to determine the sample logo corresponding to each candidate local feature of the logo as a candidate logo.

[0135] The third determining module 350 is used to determine the candidate logos whose number of local features is greater than a preset feature number threshold as target logos contained in the image to be detected.

[0136] Optionally, the logo detection device 300 further includes a screening module, which is used for:

[0137] Among the multiple local image features whose feature similarity is greater than a preset similarity threshold, mismatched image features are filtered out.

[0138] Optionally, the filtering module is further configured to:

[0139] Determine the width and height corresponding to each of the candidate logos;

[0140] Based on the width and height of the candidate logo, determine the coordinates of the four corners of the image corresponding to the candidate logo;

[0141] For each candidate logo, determine the homography matrix between the candidate logo and multiple local image features whose feature similarity is greater than a preset similarity threshold;

[0142] The four corner coordinates of the image corresponding to the candidate logo are transformed according to the homography matrix to determine the mapping feature pattern;

[0143] When the mapped feature graph is a concave quadrilateral, the local image feature corresponding to the homography matrix is ​​determined to be the mismatched image feature.

[0144] Optionally, the logo detection device 300 further includes a database construction module, which is used for:

[0145] Obtain the sample logo for each type of logo;

[0146] For each of the sample station logos, determine a plurality of local features of the station logos corresponding to the sample station logo;

[0147] Filter out redundant local features included in multiple local features of the logo;

[0148] The sample station logo with the redundant local features filtered out, along with the multiple local features of the station logo corresponding to the sample station logo, are stored.

[0149] In an optional embodiment, the logo detection device 300 further includes a confidence level determination module, the confidence level determination module being used for:

[0150] Determine the similarity confidence level corresponding to the local features of each candidate station in the target station;

[0151] Based on the similarity confidence scores corresponding to the local features of all the candidate logos, the target similarity confidence score corresponding to the target logo is determined.

[0152] The target logo and the target similarity confidence score are sent to the user.

[0153] In an optional embodiment, the logo detection device 300 further includes a feature processing module, which is used for:

[0154] Obtain the position coordinates corresponding to each of the local features of the logo;

[0155] Cluster analysis is performed on the local features of the logo based on the location coordinates, dividing the sample logo into multiple feature regions;

[0156] For each of the aforementioned feature regions, determine the area of ​​the region corresponding to the feature region and the number of local features of the logo within the feature region;

[0157] The feature density corresponding to the feature region is determined based on the area of ​​the region and the number of local features of the logo.

[0158] For the feature regions where the feature density is greater than a preset density threshold, redundant local features are selected from multiple local features of the logo.

[0159] Filter out the redundant local features.

[0160] The processing flow of each module in the device and the interaction flow between each module can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.

[0161] This disclosure provides a logo detection device that acquires an image to be detected; determines multiple local features corresponding to the image to be detected; for each of the multiple local features, determines the feature similarity between the local feature and each local feature in a preset logo database, wherein the logo database includes multiple sample logos and multiple local features corresponding to each sample logo; selects multiple local features with a feature similarity greater than a preset similarity threshold as candidate local features, determines the sample logo corresponding to each candidate local feature as a candidate logo; and determines the candidate logos whose number of candidate local features is greater than a preset feature number threshold as target logos contained in the image to be detected, thereby improving the accuracy of logo detection.

[0162] Corresponding to Figure 1 In addition to the method for detecting the logo in the text, this disclosure also provides an electronic device 400, such as... Figure 4 The diagram shown is a structural schematic of an electronic device 400 provided in an embodiment of this disclosure, including:

[0163] Processor 41, memory 42, and bus 43; memory 42 is used to store execution instructions, including main memory 421 and external memory 422; the main memory 421, also called internal memory, is used to temporarily store the computational data in processor 41, as well as the data exchanged with external memory 422 such as hard disk. Processor 41 exchanges data with external memory 422 through main memory 421. When the electronic device 400 is running, processor 41 and memory 42 communicate through bus 43, enabling processor 41 to execute... Figure 1 and Figure 2 The steps of the label testing method in China.

[0164] This disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the logo detection method described in the above-described method embodiments. The storage medium can be a volatile or non-volatile computer-readable storage medium.

[0165] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0166] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this disclosure, it should be understood that the disclosed device and method can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.

[0167] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0168] In addition, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0169] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0170] Finally, it should be noted that the above-described embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.

Claims

1. A method for detecting Taiwan logos, characterized in that, include: Acquire the image to be detected; Determine multiple local image features corresponding to the image to be detected; For each of the plurality of image local features, the feature similarity between the image local feature and each logo local feature in a preset logo database is determined, wherein the logo database includes a plurality of sample logos and a plurality of logo local features corresponding to each sample logo; Multiple local features of the logo with a similarity greater than a preset similarity threshold are selected as candidate local features of the logo, and the sample logo corresponding to each candidate local feature of the logo is determined as a candidate logo. Among the multiple local image features whose feature similarity is greater than a preset similarity threshold, mismatched image features are screened and filtered out; The method for filtering the mismatched image features includes: Determine the width and height corresponding to each candidate logo; determine the four-corner coordinates of the image corresponding to the candidate logo based on the width and height of the candidate logo; for each candidate logo, determine the homography matrix between the candidate logo and multiple local image features with a feature similarity greater than a preset similarity threshold; transform the four-corner coordinates of the image corresponding to the candidate logo based on the homography matrix to determine the mapping feature graphic; when the mapping feature graphic is a concave quadrilateral, determine the local image feature corresponding to the homography matrix as the mismatched image feature; The candidate logos whose number of local features is greater than a preset feature number threshold are identified as the target logos contained in the image to be detected.

2. The method according to claim 1, characterized in that, The logo database was constructed using the following method: Obtain the sample logo for each type of logo; For each of the sample station logos, determine a plurality of local features of the station logos corresponding to the sample station logo; Filter out redundant local features included in multiple local features of the logo; The sample station logo with the redundant local features filtered out, along with the multiple local features of the station logo corresponding to the sample station logo, are stored.

3. The method according to claim 1, characterized in that, After determining the number of local features of each candidate marker and identifying the candidate markers with a number of local features greater than a preset threshold as target markers, the method further includes: Determine the similarity confidence level corresponding to the local features of each candidate station in the target station; Based on the similarity confidence scores corresponding to the local features of all the candidate logos, the target similarity confidence score corresponding to the target logo is determined. The target logo and the target similarity confidence score are sent to the user.

4. The method according to claim 2, characterized in that, The method for filtering redundant local features included in multiple logo local features includes: Obtain the position coordinates corresponding to each of the local features of the logo; Cluster analysis is performed on the local features of the logo based on the location coordinates, dividing the sample logo into multiple feature regions; For each of the aforementioned feature regions, determine the area of ​​the region corresponding to the feature region and the number of local features of the logo within the feature region; The feature density corresponding to the feature region is determined based on the area of ​​the region and the number of local features of the logo. For the feature regions where the feature density is greater than a preset density threshold, redundant local features are selected from multiple local features of the logo. Filter out the redundant local features.

5. A label detection device, characterized in that, The label detection device includes: The acquisition module is used to acquire the image to be detected; The first determining module is used to determine multiple local image features corresponding to the image to be detected; The second determining module is used to determine, for each of the plurality of image local features, the feature similarity between the image local feature and each logo local feature in a preset logo database, wherein the logo database includes a plurality of sample logos and a plurality of logo local features corresponding to each sample logo; The matching module is used to select multiple local features of the logo that have a feature similarity greater than a preset similarity threshold as candidate local features of the logo, and to determine the sample logo corresponding to each candidate local feature of the logo as a candidate logo. The third determining module is used to determine the candidate logos whose number of local features is greater than a preset feature number threshold as target logos contained in the image to be detected. The logo detection device further includes a screening module, which is used for: Among the multiple local image features whose feature similarity is greater than a preset similarity threshold, mismatched image features are filtered out. The method for filtering the mismatched image features includes: Determine the width and height corresponding to each candidate logo; determine the four corner coordinates of the image corresponding to the candidate logo based on the width and height of the candidate logo; for each candidate logo, determine the homography matrix between the candidate logo and multiple local image features with a feature similarity greater than a preset similarity threshold; transform the four corner coordinates of the image corresponding to the candidate logo based on the homography matrix to determine the mapped feature graphic; when the mapped feature graphic is a concave quadrilateral, determine the local image feature corresponding to the homography matrix as the mismatched image feature.

6. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the steps of the logo detection method as described in any one of claims 1 to 4 are performed.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the logo detection method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Station logo recognition method and system based on SIFT operators

    CN103473551A