CN110503109B - Image feature extraction method and device, and image processing method and device - Google Patents

Image feature extraction method and device, and image processing method and device Download PDF

Info

Publication number
CN110503109B
CN110503109B CN201910715981.0A CN201910715981A CN110503109B CN 110503109 B CN110503109 B CN 110503109B CN 201910715981 A CN201910715981 A CN 201910715981A CN 110503109 B CN110503109 B CN 110503109B
Authority
CN
China
Prior art keywords
distance
pixel
image
pixel point
centroid
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910715981.0A
Other languages
Chinese (zh)
Other versions
CN110503109A (en
Inventor
赵威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Advanced New Technologies 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 Advanced New Technologies Co Ltd filed Critical Advanced New Technologies Co Ltd
Priority to CN201910715981.0A priority Critical patent/CN110503109B/en
Publication of CN110503109A publication Critical patent/CN110503109A/en
Application granted granted Critical
Publication of CN110503109B publication Critical patent/CN110503109B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/50Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides an image feature extraction method and device and an image processing method and device, wherein the image feature extraction method comprises the following steps: performing edge detection on the image to obtain a contour image; dividing the contour image to obtain a plurality of contour sub-images; for each of the contour sub-images: determining a centroid of the contour sub-image; calculating the distance between each pixel point of the contour sub-image and the centroid; counting the number of pixel points corresponding to the pixel distance and the distance between the pixel point and the centroid according to the distance between the pixel point and the centroid and a plurality of other pixel points corresponding to the pixel point; and the distance between the pixel point and any other corresponding pixel point is the pixel distance.

Description

Image feature extraction method and device, and image processing method and device
Technical Field
The invention relates to the technical field of computers, in particular to an image feature extraction method and device and an image processing method and device.
Background
In practical application scenarios, images are usually recognized according to features such as color, shape, texture, space, etc. extracted from the images. Since the shape of an image generally does not change with changes in the surrounding environment (e.g., image brightness, contrast, etc.), shape features are more stable than color features and texture features.
Currently, the shape features extracted from an image are the number of pixels with the same distance to the centroid, and a centroid distance histogram constructed based on the number can be used to describe the shape of the image.
However, in the image feature extraction process, spatial features of pixel points are ignored, and the accuracy of image description is low, so that images in different shapes have the same centroid distance histogram, and the accuracy of image identification is reduced.
Disclosure of Invention
In view of this, embodiments of the present invention provide an image feature extraction method and apparatus, and an image processing method and apparatus, which can consider spatial features of pixel points, describe an image more accurately, and further improve accuracy of image recognition.
In a first aspect, an embodiment of the present invention provides an image feature extraction method, including:
performing edge detection on the image to obtain a contour image;
dividing the contour image to obtain a plurality of contour sub-images;
for each of the contour sub-images: determining a centroid of the contour sub-image; calculating the distance between each pixel point of the contour sub-image and the centroid; counting the number of pixel points corresponding to the pixel distance and the distance between the pixel point and the centroid according to the distance between the pixel point and the centroid and a plurality of other pixel points corresponding to the pixel point; and the distance between the pixel point and any other corresponding pixel point is the pixel distance.
In a second aspect, an embodiment of the present invention provides an image processing method, including:
carrying out edge detection on an image to be identified to obtain a contour image;
dividing the contour image to obtain a plurality of contour sub-images;
for each of the contour sub-images: determining a centroid of the contour sub-image; calculating the distance between each pixel point of the contour sub-image and the centroid; counting the number of pixel points corresponding to the pixel distance and the distance between the pixel point and the centroid according to the distance between the pixel point and the centroid and a plurality of other pixel points corresponding to the pixel point; constructing a distance autocorrelation graph according to the pixel distance, the distance between the pixel point and the centroid, and the number of pixel points corresponding to the pixel distance and the distance between the pixel point and the centroid;
comparing the plurality of distance autocorrelation graphs corresponding to the image to be recognized with a plurality of distance autocorrelation graphs of a template image acquired in advance respectively, and determining the similarity between the image to be recognized and the template image;
and the distance between the pixel point and any other corresponding pixel point is the pixel distance.
In a third aspect, an embodiment of the present invention provides an image feature extraction device, including:
the detection unit is configured to carry out edge detection on the image to obtain a contour image;
the dividing unit is configured to divide the contour image to obtain a plurality of contour sub-images;
a statistical unit configured to, for each of the contour sub-images: determining a centroid of the contour sub-image; calculating the distance between each pixel point of the contour sub-image and the centroid; counting the number of pixel points corresponding to the pixel distance and the distance between the pixel point and the centroid according to the distance between the pixel point and the centroid and a plurality of other pixel points corresponding to the pixel point; and the distance between the pixel point and any other corresponding pixel point is the pixel distance.
In a fourth aspect, an embodiment of the present invention provides an image processing apparatus, including:
the detection unit is configured to perform edge detection on the image to be identified to obtain a contour image;
the dividing unit is configured to divide the contour image to obtain a plurality of contour sub-images;
a statistical unit configured to, for each of the contour sub-images: determining a centroid of the contour sub-image; calculating the distance between each pixel point of the contour sub-image and the centroid; counting the number of pixel points corresponding to the pixel distance and the distance between the pixel point and the centroid according to the distance between the pixel point and the centroid and a plurality of other pixel points corresponding to the pixel point; constructing a distance autocorrelation graph according to the pixel distance, the distance between the pixel point and the centroid, and the number of pixel points corresponding to the pixel distance and the distance between the pixel point and the centroid; the distance between the pixel point and any other corresponding pixel point is the pixel distance;
the determining unit is configured to compare the plurality of distance autocorrelation graphs corresponding to the image to be recognized with the plurality of distance autocorrelation graphs of the pre-acquired template image respectively, and determine the similarity between the image to be recognized and the template image.
The embodiment of the invention adopts at least one technical scheme which can achieve the following beneficial effects: the image feature extraction method is characterized in that space information of pixel points is blended into image features by dividing a contour image; meanwhile, in the statistical process, the information of other pixel points which are away from the pixel points by the pixel distance is considered, and the information of adjacent pixel points can be blended into the image characteristics. Because the obtained image features are fused with the spatial information of the pixel points and the information of the adjacent pixel points, the method can describe the image more accurately, and further can improve the accuracy of image identification.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart of an image feature extraction method according to an embodiment of the present invention;
fig. 2 is a flowchart of an image feature extraction method according to another embodiment of the present invention;
FIG. 3 is a flow chart of a method of image processing according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating the effect of a simulation search based on a distance autocorrelation graph according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating the effect of a simulation search based on a centroid distance histogram according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an image feature extraction apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention, and based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts belong to the scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides an image feature extraction method, which may include the following steps:
step 101: and carrying out edge detection on the image to obtain a contour image.
In an actual application scene, edge detection can be performed on an image by adopting a Sobel operator, a Prewitt operator and the like to obtain a contour image. The contour image is a binary image.
Step 102: and dividing the contour image to obtain a plurality of contour sub-images.
Step 103: for each contour sub-image: the centroid of the contour sub-image is determined.
Step 104: the distance of each pixel point of the contour sub-image from the centroid is calculated.
Step 105: counting the number of pixel points corresponding to the pixel distance and the distance between the pixel point and the mass center according to the distance between the pixel point and the mass center and a plurality of other pixel points corresponding to the pixel point; and the distance between the pixel point and any other corresponding pixel point is the pixel distance.
In consideration of the fact that the relevance between other pixel points adjacent to the pixel point and the pixel point is large, in an actual application scene, the pixel distance is smaller than a specified relevance threshold value. That is, the image feature extraction process only focuses on other pixel points whose corresponding pixel distance is within the relevant threshold.
The method includes the steps that a contour image is divided, and spatial information of pixel points is fused into image characteristics; meanwhile, in the statistical process, the information of other pixel points which are away from the pixel points by the pixel distance is considered, and the information of adjacent pixel points can be blended into the image characteristics. Because the obtained image features are fused with the spatial information of the pixel points and the information of the adjacent pixel points, the method can describe the image more accurately, and further can improve the accuracy of image identification.
In an embodiment of the present invention, step 102 specifically includes:
a1: and determining a rectangular bounding box corresponding to the outline image.
A2: and dividing the contour image into a plurality of contour sub-images according to a preset division threshold value and the rectangular bounding box.
Wherein the division threshold may be predetermined empirically by the user.
A2 specifically comprises: dividing the contour image into n contour sub-images by taking W/n as a unit; wherein the size of the rectangular bounding box is a × b, W = max (a, b), and n is used to characterize the partition threshold.
The contour image is divided according to the rectangular bounding box corresponding to the contour image, and in an actual scene, the contour image can be divided in other modes, for example, the contour image is divided into a plurality of contour sub-images according to a horizontal line passing through the centroid of the contour image.
The method can divide the outline image uniformly through the rectangular bounding box so as to blend the spatial information of the outline image into the image characteristics.
In one embodiment of the invention, the method further comprises:
determining a rectangular bounding box corresponding to the contour image;
determining the minimum value in the distances between the pixel point corresponding to the contour image and the centroid;
determining the maximum value in the distances between the pixel point corresponding to the contour image and the centroid;
standardizing the distance between each pixel point and the centroid according to the rectangular bounding box, the maximum value and the minimum value;
according to the distance between each pixel point and the centroid and a plurality of other pixel points corresponding to each pixel point, the number of the pixel points corresponding to the pixel distance and the distance between the pixel point and the centroid is counted, and the method comprises the following steps:
and counting the number of the pixel points corresponding to the pixel distance and the distance between the pixel point and the mass center according to the standardized distance between the pixel point and the mass center and a plurality of other pixel points corresponding to the pixel point.
The distance difference between different pixel points and the centroid is large, the distance between the pixel points and the centroid is standardized, and calculation can be simplified.
In an embodiment of the present invention, the counting the number of pixels corresponding to the pixel distance and the distance between the pixel point and the centroid according to the distance between the pixel point and the centroid and a plurality of other pixels corresponding to each pixel point includes:
determining whether other pixel points exist on the upper side or the lower side or the left side or the right side of the current pixel point, wherein the distance between the other pixel points and the center of mass is equal to the distance between the current pixel point and the center of mass; the distance between the current pixel point and other pixel points is the current pixel distance;
if yes, adding 1 to the number of pixel points corresponding to the distance between the current pixel and the centroid;
the current pixel point is any pixel point of the contour sub-image, and the current pixel distance is any one of a plurality of preset pixel distances.
In the embodiment of the invention, other pixel points are searched by adopting a four-neighborhood method, namely the upper side, the lower side, the left side and the right side of the current pixel point are concerned. In an actual application scene, other pixel points can be searched by adopting an eight-neighborhood method, namely whether other pixel points exist on the upper side or the lower side or the left side or the right side or the upper left side or the lower left side or the upper right side or the lower right side of the current pixel point is determined.
As shown in fig. 2, an embodiment of the present invention provides an image feature extraction method, including the following steps:
step 201: and carrying out edge detection on the image to obtain a contour image.
And (5) carrying out edge detection on the image by using a Sobel operator to obtain a contour image.
Step 202: and determining a rectangular bounding box corresponding to the outline image.
The size of the rectangular bounding box is a b, and a > b.
Step 203: and dividing the contour image into a plurality of contour sub-images according to a preset division threshold and the rectangular bounding box.
Dividing the contour image into n contour sub-images by taking a/n as a unit; wherein n is used to characterize the partition threshold.
Step 204: for each contour sub-image: the centroid of the profile sub-image is determined.
Pixel point b of contour subimage i Has the coordinates of (x) i ,y i );
Calculating the centroid c (x) of the profile sub-image according to the formula (1) and the formula (2) c ,y c )。
Figure BDA0002154146560000071
Figure BDA0002154146560000072
And N is used for representing the number of pixel points of the contour sub-image.
Step 205: the distance of each pixel point of the contour sub-image from the centroid is calculated.
Figure BDA0002154146560000073
d (bi, c) is used for representing the distance between the pixel point bi and the centroid c.
The distance between the pixel point corresponding to each contour sub-image and the centroid forms a distance matrix.
Step 206: and determining the minimum value in the distances between the pixel point corresponding to the contour image and the centroid.
Step 207: and determining the maximum value in the distances between the pixel points corresponding to the contour images and the centroid.
Step 208: the distance of each pixel point from the centroid is normalized according to the rectangular bounding box, the maximum value and the minimum value.
The distance of the pixel point from the centroid is normalized according to equation (4).
Figure BDA0002154146560000074
Wherein norm _ dis is used for representing the distance between each pixel point and the centroid after standardization, dis is used for representing the distance between the pixel point and the centroid, dis min For characterizing the minimum, dis, of the distances between the pixel point corresponding to the profile image and the centroid max The maximum value of the distances between the corresponding pixel points of the outline image and the centroid is represented, W is used for representing the maximum side length of the rectangular bounding box, and in the embodiment of the invention, W = a.
Step 209: and counting the number of the pixel points corresponding to the pixel distance and the distance between the pixel point and the mass center according to the standardized distance between the pixel point and the mass center and a plurality of other pixel points corresponding to the pixel point.
And the distance between the pixel point and any other corresponding pixel point is the pixel distance.
And (2) sequentially scanning each pixel point of the contour subimage aiming at each pixel distance, and respectively taking each pixel point as a current pixel point to execute the following steps: determining whether other pixel points exist on the upper side or the lower side or the left side or the right side of the current pixel point, wherein the distance between the other pixel points and the center of mass is equal to the distance between the current pixel point and the center of mass; the distance between the current pixel point and other pixel points is the current pixel distance; if yes, adding 1 to the number of the pixel points corresponding to the distance between the current pixel and the centroid, and if not, scanning the next pixel point.
The current pixel point is any pixel point of the contour sub-image, and the current pixel distance is any pixel distance in the pixel distances.
In the embodiment of the present invention, the number of pixels corresponding to the distances between different pixel points and the centroid needs to be counted for each pixel distance. For example, the pixel distance includes: 1. 3, 5 and 7, the distance between the pixel point and the centroid comprises: 1. 2, 3.. 50, the method needs to count the number of pixel points when the pixel distances are 1, 3, 5 and 7 respectively and the distances between the pixel points and the centroid are 1-50 respectively. For example, when the distance between a pixel and the centroid is 1-50, counting the number of corresponding pixel points; counting the number of corresponding pixel points when the pixel distance is 3 and the distance between the pixel point and the centroid is 1-50;
in the process of scanning each pixel point of the contour subimage, each pixel point can be scanned according to the arrangement sequence of the pixel points in the distance matrix, so that the problem that the statistical result is inaccurate due to errors in the statistical process is avoided.
The number of pixels corresponding to the pixel distance and the distance between the pixel point and the centroid can be expressed as a matrix of K rows and M columns, wherein the pixel distance corresponding to each row is different, and the distance between the pixel point corresponding to each column and the centroid is different. From this matrix, a distance autocorrelation map can be generated. In the process of image recognition, the similarity of the two images can be determined by comparing the corresponding distance autocorrelation graphs of the profile sub-images.
As shown in fig. 3, an embodiment of the present invention provides an image processing method, including:
step 301: carrying out edge detection on an image to be identified to obtain a contour image;
step 302: dividing the contour image to obtain a plurality of contour sub-images;
step 303; for each contour sub-image: determining the mass center of the contour sub-image;
step 304: calculating the distance between each pixel point of the contour sub-image and the centroid;
step 305: counting the number of pixel points corresponding to the pixel distance and the distance between the pixel point and the mass center according to the distance between the pixel point and the mass center and a plurality of other pixel points corresponding to the pixel point; the distance between a pixel point and any other corresponding pixel point is the pixel distance;
step 306: constructing a distance autocorrelation graph corresponding to the contour sub-image according to the pixel distance, the distance between the pixel point and the mass center, and the number of pixel points corresponding to the pixel distance and the distance between the pixel point and the mass center;
step 307: comparing a plurality of distance autocorrelation graphs corresponding to the image to be recognized with a plurality of distance autocorrelation graphs of the template image acquired in advance respectively, and determining the similarity of the image to be recognized and the template image.
And establishing a coordinate system by taking the pixel distance, the distance between the pixel point and the mass center, and the number of pixel points corresponding to the pixel distance and the distance between the pixel point and the mass center as coordinate axes to obtain a distance autocorrelation graph.
As shown in fig. 4, the simulated search effect graph based on the distance autocorrelation graph, and as shown in fig. 5, the simulated search effect graph based on the centroid distance histogram. As can be seen from comparison between FIG. 4 and FIG. 5, the simulation retrieval based on the distance autocorrelation graph has high accuracy and better effect. That is to say, "the number of pixels corresponding to the pixel distance and the distance between the pixel point and the centroid" extracted from the image takes into account the spatial information of the pixels and the information of other adjacent pixels, so that the accuracy of image description is improved, and the accuracy of image recognition is further improved.
As shown in fig. 6, an image feature extraction device includes:
a detection unit 601 configured to perform edge detection on the image to obtain a contour image;
a dividing unit 602 configured to divide the contour image to obtain a plurality of contour sub-images;
a statistics unit 603 configured to, for each contour sub-image: determining the centroid of the contour sub-image; calculating the distance between each pixel point of the contour sub-image and the centroid; counting the number of pixels corresponding to the pixel distance and the distance between the pixel point and the centroid according to the distance between each pixel point and the centroid and a plurality of other pixels corresponding to each pixel point; and the distance between the pixel point and any other corresponding pixel point is the pixel distance.
In an embodiment of the present invention, the dividing unit 602 is configured to determine a rectangular bounding box corresponding to the outline image; and dividing the contour image into a plurality of contour sub-images according to a preset division threshold value and the rectangular bounding box.
In one embodiment of the present invention, the dividing unit 602 is configured to divide the contour image into n contour sub-images in units of W/n; wherein the size of the rectangular bounding box is a × b, W = max (a, b), and n is used to characterize the partition threshold.
In one embodiment of the invention, the apparatus comprises: a normalization unit;
the normalizing unit is configured to determine a rectangular bounding box corresponding to the outline image; determining the minimum value in the distances between the pixel point corresponding to the contour image and the centroid; determining the maximum value in the distances between the pixel point corresponding to the contour image and the centroid; standardizing the distance between each pixel point and the centroid according to the rectangular bounding box, the maximum value and the minimum value;
the counting unit 603 is configured to count the number of pixels corresponding to the pixel distance and the distance between the pixel point and the centroid according to the standardized distance between each pixel point and the centroid and a plurality of other pixel points corresponding to each pixel point.
In an embodiment of the present invention, the statistical unit 603 is configured to determine whether there are other pixel points on the upper side or the lower side or the left side or the right side of the current pixel point, where the distance between the other pixel points and the centroid is equal to the distance between the current pixel point and the centroid; the distance between the current pixel point and other pixel points is the current pixel distance; if yes, adding 1 to the number of pixel points corresponding to the distance between the current pixel and the centroid; the current pixel point is any pixel point of the contour sub-image, and the current pixel distance is any one of a plurality of preset pixel distances.
As shown in fig. 7, an embodiment of the present invention provides an image processing apparatus including:
the detection unit 701 is configured to perform edge detection on an image to be identified to obtain a contour image;
a dividing unit 702 configured to divide the contour image to obtain a plurality of contour sub-images;
a statistical unit 703 configured to, for each contour sub-image: determining the centroid of the contour sub-image; calculating the distance between each pixel point of the contour subimage and the centroid; counting the number of pixel points corresponding to the pixel distance and the distance between the pixel point and the mass center according to the distance between the pixel point and the mass center and a plurality of other pixel points corresponding to the pixel point; constructing a distance autocorrelation graph according to the pixel distance, the distance between the pixel point and the centroid, and the number of pixel points corresponding to the pixel distance and the distance between the pixel point and the centroid; the distance between a pixel point and any other corresponding pixel point is the pixel distance;
the determining unit 704 is configured to compare the distance autocorrelation graphs corresponding to the image to be recognized with the distance autocorrelation graphs of the pre-acquired template image, and determine similarity between the image to be recognized and the template image.
Embodiments of the present invention provide a computer-readable storage medium having computer-readable instructions stored thereon, the computer-readable instructions being executable by a processor to implement the method of any of the above embodiments.
An embodiment of the present invention provides an image feature extraction device, including: a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the apparatus to perform the method of any of the embodiments described above.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development, but the original code before compiling is also written in a specific Programming Language, which is called Hardware Description Language (HDL), and the HDL is not only one kind but many kinds, such as abll (Advanced boot Expression Language), AHDL (alternate hard Description Language), traffic, CUPL (computer universal Programming Language), HDCal (Java hard Description Language), lava, lola, HDL, PALASM, software, rhydl (Hardware Description Language), and vhul-Language (vhyg-Language), which is currently used in the field. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be regarded as a hardware component and the means for performing the various functions included therein may also be regarded as structures within the hardware component. Or even means for performing the functions may be conceived to be both a software module implementing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the various elements may be implemented in the same one or more pieces of software and/or hardware in the practice of the present application.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. The use of the phrase "including a" does not exclude the presence of other, identical elements in the process, method, article, or apparatus that comprises the same element, whether or not the same element is present in all of the same element.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (12)

1. An image feature extraction method, comprising:
performing edge detection on the image to obtain a contour image;
dividing the contour image to obtain a plurality of contour sub-images;
for each of the contour sub-images: determining the mass center of the contour subimage according to the coordinates of the pixel points of the contour subimage; calculating the distance between each pixel point of the contour sub-image and the centroid; counting the number of pixels corresponding to the pixel distance and the distance between the pixel point and the centroid according to the distance between each pixel point and the centroid and a plurality of other pixels corresponding to each pixel point; and the distance between the pixel point and any other corresponding pixel point is the pixel distance.
2. The method of claim 1, wherein the first and second light sources are selected from the group consisting of a red light source, a green light source, and a blue light source,
dividing the contour image to obtain a plurality of contour sub-images, comprising:
determining a rectangular bounding box corresponding to the outline image;
and dividing the contour image into the plurality of contour sub-images according to a preset division threshold and the rectangular bounding box.
3. The method as set forth in claim 2, wherein,
dividing the contour image into the plurality of contour sub-images according to a preset division threshold and the rectangular bounding box, wherein the method comprises the following steps:
dividing the contour image into n contour sub-images by taking W/n as a unit;
wherein the rectangular bounding box has a size a × b, W = max (a, b), and n is used to characterize the partition threshold.
4. The method of claim 1, further comprising:
determining a rectangular bounding box corresponding to the outline image;
determining the minimum value in the distances between the pixel point corresponding to the contour image and the centroid;
determining the maximum value in the distances between the pixel point corresponding to the contour image and the centroid;
normalizing the distance of each pixel point from the centroid according to the rectangular bounding box, the maximum value and the minimum value;
according to the distance between each pixel point and the centroid and a plurality of other pixel points corresponding to each pixel point, counting the number of the pixel points corresponding to the pixel distance and the distance between the pixel point and the centroid, and comprising the following steps:
and counting the number of the pixel points corresponding to the pixel distance and the distance between the pixel point and the centroid according to the standardized distance between each pixel point and the centroid and a plurality of other pixel points corresponding to each pixel point.
5. The method according to claim 1 to 4,
according to the distance between each pixel point and the centroid and a plurality of other pixel points corresponding to each pixel point, counting the number of the pixel points corresponding to the pixel distance and the distance between the pixel point and the centroid, and comprising the following steps:
determining whether the other pixel points exist on the upper side or the lower side or the left side or the right side of the current pixel point, wherein the distance between the other pixel points and the center of mass is equal to the distance between the current pixel point and the center of mass; the distance between the current pixel point and the other pixel points is the current pixel distance;
if yes, adding 1 to the number of pixel points corresponding to the current pixel distance and the distance between the current pixel point and the centroid;
the current pixel point is any pixel point of the contour sub-image, and the current pixel distance is any one of a plurality of preset pixel distances.
6. An image processing method comprising:
carrying out edge detection on an image to be identified to obtain a contour image;
dividing the contour image to obtain a plurality of contour sub-images;
for each of the contour sub-images: determining the centroid of the contour sub-image according to the coordinates of the pixel points of the contour sub-image; calculating the distance between each pixel point of the contour sub-image and the centroid; counting the number of pixels corresponding to the pixel distance and the distance between the pixel point and the centroid according to the distance between each pixel point and the centroid and a plurality of other pixels corresponding to each pixel point; constructing a distance autocorrelation graph according to the pixel distance, the distance between the pixel point and the centroid, and the number of pixel points corresponding to the pixel distance and the distance between the pixel point and the centroid;
comparing the plurality of distance autocorrelation graphs corresponding to the image to be recognized with a plurality of distance autocorrelation graphs of a template image acquired in advance respectively, and determining the similarity between the image to be recognized and the template image;
and the distance between the pixel point and any other corresponding pixel point is the pixel distance.
7. An image feature extraction device comprising:
the detection unit is configured to carry out edge detection on the image to obtain a contour image;
the dividing unit is configured to divide the contour image to obtain a plurality of contour sub-images;
a statistical unit configured to, for each of the contour sub-images: determining the centroid of the contour sub-image according to the coordinates of the pixel points of the contour sub-image; calculating the distance between each pixel point of the contour sub-image and the centroid; counting the number of pixel points corresponding to the pixel distance and the distance between the pixel point and the centroid according to the distance between the pixel point and the centroid and a plurality of other pixel points corresponding to the pixel point; and the distance between the pixel point and any other corresponding pixel point is the pixel distance.
8. The apparatus as set forth in claim 7,
the dividing unit is configured to determine a rectangular bounding box corresponding to the outline image; and dividing the contour image into the plurality of contour sub-images according to a preset division threshold and the rectangular bounding box.
9. The apparatus as set forth in claim 8, wherein,
the dividing unit is configured to divide the contour image into n contour sub-images by taking W/n as a unit; wherein the rectangular bounding box has a size of a × b, W = max (a, b), and n is used to characterize the partition threshold.
10. The apparatus of claim 7, further comprising: a normalization unit;
the normalization unit is configured to determine a rectangular bounding box corresponding to the outline image; determining the minimum value in the distances between the pixel point corresponding to the contour image and the centroid; determining the maximum value in the distances between the pixel point corresponding to the contour image and the centroid; normalizing the distance of each pixel point from the centroid according to the rectangular bounding box, the maximum value and the minimum value;
the statistical unit is configured to count the number of the pixel points corresponding to the pixel distance and the distance between the pixel point and the centroid according to the standardized distance between each pixel point and the centroid and a plurality of other pixel points corresponding to each pixel point.
11. The apparatus of any one of claims 7-10,
the statistical unit is configured to determine whether the other pixel points exist on the upper side or the lower side or the left side or the right side of the current pixel point, wherein the distance between the other pixel points and the centroid is equal to the distance between the current pixel point and the centroid; the distance between the current pixel point and the other pixel points is the current pixel distance; if yes, adding 1 to the number of pixel points corresponding to the current pixel distance and the distance between the current pixel point and the centroid; the current pixel point is any pixel point of the contour sub-image, and the current pixel distance is any one of a plurality of preset pixel distances.
12. An image processing apparatus comprising:
the detection unit is configured to perform edge detection on the image to be identified to obtain a contour image;
the dividing unit is configured to divide the contour image to obtain a plurality of contour sub-images;
a statistical unit configured to, for each of the contour sub-images: determining the centroid of the contour sub-image according to the coordinates of the pixel points of the contour sub-image; calculating the distance between each pixel point of the contour sub-image and the centroid; counting the number of pixel points corresponding to the pixel distance and the distance between the pixel point and the centroid according to the distance between the pixel point and the centroid and a plurality of other pixel points corresponding to the pixel point; constructing a distance autocorrelation graph according to the pixel distance, the distance between the pixel point and the centroid, and the number of pixel points corresponding to the pixel distance and the distance between the pixel point and the centroid; the distance between the pixel point and any other corresponding pixel point is the pixel distance;
the determining unit is configured to compare the plurality of distance autocorrelation graphs corresponding to the image to be recognized with the plurality of distance autocorrelation graphs of the pre-acquired template image respectively, and determine the similarity between the image to be recognized and the template image.
CN201910715981.0A 2019-08-02 2019-08-02 Image feature extraction method and device, and image processing method and device Active CN110503109B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910715981.0A CN110503109B (en) 2019-08-02 2019-08-02 Image feature extraction method and device, and image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910715981.0A CN110503109B (en) 2019-08-02 2019-08-02 Image feature extraction method and device, and image processing method and device

Publications (2)

Publication Number Publication Date
CN110503109A CN110503109A (en) 2019-11-26
CN110503109B true CN110503109B (en) 2023-04-07

Family

ID=68588007

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910715981.0A Active CN110503109B (en) 2019-08-02 2019-08-02 Image feature extraction method and device, and image processing method and device

Country Status (1)

Country Link
CN (1) CN110503109B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101334794B1 (en) * 2012-08-08 2013-11-29 성균관대학교산학협력단 Flower recognition method and apparatus using feature extraction
CN103679174A (en) * 2013-12-04 2014-03-26 中国科学院深圳先进技术研究院 Shape descriptor generating method and device
CN105592367A (en) * 2015-12-23 2016-05-18 青岛海信电器股份有限公司 Image display parameter adjusting method and system
WO2018234251A1 (en) * 2017-06-20 2018-12-27 Volkswagen Aktiengesellschaft Method and device for detecting a user input on the basis of a gesture

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7149356B2 (en) * 2002-07-10 2006-12-12 Northrop Grumman Corporation System and method for template matching of candidates within a two-dimensional image

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101334794B1 (en) * 2012-08-08 2013-11-29 성균관대학교산학협력단 Flower recognition method and apparatus using feature extraction
CN103679174A (en) * 2013-12-04 2014-03-26 中国科学院深圳先进技术研究院 Shape descriptor generating method and device
CN105592367A (en) * 2015-12-23 2016-05-18 青岛海信电器股份有限公司 Image display parameter adjusting method and system
WO2018234251A1 (en) * 2017-06-20 2018-12-27 Volkswagen Aktiengesellschaft Method and device for detecting a user input on the basis of a gesture

Also Published As

Publication number Publication date
CN110503109A (en) 2019-11-26

Similar Documents

Publication Publication Date Title
CN107274442B (en) Image identification method and device
CN107633526B (en) Image tracking point acquisition method and device and storage medium
TWI694381B (en) Image processing method and device
KR102316230B1 (en) Image processing method and device
US10964050B2 (en) Method for identifying foreground object in image and electronic device
WO2021147817A1 (en) Text positioning method and system, and text positioning model training method and system
US10062007B2 (en) Apparatus and method for creating an image recognizing program having high positional recognition accuracy
CN102667810A (en) Face recognition in digital images
CN109034183A (en) A kind of object detection method, device and equipment
KR102421604B1 (en) Image processing methods, devices and electronic devices
CN112365513A (en) Model training method and device
CN114440903A (en) High-precision map construction method and device, storage medium and electronic equipment
WO2019000746A1 (en) Method for switching text color of control, and system, electronic device and storage medium
CN117197781B (en) Traffic sign recognition method and device, storage medium and electronic equipment
CN107292002A (en) Method and device for reconstructing digital core
CN108280135B (en) Method and device for realizing visualization of data structure and electronic equipment
CN110503109B (en) Image feature extraction method and device, and image processing method and device
CN116728436A (en) Control method and control device of playing robot
CN114863206A (en) Model training method, target detection method and device
CN115984154A (en) Image fusion method and device, storage medium and electronic equipment
CN110866478B (en) Method, device and equipment for identifying object in image
CN110782425A (en) Image processing method, image processing device and electronic equipment
CN115004245A (en) Target detection method, target detection device, electronic equipment and computer storage medium
CN111881959B (en) Method and device for identifying image difference
CN117372286B (en) Python-based image noise optimization method and system

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40017586

Country of ref document: HK

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20201012

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20201012

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

GR01 Patent grant
GR01 Patent grant