WO2019041271A1 - Image processing method, integrated circuit, processor, system and movable device - Google Patents

Image processing method, integrated circuit, processor, system and movable device Download PDF

Info

Publication number
WO2019041271A1
WO2019041271A1 PCT/CN2017/100061 CN2017100061W WO2019041271A1 WO 2019041271 A1 WO2019041271 A1 WO 2019041271A1 CN 2017100061 W CN2017100061 W CN 2017100061W WO 2019041271 A1 WO2019041271 A1 WO 2019041271A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
feature point
data block
integrated circuit
storage space
Prior art date
Application number
PCT/CN2017/100061
Other languages
French (fr)
Chinese (zh)
Inventor
高明明
杨康
赵尧
Original Assignee
深圳市大疆创新科技有限公司
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 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to PCT/CN2017/100061 priority Critical patent/WO2019041271A1/en
Priority to CN201780005452.0A priority patent/CN108701348A/en
Publication of WO2019041271A1 publication Critical patent/WO2019041271A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/60Memory management

Definitions

  • the present invention relates to the field of information technology and, more particularly, to a method of processing an image, an integrated circuit, a processor, a computer system, and a removable device.
  • a memory such as a Double Data Rate Synchronous Dynamic Random (Double Data Rate Synchronous Dynamic Random)
  • DDRSDRAM Double Data Rate Synchronous Dynamic Random
  • the image processing algorithm may need to read the image data from the memory. If random access is used, the bandwidth of the memory may occupy a lot, affecting the processing efficiency, and affecting the preemption of other devices on the system. The bandwidth of the memory, which in turn affects the performance of the entire system.
  • Embodiments of the present invention provide a method, an integrated circuit, a processor, a computer system, and a mobile device for processing an image, which can improve processing efficiency.
  • a first aspect provides a method for processing an image, including: acquiring a first data block corresponding to a first feature point of a first image; storing the first data block in a first storage space in a memory, and Recording a correspondence between the first feature point and the first storage space.
  • an integrated circuit including: a processing unit and a cache; wherein the processing unit is configured to acquire, from the cache, a first data block corresponding to a first feature point of the first image; The first data block is stored in the first storage space in the memory, and the corresponding relationship between the first feature point and the first storage space is recorded.
  • a processor comprising the integrated circuit of the second aspect described above.
  • a computer system comprising the integrated circuit of the second aspect or the processor of the third aspect, and a memory.
  • a computer system comprising: a memory for storing computer executable instructions; a processor for accessing the memory and executing the computer executable instructions to perform the method of the first aspect above The operation in .
  • a mobile device comprising: the integrated circuit of the second aspect; or the processor of the third aspect; or the computer system of the fourth or fifth aspect.
  • a computer storage medium having stored therein program code, the program code being operative to indicate a method of performing the first aspect described above.
  • the data blocks corresponding to the feature points are continuously stored in the memory, and the corresponding relationship between the feature points and the storage space is recorded.
  • the data block corresponding to the feature point needs to be read, the data block can be continuously read from the storage space according to the correspondence, and the reading efficiency can be improved with respect to the random access reading, thereby improving the processing efficiency.
  • FIG. 1 is an architectural diagram of a technical solution to which an embodiment of the present invention is applied.
  • FIG. 2 is a schematic architectural diagram of a mobile device according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of a method for processing an image according to an embodiment of the present invention.
  • FIG. 4 is a schematic block diagram of an integrated circuit in accordance with an embodiment of the present invention.
  • Figure 5 is a schematic block diagram of a computer system in accordance with one embodiment of the present invention.
  • Figure 6 is a schematic block diagram of a computer system in accordance with another embodiment of the present invention.
  • the technical solution of the embodiment of the present invention can be applied to various image processing algorithms, such as the Kanade-Lucas-Tomasi (KLT) algorithm, the friction algorithm, or the orb algorithm, but the embodiment of the present invention is not limited thereto.
  • KLT Kanade-Lucas-Tomasi
  • Image processing algorithms involve the processing of feature points when processing images.
  • the technical solution of the embodiment of the present invention stores the data block corresponding to the feature point into a continuous storage space in the memory, and records the correspondence between the feature point and the storage space, so that the data block can be continuously read from the memory to improve the reading.
  • Efficiency which can improve processing efficiency.
  • the manner in which the feature points are obtained may be determined by an image processing algorithm, such as a harris corner algorithm, a FAST (features from accelerated segment test) algorithm to detect feature points, etc., which is not limited in this embodiment of the present invention. .
  • the data block of the feature point may include data corresponding to a minimum pixel area of a pixel of the image selected by the image processing algorithm for the feature point. That is to say, the data block of the feature point includes data corresponding to all the pixels required to process the feature point.
  • the minimum pixel area may be a minimum rectangular pixel area of a pixel required to process the feature point, and the minimum rectangular pixel area is determined according to an image processing algorithm and a predetermined value, for example, when processing the KLT algorithm, according to accuracy requirements You can choose different sizes of square areas such as 3*3, 5*5, etc., or different sizes of rectangular areas such as 3*5, 5*3, etc.
  • the minimum pixel area can also be a non-rectangular area, for example, it can be
  • the set of pixels whose distance from the feature point is N may also be a discrete set of pixels, which is not limited herein.
  • FIG. 1 is an architectural diagram of a technical solution to which an embodiment of the present invention is applied.
  • system 100 includes a processor 110 and an external memory 120.
  • the processor 110 can be a processor in a computing device or a processor in a mobile device (eg, a drone).
  • the processor 110 can be any type of processor, which is not limited in this embodiment of the present invention.
  • the processor 110 can be comprised of an internal memory 112 and a processing unit 114.
  • the internal memory 112 may be a cache, for example, a line buffer, but this is not limited by the embodiment of the present invention.
  • the processor 110 can be implemented by circuitry.
  • the processor 110 can be a general purpose processor.
  • the processor 110 can be a chip, such as an FPGA or ASIC or the like.
  • External storage The memory 120 may be a memory, for example, a DDR SDRAM, but the embodiment of the present invention is not limited thereto.
  • the external memory 120 can store all of the pixels of the image.
  • the internal memory 112 can store a portion of the pixels of the image.
  • the processor 110 reads a portion of the pixels of the image from the external memory 120 into the internal memory 112 for processing when processing the image.
  • the mobile device which may also be referred to as a mobile device, may adopt the technical solution of the embodiment of the present invention.
  • the mobile device may be a drone, an unmanned boat, an autonomous vehicle or a robot, etc., but the embodiment of the present invention is not limited thereto.
  • FIG. 2 is a schematic architectural diagram of a removable device 200 in accordance with an embodiment of the present invention.
  • the mobile device 200 can include a power system 210, a control system 220, a sensing system 230, and a processing system 240.
  • Power system 210 is used to power the mobile device 200.
  • the power system of the drone may include an electronic governor (referred to as an electric current), a propeller, and a motor corresponding to the propeller.
  • the motor is connected between the electronic governor and the propeller, and the motor and the propeller are disposed on the corresponding arm; the electronic governor is used for receiving the driving signal generated by the control system, and providing driving current to the motor according to the driving signal to control the motor Rotating speed.
  • the motor is used to drive the propeller to rotate to power the drone's flight.
  • the sensing system 230 can be used to measure attitude information of the mobile device 200, that is, position information and state information of the mobile device 200 in space, for example, three-dimensional position, three-dimensional angle, three-dimensional velocity, three-dimensional acceleration, three-dimensional angular velocity, and the like.
  • the sensing system 230 may include, for example, at least one of a gyroscope, an electronic compass, an Inertial Measurement Unit (IMU), a vision sensor, a Global Positioning System (GPS), a barometer, an airspeed meter, and the like.
  • IMU Inertial Measurement Unit
  • GPS Global Positioning System
  • barometer an airspeed meter
  • sensing system 230 can also be used to acquire images, i.e., sensing system 230 includes sensors for acquiring images, such as cameras and the like.
  • Control system 220 is used to control the movement of mobile device 200.
  • the control system 220 can control the mobile device 200 in accordance with program instructions that are set in advance.
  • the control system 220 can control the movement of the mobile device 200 based on the attitude information of the mobile device 200 measured by the sensing system 230.
  • Control system 220 can also control mobile device 200 based on control signals from the remote control.
  • the control system 220 can be a flight control system (flying control) or a control circuit in a flight control.
  • Processing system 240 can process the images acquired by sensing system 230.
  • processing system 240 can be an Image Signal Processing (ISP) type of chip.
  • ISP Image Signal Processing
  • Processing system 240 may be system 100 of FIG. 1, or processing system 240 may include system 100 of FIG.
  • removable device 200 may also include other components not shown in FIG. 2, which are not limited by the embodiments of the present invention.
  • FIG. 3 shows a schematic flow diagram of a method 300 of processing an image in accordance with one embodiment of the present invention.
  • the method 300 can be performed by the system 100 or processor 110 shown in FIG. 1; or by the removable device 200 shown in FIG. 2.
  • the feature point is an object of image processing.
  • multiple pixels associated with the feature point may be needed, for example, multiple pixels near the feature point.
  • the data block including the plurality of pixels is a data block corresponding to the feature point.
  • the first data block includes a minimum rectangular pixel area in which an image processing algorithm selects pixels of the first image for the first feature point.
  • the smallest rectangular pixel area is also referred to as a window that selects pixels.
  • the first data block may be the smallest rectangular pixel area, or may be larger than the minimum rectangular pixel area, that is, the first data block includes all pixels required by the image processing algorithm to process the first feature point.
  • the plurality of rows of pixels of the first image may be read, and the first data block corresponding to the first feature point in the plurality of rows of pixels is obtained.
  • multiple rows of pixels of the image are read into the cache at a time, and in this process, corresponding data blocks in the plurality of rows of pixels are acquired for subsequent operations; and then the image is read.
  • One or more rows of pixels overwrite the data that first entered the cache, get the corresponding block of the newly read multi-line pixels, and so on, until the entire image is processed.
  • the first image may be an original image; or may be an intermediate image in an image processing process, for example, the first image may be a layer in an image pyramid, in particular, may be in a pyramid image.
  • the bottom layer image may be used to describe the first image.
  • the first image may be a layer in the image pyramid.
  • the read image data may simultaneously store the data block corresponding to the feature point according to the above method.
  • the feature points between each layer of the pyramid have a specific relationship, and the feature points of other layers of the pyramid image can be obtained according to the feature points of one layer, in the acquisition part Or in the process of the entire pyramid, the data blocks corresponding to the feature points of different layers of the pyramid can be notified.
  • this method is not only for the KLT algorithm, but also for all image processing.
  • the first data block is stored in the first storage space in the memory, and the corresponding relationship between the first feature point and the first storage space is recorded.
  • the data blocks corresponding to the feature points are continuously stored in the memory, that is, one data block is stored in a continuous storage space, and the corresponding relationship between the feature points and the storage space is recorded.
  • the data block can be continuously read from the storage space according to the correspondence relationship, and the reading efficiency can be improved compared to the random access reading, thereby improving the data block. Processing efficiency.
  • the correspondence may be a correspondence between the first feature point and a starting address of the first storage space.
  • the first data block can be continuously read from the start address.
  • the data blocks corresponding to the multiple feature points of the first image may be sequentially stored into the memory.
  • a window is required for framed partial pixels for calculation, that is, First, the horizontal and vertical sequences are sequentially stored with corresponding data blocks, wherein each data block is stored in a continuous storage space in the memory. It should be understood that the foregoing sequence may also be other sequences, which are not limited by the embodiments of the present invention.
  • the data blocks of the plurality of feature points may occupy a contiguous storage space in the memory, that is, the plurality of data blocks may be stored adjacent to each other, but the embodiment of the present invention is not limited thereto.
  • the first data block is read from the first storage space according to the correspondence.
  • the storage of the data block can be determined according to the correspondence relationship of the records. An address from which the data block is continuously read according to the storage address.
  • the feature point processing order that is, the order in which the feature points are selected, may be the feature point processing order of the first image, or may be the feature point processing order of other images.
  • the first image and the second image respectively represent corresponding layers in the pyramid of the I image and the J image.
  • the feature points may be selected in accordance with the feature point processing order of the first image, or the feature points may be selected in the feature point processing order of the second image. If the feature point is selected according to the feature point processing order of the second image, for example, the selected feature point corresponds to the first feature point in the first image, when the first data block in the first image needs to be read,
  • the storage address of the first data block may be determined according to the corresponding relationship of the record, and the first data block is continuously read according to the storage address.
  • the foregoing solution may also be used to store the data block of the feature point.
  • the feature point processing order of the second image may be the same as the storage order, such that if the feature points are selected according to the feature point processing order of the second image, each data block of the second image may be read in a storage order. For the data block in the first image, it can be read as described above.
  • the second image may be stored in the memory in other manners, which is not limited by the embodiment of the present invention. Regardless of the manner in which the second image is stored, the processing sequence may be determined according to the second image. When it is determined that the feature points of the first image need to be processed according to the processing order, the corresponding feature points of the first image are read in the foregoing manner. data block.
  • first image and the second image are also not limited to the KLT algorithm.
  • processing sequence may also be determined according to the second image.
  • the feature point data blocks may not be stored for the feature points in the second image, but are sequentially sorted, for example, from left to right and top to bottom, so that when the second image enters the cache, The feature points in all the second images may be traversed in the process of reading from top to bottom, and then the feature points in all the second images traversed are according to the storage address of the corresponding first image feature points.
  • the data block corresponding to the first feature point is read for calculation.
  • the second image may be continuously stored in the storage space according to the foregoing manner, and may be read in the storage order after the reading.
  • the storage of the data block corresponding to the first image feature point may also be used for other calculations, such as orb, brief calculation, and the like.
  • the technical solution of the embodiment of the present invention can reduce the number of memory accesses and improve the reading efficiency and processing efficiency by continuously storing the data blocks corresponding to the feature points in the memory.
  • the bandwidth of the memory occupied by other devices can be reduced. Impact, thereby improving the performance of the entire system.
  • the pseudo code for tracking feature points in the KLT algorithm is as follows:
  • the key implementation steps of the KLT algorithm are two for loops, one for loop to implement G calculation, and another for loop to implement d L calculation, thereby performing the next layer of KLT algorithm operation.
  • G and ⁇ I k Both need to read the data block.
  • the required data blocks are sequentially stored into the memory, wherein each data block is stored into a continuous storage in the memory. In space.
  • a similar process is performed for the image J.
  • the line buffer can cache 20 lines of data according to the position of the known feature points.
  • the corresponding data block for example, the pixel of the pixel area of 19 ⁇ 19 is read from the line buffer, and then written into the memory in order, and the starting address of the data block corresponding to the feature point is written in the memory.
  • This scheme can be used for the storage of data blocks of each layer of the pyramid. Alternatively, if a layer of a pyramid is small in size, it can be stored in the cache without being stored in memory.
  • the feature points may be sequentially processed in the order of the feature points in the layer of the image J.
  • the data blocks in the layer of the image J can be read in the storage order, and the data blocks in the layer of the corresponding image I can determine the storage address according to the correspondence relationship of the records, and realize the reading of the data block according to the storage address.
  • the data blocks in the layer of the image J can also be read in the reading order of the image J, that is, read from left to right and from top to bottom. For example, there are multiple feature points on the image J.
  • the first feature point from top to bottom from left to right is the feature point 1J, and the feature point 1I in the corresponding image I, when it is required to calculate the G of the feature point 1I in the layer of the image I, according to the feature point corresponding to the feature point
  • the starting address in memory you can continuously read out the corresponding data block, but then perform subsequent operations (such as the second for loop).
  • FIG. 4 shows a schematic block diagram of an integrated circuit 400 in accordance with an embodiment of the present invention.
  • the integrated circuit 400 can include a processing unit 410 and a cache 420.
  • the processing unit 410 is configured to acquire, from the cache 420, a first data block corresponding to the first feature point of the first image;
  • the processing unit 410 is configured to:
  • the plurality of rows of pixels of the first image are read into the buffer 420, and the first data block corresponding to the first feature point is obtained from the cache 420.
  • the correspondence is a correspondence between the first feature point and a start address of the first storage space.
  • the processing unit 410 is configured to:
  • the data blocks corresponding to the plurality of feature points of the first image are sequentially stored in the memory 420.
  • the sequence is a raster scan order.
  • the first image is a layer in an image pyramid
  • the processing unit 410 is configured to:
  • the first data block is obtained when the image pyramid is generated.
  • the first data block includes a minimum rectangular pixel area in which an image processing algorithm selects pixels of the first image for the first feature point.
  • the processing unit 410 is further configured to:
  • the first data block is read from the first storage space according to the correspondence.
  • the processing unit 410 is further configured to:
  • the first data block is read from the first storage space according to the correspondence.
  • the integrated circuit 400 can be an FPGA or an ASIC.
  • control unit may be implemented by a circuit, which may be a unified circuit or a circuit composed of several circuits.
  • the specific implementation form of the circuit is not limited in the embodiment of the present invention.
  • the embodiment of the present invention further provides a processor, which may include the integrated circuit of the various embodiments of the present invention described above.
  • the embodiment of the invention further provides a computer system, which can include the processor of the embodiment of the invention described above, and a memory.
  • FIG. 5 shows a schematic block diagram of a computer system 500 in accordance with another embodiment of the present invention.
  • the computer system 500 can include the integrated circuit 400 of the foregoing embodiments of the present invention; and a memory 510.
  • FIG. 6 shows a schematic block diagram of a computer system 600 in accordance with yet another embodiment of the present invention.
  • the computer system 600 can include a processor 610 and a memory 620.
  • the computer system may also include components that are generally included in other computer systems, such as input and output devices, communication interfaces, and the like, which are not limited by the embodiments of the present invention.
  • Memory 620 is used to store computer executable instructions.
  • the memory 620 may be various types of memory, for example, may include a high speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory, which is implemented by the present invention. This example is not limited to this.
  • RAM high speed random access memory
  • non-volatile memory such as at least one disk memory
  • the processor 610 is configured to access the memory 620 and execute the computer executable instructions to perform the operations in the method of processing images of the various embodiments of the present invention described above.
  • the processor 610 may include a microprocessor, a field-programmable gate array (FPGA), a central processing unit (CPU), a graphics processing unit (GPU), etc., and is implemented by the present invention. This example is not limited to this.
  • Embodiments of the present invention also provide a removable device that can include an integrated circuit, processor, or computer system in accordance with various embodiments of the present invention described above.
  • An integrated circuit, a processor, a computer system, and a removable device may correspond to an execution body of a method of processing an image of an embodiment of the present invention, and each module in an integrated circuit, a processor, a computer system, and a removable device.
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores program code, and the program code can be used to indicate a method for processing an image of the embodiment of the invention.
  • the term "and/or” is merely an association relationship describing an associated object, indicating that there may be three relationships.
  • a and/or B may indicate that A exists separately, and A and B exist simultaneously, and B cases exist alone.
  • the character "/" in this article generally indicates that the contextual object is an "or" relationship.
  • the disclosed systems, devices, and methods may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, or an electrical, mechanical or other form of connection.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention contributes in essence or to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium.
  • Including a number of instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform all of the methods described in various embodiments of the present invention Or part of the steps.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

Disclosed are an image processing method, an integrated circuit, a processor, a computer system, and a movable device. Said method comprises: acquiring a first data block corresponding to a first feature point of a first image; storing the first data block in a continuous first storage space in a memory, and recording the correlation between the first feature point and the first storage space. The technical solutions of the embodiments of the present invention can improve the processing efficiency.

Description

处理图像的方法、集成电路、处理器、系统和可移动设备Method, integrated circuit, processor, system, and mobile device for processing images
版权申明Copyright statement
本专利文件披露的内容包含受版权保护的材料。该版权为版权所有人所有。版权所有人不反对任何人复制专利与商标局的官方记录和档案中所存在的该专利文件或者该专利披露。The disclosure of this patent document contains material that is subject to copyright protection. This copyright is the property of the copyright holder. The copyright owner has no objection to the reproduction of the patent document or the patent disclosure in the official records and files of the Patent and Trademark Office.
技术领域Technical field
本发明涉及信息技术领域,并且更具体地,涉及一种处理图像的方法、集成电路、处理器、计算机系统和可移动设备。The present invention relates to the field of information technology and, more particularly, to a method of processing an image, an integrated circuit, a processor, a computer system, and a removable device.
背景技术Background technique
目前在现场可编程门阵列(Field-Programmable Gate Array,FPGA),或专用集成电路(Application Specific Integrated Circuit,ASIC)等的设计上,内存,例如双倍速率同步动态随机存储器(Double Data RateSynchronous Dynamic Random Access MemoryDDRSDRAM)的带宽越来越成为系统设计的瓶颈。因此,尽可能的降低每个设备访问内存的带宽,对系统性能的提升很有益处。Currently, in the design of a Field-Programmable Gate Array (FPGA) or an Application Specific Integrated Circuit (ASIC), a memory such as a Double Data Rate Synchronous Dynamic Random (Double Data Rate Synchronous Dynamic Random) The bandwidth of Access Memory DDRSDRAM is increasingly becoming a bottleneck in system design. Therefore, it is beneficial to improve the performance of the system by reducing the bandwidth of each device to access the memory as much as possible.
例如,图像处理算法在处理图像时,可能会需要从内存中读取图像的数据,如果采取随机访问读取,那么内存的带宽可能会占用很多,影响处理效率,在系统上也影响其他设备抢占内存的带宽,进而影响整个系统的性能。For example, when processing an image, the image processing algorithm may need to read the image data from the memory. If random access is used, the bandwidth of the memory may occupy a lot, affecting the processing efficiency, and affecting the preemption of other devices on the system. The bandwidth of the memory, which in turn affects the performance of the entire system.
因此,如何提高处理效率成为芯片设计中一个亟待解决的技术问题。Therefore, how to improve the processing efficiency has become an urgent technical problem in chip design.
发明内容Summary of the invention
本发明实施例提供了一种处理图像的方法、集成电路、处理器、计算机系统和可移动设备,能够提高处理效率。Embodiments of the present invention provide a method, an integrated circuit, a processor, a computer system, and a mobile device for processing an image, which can improve processing efficiency.
第一方面,提供了一种处理图像的方法,包括:获取第一图像的第一特征点对应的第一数据块;将该第一数据块存储到内存中连续的第一存储空间中,并记录该第一特征点与该第一存储空间的对应关系。A first aspect provides a method for processing an image, including: acquiring a first data block corresponding to a first feature point of a first image; storing the first data block in a first storage space in a memory, and Recording a correspondence between the first feature point and the first storage space.
第二方面,提供了一种集成电路,包括:处理单元和缓存;其中,该处理单元,用于从该缓存中获取第一图像的第一特征点对应的第一数据块; 将该第一数据块存储到内存中连续的第一存储空间中,并记录该第一特征点与该第一存储空间的对应关系。In a second aspect, an integrated circuit is provided, including: a processing unit and a cache; wherein the processing unit is configured to acquire, from the cache, a first data block corresponding to a first feature point of the first image; The first data block is stored in the first storage space in the memory, and the corresponding relationship between the first feature point and the first storage space is recorded.
第三方面,提供了一种处理器,包括上述第二方面的集成电路。In a third aspect, a processor is provided, comprising the integrated circuit of the second aspect described above.
第四方面,提供了一种计算机系统,包括上述第二方面的集成电路或者第三方面的处理器,以及内存。In a fourth aspect, a computer system is provided, comprising the integrated circuit of the second aspect or the processor of the third aspect, and a memory.
第五方面,提供了一种计算机系统,包括:存储器,用于存储计算机可执行指令;处理器,用于访问所述存储器,并执行所述计算机可执行指令,以进行上述第一方面的方法中的操作。In a fifth aspect, a computer system is provided, comprising: a memory for storing computer executable instructions; a processor for accessing the memory and executing the computer executable instructions to perform the method of the first aspect above The operation in .
第六方面,提供了一种可移动设备,包括:上述第二方面的集成电路;或者,上述第三方面的处理器;或者,上述第四或第五方面的的计算机系统。According to a sixth aspect, a mobile device is provided, comprising: the integrated circuit of the second aspect; or the processor of the third aspect; or the computer system of the fourth or fifth aspect.
第七方面,提供了一种计算机存储介质,该计算机存储介质中存储有程序代码,该程序代码可以用于指示执行上述第一方面的方法。In a seventh aspect, a computer storage medium is provided having stored therein program code, the program code being operative to indicate a method of performing the first aspect described above.
本发明实施例的技术方案,将特征点对应的数据块在内存中连续存储,并记录特征点与存储空间的对应关系。这样,在需要读取特征点对应的数据块时,可以根据该对应关系将该数据块从存储空间中连续读取,相对于随机访问读取,可以提高读取效率,从而能够提高处理效率。In the technical solution of the embodiment of the present invention, the data blocks corresponding to the feature points are continuously stored in the memory, and the corresponding relationship between the feature points and the storage space is recorded. In this way, when the data block corresponding to the feature point needs to be read, the data block can be continuously read from the storage space according to the correspondence, and the reading efficiency can be improved with respect to the random access reading, thereby improving the processing efficiency.
附图说明DRAWINGS
图1是应用本发明实施例的技术方案的架构图。FIG. 1 is an architectural diagram of a technical solution to which an embodiment of the present invention is applied.
图2是本发明实施例的可移动设备的示意性架构图。2 is a schematic architectural diagram of a mobile device according to an embodiment of the present invention.
图3是本发明实施例的处理图像的方法的示意性流程图。FIG. 3 is a schematic flowchart of a method for processing an image according to an embodiment of the present invention.
图4是本发明实施例的集成电路的示意性框图。4 is a schematic block diagram of an integrated circuit in accordance with an embodiment of the present invention.
图5是本发明一个实施例的计算机系统的示意性框图。Figure 5 is a schematic block diagram of a computer system in accordance with one embodiment of the present invention.
图6是本发明另一个实施例的计算机系统的示意性框图。Figure 6 is a schematic block diagram of a computer system in accordance with another embodiment of the present invention.
具体实施方式Detailed ways
下面将结合附图,对本发明实施例中的技术方案进行描述。The technical solutions in the embodiments of the present invention will be described below with reference to the accompanying drawings.
应理解,本文中的具体的例子只是为了帮助本领域技术人员更好地理解本发明实施例,而非限制本发明实施例的范围。It should be understood that the specific examples herein are merely intended to provide a better understanding of the embodiments of the invention.
还应理解,在本发明的各种实施例中,各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应 对本发明实施例的实施过程构成任何限定。It should also be understood that in various embodiments of the present invention, the size of the sequence numbers of the processes does not imply a sequence of executions, and the order of execution of the processes should be determined by its function and internal logic, and should not be The implementation process of the embodiments of the present invention constitutes any limitation.
还应理解,本说明书中描述的各种实施方式,既可以单独实施,也可以组合实施,本发明实施例对此并不限定。It should be understood that the various embodiments described in the specification may be implemented separately or in combination, and the embodiments of the present invention are not limited thereto.
本发明实施例的技术方案可以应用于各种图像处理算法,例如Kanade-Lucas-Tomasi(KLT)算法、brief算法或者orb算法等,但本发明实施例对此并不限定。The technical solution of the embodiment of the present invention can be applied to various image processing algorithms, such as the Kanade-Lucas-Tomasi (KLT) algorithm, the friction algorithm, or the orb algorithm, but the embodiment of the present invention is not limited thereto.
图像处理算法在处理图像时,会涉及到特征点的处理。本发明实施例的技术方案将特征点对应的数据块存储到内存中连续的存储空间中,并记录特征点与存储空间的对应关系,这样可以从内存中连续读取该数据块,提高读取效率,从而能够提高处理效率。Image processing algorithms involve the processing of feature points when processing images. The technical solution of the embodiment of the present invention stores the data block corresponding to the feature point into a continuous storage space in the memory, and records the correspondence between the feature point and the storage space, so that the data block can be continuously read from the memory to improve the reading. Efficiency, which can improve processing efficiency.
在一些可能的设计中,获取特征点的方式可以由图像处理算法决定,例如harris角点算法、FAST(features from accelerated segment test)算法来检测特征点等等,本发明实施例对此并不限定。In some possible designs, the manner in which the feature points are obtained may be determined by an image processing algorithm, such as a harris corner algorithm, a FAST (features from accelerated segment test) algorithm to detect feature points, etc., which is not limited in this embodiment of the present invention. .
在一些可能的设计中,特征点的数据块可以包括图像处理算法针对该特征点选取图像的像素的最小像素区域所对应的数据。也就是说,特征点的数据块包括处理该特征点所需的所有像素所对应的数据。其中,最小像素区域可以是处理该特征点所需的像素的最小矩形像素区域,所述最小矩形像素区域是根据图像处理算法和预定的值而确定的,例如处理KLT算法时,可以根据精度需求可以选择3*3、5*5等等不同大小的方形区域,也可以是3*5、5*3等等不同大小的矩形区域,当然,最小像素区域也可以是非矩形区域,例如,可以是距离特征点距离为N的像素的集合,也可以是离散的像素集合,这里不做限定。In some possible designs, the data block of the feature point may include data corresponding to a minimum pixel area of a pixel of the image selected by the image processing algorithm for the feature point. That is to say, the data block of the feature point includes data corresponding to all the pixels required to process the feature point. The minimum pixel area may be a minimum rectangular pixel area of a pixel required to process the feature point, and the minimum rectangular pixel area is determined according to an image processing algorithm and a predetermined value, for example, when processing the KLT algorithm, according to accuracy requirements You can choose different sizes of square areas such as 3*3, 5*5, etc., or different sizes of rectangular areas such as 3*5, 5*3, etc. Of course, the minimum pixel area can also be a non-rectangular area, for example, it can be The set of pixels whose distance from the feature point is N may also be a discrete set of pixels, which is not limited herein.
图1是应用本发明实施例的技术方案的架构图。FIG. 1 is an architectural diagram of a technical solution to which an embodiment of the present invention is applied.
如图1所示,系统100包括处理器110和外部存储器120。在一些实施例中,该处理器110可以是计算设备中的处理器,也可以是可移动设备(例如无人机)中的处理器。该处理器110可以为任意种类的处理器,本发明实施例对此不做限定。在一些实施例中,该处理器110可以为由内部存储器112和处理单元114组成。该内部存储器112可以为缓存,例如,行缓存(line buffer),但本发明实施例对此并不限定。在一些实施例中,该处理器110可以通过电路实现。在一些实施例中,该处理器110可以为通用处理器。在一些实施例中,该处理器110可以为芯片,例如FPGA或ASIC等。该外部存 储器120可以为内存,例如,DDRSDRAM,但本发明实施例对此并不限定。As shown in FIG. 1, system 100 includes a processor 110 and an external memory 120. In some embodiments, the processor 110 can be a processor in a computing device or a processor in a mobile device (eg, a drone). The processor 110 can be any type of processor, which is not limited in this embodiment of the present invention. In some embodiments, the processor 110 can be comprised of an internal memory 112 and a processing unit 114. The internal memory 112 may be a cache, for example, a line buffer, but this is not limited by the embodiment of the present invention. In some embodiments, the processor 110 can be implemented by circuitry. In some embodiments, the processor 110 can be a general purpose processor. In some embodiments, the processor 110 can be a chip, such as an FPGA or ASIC or the like. External storage The memory 120 may be a memory, for example, a DDR SDRAM, but the embodiment of the present invention is not limited thereto.
该外部存储器120可以存储图像的全部像素。该内部存储器112可以存储图像的一部分像素。在一些实施例中,该处理器110在处理图像时,从该外部存储器120中将图像的一部分像素读取到该内部存储器112中进行处理。The external memory 120 can store all of the pixels of the image. The internal memory 112 can store a portion of the pixels of the image. In some embodiments, the processor 110 reads a portion of the pixels of the image from the external memory 120 into the internal memory 112 for processing when processing the image.
在一些设计中,可移动设备,也可以称为移动设备,可以采用本发明实施例的技术方案。该可移动设备可以是无人机、无人驾驶船、自动驾驶车辆或机器人等,但本发明实施例对此并不限定。In some designs, the mobile device, which may also be referred to as a mobile device, may adopt the technical solution of the embodiment of the present invention. The mobile device may be a drone, an unmanned boat, an autonomous vehicle or a robot, etc., but the embodiment of the present invention is not limited thereto.
图2是本发明实施例的可移动设备200的示意性架构图。2 is a schematic architectural diagram of a removable device 200 in accordance with an embodiment of the present invention.
如图2所示,可移动设备200可以包括动力系统210、控制系统220、传感系统230和处理系统240。As shown in FIG. 2, the mobile device 200 can include a power system 210, a control system 220, a sensing system 230, and a processing system 240.
动力系统210用于为该可移动设备200提供动力。Power system 210 is used to power the mobile device 200.
以无人机为例,无人机的动力系统可以包括电子调速器(简称为电调)、螺旋桨以及与螺旋桨相对应的电机。电机连接在电子调速器与螺旋桨之间,电机和螺旋桨设置在对应的机臂上;电子调速器用于接收控制系统产生的驱动信号,并根据驱动信号提供驱动电流给电机,以控制电机的转速。电机用于驱动螺旋桨旋转,从而为无人机的飞行提供动力。Taking the drone as an example, the power system of the drone may include an electronic governor (referred to as an electric current), a propeller, and a motor corresponding to the propeller. The motor is connected between the electronic governor and the propeller, and the motor and the propeller are disposed on the corresponding arm; the electronic governor is used for receiving the driving signal generated by the control system, and providing driving current to the motor according to the driving signal to control the motor Rotating speed. The motor is used to drive the propeller to rotate to power the drone's flight.
传感系统230可以用于测量可移动设备200的姿态信息,即可移动设备200在空间的位置信息和状态信息,例如,三维位置、三维角度、三维速度、三维加速度和三维角速度等。传感系统230例如可以包括陀螺仪、电子罗盘、惯性测量单元(Inertial Measurement Unit,IMU)、视觉传感器、全球定位系统(Global Positioning System,GPS)、气压计、空速计等传感器中的至少一种。The sensing system 230 can be used to measure attitude information of the mobile device 200, that is, position information and state information of the mobile device 200 in space, for example, three-dimensional position, three-dimensional angle, three-dimensional velocity, three-dimensional acceleration, three-dimensional angular velocity, and the like. The sensing system 230 may include, for example, at least one of a gyroscope, an electronic compass, an Inertial Measurement Unit (IMU), a vision sensor, a Global Positioning System (GPS), a barometer, an airspeed meter, and the like. Kind.
在本发明实施例中,传感系统230还可用于采集图像,即传感系统230包括用于采集图像的传感器,例如相机等。In an embodiment of the invention, sensing system 230 can also be used to acquire images, i.e., sensing system 230 includes sensors for acquiring images, such as cameras and the like.
控制系统220用于控制可移动设备200的移动。控制系统220可以按照预先设置的程序指令对可移动设备200进行控制。例如,控制系统220可以根据传感系统230测量的可移动设备200的姿态信息控制可移动设备200的移动。控制系统220也可以根据来自遥控器的控制信号对可移动设备200进行控制。例如,对于无人机,控制系统220可以为飞行控制系统(飞控),或者为飞控中的控制电路。 Control system 220 is used to control the movement of mobile device 200. The control system 220 can control the mobile device 200 in accordance with program instructions that are set in advance. For example, the control system 220 can control the movement of the mobile device 200 based on the attitude information of the mobile device 200 measured by the sensing system 230. Control system 220 can also control mobile device 200 based on control signals from the remote control. For example, for a drone, the control system 220 can be a flight control system (flying control) or a control circuit in a flight control.
处理系统240可以处理传感系统230采集的图像。例如,处理系统240可以为图像信号处理(Image Signal Processing,ISP)类芯片。Processing system 240 can process the images acquired by sensing system 230. For example, processing system 240 can be an Image Signal Processing (ISP) type of chip.
处理系统240可以为图1中的系统100,或者,处理系统240可以包括图1中的系统100。Processing system 240 may be system 100 of FIG. 1, or processing system 240 may include system 100 of FIG.
应理解,上述对于可移动设备200的各组成部件的划分和命名仅仅是示例性的,并不应理解为对本发明实施例的限制。It should be understood that the above-mentioned division and naming of the components of the mobile device 200 are merely exemplary and should not be construed as limiting the embodiments of the present invention.
还应理解,可移动设备200还可以包括图2中未示出的其他部件,本发明实施例对此并不限定。It should also be understood that the removable device 200 may also include other components not shown in FIG. 2, which are not limited by the embodiments of the present invention.
图3示出了本发明一个实施例的处理图像的方法300的示意性流程图。该方法300可以由图1所示的系统100或处理器110执行;或者由图2所示的可移动设备200执行。具体地,在由可移动设备200执行时,可以由图2中的处理系统240执行。FIG. 3 shows a schematic flow diagram of a method 300 of processing an image in accordance with one embodiment of the present invention. The method 300 can be performed by the system 100 or processor 110 shown in FIG. 1; or by the removable device 200 shown in FIG. 2. In particular, when executed by the removable device 200, it can be performed by the processing system 240 of FIG.
310,获取第一图像的第一特征点对应的第一数据块。310. Acquire a first data block corresponding to the first feature point of the first image.
特征点为图像处理的对象。在处理图像时,针对一个特征点,可能会需要与特征点相关的多个像素,例如,特征点附近的多个像素。在本发明实施例中,包括该多个像素的数据块(block)为特征点对应的数据块。The feature point is an object of image processing. When processing an image, for a feature point, multiple pixels associated with the feature point may be needed, for example, multiple pixels near the feature point. In the embodiment of the present invention, the data block including the plurality of pixels is a data block corresponding to the feature point.
可选地,在本发明一个实施例中,该第一数据块包括图像处理算法针对该第一特征点选取该第一图像的像素的最小矩形像素区域。Optionally, in an embodiment of the present invention, the first data block includes a minimum rectangular pixel area in which an image processing algorithm selects pixels of the first image for the first feature point.
该最小矩形像素区域也称为选取像素的窗口。该第一数据块可以为该最小矩形像素区域,也可以大于该最小矩形像素区域,也就是说,该第一数据块中包括了图像处理算法处理该第一特征点所需的所有像素。The smallest rectangular pixel area is also referred to as a window that selects pixels. The first data block may be the smallest rectangular pixel area, or may be larger than the minimum rectangular pixel area, that is, the first data block includes all pixels required by the image processing algorithm to process the first feature point.
可选地,在本发明一个实施例中,可以读取该第一图像的多行像素,获取该多行像素中,该第一特征点对应的该第一数据块。Optionally, in an embodiment of the present invention, the plurality of rows of pixels of the first image may be read, and the first data block corresponding to the first feature point in the plurality of rows of pixels is obtained.
具体而言,在读取图像的过程中,一次将图像的多行像素读取到缓存中,在这个过程中,获取该多行像素中的相应数据块进行后续操作;然后再读取图像的一行或多行像素覆盖掉最先进入到缓存的数据,获取新读取的多行像素中的相应数据块,以此类推,直至处理完整个图像。Specifically, in the process of reading an image, multiple rows of pixels of the image are read into the cache at a time, and in this process, corresponding data blocks in the plurality of rows of pixels are acquired for subsequent operations; and then the image is read. One or more rows of pixels overwrite the data that first entered the cache, get the corresponding block of the newly read multi-line pixels, and so on, until the entire image is processed.
在本发明实施例中,该第一图像可以为原始图像;也可以为图像处理过程中的中间图像,例如,该第一图像可以为图像金字塔中的一层,特别的,可以是金字塔图像中的最底层图像。In the embodiment of the present invention, the first image may be an original image; or may be an intermediate image in an image processing process, for example, the first image may be a layer in an image pyramid, in particular, may be in a pyramid image. The bottom layer image.
举例来说,对于KLT算法,在处理过程中一般需要构建图像的图像 金字塔。上述第一图像可以为图像金字塔中的一层,在这种情况下,因为在生成图像金字塔时,需要读取图像数据,该读取的图像数据可以同时按照上述方法存储特征点对应的数据块,在获得金字塔图像的同时获取该数据块,进一步的,金字塔的每一层之间的特征点具有特定的联系,根据一层的特征点可以得到金字塔图像其他层的特征点位置,在获取部分或者整个金字塔的过程中,可以通知得到金字塔不同层的特征点对应的数据块。而且不需要增加额外的读取时间,这种方式不仅针对KLT算法,针对所有的图像处理都适用。For example, for the KLT algorithm, it is generally necessary to construct an image of the image during processing. pyramid. The first image may be a layer in the image pyramid. In this case, since the image data needs to be read when the image pyramid is generated, the read image data may simultaneously store the data block corresponding to the feature point according to the above method. Obtaining the data block while obtaining the pyramid image. Further, the feature points between each layer of the pyramid have a specific relationship, and the feature points of other layers of the pyramid image can be obtained according to the feature points of one layer, in the acquisition part Or in the process of the entire pyramid, the data blocks corresponding to the feature points of different layers of the pyramid can be notified. And there is no need to add extra read time, this method is not only for the KLT algorithm, but also for all image processing.
320,将该第一数据块存储到内存中连续的第一存储空间中,并记录该第一特征点与该第一存储空间的对应关系。The first data block is stored in the first storage space in the memory, and the corresponding relationship between the first feature point and the first storage space is recorded.
在本发明实施例中,将特征点对应的数据块在内存中连续存储,即一个数据块存储到一个连续的存储空间中,同时记录特征点与存储空间的对应关系。这样,在需要读取某一特征点对应的数据块时,可以根据该对应关系将该数据块从该存储空间中连续读取,相对于随机访问读取,可以提高读取效率,从而能够提高处理效率。In the embodiment of the present invention, the data blocks corresponding to the feature points are continuously stored in the memory, that is, one data block is stored in a continuous storage space, and the corresponding relationship between the feature points and the storage space is recorded. In this way, when the data block corresponding to a certain feature point needs to be read, the data block can be continuously read from the storage space according to the correspondence relationship, and the reading efficiency can be improved compared to the random access reading, thereby improving the data block. Processing efficiency.
可选地,在本发明一个实施例中,该对应关系可以为该第一特征点与该第一存储空间的起始地址的对应关系。Optionally, in an embodiment of the present invention, the correspondence may be a correspondence between the first feature point and a starting address of the first storage space.
这样,在处理该第一特征点时,可以从该起始地址连续读取出该第一数据块。Thus, when processing the first feature point, the first data block can be continuously read from the start address.
应理解,该对应关系也可以为其他形式的对应关系,本发明实施例对此并不限定。It should be understood that the corresponding relationship may also be a corresponding relationship of other forms, which is not limited by the embodiment of the present invention.
可选地,在本发明一个实施例中,可以将该第一图像的多个特征点对应的数据块按顺序存储到该内存中。Optionally, in an embodiment of the present invention, the data blocks corresponding to the multiple feature points of the first image may be sequentially stored into the memory.
具体而言,对于该第一图像的多个特征点,可以按顺序,例如,光栅扫描顺序,光栅为该特征点进行图像处理的过程中,所需要窗口,用于框定部分像素进行计算,即先横向再纵向的顺序,先后存储相应的数据块,其中,每个数据块存储到内存中一个连续的存储空间中。应理解,上述顺序也可以为其他顺序,本发明实施例对此并不限定。Specifically, for a plurality of feature points of the first image, in a sequence, for example, a raster scan order, and a raster is used for performing image processing on the feature point, a window is required for framed partial pixels for calculation, that is, First, the horizontal and vertical sequences are sequentially stored with corresponding data blocks, wherein each data block is stored in a continuous storage space in the memory. It should be understood that the foregoing sequence may also be other sequences, which are not limited by the embodiments of the present invention.
可选地,多个特征点的数据块在内存中可以占据连续的存储空间,即多个数据块可以相邻存储,但本发明实施例对此并不限定。Alternatively, the data blocks of the plurality of feature points may occupy a contiguous storage space in the memory, that is, the plurality of data blocks may be stored adjacent to each other, but the embodiment of the present invention is not limited thereto.
可选地,在本发明一个实施例中,在需要处理该第一特征点时,可以 根据该对应关系,从该第一存储空间中读取该第一数据块。Optionally, in an embodiment of the present invention, when the first feature point needs to be processed, The first data block is read from the first storage space according to the correspondence.
由于特征点的数据块已连续存储在了内存中,在利用算法处理图像时,按照处理顺序,需要读取某一特征点的数据块时,可以根据记录的对应关系,确定该数据块的存储地址,根据该存储地址,连续读取该数据块。Since the data blocks of the feature points are continuously stored in the memory, when the image is processed by the algorithm, when the data block of a certain feature point needs to be read according to the processing order, the storage of the data block can be determined according to the correspondence relationship of the records. An address from which the data block is continuously read according to the storage address.
可选地,在本发明一个实施例中,可以根据第二图像的特征点处理顺序,确定需要处理该第一特征点;根据该对应关系,从该第一存储空间中读取该第一数据块。Optionally, in an embodiment of the present invention, determining, according to a feature point processing sequence of the second image, that the first feature point needs to be processed; and reading the first data from the first storage space according to the correspondence relationship Piece.
具体而言,特征点处理顺序,即选择特征点的先后顺序,可以是该第一图像的特征点处理顺序,也可以是其他图像的特征点处理顺序。Specifically, the feature point processing order, that is, the order in which the feature points are selected, may be the feature point processing order of the first image, or may be the feature point processing order of other images.
例如,对于KLT算法,在I图像和J图像的特征点匹配处理中,第一图像和第二图像分别表示I图像和J图像的金字塔中的对应层。在该层的处理中,既可以按照第一图像的特征点处理顺序选择特征点,也可以按照第二图像的特征点处理顺序选择特征点。若按照第二图像的特征点处理顺序选择特征点,例如,选择的特征点对应第一图像中的该第一特征点,则在需要读取该第一图像中的该第一数据块时,可以根据记录的对应关系,确定该第一数据块的存储地址,根据该存储地址,连续读取该第一数据块。For example, for the KLT algorithm, in the feature point matching processing of the I image and the J image, the first image and the second image respectively represent corresponding layers in the pyramid of the I image and the J image. In the processing of the layer, the feature points may be selected in accordance with the feature point processing order of the first image, or the feature points may be selected in the feature point processing order of the second image. If the feature point is selected according to the feature point processing order of the second image, for example, the selected feature point corresponds to the first feature point in the first image, when the first data block in the first image needs to be read, The storage address of the first data block may be determined according to the corresponding relationship of the record, and the first data block is continuously read according to the storage address.
可选地,对于该第二图像,也可以采用前述方案存储特征点的数据块。可选地,该第二图像的特征点处理顺序可以与存储顺序相同,这样,若按照该第二图像的特征点处理顺序选择特征点,该第二图像的各数据块可以按存储顺序读取,对于该第一图像中的数据块,可按照前述方式读取。Optionally, for the second image, the foregoing solution may also be used to store the data block of the feature point. Optionally, the feature point processing order of the second image may be the same as the storage order, such that if the feature points are selected according to the feature point processing order of the second image, each data block of the second image may be read in a storage order. For the data block in the first image, it can be read as described above.
应理解,该第二图像也可以采用其他方式存储到内存,本发明实施例对此并不限定。不管该第二图像采用何种方式存储,都可以根据该第二图像确定处理顺序,当按照处理顺序确定需要处理第一图像的特征点时,再采用前述方式读取第一图像相应特征点的数据块。It should be understood that the second image may be stored in the memory in other manners, which is not limited by the embodiment of the present invention. Regardless of the manner in which the second image is stored, the processing sequence may be determined according to the second image. When it is determined that the feature points of the first image need to be processed according to the processing order, the corresponding feature points of the first image are read in the foregoing manner. data block.
还应理解,第一图像和第二图像也不限定于KLT算法中。对于其他算法,也可以根据第二图像确定处理顺序,当按照处理顺序确定需要处理第一图像的特征点时,再采用前述方式读取第一图像相应特征点的数据块。It should also be understood that the first image and the second image are also not limited to the KLT algorithm. For other algorithms, the processing sequence may also be determined according to the second image. When it is determined that the feature points of the first image need to be processed according to the processing order, the data blocks of the corresponding feature points of the first image are read in the foregoing manner.
可选的,对于第二图像中的特征点也可以不存储特征点数据块,而是按照顺序进行排序,例如,从左到右,从上到下,以便于在第二图像进入缓存时,从上到下依次读取的过程中可以遍历所有第二图像中的特征点,然后遍历的所有第二图像中的特征点都根据对应的第一图像特征点的存储地址, 读取第一特征点对应的数据块进行计算。Optionally, the feature point data blocks may not be stored for the feature points in the second image, but are sequentially sorted, for example, from left to right and top to bottom, so that when the second image enters the cache, The feature points in all the second images may be traversed in the process of reading from top to bottom, and then the feature points in all the second images traversed are according to the storage address of the corresponding first image feature points. The data block corresponding to the first feature point is read for calculation.
可选的,第二图像可以按照上述方式将特征点对应的数据块进行向存储空间中连续的存储,后续在读取时可以按照存储顺序读取。Optionally, the second image may be continuously stored in the storage space according to the foregoing manner, and may be read in the storage order after the reading.
可选地,第一图像特征点对应的数据块的存储也可以用于其他计算,如orb、brief计算等。Optionally, the storage of the data block corresponding to the first image feature point may also be used for other calculations, such as orb, brief calculation, and the like.
本发明实施例的技术方案,通过将特征点对应的数据块在内存中连续存储,可以减少内存访问的次数,提高读取效率和处理效率;另外,还可以降低对其他设备抢占内存的带宽的影响,从而提升整个系统的性能。The technical solution of the embodiment of the present invention can reduce the number of memory accesses and improve the reading efficiency and processing efficiency by continuously storing the data blocks corresponding to the feature points in the memory. In addition, the bandwidth of the memory occupied by other devices can be reduced. Impact, thereby improving the performance of the entire system.
下面以KLT算法为例,详细描述本发明实施例的技术方案。应理解,这只是为了帮助本领域技术人员更好地理解本发明实施例,而非限制本发明实施例的范围。The technical solution of the embodiment of the present invention is described in detail below by taking the KLT algorithm as an example. It is to be understood that the scope of the present invention is not limited by the scope of the embodiments of the invention.
KLT算法中跟踪特征点的伪代码如下所示:The pseudo code for tracking feature points in the KLT algorithm is as follows:
For a point u in Image I,find corresponding location v in Image J(对于图像I的点u,在图像J中寻找对应的位置v)For a point u in Image I, find corresponding location v in Image J (for point u of image I, find the corresponding position v in image J)
Build pyramids for Images I and J(为图像I和J建立金字塔):Build pyramids for Images I and J (building pyramids for images I and J):
Figure PCTCN2017100061-appb-000001
and
Figure PCTCN2017100061-appb-000002
Figure PCTCN2017100061-appb-000001
And
Figure PCTCN2017100061-appb-000002
Initialization of pyramidal guess(初始化金字塔猜测):Initialization of pyramidal guess:
Figure PCTCN2017100061-appb-000003
Figure PCTCN2017100061-appb-000003
for L=Lm down to 0with step of -1(L从Lm开始依次-1直到0)For L=L m down to 0with step of -1 (L starts from L m in order -1 until 0)
Identify pixel location of point uin image IL(在图像IL中确定点u的像素位置):Identify pixel location of point uin image I L (determine the pixel position of point u in image I L ):
uL=[pxpy]T=u/2L u L =[p x p y ] T =u/2 L
Calculate derivative of IL with respect to x(计算IL对x的导数): Calculate derivative of I L with respect to x ( I L calculates the derivative of x):
Figure PCTCN2017100061-appb-000004
Figure PCTCN2017100061-appb-000004
Calculate derivative of IL with respect to y(计算IL对y的导数): Calculate derivative of I L with respect to y ( I L calculates the derivative of y):
Figure PCTCN2017100061-appb-000005
Figure PCTCN2017100061-appb-000005
Calculate spatial gradient matrix G(计算空间梯度矩阵G):Calculate spatial gradient matrix G:
Figure PCTCN2017100061-appb-000006
Figure PCTCN2017100061-appb-000006
Initialization of iterative L-K optical flow computation(初始化迭代L-K光流计算): Initialization of iterative L-K optical flow computation:
Figure PCTCN2017100061-appb-000007
Figure PCTCN2017100061-appb-000007
for k=1to K with step of 1(or until‖ηk‖<accuracy threshold)(k从1开始依次加1直到K,或者直到‖ηk‖<精度阈值)For k=1to K with step of 1(or until‖η k ‖<accuracy threshold) (k is incremented by 1 from 1 to K, or until ‖η k ‖<precision threshold)
Calculate image difference(计算图像差):Calculate image difference:
Figure PCTCN2017100061-appb-000008
Figure PCTCN2017100061-appb-000008
Calculate image mismatch vector(计算图像失配矢量):Calculate image mismatch vector:
Figure PCTCN2017100061-appb-000009
Figure PCTCN2017100061-appb-000009
Calculate optical flow using L-K optical flow computation(采用L-K光流计算法计算光流):Calculate optical flow using L-K optical flow computation (calculation of optical flow using L-K optical flow calculation):
Figure PCTCN2017100061-appb-000010
Figure PCTCN2017100061-appb-000010
Obtain the pixel displacement guess for next iteration(为下一迭代获取像素位移猜测):Obtain the pixel displacement guess for next iteration: Obtain pixel displacement guess for the next iteration:
Figure PCTCN2017100061-appb-000011
Figure PCTCN2017100061-appb-000011
end of for-loop on k(对于k的for循环结束)End of for-loop on k (for the end of the for loop of k)
Identify optical flow at Layer L(确定层L上的光流):Identify optical flow at Layer L: Determine the optical flow on layer L:
Figure PCTCN2017100061-appb-000012
Figure PCTCN2017100061-appb-000012
Identify pyramidal guess for next Layer L-1(为下一层L-1确定金字塔猜测):Identify pyramidal guess for next Layer L-1 (determine pyramid guess for the next layer L-1):
Figure PCTCN2017100061-appb-000013
Figure PCTCN2017100061-appb-000013
end of for-loop on L(对于L的for循环结束)End of for-loop on L (for the end of the L for loop)
Identify final optical flow vector(确定最终光流矢量):Identify final optical flow vector:
d=g0+d0 d=g 0 +d 0
Identify location of point on J(确定J上点的位置):Identify location of point on J: Determine the location of the point on J:
v=u+dv=u+d
Solution:The corresponding point is at location v on image J(解答:对应点在图像J上的位置v)Solution:The corresponding point is at location v on image J (answer: position v of the corresponding point on image J)
从上可以看到,KLT算法的关键的实现步骤为2个for循环,一个for循环实现G的计算,另外一个for循环实现dL的计算,从而进行下一层KLT算法的运算。计算G以及δIk
Figure PCTCN2017100061-appb-000014
都需要数据块的读取。当图像的点数增多即图像尺寸变大时,内存的读取就是系统性能的瓶颈。
As can be seen from the above, the key implementation steps of the KLT algorithm are two for loops, one for loop to implement G calculation, and another for loop to implement d L calculation, thereby performing the next layer of KLT algorithm operation. Calculate G and δI k ,
Figure PCTCN2017100061-appb-000014
Both need to read the data block. When the number of images increases, that is, the image size becomes larger, the reading of the memory is a bottleneck of system performance.
在本发明实施例中,在金字塔I构建的过程中或者是I数据的读取过程中,将需要的数据块按照顺序存储到内存中,其中,每个数据块存储到内存中一个连续的存储空间中。可选地,对于图像J也做类似处理。In the embodiment of the present invention, in the process of constructing the pyramid I or during the reading of the I data, the required data blocks are sequentially stored into the memory, wherein each data block is stored into a continuous storage in the memory. In space. Alternatively, a similar process is performed for the image J.
举例来说,金字塔的数据在创建过程中,需要按顺序读入原始数据,因此可以使用一个行缓存(linebuffer),例如该line buffer可以缓存图像20行的数据,根据已知的特征点的位置,将对应的数据块,例如19x19的像素区域的像素从line buffer中读取后,再按顺序写入到内存中,同时建立该特征点对应的数据块在内存中写入的起始地址。金字塔各层的数据块的存储,均可采用此方案。可选地,若金字塔某一层的大小已很小,则可以存储到缓存中,而不用存储到内存中。For example, during the creation of the pyramid data, the original data needs to be read in order, so a line buffer can be used. For example, the line buffer can cache 20 lines of data according to the position of the known feature points. The corresponding data block, for example, the pixel of the pixel area of 19×19 is read from the line buffer, and then written into the memory in order, and the starting address of the data block corresponding to the feature point is written in the memory. This scheme can be used for the storage of data blocks of each layer of the pyramid. Alternatively, if a layer of a pyramid is small in size, it can be stored in the cache without being stored in memory.
在进行KLT算法计算时,对于每一层,可以按照图像J的该层中的特征点的顺序依次处理特征点。这样,图像J的该层中的数据块可以按照存储顺序读取,对应的图像I的该层中的数据块可以根据记录的对应关系,确定存储地址,根据该存储地址实现数据块的读取。图像J的该层中的数据块也可以按照图像J的读取顺序进行读取,即按照从左到右,从上到下的顺序进行读取,例如,图像J上有多个特征点,从左到右从上到下第一个特征点为特征点1J,其对应的图像I中的特征点1I,当需要计算图像I的该层中特征点1I的G时,根据该特征点对应的内存中的起始地址,就可以连续的读取出相应的数据块,然而再进行后续的运算(例如第二个for循环)。When performing the KLT algorithm calculation, for each layer, the feature points may be sequentially processed in the order of the feature points in the layer of the image J. In this way, the data blocks in the layer of the image J can be read in the storage order, and the data blocks in the layer of the corresponding image I can determine the storage address according to the correspondence relationship of the records, and realize the reading of the data block according to the storage address. . The data blocks in the layer of the image J can also be read in the reading order of the image J, that is, read from left to right and from top to bottom. For example, there are multiple feature points on the image J. The first feature point from top to bottom from left to right is the feature point 1J, and the feature point 1I in the corresponding image I, when it is required to calculate the G of the feature point 1I in the layer of the image I, according to the feature point corresponding to the feature point The starting address in memory, you can continuously read out the corresponding data block, but then perform subsequent operations (such as the second for loop).
这样,图像I和图像J的相应层中的数据块都能较快地读取,从而能够提高算法的处理效率。In this way, the data blocks in the respective layers of the image I and the image J can be read faster, thereby improving the processing efficiency of the algorithm.
上文详细描述了本发明实施例的处理图像的方法,下面将描述本发明实施例的集成电路、处理器、计算机系统和可移动设备。应理解,本发明实施例的集成电路、处理器、计算机系统和可移动设备可以执行前述本发明实施例的各种方法,即以下各种产品的具体工作过程,可以参考前述方法实施例中的对应过程。The method of processing an image of an embodiment of the present invention has been described in detail above, and an integrated circuit, a processor, a computer system, and a mobile device of an embodiment of the present invention will be described below. It should be understood that the integrated circuit, the processor, the computer system, and the mobile device of the embodiments of the present invention may perform the foregoing various methods of the embodiments of the present invention, that is, the specific working processes of the following various products, and may refer to the foregoing method embodiments. Corresponding process.
图4示出了本发明实施例的集成电路400的示意性框图。如图4所示,该集成电路400可以包括:处理单元410和缓存420。FIG. 4 shows a schematic block diagram of an integrated circuit 400 in accordance with an embodiment of the present invention. As shown in FIG. 4, the integrated circuit 400 can include a processing unit 410 and a cache 420.
该处理单元410,用于从该缓存420中获取第一图像的第一特征点对应的第一数据块;The processing unit 410 is configured to acquire, from the cache 420, a first data block corresponding to the first feature point of the first image;
将该第一数据块存储到内存中连续的第一存储空间中,并记录该第一 特征点与该第一存储空间的对应关系。Storing the first data block into a continuous first storage space in the memory, and recording the first A correspondence between the feature point and the first storage space.
可选地,在本发明一个实施例中,该处理单元410用于:Optionally, in an embodiment of the present invention, the processing unit 410 is configured to:
将该第一图像的多行像素读取到该缓存420中,从该缓存420中获取该多行像素中,该第一特征点对应的该第一数据块。The plurality of rows of pixels of the first image are read into the buffer 420, and the first data block corresponding to the first feature point is obtained from the cache 420.
可选地,在本发明一个实施例中,该对应关系为该第一特征点与该第一存储空间的起始地址的对应关系。Optionally, in an embodiment of the present invention, the correspondence is a correspondence between the first feature point and a start address of the first storage space.
可选地,在本发明一个实施例中,该处理单元410用于:Optionally, in an embodiment of the present invention, the processing unit 410 is configured to:
将该第一图像的多个特征点对应的数据块按顺序存储到该内存420中。The data blocks corresponding to the plurality of feature points of the first image are sequentially stored in the memory 420.
可选地,在本发明一个实施例中,该顺序为光栅扫描顺序。Optionally, in one embodiment of the invention, the sequence is a raster scan order.
可选地,在本发明一个实施例中,该第一图像为图像金字塔中的一层;Optionally, in an embodiment of the present invention, the first image is a layer in an image pyramid;
该处理单元410用于:The processing unit 410 is configured to:
在生成该图像金字塔时,获取该第一数据块。The first data block is obtained when the image pyramid is generated.
可选地,在本发明一个实施例中,该第一数据块包括图像处理算法针对该第一特征点选取该第一图像的像素的最小矩形像素区域。Optionally, in an embodiment of the present invention, the first data block includes a minimum rectangular pixel area in which an image processing algorithm selects pixels of the first image for the first feature point.
可选地,在本发明一个实施例中,该处理单元410还用于:Optionally, in an embodiment of the present invention, the processing unit 410 is further configured to:
在需要处理该第一特征点时,根据该对应关系,从该第一存储空间中读取该第一数据块。When the first feature point needs to be processed, the first data block is read from the first storage space according to the correspondence.
可选地,在本发明一个实施例中,该处理单元410还用于:Optionally, in an embodiment of the present invention, the processing unit 410 is further configured to:
根据第二图像的特征点处理顺序,确定需要处理该第一特征点;Determining that the first feature point needs to be processed according to a feature point processing sequence of the second image;
根据该对应关系,从该第一存储空间中读取该第一数据块。The first data block is read from the first storage space according to the correspondence.
可选地,在本发明一个实施例中,该集成电路400可以为FPGA或ASIC。Optionally, in an embodiment of the invention, the integrated circuit 400 can be an FPGA or an ASIC.
应理解,在上述本发明各种实施例的集成电路中,控制单元可以由电路实现,该电路可以是统一的一个电路,也可以是由几个电路组成的电路。本发明实施例对电路的具体实现形式不做限定。It should be understood that in the integrated circuit of the various embodiments of the present invention described above, the control unit may be implemented by a circuit, which may be a unified circuit or a circuit composed of several circuits. The specific implementation form of the circuit is not limited in the embodiment of the present invention.
还应理解,本发明实施例中的各种单元或模块可以集成在一个芯片中,也可以分布在不同的芯片中。It should also be understood that the various units or modules in the embodiments of the present invention may be integrated in one chip or distributed in different chips.
本发明实施例还提供了一种处理器,该处理器可以包括上述本发明各种实施例的集成电路。The embodiment of the present invention further provides a processor, which may include the integrated circuit of the various embodiments of the present invention described above.
本发明实施例还提供了一种计算机系统,该计算机系统可以包括上述本发明实施例的处理器,以及内存。 The embodiment of the invention further provides a computer system, which can include the processor of the embodiment of the invention described above, and a memory.
图5示出了本发明另一个实施例的计算机系统500的示意性框图。FIG. 5 shows a schematic block diagram of a computer system 500 in accordance with another embodiment of the present invention.
如图5所示,该计算机系统500可以包括前述本发明实施例的集成电路400;以及内存510。As shown in FIG. 5, the computer system 500 can include the integrated circuit 400 of the foregoing embodiments of the present invention; and a memory 510.
图6示出了本发明又一个实施例的计算机系统600的示意性框图。FIG. 6 shows a schematic block diagram of a computer system 600 in accordance with yet another embodiment of the present invention.
如图6所示,该计算机系统600可以包括处理器610和存储器620。As shown in FIG. 6, the computer system 600 can include a processor 610 and a memory 620.
应理解,计算机系统中还可以包括其他计算机系统中通常所包括的部件,例如,输入输出设备、通信接口等,本发明实施例对此并不限定。It should be understood that the computer system may also include components that are generally included in other computer systems, such as input and output devices, communication interfaces, and the like, which are not limited by the embodiments of the present invention.
存储器620用于存储计算机可执行指令。 Memory 620 is used to store computer executable instructions.
存储器620可以是各种种类的存储器,例如可以包括高速随机存取存储器(Random Access Memory,RAM),还可以包括非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器,本发明实施例对此并不限定。The memory 620 may be various types of memory, for example, may include a high speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory, which is implemented by the present invention. This example is not limited to this.
处理器610用于访问该存储器620,并执行该计算机可执行指令,以进行上述本发明各种实施例的处理图像的方法中的操作。The processor 610 is configured to access the memory 620 and execute the computer executable instructions to perform the operations in the method of processing images of the various embodiments of the present invention described above.
处理器610可以包括微处理器,现场可编程门阵列(Field-Programmable Gate Array,FPGA),中央处理器(Central Processing unit,CPU),图形处理器(Graphics Processing Unit,GPU)等,本发明实施例对此并不限定。The processor 610 may include a microprocessor, a field-programmable gate array (FPGA), a central processing unit (CPU), a graphics processing unit (GPU), etc., and is implemented by the present invention. This example is not limited to this.
本发明实施例还提供了一种可移动设备,该可移动设备可以包括上述本发明各种实施例的集成电路、处理器或者计算机系统。Embodiments of the present invention also provide a removable device that can include an integrated circuit, processor, or computer system in accordance with various embodiments of the present invention described above.
本发明实施例的集成电路、处理器、计算机系统和可移动设备可对应于本发明实施例的处理图像的方法的执行主体,并且集成电路、处理器、计算机系统和可移动设备中的各个模块的上述和其它操作和/或功能分别为了实现前述各个方法的相应流程,为了简洁,在此不再赘述。An integrated circuit, a processor, a computer system, and a removable device according to embodiments of the present invention may correspond to an execution body of a method of processing an image of an embodiment of the present invention, and each module in an integrated circuit, a processor, a computer system, and a removable device The above and other operations and/or functions are respectively implemented in order to implement the corresponding processes of the foregoing various methods, and are not described herein for brevity.
本发明实施例还提供了一种计算机存储介质,该计算机存储介质中存储有程序代码,该程序代码可以用于指示执行上述本发明实施例的处理图像的方法。The embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores program code, and the program code can be used to indicate a method for processing an image of the embodiment of the invention.
应理解,在本发明实施例中,术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系。例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。 It should be understood that in the embodiment of the present invention, the term "and/or" is merely an association relationship describing an associated object, indicating that there may be three relationships. For example, A and/or B may indicate that A exists separately, and A and B exist simultaneously, and B cases exist alone. In addition, the character "/" in this article generally indicates that the contextual object is an "or" relationship.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both, for clarity of hardware and software. Interchangeability, the composition and steps of the various examples have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。A person skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the system, the device and the unit described above can refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, or an electrical, mechanical or other form of connection.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本发明实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部 或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention contributes in essence or to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium. Including a number of instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform all of the methods described in various embodiments of the present invention Or part of the steps. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。 The above is only the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any equivalent person can be easily conceived within the technical scope of the present invention by any person skilled in the art. Modifications or substitutions are intended to be included within the scope of the invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims (22)

  1. 一种处理图像的方法,其特征在于,包括:A method for processing an image, comprising:
    获取第一图像的第一特征点对应的第一数据块;Obtaining a first data block corresponding to the first feature point of the first image;
    将所述第一数据块存储到内存中连续的第一存储空间中,并记录所述第一特征点与所述第一存储空间的对应关系。And storing the first data block into a continuous first storage space in the memory, and recording a correspondence between the first feature point and the first storage space.
  2. 根据权利要求1所述的方法,其特征在于,所述获取第一图像的第一特征点对应的第一数据块,包括:The method according to claim 1, wherein the acquiring the first data block corresponding to the first feature point of the first image comprises:
    读取所述第一图像的多行像素,获取所述多行像素中,所述第一特征点对应的所述第一数据块。Reading a plurality of rows of pixels of the first image, and acquiring the first data block corresponding to the first feature point in the plurality of rows of pixels.
  3. 根据权利要求1或2所述的方法,其特征在于,所述对应关系为所述第一特征点与所述第一存储空间的起始地址的对应关系。The method according to claim 1 or 2, wherein the correspondence relationship is a correspondence between the first feature point and a start address of the first storage space.
  4. 根据权利要求1至3任一项所述的方法,其特征在于,所述将所述第一数据块存储到内存中连续的第一存储空间中,包括:The method according to any one of claims 1 to 3, wherein the storing the first data block into a continuous first storage space in the memory comprises:
    将所述第一图像的多个特征点对应的数据块按顺序存储到所述内存中。Data blocks corresponding to the plurality of feature points of the first image are sequentially stored into the memory.
  5. 根据权利要求4所述的方法,其特征在于,所述顺序为光栅扫描顺序。The method of claim 4 wherein said order is a raster scan order.
  6. 根据权利要求1至5任一项所述的方法,其特征在于,所述第一图像为图像金字塔中的一层;The method according to any one of claims 1 to 5, wherein the first image is a layer in an image pyramid;
    所述获取第一图像的第一特征点对应的第一数据块,包括:The acquiring the first data block corresponding to the first feature point of the first image includes:
    在生成所述图像金字塔时,获取所述第一数据块。The first data block is acquired when the image pyramid is generated.
  7. 根据权利要求1至6任一项所述的方法,其特征在于,所述第一数据块包括图像处理算法针对所述第一特征点选取所述第一图像的像素的最小矩形像素区域。The method according to any one of claims 1 to 6, wherein the first data block comprises a minimum rectangular pixel area in which an image processing algorithm selects pixels of the first image for the first feature point.
  8. 根据权利要求1至7任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 7, wherein the method further comprises:
    在需要处理所述第一特征点时,根据所述对应关系,从所述第一存储空间中读取所述第一数据块。When the first feature point needs to be processed, the first data block is read from the first storage space according to the corresponding relationship.
  9. 根据权利要求1至7任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 7, wherein the method further comprises:
    根据第二图像的特征点处理顺序,确定需要处理所述第一特征点;Determining that the first feature point needs to be processed according to a feature point processing sequence of the second image;
    根据所述对应关系,从所述第一存储空间中读取所述第一数据块。 Reading the first data block from the first storage space according to the correspondence.
  10. 一种集成电路,其特征在于,包括:处理单元和缓存;An integrated circuit, comprising: a processing unit and a cache;
    其中,所述处理单元,用于从所述缓存中获取第一图像的第一特征点对应的第一数据块;The processing unit is configured to acquire, from the cache, a first data block corresponding to a first feature point of the first image;
    将所述第一数据块存储到内存中连续的第一存储空间中,并记录所述第一特征点与所述第一存储空间的对应关系。And storing the first data block into a continuous first storage space in the memory, and recording a correspondence between the first feature point and the first storage space.
  11. 根据权利要求10所述的集成电路,其特征在于,所述处理单元用于:The integrated circuit of claim 10 wherein said processing unit is operative to:
    将所述第一图像的多行像素读取到所述缓存中,从所述缓存中获取所述多行像素中,所述第一特征点对应的所述第一数据块。Reading a plurality of rows of pixels of the first image into the cache, and acquiring, from the cache, the first data block corresponding to the first feature point in the plurality of rows of pixels.
  12. 根据权利要求10或11所述的集成电路,其特征在于,所述对应关系为所述第一特征点与所述第一存储空间的起始地址的对应关系。The integrated circuit according to claim 10 or 11, wherein the correspondence relationship is a correspondence between the first feature point and a start address of the first storage space.
  13. 根据权利要求10至12任一项所述的集成电路,其特征在于,所述处理单元用于:The integrated circuit according to any one of claims 10 to 12, wherein the processing unit is configured to:
    将所述第一图像的多个特征点对应的数据块按顺序存储到所述内存中。Data blocks corresponding to the plurality of feature points of the first image are sequentially stored into the memory.
  14. 根据权利要求13所述的集成电路,其特征在于,所述顺序为光栅扫描顺序。The integrated circuit of claim 13 wherein said sequence is a raster scan order.
  15. 根据权利要求10至14任一项所述的集成电路,其特征在于,所述第一图像为图像金字塔中的一层;The integrated circuit according to any one of claims 10 to 14, wherein the first image is a layer in an image pyramid;
    所述处理单元用于:The processing unit is used to:
    在生成所述图像金字塔时,获取所述第一数据块。The first data block is acquired when the image pyramid is generated.
  16. 根据权利要求10至15任一项所述的集成电路,其特征在于,所述第一数据块包括图像处理算法针对所述第一特征点选取所述第一图像的像素的最小矩形像素区域。The integrated circuit according to any one of claims 10 to 15, wherein the first data block comprises a minimum rectangular pixel area in which an image processing algorithm selects pixels of the first image for the first feature point.
  17. 根据权利要求10至16任一项所述的集成电路,其特征在于,所述处理单元还用于:The integrated circuit according to any one of claims 10 to 16, wherein the processing unit is further configured to:
    在需要处理所述第一特征点时,根据所述对应关系,从所述第一存储空间中读取所述第一数据块。When the first feature point needs to be processed, the first data block is read from the first storage space according to the corresponding relationship.
  18. 根据权利要求10至16任一项所述的集成电路,其特征在于,所述处理单元还用于:The integrated circuit according to any one of claims 10 to 16, wherein the processing unit is further configured to:
    根据第二图像的特征点处理顺序,确定需要处理所述第一特征点;Determining that the first feature point needs to be processed according to a feature point processing sequence of the second image;
    根据所述对应关系,从所述第一存储空间中读取所述第一数据块。 Reading the first data block from the first storage space according to the correspondence.
  19. 一种处理器,其特征在于,包括根据权利要求10至18中任一项所述的集成电路。A processor, comprising an integrated circuit according to any one of claims 10 to 18.
  20. 一种计算机系统,其特征在于,包括:A computer system, comprising:
    根据权利要求10至18中任一项所述的集成电路或者根据权利要求19所述的处理器;以及An integrated circuit according to any one of claims 10 to 18 or a processor according to claim 19;
    内存。RAM.
  21. 一种计算机系统,其特征在于,包括:A computer system, comprising:
    存储器,用于存储计算机可执行指令;a memory for storing computer executable instructions;
    处理器,用于访问所述存储器,并执行所述计算机可执行指令,以进行根据权利要求1至9中任一项所述的方法中的操作。A processor for accessing the memory and executing the computer executable instructions to perform the operations of the method of any one of claims 1 to 9.
  22. 一种可移动设备,其特征在于,包括:A mobile device, comprising:
    根据权利要求10至18中任一项所述的集成电路;或者,An integrated circuit according to any one of claims 10 to 18; or
    根据权利要求19所述的处理器;或者,The processor of claim 19; or
    根据权利要求20或21所述的计算机系统。 A computer system according to claim 20 or 21.
PCT/CN2017/100061 2017-08-31 2017-08-31 Image processing method, integrated circuit, processor, system and movable device WO2019041271A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2017/100061 WO2019041271A1 (en) 2017-08-31 2017-08-31 Image processing method, integrated circuit, processor, system and movable device
CN201780005452.0A CN108701348A (en) 2017-08-31 2017-08-31 Handle method, integrated circuit, processor, system and the movable equipment of image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/100061 WO2019041271A1 (en) 2017-08-31 2017-08-31 Image processing method, integrated circuit, processor, system and movable device

Publications (1)

Publication Number Publication Date
WO2019041271A1 true WO2019041271A1 (en) 2019-03-07

Family

ID=63844089

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/100061 WO2019041271A1 (en) 2017-08-31 2017-08-31 Image processing method, integrated circuit, processor, system and movable device

Country Status (2)

Country Link
CN (1) CN108701348A (en)
WO (1) WO2019041271A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111459879A (en) * 2020-06-02 2020-07-28 浙江欣奕华智能科技有限公司 Data processing method and system on chip
WO2022241729A1 (en) * 2021-05-20 2022-11-24 深圳市大疆创新科技有限公司 Image processing method and apparatus, and movable platform and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101686367A (en) * 2008-09-22 2010-03-31 索尼株式会社 Image processing apparatus, image pickup apparatus, image processing method, and computer programm
CN102999898A (en) * 2011-09-14 2013-03-27 财团法人工业技术研究院 Image feature description processing device and image feature description processing method
CN106095588A (en) * 2016-06-28 2016-11-09 北京大学深圳研究生院 CDVS based on GPGPU platform extracts process accelerated method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100507780B1 (en) * 2002-12-20 2005-08-17 한국전자통신연구원 Apparatus and method for high-speed marker-free motion capture
CN100579225C (en) * 2007-03-28 2010-01-06 华为技术有限公司 Image data accessing and decoding method and decoding device
WO2018090250A1 (en) * 2016-11-16 2018-05-24 深圳市大疆创新科技有限公司 Three-dimensional point cloud generation method, device, computer system, and mobile apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101686367A (en) * 2008-09-22 2010-03-31 索尼株式会社 Image processing apparatus, image pickup apparatus, image processing method, and computer programm
CN102999898A (en) * 2011-09-14 2013-03-27 财团法人工业技术研究院 Image feature description processing device and image feature description processing method
CN106095588A (en) * 2016-06-28 2016-11-09 北京大学深圳研究生院 CDVS based on GPGPU platform extracts process accelerated method

Also Published As

Publication number Publication date
CN108701348A (en) 2018-10-23

Similar Documents

Publication Publication Date Title
US10984556B2 (en) Method and apparatus for calibrating relative parameters of collector, device and storage medium
US20190180469A1 (en) Systems and methods for dynamic facial analysis using a recurrent neural network
US20210150755A1 (en) Device and method with simultaneous implementation of localization and mapping
US11182908B2 (en) Dense optical flow processing in a computer vision system
US20210133093A1 (en) Data access method, processor, computer system, and mobile device
WO2018148924A1 (en) Method and device for reconstructing three-dimensional point cloud
CN110163087B (en) Face gesture recognition method and system
CN110296717B (en) Event data stream processing method and computing device
WO2018218481A1 (en) Neural network training method and device, computer system and mobile device
KR102443551B1 (en) Point cloud fusion method, apparatus, electronic device and computer storage medium
US11682212B2 (en) Hierarchical data organization for dense optical flow processing in a computer vision system
KR20200037502A (en) Method and apparatus of outputting pose information
EP4163873A1 (en) Method and apparatus with global localization
WO2019041271A1 (en) Image processing method, integrated circuit, processor, system and movable device
WO2018165812A1 (en) Image processing method, chip, processor, computer system, and mobile device
CN115668374A (en) Motion sensor in memory
US20200134771A1 (en) Image processing method, chip, processor, system, and mobile device
CN109891188A (en) Mobile platform, camera paths generation method, program and recording medium
WO2020155044A1 (en) Convolution calculation device and method, processor and movable device
WO2021102946A1 (en) Computing apparatus and method, processor, and movable device
CN115578432B (en) Image processing method, device, electronic equipment and storage medium
CN109697767B (en) Data processing method, related device and computer storage medium
CN115294280A (en) Three-dimensional reconstruction method, apparatus, device, storage medium, and program product
CN111161357A (en) Information processing method and device, augmented reality equipment and readable storage medium
US20210183082A1 (en) Image registration method, apparatus, computer system, and mobile device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17923331

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17923331

Country of ref document: EP

Kind code of ref document: A1