CN107146245B - Image matching method and device - Google Patents

Image matching method and device Download PDF

Info

Publication number
CN107146245B
CN107146245B CN201710312028.2A CN201710312028A CN107146245B CN 107146245 B CN107146245 B CN 107146245B CN 201710312028 A CN201710312028 A CN 201710312028A CN 107146245 B CN107146245 B CN 107146245B
Authority
CN
China
Prior art keywords
image
reference image
image data
extended
expanded
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
CN201710312028.2A
Other languages
Chinese (zh)
Other versions
CN107146245A (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.)
Beijing Jingdong Qianshi Technology Co Ltd
Original Assignee
Tianjin Jingdong Shentuo Robot 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 Tianjin Jingdong Shentuo Robot Technology Co ltd filed Critical Tianjin Jingdong Shentuo Robot Technology Co ltd
Priority to CN201710312028.2A priority Critical patent/CN107146245B/en
Publication of CN107146245A publication Critical patent/CN107146245A/en
Application granted granted Critical
Publication of CN107146245B publication Critical patent/CN107146245B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • G06T7/33Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods
    • G06T7/337Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods involving reference images or patches

Landscapes

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

Abstract

The application discloses an image matching method and device. One embodiment of the method comprises: acquiring a reference image, wherein the reference image comprises image data arranged in a matrix; expanding the reference image to generate a plurality of expanded reference images, wherein the number of rows of image data contained in each expanded reference image is the same as the number of rows of image data contained in the reference image, and the number of columns of image data contained in each expanded reference image is equal to and greater than the number of columns of image data contained in the reference image; extracting a target image with the same size as the extended reference image from the image to be identified by adopting a direct memory access mode; and performing cross-correlation matching operation on the target image and each extended reference image to determine whether the target image is matched with the reference image. The embodiment enlarges the size of the target image to be matched by expanding the reference image, thereby improving the efficiency of image matching.

Description

Image matching method and device
Technical Field
The present application relates to the field of image processing, and in particular, to an image matching method and apparatus.
Background
With the development of scientific technology, image matching has become a very important technology in the field of image information processing. The image matching technology research relates to image acquisition, image preprocessing, image segmentation and the like, and is combined with a computer vision and numerical calculation method and the like. With the wide application of image matching technology, new applications and new requirements are gradually generated, so that the requirements of image matching technology are faster, more stable and more accurate.
The cross-correlation matching algorithm based on the digital signal processor can improve the accuracy of image matching, so that the image matching technology is applied to a plurality of advanced technical fields such as unmanned vehicles, unmanned planes and the like. In the process of image matching by using the digital signal processor, it is necessary to transfer image data stored externally to the digital signal processor by Direct Memory Access (DMA) to perform matching operation. However, due to the characteristics of the dma function, the time for the dsp to perform the matching operation may be shorter than the time for transferring data to the dsp during the image matching process. That is, in the process of performing both the matching operation and the data transfer operation at the same time, the data preparation time exceeds the data matching operation time. This results in a reduction in the efficiency of image matching and a waste of computing resources.
Disclosure of Invention
It is an object of the present application to provide an improved image matching method and apparatus to solve the technical problems mentioned in the background section above.
In a first aspect, the present application provides an image matching method, including: acquiring a reference image, wherein the reference image comprises image data arranged in a matrix; expanding the reference image to generate a plurality of expanded reference images, wherein the number of rows of image data contained in each expanded reference image is the same as the number of rows of image data contained in the reference image, and the number of columns of image data contained in each expanded reference image is equal to and greater than the number of columns of image data contained in the reference image; extracting a target image with the same size as the extended reference image from the image to be identified by adopting a direct memory access mode; and performing cross-correlation matching operation on the target image and each extended reference image to determine whether the target image is matched with the reference image.
In some embodiments, the expanding the reference image to generate a plurality of expanded reference images includes: generating a plurality of expansion templates, wherein each expansion template comprises initial image data arranged in a matrix, each expansion template comprises an area to be superposed and an expansion area, and the positions of the areas to be superposed in each expansion template are different from each other; superposing the image data of the reference image and the initial image data of the area to be superposed in each expanded template to generate a plurality of expanded reference images; the number of rows of the initial image data of the expanded template is equal to the number of rows of the image data of the reference image, and the number of columns of the initial image data of the area to be superposed is equal to the number of columns of the image data of the reference image.
In some embodiments, the number of the expansion templates is 4n, where n is a preset positive integer; the initial image data in matrix arrangement in each expansion template is zero.
In some embodiments, the extension area comprises a list of the initial image data, each extension template comprises 4n-1 extension areas, and each extension area is positioned on one side or two sides of the area to be overlapped, so that the positions of the areas to be overlapped are different from each other in different extension templates.
In some embodiments, the extracting a target image with a size equal to that of the extended reference image from the image to be recognized by using a direct memory access method includes: acquiring an image to be identified by using an image sensor, analyzing the image to be identified, and caching the image to be identified to an external memory; and extracting the target image with the size equal to that of the extended reference image from the external memory by adopting a direct memory access mode.
In some embodiments, the image data addresses of the target image are aligned with the bus addresses.
In a second aspect, the present application provides an image matching apparatus, comprising: the device comprises a reference image acquisition module, a processing module and a display module, wherein the reference image acquisition module is configured to acquire a reference image, and the reference image comprises image data arranged in a matrix; the extended reference image generation module is configured to extend the reference image to generate a plurality of extended reference images, wherein the number of rows of image data included in each extended reference image is the same as the number of rows of image data included in the reference image, and the number of columns of image data included in each extended reference image is equal to and greater than the number of columns of image data included in the reference image; the target image extraction module is configured to extract a target image with the size equal to that of the extended reference image from the image to be identified by adopting a direct memory access mode; and the matching operation module is configured for performing cross-correlation matching operation on the target image and each extended reference image to determine whether the target image is matched with the reference image.
In some embodiments, the extended reference image generation module comprises: the system comprises an expansion template generating unit, a storage unit and a display unit, wherein the expansion template generating unit is configured to generate a plurality of expansion templates, each expansion template comprises initial image data arranged in a matrix, each expansion template comprises an area to be superposed and an expansion area, and the positions of the areas to be superposed in each expansion template are different from each other; the superposition unit is configured to superpose the image data of the reference image and the initial image data of the region to be superposed in each expansion template to generate a plurality of expansion reference images; the number of rows of the initial image data of the expanded template is equal to the number of rows of the image data of the reference image, and the number of columns of the initial image data of the area to be superposed is equal to the number of columns of the image data of the reference image.
In some embodiments, the number of the expansion templates is 4n, where n is a preset positive integer; the initial image data in matrix arrangement in each expansion template is zero.
In some embodiments, the extension area comprises a column of image data, each extension template comprises 4n-1 extension areas, and each extension area is positioned on one side or two sides of the area to be overlapped, so that the areas to be overlapped are positioned in different positions in different extension templates.
In some embodiments, the target image extraction module is further configured to: acquiring an image to be identified by using an image sensor, analyzing the image to be identified, and caching the image to be identified to an external memory; and extracting the target image with the size equal to that of the extended reference image from the external memory by adopting a direct memory access mode.
In some embodiments, the image data addresses of the target image are aligned with the bus addresses.
In a third aspect, the present application provides a digital signal processing apparatus comprising: one or more processors; storage means for storing one or more programs; when executed by one or more processors, cause the one or more processors to implement any of the methods described above.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs any of the methods described above.
The image matching method and the device provided by the application, after a reference image is obtained, firstly, the reference image is expanded to generate a plurality of expanded reference images, the row number of image data of each expanded reference image is equal to the row number of the image data of the reference image, the column number of the image data of each expanded reference image is larger than the column number of the image data of the reference image, then, a target image with the size equal to that of each expanded reference image is extracted from an image to be identified by adopting a direct memory access mode, finally, the target image and each expanded reference image are subjected to cross-correlation matching operation to determine whether the target image can be matched with the reference image or not, the expanded reference image is generated by expanding the reference image, so that the size of the target image for the cross-correlation matching operation with each expanded reference image is larger than that of the reference image, and the times of extracting the target image from the image to be identified can be, the efficiency of image matching is improved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, with reference to the accompanying drawings in which:
FIG. 1 illustrates an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 shows a flow diagram of an embodiment of an image matching method according to the present application;
FIG. 3 shows a flow diagram of another embodiment of an image matching method according to the present application;
4A-4J illustrate schematic diagrams of an application scenario of the image matching method according to the present application;
FIG. 5 shows a schematic structural diagram of an embodiment of an image matching apparatus according to the present application;
fig. 6 shows a schematic block diagram of a digital signal processing system suitable for use in implementing an electronic device of an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 shows an exemplary system architecture 100 to which embodiments of the image matching method or image matching apparatus of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a digital signal processor 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the digital signal processor 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 101, 102, 103 to interact with the digital signal processor 105 via the network 104 to receive or transmit images, etc. Various client applications, such as a web browser application, image processing software, search-type applications, a mailbox client, social platform software, etc., may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting Picture browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture experts Group Audio Layer III, mpeg compression standard Audio Layer 3), MP4 players (Moving Picture experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop portable computers, desktop computers, and the like.
The digital signal processor 105 may be a processor that provides various services, such as an image processor that provides support for image processor software on the terminal devices 101, 102, 103. The image processor may perform processing such as matching on the pattern to be recognized, and feed back the processing result (e.g., matching result) to the terminal device.
It should be noted that the image matching method provided in the embodiment of the present application is generally executed by the digital signal processor 105, and accordingly, the image matching apparatus is generally disposed in the digital signal processor 105.
It should be understood that the number of terminal devices, networks, and digital signal processors in fig. 1 are merely illustrative. There may be any number of terminal devices, networks, and digital signal processors, as desired for an implementation.
Continuing to refer to FIG. 2, a flow 200 of an embodiment of an image matching method according to the present application is shown. The image matching method provided by the embodiment can be applied to electronic equipment with certain computing capability, such as a digital signal processor and the like. The image matching method provided by the embodiment may include the following steps:
step 201, acquiring a reference image.
In this embodiment, the electronic device may acquire a reference image for image matching from a reference image library that stores reference images set in advance. The reference image library may be stored in a memory of the electronic device, or may be provided in an external memory of the electronic device. The reference image may be a rectangular image with a fixed size, and the reference image may be composed of a plurality of image data arranged in a matrix, for example, the reference image may be a gray scale image, where the image data may be a value of 0 to 255 for representing the gray scale value of each pixel in the reference image.
Step 202, expanding the reference image to generate a plurality of expanded reference images.
In this embodiment, based on the reference image obtained in step 201, the electronic device may expand the reference image to generate a plurality of expanded reference images having a size larger than that of the reference image. Specifically, the number of lines of the image data included in each extended reference image may be equal to the number of lines of the image data included in the reference image, and the number of columns of the image data included in each extended reference image may be greater than the number of columns of the image data included in the reference image. It can be seen that each extended reference picture may be similar to the shape of the reference picture, that is, the shape of each extended reference picture may also be a rectangle, and the length of each extended reference picture in the column direction is the same as the length of the reference picture in the column direction. Further, the number of columns of image data included in each extended reference image may be greater than the number of columns of image data included in the reference image. That is, the length of each extended reference image in the row direction may be larger than the length of the above-described reference image in the row direction.
Step 203, extracting a target image with the size equal to that of the extended reference image from the image to be identified by adopting a direct memory access mode.
In this embodiment, the electronic device may extract a target image from an image to be recognized by using a direct memory access method, where the size of the target image may be equal to the size of each extended reference image, so as to determine whether the target image matches the extended reference image by calculating the similarity between the target image and each extended reference image. It can be understood that the size of the extended reference image is larger than that of the reference image, so that the size of the target image is larger than that of the reference image, and compared with the case of acquiring the target image with the same size as the reference image, the method of the embodiment can reduce the number of times of extracting the target image from the image to be recognized.
And step 204, performing cross-correlation matching operation on the target image and each extended reference image to determine whether the target image is matched with the reference image.
In this embodiment, based on the target image extracted in step 203, the electronic device may perform a cross-correlation matching operation on the target image and each extended reference image by using a cross-correlation matching algorithm, and then obtain a result of the matching operation on the target image and each extended reference image. The electronic device may determine whether the target image and the reference image match each other according to a result of the matching operation. For example, if there is a mutual match between the result of any extended reference image and the target image matching operation, it may be determined that the reference image used to generate the extended reference image and the target image match with each other. It can be seen that the reference image can be matched to a target image with a size larger than that of the reference image through the generated extended reference image.
In the prior art, the time required for extracting the target image from the image to be recognized by adopting a direct memory access mode is usually longer than the time for performing one-time matching operation on the reference image and the target image by adopting a cross-correlation matching algorithm, which causes that electronic equipment cannot continuously perform matching operation and causes the waste of computing resources. Therefore, the image matching method of the embodiment performs the cross-correlation matching operation on the multiple extended reference images with the sizes larger than the reference image and the target image, that is, the target image can be extracted once, so that the computing resources of the electronic device can be fully utilized, the number of times that the target image can be extracted from the image to be recognized can be reduced by the target image with the sizes larger than the reference image, and the image matching speed is improved.
According to the image matching method provided by the embodiment of the application, firstly, a plurality of extended reference images with the size larger than that of the reference image are generated by using the reference image, then the target images with the size same as that of the extended reference images are extracted from the images to be recognized, and then the extended reference images and the target images are subjected to cross-correlation matching operation to determine the target images matched with the reference images in the images to be recognized.
With continuing reference to FIG. 3, which illustrates a flow 300 according to another embodiment of an image matching method of the present application, the flow 300 may include the steps of:
step 301, a reference image is acquired.
In this embodiment, an electronic device (e.g., a digital signal processor) may obtain a reference image for image matching from a preset reference image library storing reference images. The reference image may be a rectangular image, and the reference image may include image data arranged in a rectangle.
Step 302, generate a plurality of expanded templates.
In this implementation, the electronic device may further generate a plurality of extension templates. Each expansion template may include initial image data arranged in a matrix, and each expansion template may include a region to be superimposed, which may be used to superimpose image data of a reference image, and an expansion region. It should be noted that, the positions of the regions to be superimposed in the above-mentioned expansion templates are different from each other.
Here, the number of rows of the initial image data of the extended template may be equal to the number of rows of the image data of the reference image, the number of columns of the initial image data of the region to be superimposed in the extended template may be equal to the number of columns of the image data of the reference image, that is, the length of the extended template in the column direction may be equal to the length of the reference image in the column direction, and the length of the region to be superimposed of the extended template in the row direction may be equal to the length of the reference image in the row direction.
And 303, overlapping the image data of the reference image with the initial image data of the region to be overlapped in each extended template to generate a plurality of extended reference images.
In this embodiment, based on the plurality of extended templates generated in step 302, the electronic device may superimpose the reference image and the region to be superimposed in each extended template, that is, may superimpose the image data of the reference image and the initial image data of the region to be superimposed in each extended template, so as to generate a plurality of extended reference images. As can be seen, each generated extended reference image may include an overlapping region where the reference image has been overlapped and an extended region in the corresponding extended template, and the image data of each extended region is still the initial image data.
In some optional implementation manners of this embodiment, the electronic device may generate 4n expansion templates, where n may be a preset positive integer. For example, n may be 1, 2, 3, or the like, that is, the electronic device may generate 4 extended templates, 8 extended templates, or 12 extended templates, or the like.
In some optional implementation manners of this embodiment, the reference image may be a grayscale map, the image data of the reference image may be a numerical value from 0 to 255, and the initial image data included in each of the expansion templates may be "0". Therefore, when the image data of the reference image is superimposed on the initial image data of the region to be superimposed in the extended template, the image data of the region in the extended template on which the reference image is superimposed is generated to be the same as the image data of the reference image, and the image data of the extended region in the extended template on which the reference image is not superimposed is still the initial image data "0". It can be seen that the positions of the regions to be superimposed in different extended templates are different, and the regions in which the reference images are superimposed are also different, i.e. the corresponding generated extended reference images are different.
In some optional implementations of the present embodiment, the extension regions in the extension template may include a list of initial image data, and each extension template may include 4n-1 extension regions. The extension areas can be positioned on one side or two sides of the area to be overlapped, so that the positions of the area to be overlapped in different extension templates are different from each other. For example, if the preset positive integer n may be 1, the electronic device may generate 4 expansion templates, each expansion template may include one to-be-superimposed region and 3 expansion regions, and the 3 expansion regions may be respectively disposed on one side or two sides of the to-be-superimposed region, so that the 4 expansion templates are different from each other.
And 304, acquiring the image to be identified by using the image sensor, analyzing the image to be identified, and caching the image to be identified to an external memory.
In this embodiment, the electronic device may be connected to an external image sensor, and the image sensor may capture an image to be recognized, so that the electronic device may acquire the image to be recognized. And then the electronic equipment can analyze the image to be identified, generate a gray scale map which can be used for matching operation, and cache the analyzed image to be identified into an external memory. It should be noted that the size of the image to be recognized collected by the image sensor is usually large, and if the electronic device does not have enough memory to store the image to be recognized, the image to be recognized may be stored in a preset external storage.
It can be understood that, if the size of the image to be recognized collected by the image sensor is small, the electronic device has enough memory to store the analyzed image to be recognized, and at this time, the analyzed image to be recognized may also be directly stored in the memory of the electronic device without being stored in an external storage.
In step 305, a target image with the same size as the extended reference image is extracted from the external memory by direct memory access.
In this embodiment, based on the image to be recognized stored in the external storage in step 304, the electronic device may extract the target image from the image to be recognized stored in the external storage in a direct memory access manner, and the size of the target image is the same as that of the extended reference image generated in step 303. Generally, the size of the image to be recognized acquired by the image sensor is large, and the electronic device needs to extract different target images from the image to be recognized for multiple times so as to complete matching between the reference image and the image to be recognized.
It can be understood that, when the parsed image to be recognized is stored in the memory of the electronic device, the electronic device may directly extract the target image with the size equal to that of the extended reference image from the image to be recognized in the memory.
In some optional implementations of the embodiment, the address of the image data of the target image is aligned with the bus address, which may further increase the speed of extracting the target image.
Step 306, performing cross-correlation matching operation on the target image and each extended reference image to determine whether the target image is matched with the reference image.
In this embodiment, the electronic device may perform a cross-correlation matching operation on the target image extracted from the image to be recognized and each of the extended reference images. It is understood that the size of the image to be recognized is large, and the electronic device may extract a plurality of target images from the image to be recognized and perform cross-correlation matching on each target image and each extended reference image. When there is a cross-correlation match between any target image and any extended reference image as a result of a match, it may be determined that the reference image used to generate the extended reference image and the target image match each other.
Generally, the electronic device may generate 4n extended templates to form 4n different extended reference images, where a value of the preset positive integer n may be set according to a computing capability of the electronic device. That is, n may take a larger value if the computing speed of the electronic device is relatively fast.
As an application scenario, as shown in fig. 4A to 4J, the image matching method of the present embodiment may match a reference image shown in fig. 4B in an image to be recognized shown in fig. 4A, for example. For example, the electronic device may generate 4 expansion templates, as shown in fig. 4C to 4F, each expansion template may include an area to be superimposed and an expansion area, as shown in the figure, and positions of the areas to be superimposed in different expansion templates are different from each other. Superimposing the image data of the reference image shown in fig. 4B on the initial image data of the region to be superimposed in the extended template shown in fig. 4C to 4F may generate extended reference images as shown in fig. 4G to 4J, and it is seen that the size of each extended reference image may be larger than that of the reference image. The electronic device can extract a plurality of target images with the same size as the extended reference image shown in fig. 4G-4J from the image to be recognized shown in fig. 4A, and perform cross-correlation matching operation on each target image and the extended reference image shown in fig. 4G-4J, so that the identification of the target image matched with the reference image shown in fig. 4B in the image to be recognized shown in fig. 4A through the extended reference image shown in fig. 4G-4J can be realized.
According to the image matching method provided by the embodiment of the application, the reference images are firstly superimposed to the to-be-superimposed areas of the extended templates to generate the multiple extended reference images, then the target images with the same size as the extended reference images are extracted from the to-be-recognized images stored in the external memory, and the target images are matched with the extended templates in a cross-correlation manner, so that the target images matched with the reference images can be matched from the to-be-recognized images, the times of extracting the target images from the to-be-recognized images are reduced, and the image matching efficiency is improved.
With further reference to fig. 5, as an implementation of the methods shown in the above-mentioned figures, the present application provides an embodiment of an image matching apparatus, which corresponds to the method embodiment shown in fig. 2, and which is particularly applicable in an electronic device.
As shown in fig. 5, the information pushing apparatus 500 of the present embodiment includes: a reference image acquisition module 501, an extended reference image generation module 502, a target image extraction module 503, and a matching operation module 504. The reference image obtaining module 501 may be configured to obtain a reference image, where the reference image includes image data arranged in a matrix; the extended reference image generation module 502 may be configured to extend the reference image to generate a plurality of extended reference images, where a row number of image data included in each extended reference image is the same as a row number of image data included in the reference image, and a column number of image data included in each extended reference image is equal to and greater than a column number of image data included in the reference image; the target image extracting module 503 may be configured to extract a target image with a size equal to that of the extended reference image from the image to be recognized by using a direct memory access manner; the matching operation module 504 may be configured to perform a cross-correlation matching operation on the target image and each extended reference image to determine whether the target image matches the reference image.
In some optional implementations of the present embodiment, the extended reference image generation module 502 may include an extended template generation unit (not shown) and an overlay unit (not shown). The expansion template generating unit can be configured to generate a plurality of expansion templates, wherein each expansion template comprises initial image data arranged in a matrix, each expansion template comprises an area to be superposed and an expansion area, and the positions of the areas to be superposed in each expansion template are different from each other; the superposition unit may be configured to superpose the image data of the reference image and the initial image data of the region to be superposed in each extended template, and generate a plurality of extended reference images; the number of rows of the initial image data of the expanded template is equal to the number of rows of the image data of the reference image, and the number of columns of the initial image data of the area to be superposed is equal to the number of columns of the image data of the reference image.
In some optional implementation manners of this embodiment, the number of the expansion templates is 4n, where n is a preset positive integer; the initial image data in matrix arrangement in each expansion template is zero.
In some optional implementations of the embodiment, the extension area includes a list of image data, each extension template includes 4n-1 extension areas, and each extension area is located on one side or both sides of the area to be superimposed, so that the positions of the areas to be superimposed in different extension templates are different from each other.
In some optional implementations of this embodiment, the target image extraction module 503 in the apparatus 500 may be further configured to acquire an image to be recognized by using an image sensor, parse the image to be recognized, and cache the image to be recognized in an external memory; and extracting the target image with the size equal to the size of the extended reference image from the external memory by adopting a direct memory access mode.
In some optional implementations of the embodiment, the image data addresses of the target image are aligned with the bus addresses.
It is to be noted that modules described in the image matching apparatus 500 correspond to respective steps in the method described with reference to fig. 2. Thus, the operations and features described above for the method are also applicable to the image matching apparatus 500 and the modules or units included therein, and are not described herein again.
Those skilled in the art will appreciate that the image matching apparatus 500 described above also includes some other well-known structures, such as internal circuits, processors, etc., which are not shown in fig. 5 in order to not unnecessarily obscure embodiments of the present disclosure.
Reference is now made to fig. 6, which is a block diagram illustrating a digital signal processing system suitable for use in implementing the electronic device of an embodiment of the present application. The digital signal processing system shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, the digital signal processing system 600 includes a processor 601 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from an external memory 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The I/O interface 605 may include a network interface, an external storage interface, a power interface, a signal acquisition interface, and the like. The network interface is used for connecting with network equipment 606 such as an external PC, the external storage interface is used for connecting with an external memory 607, the power interface is used for connecting with an external power supply system 608 which provides power signals for the digital signal processing system, and the signal acquisition interface is used for connecting with an image sensor 609 which acquires signals such as images.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. And may be stored in the ROM 602, and the processor 601 may specifically implement the function of image matching defined in the method of the present application by calling the computer program stored in the ROM 602.
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 modules referred to in the embodiments of the present application may be implemented in a software manner, or may be implemented in a hardware manner. The described modules may also be provided in a processor, which may be described as: a processor comprises a reference image acquisition module, an extended reference image generation module, a target image extraction module and a matching operation module. The names of these modules do not in some cases constitute a limitation on the module itself, and for example, the reference image acquisition module may also be described as a "module configured to acquire a reference image".
As another aspect, the present application also provides a computer-readable storage medium, which may be contained in the apparatus described in the above embodiments; or may be present separately and not assembled into the device. The computer readable storage medium stores one or more programs that, when executed by one or more processors, cause the apparatus to: acquiring a reference image, wherein the reference image comprises image data arranged in a matrix; expanding the reference image to generate a plurality of expanded reference images, wherein the number of rows of image data contained in each expanded reference image is the same as the number of rows of image data contained in the reference image, and the number of columns of image data contained in each expanded reference image is equal to and greater than the number of columns of image data contained in the reference image; extracting a target image with the same size as the extended reference image from the image to be identified by adopting a direct memory access mode; and performing cross-correlation matching operation on the target image and each extended reference image to determine whether the target image is matched with the reference image.
As a further aspect, the present application also provides a digital signal processing apparatus including: one or more processors; a memory for storing one or more programs (which may include, for example, the computer-readable storage media described above); wherein the one or more programs, when executed by the one or more processors, cause the processors to implement the image matching methods provided 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 invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (14)

1. An image matching method, comprising:
acquiring a reference image, wherein the reference image comprises image data arranged in a matrix;
expanding the reference image to generate a plurality of expanded reference images, wherein the number of rows of image data included in each expanded reference image is the same as the number of rows of image data included in the reference image, and the number of columns of image data included in each expanded reference image is equal to and greater than the number of columns of image data included in the reference image;
extracting a target image with the same size as the extended reference image from the image to be identified by adopting a direct memory access mode;
and performing cross-correlation matching operation on the target image and each extended reference image to determine whether the target image is matched with the reference image.
2. The image matching method of claim 1, wherein the expanding the reference image to generate a plurality of expanded reference images comprises:
generating a plurality of expansion templates, wherein each expansion template comprises initial image data arranged in a matrix, each expansion template comprises a region to be superposed and an expansion region, and the positions of the regions to be superposed in each expansion template are different from each other;
superposing the image data of the reference image and the initial image data of the region to be superposed in each expanded template to generate a plurality of expanded reference images;
the number of rows of the initial image data of the extended template is equal to the number of rows of the image data of the reference image, and the number of columns of the initial image data of the area to be superimposed is equal to the number of columns of the image data of the reference image.
3. The image matching method according to claim 2, wherein the number of the expansion templates is 4n, wherein n is a preset positive integer;
and the initial image data in matrix arrangement in each expansion template is zero.
4. The image matching method according to claim 3, wherein the extension region comprises a list of initial image data, each extension template comprises 4n-1 extension regions, and each extension region is located on one side or two sides of the region to be superimposed, so that the regions to be superimposed are located at different positions in different extension templates.
5. The image matching method according to claim 1, wherein the extracting a target image with a size equal to that of the extended reference image from the image to be recognized by direct memory access comprises:
acquiring an image to be identified by using an image sensor, analyzing the image to be identified, and caching the image to be identified to an external memory;
and extracting the target image with the size equal to that of the extended reference image from the external memory by adopting a direct memory access mode.
6. The image matching method of claim 1, wherein the image data addresses of the target image are aligned with bus addresses.
7. An image matching apparatus, characterized by comprising:
a reference image acquisition module configured to acquire a reference image, wherein the reference image includes image data arranged in a matrix;
an extended reference image generation module configured to extend the reference image to generate a plurality of extended reference images, where a number of rows of image data included in each extended reference image is the same as a number of rows of image data included in the reference image, and a number of columns of image data included in each extended reference image is equal to and greater than a number of columns of image data included in the reference image;
the target image extraction module is configured to extract a target image with the same size as the extended reference image from an image to be identified by adopting a direct memory access mode;
and the matching operation module is configured to perform cross-correlation matching operation on the target image and each extended reference image to determine whether the target image is matched with the reference image.
8. The apparatus of claim 7, wherein the extended reference image generation module comprises:
the system comprises an expanded template generating unit, a superposition unit and a superposition unit, wherein the expanded template generating unit is configured to generate a plurality of expanded templates, each expanded template comprises initial image data arranged in a matrix, each expanded template comprises a region to be superposed and an expanded region, and the positions of the regions to be superposed in each expanded template are different from each other;
the superposition unit is configured to superpose the image data of the reference image and the initial image data of the region to be superposed in each expanded template to generate a plurality of expanded reference images;
the number of rows of the initial image data of the extended template is equal to the number of rows of the initial image data of the reference image, and the number of columns of the image data of the region to be superimposed is equal to the number of columns of the image data of the reference image.
9. The apparatus according to claim 8, wherein the number of the expansion templates is 4n, where n is a preset positive integer;
and the initial image data in matrix arrangement in each expansion template is zero.
10. The apparatus according to claim 9, wherein the expansion region comprises a list of initial image data, each expansion template comprises 4n-1 expansion regions, and each expansion region is located on one side or both sides of the region to be superimposed, so that the regions to be superimposed are located at different positions in different expansion templates.
11. The apparatus of claim 7, wherein the target image extraction module is further configured to:
acquiring an image to be identified by using an image sensor, analyzing the image to be identified, and caching the image to be identified to an external memory;
and extracting the target image with the size equal to that of the extended reference image from the external memory by adopting a direct memory access mode.
12. The apparatus of claim 7, wherein the image data addresses of the target image are aligned with bus addresses.
13. A digital signal processing apparatus comprising:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
14. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN201710312028.2A 2017-05-05 2017-05-05 Image matching method and device Active CN107146245B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710312028.2A CN107146245B (en) 2017-05-05 2017-05-05 Image matching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710312028.2A CN107146245B (en) 2017-05-05 2017-05-05 Image matching method and device

Publications (2)

Publication Number Publication Date
CN107146245A CN107146245A (en) 2017-09-08
CN107146245B true CN107146245B (en) 2020-06-05

Family

ID=59777045

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710312028.2A Active CN107146245B (en) 2017-05-05 2017-05-05 Image matching method and device

Country Status (1)

Country Link
CN (1) CN107146245B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109684980B (en) * 2018-09-19 2022-12-13 腾讯科技(深圳)有限公司 Automatic scoring method and device
CN113297409A (en) * 2021-06-30 2021-08-24 杭州海康威视数字技术股份有限公司 Image searching method and device, electronic equipment and storage medium
CN115965848B (en) * 2023-03-13 2023-05-23 腾讯科技(深圳)有限公司 Image processing method and related device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5729009A (en) * 1992-10-05 1998-03-17 Logitech, Inc. Method for generating quasi-sinusoidal signals
CN1904907A (en) * 2005-07-27 2007-01-31 上海明波通信技术有限公司 High-speed image matching detecting system and method
CN101495975A (en) * 2006-12-25 2009-07-29 松下电器产业株式会社 Memory control device, memory device, and memory control method
CN103856774A (en) * 2014-02-28 2014-06-11 北京航科威视光电信息技术有限公司 Intelligent detection system and method for video surveillance
CN104182538A (en) * 2014-09-01 2014-12-03 西安电子科技大学 Semi-supervised hash based image retrieval method
CN104778687A (en) * 2015-03-26 2015-07-15 北京奇虎科技有限公司 Image matching method and device
CN105046684A (en) * 2015-06-15 2015-11-11 华中科技大学 Image matching method based on polygon generalized Hough transform
CN105608463A (en) * 2015-12-14 2016-05-25 武汉大学 Stereo image feature matching method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5729009A (en) * 1992-10-05 1998-03-17 Logitech, Inc. Method for generating quasi-sinusoidal signals
CN1904907A (en) * 2005-07-27 2007-01-31 上海明波通信技术有限公司 High-speed image matching detecting system and method
CN101495975A (en) * 2006-12-25 2009-07-29 松下电器产业株式会社 Memory control device, memory device, and memory control method
CN103856774A (en) * 2014-02-28 2014-06-11 北京航科威视光电信息技术有限公司 Intelligent detection system and method for video surveillance
CN104182538A (en) * 2014-09-01 2014-12-03 西安电子科技大学 Semi-supervised hash based image retrieval method
CN104778687A (en) * 2015-03-26 2015-07-15 北京奇虎科技有限公司 Image matching method and device
CN105046684A (en) * 2015-06-15 2015-11-11 华中科技大学 Image matching method based on polygon generalized Hough transform
CN105608463A (en) * 2015-12-14 2016-05-25 武汉大学 Stereo image feature matching method

Also Published As

Publication number Publication date
CN107146245A (en) 2017-09-08

Similar Documents

Publication Publication Date Title
EP3779800A1 (en) Image recognition method, apparatus, electronic device and storage medium
EP3138046B1 (en) Techniques for distributed optical character recognition and distributed machine language translation
US20200257902A1 (en) Extraction of spatial-temporal feature representation
CN110427915B (en) Method and apparatus for outputting information
CN107146245B (en) Image matching method and device
CN113112509B (en) Image segmentation model training method, device, computer equipment and storage medium
CN110516678B (en) Image processing method and device
CN111784712B (en) Image processing method, device, equipment and computer readable medium
CN110111241B (en) Method and apparatus for generating dynamic image
CN110210480B (en) Character recognition method and device, electronic equipment and computer readable storage medium
CN113496208B (en) Video scene classification method and device, storage medium and terminal
CN108595211B (en) Method and apparatus for outputting data
CN112598673A (en) Panorama segmentation method, device, electronic equipment and computer readable medium
CN112488095A (en) Seal image identification method and device and electronic equipment
CN109919220B (en) Method and apparatus for generating feature vectors of video
CN114693963A (en) Recognition model training and recognition method and device based on electric power data feature extraction
CN111862351B (en) Positioning model optimization method, positioning method and positioning equipment
CN113111684B (en) Training method and device for neural network model and image processing system
CN111639523B (en) Target detection method, device, computer equipment and storage medium
CN112102145A (en) Image processing method and device
CN112487943B (en) Key frame de-duplication method and device and electronic equipment
CN114254563A (en) Data processing method and device, electronic equipment and storage medium
JP7107544B2 (en) Information processing device, control method, and program
CN109657523B (en) Driving region detection method and device
CN112394809A (en) Method, device and communication equipment for realizing augmented reality

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
TA01 Transfer of patent application right

Effective date of registration: 20190724

Address after: 300 457 days First Floor, Phase 2, No. 10, Fourth Avenue, Binhai New Area Economic and Technological Development Zone, Tianjin

Applicant after: Tianjin Jingdong Shentuo Robot Technology Co., Ltd.

Address before: 100080 Beijing city Haidian District xingshikou Road No. 65 building 11C Creative Park West West west Shan East 1-4 layer 1-4 layer

Applicant before: Beijing Jingdong Shangke Information Technology Co., Ltd.

Applicant before: Beijing Jingdong Century Commerce Co., Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
TA01 Transfer of patent application right

Effective date of registration: 20200519

Address after: 100176 room a1905, floor 19, building 2, No. 18, Kechuang 11th Street, Daxing Economic and Technological Development Zone, Beijing

Applicant after: Beijing Jingdong Qianshi Technology Co.,Ltd.

Address before: 300 457 days First Floor, Phase 2, No. 10, Fourth Avenue, Binhai New Area Economic and Technological Development Zone, Tianjin

Applicant before: Tianjin Jingdong Shentuo Robot Technology Co.,Ltd.

TA01 Transfer of patent application right