CN113920329A - Feature extraction method and device based on gradient histogram - Google Patents

Feature extraction method and device based on gradient histogram Download PDF

Info

Publication number
CN113920329A
CN113920329A CN202111309960.2A CN202111309960A CN113920329A CN 113920329 A CN113920329 A CN 113920329A CN 202111309960 A CN202111309960 A CN 202111309960A CN 113920329 A CN113920329 A CN 113920329A
Authority
CN
China
Prior art keywords
gradient
histogram
unit
amplitude
gradient histogram
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111309960.2A
Other languages
Chinese (zh)
Inventor
李军平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jiuzhou Anhua Information Security Technology Co ltd
Original Assignee
Beijing Jiuzhou Anhua Information Security 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 Beijing Jiuzhou Anhua Information Security Technology Co ltd filed Critical Beijing Jiuzhou Anhua Information Security Technology Co ltd
Priority to CN202111309960.2A priority Critical patent/CN113920329A/en
Publication of CN113920329A publication Critical patent/CN113920329A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The embodiment of the application provides a feature extraction method and device based on a gradient histogram. The method comprises dividing a pre-acquired image into a plurality of unit areas, wherein each unit area comprises nxn cell units; acquiring a gradient histogram of each unit region, wherein the gradient histogram comprises a gradient angle and a gradient amplitude of each cell unit; screening out gradient amplitudes higher than a preset amplitude, and matching a reference gradient histogram in a preset database according to a gradient histogram to which the gradient amplitudes belong; and if the matching is successful, determining the image characteristics according to the successfully matched reference gradient histogram. In this way, when feature recognition is performed, after the gradient histogram of each unit region is determined, the gradient histogram is screened according to the gradient amplitude, and since the gradient amplitude can reflect the contrast between the cell units, only the gradient histogram having the gradient amplitude larger than the preset amplitude is matched in the present application, so that the calculation amount is reduced and the calculation efficiency is improved.

Description

Feature extraction method and device based on gradient histogram
Technical Field
The embodiments of the present application relate to the technical field of image feature recognition, and more particularly, to a method and an apparatus for feature extraction based on a gradient histogram.
Background
The histogram of directional gradient is a characteristic descriptor used for target detection in the field of computer vision and image processing, and this technology is used to calculate the statistical value of the directional information of the local image gradient.
In view of the above-mentioned related art, the inventors consider that the method has the disadvantages of large calculation amount and low calculation efficiency.
Disclosure of Invention
According to an embodiment of the present application, a gradient histogram based feature extraction scheme is provided.
In a first aspect of the present application, a method for feature extraction based on gradient histograms is provided. The method comprises the following steps:
dividing a pre-acquired image into a plurality of unit areas, wherein each unit area comprises nxn cell units;
obtaining a gradient histogram of each unit region, wherein the gradient histogram comprises a gradient angle and a gradient amplitude of each cell unit;
screening out gradient amplitude values higher than a preset amplitude value, and matching a reference gradient histogram in a preset database according to a gradient histogram to which the gradient amplitude values belong;
and if the matching is successful, determining the image characteristics according to the successfully matched reference gradient histogram.
In a possible implementation manner, after the matching a reference gradient histogram in a preset database according to a gradient histogram to which the gradient magnitude belongs, the method further includes:
if the matching fails, the unit areas are subdivided so that each unit area includes m × m cell units, m > n.
In one possible implementation, the obtaining the gradient histogram of each unit region includes:
acquiring three-channel color values of each cell unit in each unit area;
determining a group of alternative gradient angles and alternative gradient amplitudes according to the color value of each channel;
taking the maximum value in the three groups of candidate gradient amplitudes as the gradient amplitude of the cell unit;
the gradient magnitude and gradient angle of a plurality of the cell units constitute a gradient histogram of the unit region.
In a possible implementation manner, the matching a reference gradient histogram in a preset database according to a gradient histogram to which the gradient magnitude belongs includes:
determining a unit area matched with the gradient histogram according to the gradient histogram to which the gradient amplitude belongs;
dividing the unit region into a plurality of subregions, wherein the number of the subregions in each unit region is less than the number of the cell units;
calculating a sub-gradient histogram of each sub-region;
screening gradient amplitude values higher than a preset amplitude value, and determining a sub-gradient histogram to which the gradient amplitude values belong as a characteristic histogram;
and matching the characteristic histogram with a reference gradient histogram in a preset database.
According to the feature extraction method based on the gradient histogram, when feature recognition is carried out, particularly image edge feature recognition is carried out, after the gradient histogram of each unit region is determined, the gradient histogram is screened according to the gradient amplitude, and the gradient amplitude can reflect the contrast between cell units, so that only the gradient histogram with the gradient amplitude larger than the preset amplitude is matched in the method, the calculated amount is reduced, and meanwhile, the calculation efficiency is improved.
In a second aspect of the present application, a gradient histogram-based feature extraction apparatus is provided. The device includes:
the dividing module is used for dividing the pre-acquired image into a plurality of unit areas, and each unit area comprises nxn cell units;
the acquisition module is used for acquiring a gradient histogram of each unit region, wherein the gradient histogram comprises a gradient angle and a gradient amplitude of each cell unit;
the processing module is used for screening out gradient amplitude values higher than a preset amplitude value and matching a reference gradient histogram in a preset database according to a gradient histogram to which the gradient amplitude values belong;
and the determining module is used for determining the image characteristics according to the successfully matched reference gradient histogram when the gradient histogram to which the gradient amplitude belongs is successfully matched with the reference gradient histogram in the preset database.
In one possible implementation manner, the method further includes:
and the resetting module is used for repartitioning the unit region when the matching of the gradient histogram to which the gradient amplitude belongs and a reference gradient histogram in a preset database fails, so that each unit region comprises m multiplied by m cell units, and m is greater than n.
In one possible implementation manner, the obtaining module includes:
the extraction unit is used for acquiring three-channel color values of each cell unit in each unit area;
the computing unit is used for determining a group of alternative gradient angles and alternative gradient amplitudes according to each channel color value;
a gradient amplitude screening unit for taking the maximum value of the three groups of candidate gradient amplitudes as the gradient amplitude of the cell unit;
and the composition unit is used for forming a gradient histogram of the unit area by using the gradient amplitude and the gradient angle of a plurality of cell units.
In one possible implementation, the processing module includes:
the unit area determining unit is used for determining a unit area matched with the gradient histogram according to the gradient histogram to which the gradient amplitude belongs;
the thinning unit is used for dividing the unit area into a plurality of sub-areas, and the number of the sub-areas in each unit area is smaller than that of the cell units;
the generating unit is used for calculating the sub-gradient histogram of each sub-region;
the characteristic histogram screening unit is used for screening gradient amplitude values higher than a preset amplitude value and determining a sub-gradient histogram to which the gradient amplitude values belong as a characteristic histogram;
and the matching unit is used for matching the characteristic histogram with a reference gradient histogram in a preset database.
In a third aspect of the present application, an electronic device is provided. The electronic device includes: a memory having a computer program stored thereon and a processor implementing the method as described above when executing the program.
In a fourth aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the method as according to the first aspect of the present application.
It should be understood that what is described in this summary section is not intended to limit key or critical features of the embodiments of the application, nor is it intended to limit the scope of the application. Other features of the present application will become apparent from the following description.
Drawings
The above and other features, advantages and aspects of various embodiments of the present application will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. In the drawings, like or similar reference characters designate like or similar elements, and wherein:
FIG. 1 shows a flow diagram of a gradient histogram based feature extraction method according to an embodiment of the application;
FIG. 2 shows a schematic diagram of a gradient histogram according to an embodiment of the present application;
FIG. 3 shows a block diagram of a gradient histogram based feature extraction apparatus according to an embodiment of the present application;
fig. 4 shows a schematic structural diagram of a terminal device or a server suitable for implementing the embodiments of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In addition, the term "and/or" herein is only one kind of association relationship describing an associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs unless specifically defined otherwise. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
The application provides a feature extraction method based on a gradient histogram, which is applied to image edge feature identification. Firstly, an image to be identified is obtained, the image is divided into a plurality of unit areas, each unit area comprises n multiplied by n cell units, a gradient histogram of each unit area is obtained, the gradient histogram comprises a gradient angle and a gradient amplitude of each cell unit, the gradient amplitude is compared with a preset amplitude, the gradient histogram with the gradient amplitude higher than the preset amplitude is matched with a reference gradient histogram in a preset database, and if the matching is successful, image characteristics are determined according to the successfully matched reference gradient histogram. When the method is used for feature recognition, after the gradient histogram of each unit area is determined, the gradient histogram is screened according to the gradient amplitude, and the gradient amplitude can reflect the contrast between cell units, so that only the gradient histogram with the gradient amplitude larger than the preset amplitude is matched in the method, the calculated amount is reduced, and the calculation efficiency is improved.
Fig. 1 shows a flowchart of a gradient histogram-based feature extraction method according to an embodiment of the present application, which is executed by an electronic device.
Step S100, dividing the pre-acquired image into a plurality of unit areas, wherein each unit area comprises n multiplied by n cell units.
After the image to be recognized is obtained, the image can be cut according to the preset proportion so as to be convenient for subsequent area division of the image, the condition that the existing part can not be divided into a unit area is avoided, and the preset proportion can be 1: 2 or 1:3, etc., without limitation.
The number of n may be customized, and in a specific example, the pre-captured image may be divided into 8 × 16 unit areas, and each unit area may include 4 × 4 cell units, although the number of unit areas and the number of cell units are not limited as exemplified herein.
Step S200, obtaining a gradient histogram of each unit area, wherein the gradient histogram comprises a gradient angle and a gradient amplitude of each cell unit.
The gradient is calculated by a conventional calculation method, such as Sobel operator, which is not described herein.
Obtaining the gradient histogram of each region may be by obtaining three channel color values of each of the cell units in each unit region; determining a group of alternative gradient angles and alternative gradient amplitudes according to the color value of each channel; because the gradient amplitude can represent the contrast between two cell units, the larger the gradient amplitude is, the stronger the contrast between two cell units is, and here, the maximum value of the three sets of alternative gradient amplitudes is taken as the gradient amplitude of the cell unit; the gradient magnitude and gradient angle of a plurality of the cell units constitute a gradient histogram of the unit region.
In some embodiments, the acquired gradient histogram may be further gamma corrected to adjust the image contrast, reduce the effects of illumination on the image (including uneven illumination and local shadows), and normalize the overexposed or underexposed image to be closer to the image seen by the human eye.
In the present embodiment, the gradient angle may be an unsigned gradient, i.e., the gradient angle ranges between 0-180 degrees, rather than 0-360 degrees, since the two diametrically opposite directions are considered to be the same.
In a specific example, the gradient angle range may be divided into 9 equal parts, that is, every 20 ° is a group, every 0-20 ° is a group, every 20-40 ° is a group, every … …, every 160-.
As shown in fig. 2, a length-9 histogram can be constructed by adding the gradient magnitude of each cell unit in a unit area to the corresponding bin.
S300, screening out gradient amplitude values higher than a preset amplitude value, and matching a reference gradient histogram in a preset database according to a gradient histogram to which the gradient amplitude values belong;
when the image edge feature is identified, the gradient amplitude between the edge of the image to be identified and the background image is higher, so that the gradient histogram can be screened according to the magnitude of the gradient amplitude, specifically, the gradient amplitude can be compared with the preset amplitude to screen out the gradient amplitude larger than the preset amplitude, and the gradient histogram to which the screened gradient amplitude belongs is matched with the reference gradient image in the preset database.
In some embodiments, in order to improve the accuracy of image recognition, after screening out gradient amplitudes greater than a preset amplitude, a unit region matched with the gradient amplitudes may be determined according to a gradient histogram to which the gradient amplitudes belong, and the unit region is divided into a plurality of sub-regions, wherein the number of the sub-regions in each unit region is less than the number of the cell units, that is, the unit region includes the plurality of sub-regions, and the sub-regions include the plurality of cell units; and then calculating a sub-gradient histogram of each sub-region, wherein the sub-gradient histogram comprises the gradient angle and the gradient amplitude of each cell unit in the sub-region, screening the gradient amplitude higher than a preset amplitude, determining the sub-gradient histogram to which the gradient amplitude belongs as a feature histogram, and matching the feature histogram with a reference gradient histogram in a preset database.
And S400, if the matching is successful, determining image characteristics according to the successfully matched reference gradient histogram.
In the embodiment of the application, the preset database stores a reference gradient histogram group, when the screened gradient histogram is matched with the reference gradient histogram, a fuzzy algorithm can be adopted, and when the similarity between the gradient histogram and the reference gradient histogram is greater than the preset similarity, the matching is considered to be successful.
After the matching is successful, the image features can be determined according to the reference gradient histogram with successful matching, wherein the matching relation between the image features and the reference gradient histogram can be pre-stored in the database.
The image feature may be, without limitation, identifying a type of image, such as a table, a chair, etc.
In some embodiments, if the screened gradient histogram fails to match the reference gradient fat map, the unit regions are subdivided so that each unit region includes m × m cell units, where m > n, that is, each unit region is subdivided twice, and the cell units in each unit region are increased, so as to improve the gradient calculation accuracy.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are exemplary embodiments and that the acts and modules referred to are not necessarily required in this application.
The above is a description of method embodiments, and the embodiments of the present application are further described below by way of apparatus embodiments.
Fig. 3 shows a block diagram of a gradient histogram-based feature extraction apparatus according to an embodiment of the present application. The device comprises:
a dividing module 301, configured to divide a pre-acquired image into a plurality of unit regions, where each unit region includes nxn cell units;
an obtaining module 302, configured to obtain a gradient histogram of each unit region, where the gradient histogram includes a gradient angle and a gradient magnitude of each cell unit;
the processing module 303 is configured to screen out a gradient amplitude higher than a preset amplitude, and match a reference gradient histogram in a preset database according to a gradient histogram to which the gradient amplitude belongs;
the determining module 304 is configured to determine, when the gradient histogram to which the gradient magnitude belongs is successfully matched with a reference gradient histogram in a preset database, an image feature according to the reference gradient histogram that is successfully matched.
In one possible implementation manner, the method further includes:
and the resetting module is used for repartitioning the unit region when the matching of the gradient histogram to which the gradient amplitude belongs and a reference gradient histogram in a preset database fails, so that each unit region comprises m multiplied by m cell units, and m is greater than n.
In one possible implementation manner, the obtaining module 302 includes:
the extraction unit is used for acquiring three-channel color values of each cell unit in each unit area;
the computing unit is used for determining a group of alternative gradient angles and alternative gradient amplitudes according to each channel color value;
a gradient amplitude screening unit for taking the maximum value of the three groups of candidate gradient amplitudes as the gradient amplitude of the cell unit;
and the composition unit is used for forming a gradient histogram of the unit area by using the gradient amplitude and the gradient angle of a plurality of cell units.
In one possible implementation manner, the processing module 303 includes:
the unit area determining unit is used for determining a unit area matched with the gradient histogram according to the gradient histogram to which the gradient amplitude belongs;
the thinning unit is used for dividing the unit area into a plurality of sub-areas, and the number of the sub-areas in each unit area is smaller than that of the cell units;
the generating unit is used for calculating the sub-gradient histogram of each sub-region;
the characteristic histogram screening unit is used for screening gradient amplitude values higher than a preset amplitude value and determining a sub-gradient histogram to which the gradient amplitude values belong as a characteristic histogram;
and the matching unit is used for matching the characteristic histogram with a reference gradient histogram in a preset database.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the described module may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
Fig. 4 shows a schematic structural diagram of an electronic device suitable for implementing an embodiment of the present application.
As shown in fig. 4, the electronic apparatus includes a Central Processing Unit (CPU)401 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage section 408 into a Random Access Memory (RAM) 404. In the RAM 403, various programs and data necessary for the operation of the system 400 are also stored. The CPU 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
The following components are connected to the I/O interface 405: an input section 406 including a keyboard, a mouse, and the like; an output section 407 including a display device such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 408 including a hard disk and the like; and a communication section 409 including a network interface card such as a LAN card, a modem, or the like. The communication section 409 performs communication processing via a network such as the internet. A driver 410 is also connected to the I/O interface 405 as needed. A removable medium 411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 410 as necessary, so that a computer program read out therefrom is mounted into the storage section 408 as necessary.
In particular, according to embodiments of the present application, the process described above with reference to the flowchart fig. 1 may be implemented as a computer software program. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a machine-readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 409, and/or installed from the removable medium 411. The above-described functions defined in the system of the present application are executed when the computer program is executed by a Central Processing Unit (CPU) 401.
It should be noted that the computer readable medium shown in the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software or hardware. The described units or modules may also be provided in a processor, and may be described as: a processor includes a partitioning module, an obtaining module, a processing module, and a determining module. Where the names of these units or modules do not in some cases constitute a limitation on the units or modules themselves, for example, a division module may also be described as "a module for dividing a pre-acquired image into unit areas each including n × n cell units".
As another aspect, the present application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or may be separate and not incorporated into the electronic device. The computer-readable storage medium stores one or more programs which, when executed by one or more processors, perform a gradient histogram-based feature extraction method as described herein.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the application referred to in the present application is not limited to the embodiments with a particular combination of the above-mentioned features, but also encompasses other embodiments with any combination of the above-mentioned features or their equivalents without departing from the spirit of the application. For example, the above features may be replaced with (but not limited to) features having similar functions as those described in this application.

Claims (10)

1. A feature extraction method based on a gradient histogram is characterized by comprising the following steps:
dividing a pre-acquired image into a plurality of unit areas, wherein each unit area comprises nxn cell units;
obtaining a gradient histogram of each unit region, wherein the gradient histogram comprises a gradient angle and a gradient amplitude of each cell unit;
screening out gradient amplitude values higher than a preset amplitude value, and matching a reference gradient histogram in a preset database according to a gradient histogram to which the gradient amplitude values belong;
and if the matching is successful, determining the image characteristics according to the successfully matched reference gradient histogram.
2. The method as claimed in claim 1, further comprising, after the matching of the histogram of gradients belonging to the gradient magnitude with a reference histogram of gradients in a predetermined database, the steps of:
if the matching fails, the unit areas are subdivided so that each unit area includes m × m cell units, m > n.
3. The method of claim 1, wherein the obtaining the gradient histogram of each unit region comprises:
acquiring three-channel color values of each cell unit in each unit area;
determining a group of alternative gradient angles and alternative gradient amplitudes according to the color value of each channel;
taking the maximum value in the three groups of candidate gradient amplitudes as the gradient amplitude of the cell unit;
the gradient magnitude and gradient angle of a plurality of the cell units constitute a gradient histogram of the unit region.
4. The method as claimed in claim 1, wherein the matching the histogram of reference gradients in a predetermined database according to the histogram of gradients to which the gradient magnitudes belong comprises:
determining a unit area matched with the gradient histogram according to the gradient histogram to which the gradient amplitude belongs;
dividing the unit region into a plurality of subregions, wherein the number of the subregions in each unit region is less than the number of the cell units;
calculating a sub-gradient histogram of each sub-region;
screening gradient amplitude values higher than a preset amplitude value, and determining a sub-gradient histogram to which the gradient amplitude values belong as a characteristic histogram;
and matching the characteristic histogram with a reference gradient histogram in a preset database.
5. A feature extraction device based on a gradient histogram, comprising:
a dividing module (301) for dividing the pre-acquired image into a plurality of unit areas, each of the unit areas comprising nxn cell units;
an obtaining module (302) for obtaining a gradient histogram of each unit region, the gradient histogram including a gradient angle and a gradient magnitude of each cell unit;
the processing module (303) is used for screening out gradient amplitudes higher than a preset amplitude, and matching a reference gradient histogram in a preset database according to a gradient histogram to which the gradient amplitudes belong;
and the determining module (304) is used for determining image characteristics according to the reference gradient histogram which is successfully matched when the gradient histogram to which the gradient amplitude belongs is successfully matched with the reference gradient histogram in the preset database.
6. The histogram of gradients-based feature extraction device of claim 5, further comprising:
and the resetting module is used for repartitioning the unit region when the matching of the gradient histogram to which the gradient amplitude belongs and a reference gradient histogram in a preset database fails, so that each unit region comprises m multiplied by m cell units, and m is greater than n.
7. The apparatus of claim 5, wherein the obtaining module comprises:
the extraction unit is used for acquiring three-channel color values of each cell unit in each unit area;
the computing unit is used for determining a group of alternative gradient angles and alternative gradient amplitudes according to each channel color value;
a gradient amplitude screening unit for taking the maximum value of the three groups of candidate gradient amplitudes as the gradient amplitude of the cell unit;
and the composition unit is used for forming a gradient histogram of the unit area by using the gradient amplitude and the gradient angle of a plurality of cell units.
8. The method of claim 5, wherein the processing module comprises:
the unit area determining unit is used for determining a unit area matched with the gradient histogram according to the gradient histogram to which the gradient amplitude belongs;
the thinning unit is used for dividing the unit area into a plurality of sub-areas, and the number of the sub-areas in each unit area is smaller than that of the cell units;
the generating unit is used for calculating the sub-gradient histogram of each sub-region;
the characteristic histogram screening unit is used for screening gradient amplitude values higher than a preset amplitude value and determining a sub-gradient histogram to which the gradient amplitude values belong as a characteristic histogram;
and the matching unit is used for matching the characteristic histogram with a reference gradient histogram in a preset database.
9. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program, wherein the processor, when executing the program, implements the method of any of claims 1-4.
10. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method according to any one of claims 1 to 4.
CN202111309960.2A 2021-11-08 2021-11-08 Feature extraction method and device based on gradient histogram Pending CN113920329A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111309960.2A CN113920329A (en) 2021-11-08 2021-11-08 Feature extraction method and device based on gradient histogram

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111309960.2A CN113920329A (en) 2021-11-08 2021-11-08 Feature extraction method and device based on gradient histogram

Publications (1)

Publication Number Publication Date
CN113920329A true CN113920329A (en) 2022-01-11

Family

ID=79245557

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111309960.2A Pending CN113920329A (en) 2021-11-08 2021-11-08 Feature extraction method and device based on gradient histogram

Country Status (1)

Country Link
CN (1) CN113920329A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104850852A (en) * 2015-04-27 2015-08-19 小米科技有限责任公司 Feature vector calculation method and device
CN108108753A (en) * 2017-12-15 2018-06-01 京北方信息技术股份有限公司 A kind of recognition methods of check box selection state based on support vector machines and device
CN109101922A (en) * 2018-08-10 2018-12-28 广东电网有限责任公司 Operating personnel device, assay, device and electronic equipment
CN109685142A (en) * 2018-12-25 2019-04-26 国信优易数据有限公司 A kind of image matching method and device
CN110490020A (en) * 2019-07-31 2019-11-22 珠海市杰理科技股份有限公司 Bar code recognition, device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104850852A (en) * 2015-04-27 2015-08-19 小米科技有限责任公司 Feature vector calculation method and device
CN108108753A (en) * 2017-12-15 2018-06-01 京北方信息技术股份有限公司 A kind of recognition methods of check box selection state based on support vector machines and device
CN109101922A (en) * 2018-08-10 2018-12-28 广东电网有限责任公司 Operating personnel device, assay, device and electronic equipment
CN109685142A (en) * 2018-12-25 2019-04-26 国信优易数据有限公司 A kind of image matching method and device
CN110490020A (en) * 2019-07-31 2019-11-22 珠海市杰理科技股份有限公司 Bar code recognition, device, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
(澳)拉库马•布亚 等编著,彭木根 等译: "《雾计算与边缘计算 原理及范式》", 31 January 2020, 北京:机械工业出版社 *

Similar Documents

Publication Publication Date Title
CN110874594B (en) Human body appearance damage detection method and related equipment based on semantic segmentation network
CN108229419B (en) Method and apparatus for clustering images
CN109711508B (en) Image processing method and device
CN113705462B (en) Face recognition method, device, electronic equipment and computer readable storage medium
CN110941978B (en) Face clustering method and device for unidentified personnel and storage medium
CN111860522B (en) Identity card picture processing method, device, terminal and storage medium
CN112488297B (en) Neural network pruning method, model generation method and device
CN111882565B (en) Image binarization method, device, equipment and storage medium
CN112750162A (en) Target identification positioning method and device
WO2022160202A1 (en) Method and apparatus for inspecting mask wearing, terminal device and readable storage medium
CN110517296B (en) Target tracking method and device, storage medium and electronic equipment
CN113378790B (en) Viewpoint positioning method, apparatus, electronic device, and computer-readable storage medium
CN113158773B (en) Training method and training device for living body detection model
CN112465050B (en) Image template selection method, device, equipment and storage medium
CN109523564B (en) Method and apparatus for processing image
CN113920329A (en) Feature extraction method and device based on gradient histogram
CN114998282B (en) Image detection method, device, electronic equipment and storage medium
CN110895699B (en) Method and apparatus for processing feature points of image
CN114323585B (en) Method for batch calculation of modulation transfer function, electronic device and storage medium
CN108629219B (en) Method and device for identifying one-dimensional code
CN111062341A (en) Video image area classification method, device, equipment and storage medium
CN117474827A (en) Image definition detection method and device
CN109286798B (en) Frame position identification method and system of projection screen and terminal equipment
CN115423855B (en) Template matching method, device, equipment and medium for image
CN114708592B (en) Seal security level judging method, device, equipment 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