WO2022241729A1 - Image processing method and apparatus, and movable platform and storage medium - Google Patents

Image processing method and apparatus, and movable platform and storage medium Download PDF

Info

Publication number
WO2022241729A1
WO2022241729A1 PCT/CN2021/094965 CN2021094965W WO2022241729A1 WO 2022241729 A1 WO2022241729 A1 WO 2022241729A1 CN 2021094965 W CN2021094965 W CN 2021094965W WO 2022241729 A1 WO2022241729 A1 WO 2022241729A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
image block
buffer
processed
memory
Prior art date
Application number
PCT/CN2021/094965
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/CN2021/094965 priority Critical patent/WO2022241729A1/en
Publication of WO2022241729A1 publication Critical patent/WO2022241729A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • H04N19/423Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation characterised by memory arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • H04N19/43Hardware specially adapted for motion estimation or compensation
    • H04N19/433Hardware specially adapted for motion estimation or compensation characterised by techniques for memory access

Definitions

  • the present application relates to the technical field of image processing, and in particular, relates to an image processing method, device, removable platform, and storage medium.
  • image registration methods are used in object detection, object tracking, motion estimation, video analysis, object location, model reconstruction, remote sensing data analysis, and aerial reconnaissance.
  • image registration it is necessary to read the image blocks of the reference image and the image blocks of the image to be processed from the memory for processing. Since the images are usually stored in the order from left to right and from top to bottom in the memory, then The storage addresses of the image blocks are usually discontinuous, so multiple read instructions need to be used to read the image block, resulting in the problem of low reading efficiency for the memory.
  • one of the objectives of the present application is to provide an image processing method, device, removable platform and storage medium.
  • the embodiment of the present application provides an image processing method, including:
  • the reference image is divided into multiple image blocks according to the size of the first image block, and the reference image is continuously stored in the memory in units of image blocks; and/or, the image to be processed is The size of the second image block is divided into a plurality of image blocks, and the image to be processed is continuously stored in the memory in units of image blocks.
  • the embodiment of the present application provides an image processing device, including a memory, a data loading module, and a processor;
  • the memory is used to store reference images and images to be processed
  • the data loading module is used to read the first image block of the reference image and the second image block of the image to be processed from the memory; wherein, the reference image is divided into the size of the first image block A plurality of image blocks, the reference image is continuously stored in the memory in units of image blocks; and/or, the image to be processed is divided into a plurality of image blocks according to the size of the second image block, so The image to be processed is continuously stored in the memory in units of image blocks;
  • the processor is configured to perform image registration using the first image block and the second image block.
  • the embodiment of the present application provides a mobile platform, including:
  • a power system mounted on the fuselage for powering the movable platform
  • the image processing device according to the second aspect.
  • an embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by the image processing device, the computer program described in the first aspect is implemented. image processing method.
  • the reference image stored in the memory is divided into multiple image blocks according to the size of the first image block, and the reference image is in
  • the memory is continuously stored in units of image blocks, and/or, the image to be processed stored in the memory is divided into multiple image blocks by the size of the second image block, and the image to be processed is stored in the memory in the form of Image blocks are continuously stored in units; when the first image block of the reference image and the second image block of the image to be processed are read from the memory for image registration, since the reference image and/or the image to be processed are stored as image blocks in the memory Stored as a unit, and can also be read in units of image blocks when reading, then fewer read instructions can be used to read the first image block and/or the second image block, which is conducive to improving the storage capacity of the memory. read efficiency.
  • FIG. 1 is a schematic diagram of a reference image provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of image registration using the optical flow method provided by an embodiment of the present application.
  • Fig. 3 is a schematic diagram of an application scenario provided by an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of an image processing method provided by an embodiment of the present application.
  • Figure 5 and Figure 6 are different schematic diagrams of acquiring and storing image blocks provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of data read using 16 burst signals (burst length is 4) provided by an embodiment of the present application;
  • Fig. 8 is a schematic diagram of two situations of reading image blocks provided by an embodiment of the present application.
  • Figure 9, Figure 10 and Figure 11 are schematic diagrams of different numbers of image blocks including pixels of the first image block provided by an embodiment of the present application;
  • Figure 12 is a schematic diagram of a second buffer provided by an embodiment of the present application.
  • Fig. 13 is a schematic flowchart of another image processing method provided by an embodiment of the present application.
  • Fig. 14, Fig. 15, Fig. 16, Fig. 17 and Fig. 18 are schematic diagrams of different structures of an image processing device provided by an embodiment of the present application;
  • Fig. 19 is a schematic structural diagram of a mobile platform provided by an embodiment of the present application.
  • the storage addresses of the image block data are discontinuous, and at least three read Instructions, such as 3 burst signals, the first burst signal is used to read pixels 1, 2, 3; the second burst signal is used to read pixels 4, 5, 6; the third burst signal Signaling is used to read pixels 7, 8, and 9, so as to obtain image block data of the gray part, and there is a problem of low reading efficiency of the memory.
  • the embodiment of the present application provides an image registration method, the reference image stored in the memory is divided into multiple image blocks according to the size of the first image block, and the reference image is in the
  • the memory is continuously stored in units of image blocks, and/or, the image to be processed stored in the memory is divided into multiple image blocks with the size of the second image block, and the image to be processed is stored in the memory as an image Blocks are continuously stored in units; then when reading the first image block of the reference image and the second image block of the image to be processed from the memory for image registration, since the reference image and/or the image to be processed are based on image blocks in the memory
  • the unit is stored, and when reading, it can also be read in units of image blocks, so that fewer read instructions can be used to read the first image block and/or the second image block, which is conducive to improving the readability of the memory. Take efficiency.
  • image registration can be applied to target detection, target tracking, motion estimation, video analysis, target positioning, model reconstruction, remote sensing data analysis, aerial reconnaissance, etc.
  • target tracking has a wide range of applications in fields such as visual navigation, robotics, intelligent transportation, or public security.
  • an important method in the target tracking process is the optical flow method.
  • optical flow is the instantaneous two-dimensional velocity field generated by the movement of pixels on the observed imaging plane of a spatially moving object, including the object's apparent structure and dynamic behavior.
  • Important information it uses the changes of pixels in the image sequence in the time domain and the correlation between adjacent frames to find the corresponding relationship between the previous frame and the current frame, so as to calculate the object's distance between adjacent frames.
  • Motion information so as to realize target tracking according to the motion information of objects between adjacent frames.
  • the optical flow method can also be applied to scenarios such as target positioning, and the above is only for illustration and does not constitute a limitation to the present application.
  • the key points used to describe the foreground target in the previous frame for example, it can be randomly generated, or the feature points can be used as key points
  • the best position of the point in the current frame for example, please refer to Figure 2, find the position of the key point u in the image I in the image J, so as to obtain the position coordinates of the foreground target in the current frame; iteratively for the video frame sequence Goal tracking can be realized.
  • optical flow methods such as KLT algorithm and LK algorithm.
  • the second image block of the key point u in image J can be obtained according to the position of the first image block at the same position in image J, and then according to the distance between the first image block and the second image block Solve the velocity vector of the key point u with respect to the image J, and then determine the position of the key point u in the image J; in the subsequent iterative calculation process, the key point u can be re-determined in the image J according to the velocity vector solved last time According to the re-determined position of the key point u in image J, the second image block in image J is obtained, and the re-acquired second image block is used for iterative calculation with the first image block until the predetermined value is met.
  • Set the iteration condition position It can be understood that the preset iteration condition may be specifically set according to an actual application scenario.
  • the image I can be divided into a plurality of image blocks according to the size of the first image block, and the first image is continuously stored in the memory in units of image blocks;
  • the image J may also be divided into multiple image blocks according to the size of the second image block, and the second image blocks are continuously stored in the memory. Subsequently, when reading the first image block of image I and the second image block of image J, the reading can be performed in units of image blocks, which can significantly improve the reading efficiency.
  • the general flow of another image registration method is as follows: two images are respectively acquired (for example, one is a reference image, and the other is a reference image). is the key point of the image to be processed (for example, it can be randomly generated, or the feature point can be used as the key point); the image block of the key point is read from the memory address where the two images are stored in the memory, and the similarity measurement is carried out Determine the similarity between the image blocks of the two images to determine the matching key points; then obtain the image space coordinate transformation parameters through the matching key points; finally perform target detection or target positioning based on the image space coordinate transformation parameters.
  • the image can be divided into several blocks according to the size of the image block, and stored continuously in the memory in units of image blocks, and subsequently read
  • the image blocks of the key points can be read in units of image blocks, which can significantly improve the reading efficiency.
  • the image processing method in the embodiment of the present application may be applied to an image processing device.
  • the image processing device may be an electronic device with data processing capabilities, such as a computer, a server, a cloud server or a terminal, a mobile platform (such as an unmanned aerial vehicle, an unmanned vehicle, or a mobile robot) and many more.
  • a computer such as a computer, a server, a cloud server or a terminal
  • a mobile platform such as an unmanned aerial vehicle, an unmanned vehicle, or a mobile robot
  • the image processing device may also be a computer chip or an integrated circuit with data processing capabilities, such as a central processing unit (Central Processing Unit, CPU), a digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA), etc.
  • a central processing unit Central Processing Unit, CPU
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA off-the-shelf programmable gate array
  • the image processing device can be installed on an electronic device, such as the image processing device can be installed on a mobile platform such as an unmanned aerial vehicle, an unmanned vehicle or a mobile robot; or the image processing device can also be installed on a handheld PTZ.
  • the image processing device may be an unmanned aerial vehicle or the image processing device may be a chip or an integrated circuit installed in an unmanned aerial vehicle.
  • the unmanned aerial vehicle 100 can realize the function of following and photographing a target object or the function of target positioning through the image processing device.
  • the UAV 100 is equipped with an imaging device 200, through which multiple images of the target object are collected, and then the image processing device can be used to perform the
  • the image processing method sequentially performs image registration on the current frame (reference image) and the next frame (image to be processed), and automatically tracks the movement change process of the target object, so that the unmanned aerial vehicle 100 can detect the target object according to the result of image registration. Perform follow-up shooting.
  • the imaging device 200 is used to collect multiple images of the unmanned aerial vehicle 100 during flight, and then the image processing device can be used to perform the image processing method, and the current frame (refer to image) and the next frame (image to be processed) for image registration to locate the position of the target in different images, and then assist in determining the position of the UAV 100 according to the position of the located target.
  • FIG. 4 is a schematic flow chart of an image processing method provided by the embodiment of the present application.
  • the method can be executed by an image processing device. Methods include:
  • step S101 a first image block of a reference image and a second image block of an image to be processed are read from a memory.
  • the reference image is divided into multiple image blocks according to the size of the first image block, and the reference image is continuously stored in the memory in units of image blocks; and/or, the image to be processed is The size of the second image block is divided into a plurality of image blocks, and the image to be processed is continuously stored in the memory in units of image blocks.
  • step S102 image registration is performed using the first image block and the second image block.
  • the reference image and/or the image to be processed are continuously stored in the memory in units of image blocks, and the storage addresses of the pixels in each image block in the memory are also consecutive , when reading the first image block or the second image block, it can be read from the memory in units of image blocks, which is conducive to improving the reading efficiency of the memory, thereby improving the efficiency of image registration .
  • the reference image or the image to be processed please refer to FIG. 5.
  • the reference image is divided into It is divided into a plurality of image blocks, and then stored continuously in the memory in units of image blocks, and the storage addresses of the pixels in each image block in the memory are also continuous.
  • the same processing method is also used for the image to be processed, the image to be processed is divided into multiple image blocks according to the size of the second image block, and then stored continuously in the memory in units of image blocks, and for each The storage addresses of the pixels in the image block in the memory are also continuous.
  • the size of the first image block and the size of the second image block are the same, of course, in some embodiments, the size of the first image block and the size of the second image block can also be Different, this embodiment does not impose any limitation on this.
  • each cache row is used to cache a row of pixels of the reference image; then, for each image block of the reference image, according to the size of the first image block, the The target cache line in the first cache line reads the specified pixel, and stores the specified pixel continuously in the memory.
  • the size of the first image block is 16*16 as an example.
  • the size of the first image block includes width and height; the number of the target cache line is determined according to one of the height and width; the number of specified pixels is determined according to the height and width The other one is determined; for example, the size of the first image block is 16*32, the data of the target cache line is 16, and the specified number of pixels is 32, that is, for each image block, the image processing device needs to start from 16 32 pixels are read from the specified positions in each target cache line, and then 16*32 pixels are continuously stored in the memory. Assuming that a pixel row has 64 pixels, for the first image block, the first to 32nd pixels need to be read, and for the second image block, the 33rd to 64th pixels need to be read.
  • the number of cache lines included in the first buffer is at least the number of the target cache lines.
  • the size of the first image block is 16*32
  • the data of the target cache line is 16
  • the number of cache lines included in the first buffer zone is at least 16.
  • the image processing device may cache the image to be processed in In the first buffer, each cache line is used to cache a row of pixels of the image to be processed; then, for each image block of the image to be processed, according to the size of the second image block from the multiple
  • the target cache line in one cache line reads the specified pixel, and stores the specified pixel in the memory continuously.
  • the size of the second image block includes width and height; the number of the target cache line is determined according to one of the height and width; the number of specified pixels is determined according to the height and width The other one is determined; for example, the size of the second image block is 16*32, the data of the target cache line is 16, and the specified number of pixels is 32, that is, for each image block, the image processing device needs to start from 16 32 pixels are read from the specified positions in each target cache line, and then 16*32 pixels are continuously stored in the memory.
  • the number of the first buffers is at least two; the reference image is buffered in one of the first buffers; the image to be processed is buffered in the other first buffer.
  • the number of the first buffer may be one; for example, the first buffer may be used to process the reference image, and then the image to be processed may be processed using the first buffer; Alternatively, the first buffer zone may be used to process the image to be processed, and then the reference image may be processed using the first buffer zone.
  • an image pyramid of a reference image and an image pyramid of an image to be processed are usually constructed for image registration.
  • the image pyramid is a series of images arranged in a pyramid shape with gradually reduced resolution and derived from the same original image.
  • the above method can be used to divide it into multiple image blocks and store the multiple image blocks continuously in the memory, and the storage addresses of the pixels in the image block in the memory are also continuous .
  • the first image block of the reference image and the second image block of the image to be processed may be read from the memory in a burst continuous read manner.
  • the burst continuous reading method is adopted.
  • the burst length of the burst signal L is 4, it means that the continuous pixel can be read.
  • the image block data size to be read is 16*16, as shown in Figure 7,
  • the gray part in Figure 7 is the image block data required this time.
  • a burst signal (burst length is 4) can read a row of 64 pixel data, and the image block data size is 16*16, so 16 burst signals are required. (burst length is 4) read 64*16 data as shown in FIG. 2 . Also referring to Fig.
  • the image (here, the reference image is taken as an example) is continuously stored in the memory in units of image blocks, and the storage addresses of the pixels in the image blocks in the memory are continuous, then when reading a 16 *
  • the first image block of 16 There are the following three situations in the first image block of 16: (1) Please refer to Figure 9, the data of the first image block is all in one image block, then only one burst signal (burst length is 16) is required Read, the required read instruction is less; (2) Please refer to Figure 10, the data of the first image block is in two image blocks, then only two burst signals (burst length is 16) can be read Fetch, the required read instruction is less; (3) Please refer to Figure 11, the data of the first image block is in four image blocks, then need 4 burst signals (burst length is 16) to read , although the data volume read by 4 burst signals (burst length is 16) is the same as the data volume read by 16 burst signals (burst length is 4) in the case (1) in the embodiment shown in
  • the image processing device may use the first burst signal to read the first image block of the reference image from the memory, and use the second burst signal to read the first image block from the memory. Get the second image block of the image to be processed.
  • the first burst signal and/or the second burst signal The numbers are all less than or equal to 4.
  • the quantity of the first burst signal is determined according to the number of image blocks containing the pixels of the first image block (such as in FIG. 10, if the number of image blocks containing the pixels of the first image block is 2, then 2 second a burst signal); and/or, the number of the second burst signal is determined according to the number of image blocks including the pixels of the second image block.
  • the first burst signal can be used to read in units of image blocks, and a first burst
  • the signal is used to read the data of an image block, and the burst length of the first burst signal can be determined according to the number of pixels contained in the first image block, the pixel bit width and the bit width of the memory; wherein, The pixel bit width and the bit width of the memory determine the number of pixels that can be stored in a storage unit in the memory, then the number of pixels contained in the first image block and the number of pixels that can be stored in a storage unit can be determined for storage The number of storage units for the first image block, the number of storage units for storing the first image block is the burst length of the first burst signal.
  • the second burst signal can be used to read in units of image blocks, one
  • the second burst signal is used to read the data of an image block, and the signal length of the second burst signal can be determined according to the number of pixels contained in the second image block, the pixel bit width and the bit width of the memory ; Wherein, the pixel bit width and the bit width of the memory determine the number of pixels that can be stored in a storage unit in the memory, then the number of pixels included in the second image block and the number of pixels that can be stored in a storage unit can be determined The number of storage units used to store the second image block is the burst length of the second burst signal.
  • the first image block and the second image block are determined according to the key points extracted from the reference image, and then according to the image configuration of the first image block and the second image block A standard process to determine the position of key points in the image to be processed.
  • the key points can be determined randomly from the reference image, or can be determined according to feature points or feature information extracted from the reference image, and the feature points or feature information include but not limited to corner points, edge points, height Curvature points, contours, intersections, line segments, closed boundaries, or centers of gravity, etc.
  • the first image block may be an area of a preset size centered on the key point in the reference image; and after estimating the position of the key point in the image to be processed, the The second image block may be an area of a preset size centered on the key point in the image to be processed.
  • the first image block can be determined according to the first feature point extracted from the reference image
  • the second image block can be determined according to the second feature point extracted from the image to be processed, and then according to The image registration process of the first image block and the second image block is used to obtain the relative pose and the like between the reference image and the image to be processed.
  • the first image block is an area of a preset size centered on the first feature point in the reference image
  • the second image block is an area of preset size centered on the second feature point in the image to be processed Area.
  • the reference image area including the first image block can be read from the memory, and the reference image area except the first image block
  • the data is used for the next image registration process
  • the image area to be processed including the second image block can also be read from the memory, and the image area to be processed Data other than the second image block are used for the next image registration process.
  • the reference image area and/or the image area to be processed can be cached in the second buffer, and in this embodiment, when reading the first image block and/or the second image block, it can read Image blocks with more data and/or read more data than the second image block are cached, and the cached data can be directly read and used later, which can effectively reduce the access efficiency to the memory and improve the data reading efficiency. At the same time It also avoids wasting redundant data that is read.
  • the reference image area and the image area to be processed share a second buffer.
  • the image registration process is to find the position of the key point u in the image I (reference image) in the image J (image to be processed), by reading the key point u from the memory
  • the first image block in image I and the second image block in image J are iteratively calculated to solve the velocity vector of key point u with respect to image J, and then determine the position of key point u in image J, where the iterative
  • the process needs to read the second image block from the memory multiple times, so it is more urgent to cache the second image block.
  • the buffer capacity of the buffer interval corresponding to the reference image area and/or the buffer capacity of the buffer interval corresponding to the image area to be processed are based on the number of key points extracted from the reference image Determine; wherein, the buffer capacity of the buffer interval corresponding to the reference image area is positively correlated with the number of key points; and/or, the buffer capacity of the buffer interval corresponding to the image area to be processed is related to the number of key points The number is negatively correlated; that is, the smaller the number of key points extracted from the reference image, the smaller the buffer capacity of the buffer interval corresponding to the reference image area, and the smaller the buffer capacity of the buffer interval corresponding to the image area to be processed bigger.
  • the buffering capacity of the buffering section corresponding to the reference image area is smaller than the buffering capacity of the buffering area corresponding to the image area to be processed, so as to realize effective buffering of the second image block .
  • the reference image area is cached in one of the second buffers; the image area to be processed is cached in another second buffer. in the buffer.
  • the image processing device first determines whether the first image block is cached in the second buffer ; Wherein, the reference image area cached in the second buffer zone corresponds to a first storage identifier, and the first storage identifier is used to indicate the position of the reference image area in the reference image; the The image processing device may determine whether the first image block related to the key point is cached in the second buffer according to the key point extracted from the reference image and the first storage identifier.
  • the first image block is read from the second buffer without reading from a memory, which is beneficial to improve data reading efficiency. If the first image block is not cached in the second buffer, read a reference image area including the first image block from the memory, and simultaneously generate a reference image including the first image block The first storage ID for the region. If part of the data of the first image block is buffered in the second buffer, read the part of the data from the second buffer and read from the memory including the data except the part of the data the reference image area of other data, and simultaneously generate the first storage identifier of the reference image area including other data except the partial data.
  • the image processing device first determines whether the second image is cached in the second buffer block; wherein, the image region to be processed cached in the second buffer zone corresponds to a second storage identifier, and the second storage identifier is used to indicate the location of the image region to be processed in the image to be processed location; the image processing apparatus may determine whether the second image block related to the key point is cached in the second buffer according to the key point extracted from the reference image and the second storage identifier.
  • the second image block is read from the second buffer without reading from a memory, which is beneficial to improve data reading efficiency. If the second image block is not cached in the second buffer, read the image area to be processed including the second image block from the memory, and generate an image area to be processed including the second image block at the same time The second storage ID of the image region. If part of the data of the second image block is cached in the second buffer, read the part of the data from the second buffer and read from the memory including the parts except the part of the data The image area to be processed of other data, and simultaneously generate a second storage identifier of the image area to be processed including other data except the part of data. In this embodiment, more data is read and cached in the second buffer during the reading process, which can effectively reduce the number of accesses to the memory, and is also conducive to improving the efficiency of data reading, while avoiding the waste of redundant data read .
  • the data volume of the image area to be processed and/or the reference image area can be determined according to the bit width of the line connected to the memory, such as the image area to be processed and/or the
  • the amount of data in the reference image area is an integer multiple of the bit width of the line connected to the memory, that is, the amount of data read each time is just an integer multiple of the maximum transmission capacity of the line connected to the memory, which is conducive to improving Data transfer efficiency.
  • the embodiment of the present application also provides another image processing method, which can be executed by an image processing device, and the method includes:
  • step S201 the reference image area including the first image block and the image area to be processed including the second image block are read from the memory; wherein, the reference image area excludes the first image block
  • the data other than the second image block is used for the next image registration process; the data other than the second image block in the image area to be processed is used for the next image registration process.
  • step S202 image registration is performed using the first image block and the second image block.
  • more data than the first image block and/or more data than the second image block can be read and cached, and can be directly read later
  • the cached data is used, which can effectively reduce the access efficiency to the memory, improve the data reading efficiency, and avoid the waste of redundant data read.
  • the present application also provides an image processing device, including a memory 10 , a data loading module 20 and a processor 30 .
  • the memory 10 is used for storing reference images and images to be processed.
  • the data loading module 20 is used to read the first image block of the reference image and the second image block of the image to be processed from the memory 10; wherein, the reference image is stored with the size of the first image block Cutting into multiple image blocks, the reference image is continuously stored in the memory 10 in units of image blocks; and/or, the image to be processed is cut into multiple images with the size of the second image block
  • the image to be processed is continuously stored in the memory 10 in units of image blocks.
  • the processor 30 is configured to perform image registration using the first image block and the second image block.
  • the memory 10 may include at least one type of storage medium, and the storage medium includes a flash memory, a hard disk, a multimedia card, a card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access Memory (SRAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Programmable Read Only Memory (PROM), Magnetic Memory, Magnetic Disk, Optical Disk, etc.
  • the storage 10 may be an internal storage unit of the device, such as a hard disk or a memory of the device.
  • the memory 10 can also be an external storage device of the device, such as a plug-in hard disk equipped on the device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash memory card (Flash Card) and the like. Further, the memory 10 may also include both an internal storage unit of the device and an external storage device. The memory 10 is used for storing reference images and images to be processed. The memory 10 can also be used to temporarily store data that has been output or will be output.
  • a plug-in hard disk equipped on the device such as a plug-in hard disk equipped on the device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash memory card (Flash Card) and the like. Further, the memory 10 may also include both an internal storage unit of the device and an external storage device. The memory 10 is used for storing reference images and images to be processed. The memory 10 can also be used to temporarily store data that has been output or will be output
  • pixels in each image block have consecutive storage addresses in the memory 10 .
  • the device further includes a first conversion module 40 .
  • the first conversion module 40 is configured to: after acquiring the reference image, cache the reference image in the first buffer 11 including a plurality of cache lines, each cache line is used to cache the reference image A row of pixels of the image; for each image block of the reference image, read specified pixels from the target cache line in the plurality of cache lines according to the size of the first image block, and place the specified pixel in the stored continuously in the memory 10.
  • the device further includes a second conversion module 50 .
  • the second converting module 50 is used for: buffering the image to be processed in the first buffer 11 comprising a plurality of cache lines, each of which is used to cache a row of pixels of the image to be processed; For each image block of the image to be processed, according to the size of the second image block, a specified pixel is read from a target cache line in the plurality of cache lines, and the specified pixels are continuously stored in the memory 10 storage.
  • the size of the first image block and the second image block are the same; the size of the first image block and the second image block includes width and height; the number of the target cache line It is determined according to one of the height and width; the number of specified pixels is determined according to the other of the height and width.
  • the number of the first buffers 11 is at least two; the reference image is buffered in one of the first buffers 11; the image to be processed is buffered in the other first buffer 11 .
  • the first conversion module 40 includes at least one first buffer 11
  • the second conversion module 50 also includes at least one first buffer 11 .
  • the data loading module 20 is specifically configured to read the first image block of the reference image and the second image block of the image to be processed from the memory 10 in a burst continuous reading manner.
  • the data loading module 20 is specifically configured to: use the first burst signal to read the first image block of the reference image from the memory 10, and use the second burst signal to read the first image block of the reference image from the memory 10. Get the second image block of the image to be processed.
  • the burst length of the first burst signal is determined according to the number of pixels contained in the first image block, the pixel bit width and the bit width of the memory 10; and/or, the second The burst length of the burst signal is determined according to the number of pixels included in the second image block, the pixel bit width and the bit width of the memory 10 .
  • the number of the first burst signal and/or the second burst signal is less than or equal to four.
  • the number of the first burst signals is determined according to the number of image blocks including the pixels of the first image block; and/or, the number of the second burst signals is determined according to the number of image blocks including the pixels of the first image block The image block number of pixels of the second image block is determined.
  • the first image block and the second image block are determined according to key points extracted from the reference image.
  • the data loading module 20 includes a first loading module 21 and a second loading module 22 .
  • the first loading module 21 is used to read the first image block from the memory 10 according to the coordinates of key points extracted from the reference image; the second loading module 22 is used to read the first image block from the The coordinates of the key points extracted from the reference image or the coordinates of the key points after iterative calculation by the processor 30 are read from the memory 10 to read the second image block.
  • the data loading module 20 is specifically configured to: read the reference image area including the first image block and/or the image area to be processed including the second image block from the memory 10; Wherein, the data in the reference image area except for the first image block is used for the next image registration process; the data in the image area to be processed except for the second image block is used for the next One-time image registration process.
  • the data loading module 20 includes a second buffer 12 , and the reference image area and/or the image area to be processed are buffered in the second buffer 12 .
  • the buffer capacity of the buffer interval corresponding to the reference image area and/or the buffer capacity of the buffer interval corresponding to the image area to be processed are based on the data extracted from the reference image. The number of keypoints is determined.
  • the buffer capacity of the buffer interval corresponding to the reference image area is positively correlated with the number of key points; and/or, the buffer capacity of the buffer interval corresponding to the image area to be processed is related to the key The number of points is negatively correlated.
  • the buffer capacity of the buffer interval corresponding to the reference image area is smaller than the buffer capacity of the buffer interval corresponding to the image area to be processed.
  • the reference image area is cached in one of the second buffers 12; the image area to be processed is cached in another a second buffer 12.
  • the data loading module 20 is specifically configured to: determine whether the first image block is cached in the second buffer 12; if the second buffer 12 has the first image block cached, An image block, read the first image block from the second buffer 12; if the first image block is not cached in the second buffer 12, read from the memory 10 including The reference image area of the first image block; if the second buffer 12 is buffered with partial data of the first image block, read the partial data from the second buffer 12 and read the partial data from the second buffer 12 A reference image area including data other than the partial data is read from the memory 10.
  • the reference image area cached in the second buffer 12 corresponds to a first storage identifier, and the first storage identifier is used to indicate the location of the reference image area in the reference image. Location.
  • the data loading module 20 is also used for: according to the key points extracted from the reference image and the first storage identifier, determine whether the first key point related to the key point is cached in the second buffer 12. Image blocks.
  • the data loading module 20 is specifically configured to: determine whether the second image block is cached in the second buffer 12; if the second image block is cached in the second buffer 12, Two image blocks, read the second image block from the second buffer 12; if the second image block is not cached in the second buffer 12, read from the memory 10 including The to-be-processed image area of the second image block; if the second buffer 12 is buffered with part of the data of the second image block, read the part of the data from the second buffer 12 and read the data from the second buffer 12 The image area to be processed including other data except the partial data is read from the memory 10 .
  • the image region to be processed cached in the second buffer 12 corresponds to a second storage identifier, and the second storage identifier is used to indicate that the image region to be processed is in the position in the image.
  • the data loading module 20 is specifically configured to: according to the key points extracted from the reference image and the second storage identifier, determine whether the second buffer 12 has cached the second data about the key points. Image blocks.
  • the device embodiment since it basically corresponds to the method embodiment, for related parts, please refer to the part description of the method embodiment.
  • the device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network elements. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. It can be understood and implemented by those skilled in the art without creative effort.
  • Various implementations described herein can be implemented using a computer readable medium such as computer software, hardware, or any combination thereof.
  • the embodiments described herein can be implemented by using Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays ( FPGA), processors, controllers, microcontrollers, microprocessors, electronic units designed to perform the functions described herein.
  • ASICs Application Specific Integrated Circuits
  • DSPs Digital Signal Processors
  • DSPDs Digital Signal Processing Devices
  • PLDs Programmable Logic Devices
  • FPGA Field Programmable Gate Arrays
  • processors controllers, microcontrollers, microprocessors, electronic units designed to perform the functions described herein.
  • an embodiment such as a procedure or a function may be implemented with a separate software module that allows at least one function or operation to be performed.
  • the software codes can be implemented by a software application (or program
  • the image processing device is a chip or an integrated circuit with data processing capability
  • the image processing device can be installed on a movable platform, and this embodiment also provides a A kind of movable platform, described movable platform comprises:
  • the power system 02 is installed on the fuselage 01 and is used to provide power for the movable platform; and the above-mentioned image processing device 03 .
  • the mobile platform includes but is not limited to unmanned aerial vehicles, unmanned vehicles, unmanned ships or mobile robots.
  • the movable platform further includes an imaging device.
  • non-transitory computer-readable storage medium including instructions, such as a memory including instructions, which are executable by a processor of an apparatus to perform the above method.
  • the non-transitory computer readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
  • a non-transitory computer-readable storage medium enabling the terminal to execute the above method when instructions in the storage medium are executed by a processor of the terminal.

Landscapes

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

Abstract

An image processing method and apparatus, and a movable platform and a storage medium. The method comprises: reading, from a memory, a first image block of a reference image and a second image block of an image to be processed; and performing image registration by using the first image block and the second image block, wherein the reference image is divided into a plurality of image blocks according to the size of the first image block, and the reference image is continuously stored in the memory in a unit of image block, and/or the image to be processed is divided into a plurality of image blocks according to the size of the second image block, and the image to be processed is continuously stored in the memory in a unit of image block. By means of the embodiments, the improvement of the read efficiency of a memory is facilitated.

Description

一种图像处理方法、装置、可移动平台及存储介质Image processing method, device, movable platform and storage medium 技术领域technical field
本申请涉及图像处理技术领域,具体而言,涉及一种图像处理方法、装置、可移动平台及存储介质。The present application relates to the technical field of image processing, and in particular, relates to an image processing method, device, removable platform, and storage medium.
背景技术Background technique
在计算机视觉领域,图像配准方法应用于目标检测、目标跟踪、运动估计、视频分析、目标定位、模型重建、遥感数据分析以及航空侦察等方面。在图像配准过程中,需要从存储器中读取参考图像的图像块和待处理图像的图像块进行处理,由于图像在存储器中通常以从左到右及从上到下的顺序进行存储,则图像块的存储地址通常不连续,从而需要使用多个读取指令来读取该图像块,造成针对于存储器的读取效率较低的问题。In the field of computer vision, image registration methods are used in object detection, object tracking, motion estimation, video analysis, object location, model reconstruction, remote sensing data analysis, and aerial reconnaissance. In the process of image registration, it is necessary to read the image blocks of the reference image and the image blocks of the image to be processed from the memory for processing. Since the images are usually stored in the order from left to right and from top to bottom in the memory, then The storage addresses of the image blocks are usually discontinuous, so multiple read instructions need to be used to read the image block, resulting in the problem of low reading efficiency for the memory.
发明内容Contents of the invention
有鉴于此,本申请的目的之一是提供一种图像处理方法、装置、可移动平台及存储介质。In view of this, one of the objectives of the present application is to provide an image processing method, device, removable platform and storage medium.
第一方面,本申请实施例提供了一种图像处理方法,包括:In the first aspect, the embodiment of the present application provides an image processing method, including:
从存储器中读取参考图像的第一图像块以及待处理图像的第二图像块;reading the first image block of the reference image and the second image block of the image to be processed from the memory;
使用所述第一图像块和所述第二图像块进行图像配准;performing image registration using the first image block and the second image block;
其中,所述参考图像以所述第一图像块的尺寸被切分成多个图像块,所述参考图像在所述存储器中以图像块为单位连续存储;和/或,所述待处理图像以所述第二图像块的尺寸被切分为多个图像块,所述待处理图像在所述存储器中以图像块为单位连续存储。Wherein, the reference image is divided into multiple image blocks according to the size of the first image block, and the reference image is continuously stored in the memory in units of image blocks; and/or, the image to be processed is The size of the second image block is divided into a plurality of image blocks, and the image to be processed is continuously stored in the memory in units of image blocks.
第二方面,本申请实施例提供了一种图像处理装置,包括存储器、数据载入模块以及处理器;In a second aspect, the embodiment of the present application provides an image processing device, including a memory, a data loading module, and a processor;
所述存储器用于存储参考图像和待处理图像;The memory is used to store reference images and images to be processed;
所述数据载入模块用于从所述存储器中读取参考图像的第一图像块以及待处理图像的第二图像块;其中,所述参考图像以所述第一图像块的尺寸被切分成多个图像块,所述参考图像在所述存储器中以图像块为单位连续存储;和/或,所述待处理图像以所述第二图像块的尺寸被切分为多个图像块,所述待处理图像在所述存储器中以图像块为单位连续存储;The data loading module is used to read the first image block of the reference image and the second image block of the image to be processed from the memory; wherein, the reference image is divided into the size of the first image block A plurality of image blocks, the reference image is continuously stored in the memory in units of image blocks; and/or, the image to be processed is divided into a plurality of image blocks according to the size of the second image block, so The image to be processed is continuously stored in the memory in units of image blocks;
所述处理器用于使用所述第一图像块和所述第二图像块进行图像配准。The processor is configured to perform image registration using the first image block and the second image block.
第三方面,本申请实施例提供了一种可移动平台,包括:In a third aspect, the embodiment of the present application provides a mobile platform, including:
机身;body;
动力系统,安装于所述机身上,用于为所述可移动平台提供动力;以及,a power system mounted on the fuselage for powering the movable platform; and,
如第二方面所述的图像处理装置。The image processing device according to the second aspect.
第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被所述图像处理装置执行时实现如第一方面所述的图像处理方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by the image processing device, the computer program described in the first aspect is implemented. image processing method.
本申请实施例所提供的一种图像处理方法、装置、可移动平台及存储介质,存储在存储器中的参考图像以第一图像块的尺寸被切分成多个图像块,且所述参考图像在所述存储器中以图像块为单位连续存储,和/或,存储在存储器中的待处理图像以第二图像块的尺寸被切分为多个图像块,且待处理图像在所述存储器中以图像块为单位连续存储;则从存储器中读取参考图像的第一图像块以及待处理图像的第二图像块进行图像配准时,由于参考图像和/或待处理图像在存储器中是以图像块为单位进行存储,在读取时也可以以图像块为单位进行读取,则可以使用较少的读取指令来读取所述第一图像块和/第二图像块,有利于提高存储器的读取效率。In the image processing method, device, mobile platform, and storage medium provided by the embodiments of the present application, the reference image stored in the memory is divided into multiple image blocks according to the size of the first image block, and the reference image is in The memory is continuously stored in units of image blocks, and/or, the image to be processed stored in the memory is divided into multiple image blocks by the size of the second image block, and the image to be processed is stored in the memory in the form of Image blocks are continuously stored in units; when the first image block of the reference image and the second image block of the image to be processed are read from the memory for image registration, since the reference image and/or the image to be processed are stored as image blocks in the memory Stored as a unit, and can also be read in units of image blocks when reading, then fewer read instructions can be used to read the first image block and/or the second image block, which is conducive to improving the storage capacity of the memory. read efficiency.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that need to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1是本申请一个实施例提供的参考图像的示意图;FIG. 1 is a schematic diagram of a reference image provided by an embodiment of the present application;
图2是本申请一个实施例提供的使用光流法进行图像配准的一种示意图;FIG. 2 is a schematic diagram of image registration using the optical flow method provided by an embodiment of the present application;
图3是本申请一个实施例提供的应用场景的示意图;Fig. 3 is a schematic diagram of an application scenario provided by an embodiment of the present application;
图4是本申请一个实施例提供的一种图像处理方法的流程示意图;FIG. 4 is a schematic flowchart of an image processing method provided by an embodiment of the present application;
图5和图6是本申请一个实施例提供的获取以及存储图像块的不同示意图;Figure 5 and Figure 6 are different schematic diagrams of acquiring and storing image blocks provided by an embodiment of the present application;
图7是本申请一个实施例提供的使用16个burst信号(突发长度为4)读取的数据的示意图;FIG. 7 is a schematic diagram of data read using 16 burst signals (burst length is 4) provided by an embodiment of the present application;
图8是本申请一个实施例提供的读取图像块的两种情况的示意图;Fig. 8 is a schematic diagram of two situations of reading image blocks provided by an embodiment of the present application;
图9、图10和图11是本申请一个实施例提供的包括第一图像块的像素的不同图像块数量的示意图;Figure 9, Figure 10 and Figure 11 are schematic diagrams of different numbers of image blocks including pixels of the first image block provided by an embodiment of the present application;
图12是本申请一个实施例提供的第二缓冲区的示意图;Figure 12 is a schematic diagram of a second buffer provided by an embodiment of the present application;
图13是本申请一个实施例提供的另一种图像处理方法的流程示意图;Fig. 13 is a schematic flowchart of another image processing method provided by an embodiment of the present application;
图14、图15、图16、图17和图18是本申请一个实施例提供的图像处理装置的不同结构示意图;Fig. 14, Fig. 15, Fig. 16, Fig. 17 and Fig. 18 are schematic diagrams of different structures of an image processing device provided by an embodiment of the present application;
图19是本申请一个实施例提供的可移动平台的结构示意图。Fig. 19 is a schematic structural diagram of a mobile platform provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the application with reference to the drawings in the embodiments of the application. Apparently, the described embodiments are only some of the embodiments of the application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.
相关技术中,在图像配准过程中,需要从存储器中读取参考图像的图像块和待处理图像的图像块进行处理,而图像块的存储地址通常不连续,从而需要使用多个读取指令来读取该图像块,造成针对于存储器的读取效率较低的问题。比如如图1所示的图像,假设图中一个格子表示一个像素,图1所示的图像在存储器中通常以从左到右及从上到下的光栅扫描顺序连续存储,而在图像配准过程中,通常只需要读取图像中的图像块数据,假设需要读取的图像块数据为图1灰色部分,显然,该图像块数据的存储地址是不连续的,至少需要使用3个读取指令,比如3个突发(burst)信号,第1个突发信号用于读取像素1,2,3;第2个突发信号用于读取像素4,5,6;第3个突发信号用于读取像素7,8,9,从而获得灰色部分的图像块数据,存在存储器的读取效率较低的问题。In the related art, in the process of image registration, it is necessary to read the image blocks of the reference image and the image blocks of the image to be processed from the memory for processing, and the storage addresses of the image blocks are usually discontinuous, so multiple read instructions need to be used to read the image block, resulting in the problem of low reading efficiency for the memory. For example, for the image shown in Figure 1, assuming that a grid in the figure represents a pixel, the image shown in Figure 1 is usually stored continuously in the memory in the order of raster scanning from left to right and from top to bottom, and in image registration In the process, usually only the image block data in the image needs to be read. Assume that the image block data to be read is the gray part in Figure 1. Obviously, the storage addresses of the image block data are discontinuous, and at least three read Instructions, such as 3 burst signals, the first burst signal is used to read pixels 1, 2, 3; the second burst signal is used to read pixels 4, 5, 6; the third burst signal Signaling is used to read pixels 7, 8, and 9, so as to obtain image block data of the gray part, and there is a problem of low reading efficiency of the memory.
针对于相关技术中的问题,本申请实施例提供了一种图像配准方法,存储在存储器中的参考图像以第一图像块的尺寸被切分成多个图像块,且所述参考图像在所述存储器中以图像块为单位连续存储,和/或,存储在存储器中的待处理图像以第二图像块 的尺寸被切分为多个图像块,且待处理图像在所述存储器中以图像块为单位连续存储;则从存储器中读取参考图像的第一图像块以及待处理图像的第二图像块进行图像配准时,由于参考图像和/或待处理图像在存储器中是以图像块为单位进行存储,在读取时也可以以图像块为单位进行读取,则可以使用较少的读取指令来读取所述第一图像块和/第二图像块,有利于提高存储器的读取效率。Aiming at the problems in the related art, the embodiment of the present application provides an image registration method, the reference image stored in the memory is divided into multiple image blocks according to the size of the first image block, and the reference image is in the The memory is continuously stored in units of image blocks, and/or, the image to be processed stored in the memory is divided into multiple image blocks with the size of the second image block, and the image to be processed is stored in the memory as an image Blocks are continuously stored in units; then when reading the first image block of the reference image and the second image block of the image to be processed from the memory for image registration, since the reference image and/or the image to be processed are based on image blocks in the memory The unit is stored, and when reading, it can also be read in units of image blocks, so that fewer read instructions can be used to read the first image block and/or the second image block, which is conducive to improving the readability of the memory. Take efficiency.
其中,图像配准可以应用于目标检测、目标跟踪、运动估计、视频分析、目标定位、模型重建、遥感数据分析、航空侦察等方面。Among them, image registration can be applied to target detection, target tracking, motion estimation, video analysis, target positioning, model reconstruction, remote sensing data analysis, aerial reconnaissance, etc.
在一示例性的实施例中,比如在目标跟踪场景下,目标跟踪在视觉导航、机器人、智能交通或者公共安全等领域有着广泛的应用。其中,目标跟踪过程中的一个重要方法是光流法,简单来说,光流是空间运动物体被观测成像平面上的像素点运动产生的瞬时二维速度场,包含了物体表明结构和动态行为的重要信息;其利用图像序列中像素在时间域上的变化以及相邻帧之间的相关性来找到上一帧跟当前帧之间存在的对应关系,从而计算出相邻帧之间物体的运动信息,从而根据相邻帧之间物体的运动信息实现目标跟踪。当然,光流法也可应用于目标定位等场景,上述仅为举例说明,并不构成对本申请的限制。In an exemplary embodiment, for example, in a target tracking scenario, target tracking has a wide range of applications in fields such as visual navigation, robotics, intelligent transportation, or public security. Among them, an important method in the target tracking process is the optical flow method. Simply put, optical flow is the instantaneous two-dimensional velocity field generated by the movement of pixels on the observed imaging plane of a spatially moving object, including the object's apparent structure and dynamic behavior. Important information; it uses the changes of pixels in the image sequence in the time domain and the correlation between adjacent frames to find the corresponding relationship between the previous frame and the current frame, so as to calculate the object's distance between adjacent frames. Motion information, so as to realize target tracking according to the motion information of objects between adjacent frames. Of course, the optical flow method can also be applied to scenarios such as target positioning, and the above is only for illustration and does not constitute a limitation to the present application.
比如对一个连续的视频帧序列,在提取上一帧中用于描述前景目标的关键点(比如可以随机产生,也可以利用特征点来做关键点)之后,可以寻找上一帧中出现的关键点在当前帧中的最佳位置,比如请参阅图2,寻找图像I中的关键点u在图像J中的位置,从而得到前景目标在当前帧中的位置坐标;针对于视频帧序列如此迭代进行,便可实现目标的跟踪。其中,光流法有多种,比如有KLT算法、LK算法等。For example, for a continuous video frame sequence, after extracting the key points used to describe the foreground target in the previous frame (for example, it can be randomly generated, or the feature points can be used as key points), you can find the key points that appeared in the previous frame. The best position of the point in the current frame, for example, please refer to Figure 2, find the position of the key point u in the image I in the image J, so as to obtain the position coordinates of the foreground target in the current frame; iteratively for the video frame sequence Goal tracking can be realized. Among them, there are many kinds of optical flow methods, such as KLT algorithm and LK algorithm.
在使用光流法进行目标跟踪的过程中,比如请参阅图2,在寻找图像I中的关键点u在图像J中的位置,通过是从存储器中读取关键点u在图像I中的第一图像块和在图像J中的第二图像块进行迭代计算,求解关键点u关于图像J的速度向量,进而确定关键点u在图像J中的位置。其中,在首次计算过程中,可以根据第一图像块的位置在图像J中的相同位置获取关键点u在图像J中的第二图像块,然后根据第一图像块和第二图像块之间的差异求解关键点u关于图像J的速度向量,进而确定关键点u在图像J中的位置;在后续的迭代计算过程中,可以根据上次求解的速度向量重新确定关键点u在图像J中的位置,根据重新确定后的关键点u在图像J中的位置获取在图像J中的第二图像块,使用重新获取的第二图像块与所述第一图像块进行迭代计算,直到满足预设迭代条件位置。可以理解的是,所述预设迭代条件可依据实际应用场景进行具体设置。In the process of using the optical flow method for target tracking, for example, please refer to Figure 2, when looking for the position of the key point u in the image I in the image J, by reading the first position of the key point u in the image I from the memory The first image block and the second image block in the image J are iteratively calculated to solve the velocity vector of the key point u with respect to the image J, and then determine the position of the key point u in the image J. Among them, in the first calculation process, the second image block of the key point u in image J can be obtained according to the position of the first image block at the same position in image J, and then according to the distance between the first image block and the second image block Solve the velocity vector of the key point u with respect to the image J, and then determine the position of the key point u in the image J; in the subsequent iterative calculation process, the key point u can be re-determined in the image J according to the velocity vector solved last time According to the re-determined position of the key point u in image J, the second image block in image J is obtained, and the re-acquired second image block is used for iterative calculation with the first image block until the predetermined value is met. Set the iteration condition position. It can be understood that the preset iteration condition may be specifically set according to an actual application scenario.
其中,对于图像I(以下称为参考图像),可以以所述第一图像块的尺寸将图像I划分为多个图像块,在存储器中以图像块为单位连续存储所述第一图像;对于图像J(以下称 为待处理图像),也可以以所述第二图像块的尺寸将图像J划分为多个图像块,在存储器中连续存储所述第二图像块。后续在读取图像I的第一图像块和图像J的第二图像块时,可以以图像块为单位进行读取,这样可以显著提高读取效率。Wherein, for the image I (hereinafter referred to as the reference image), the image I can be divided into a plurality of image blocks according to the size of the first image block, and the first image is continuously stored in the memory in units of image blocks; for For the image J (hereinafter referred to as the image to be processed), the image J may also be divided into multiple image blocks according to the size of the second image block, and the second image blocks are continuously stored in the memory. Subsequently, when reading the first image block of image I and the second image block of image J, the reading can be performed in units of image blocks, which can significantly improve the reading efficiency.
在另一示例性的实施例中,比如在目标检测、目标定位等场景下,另一种图像配准方法的大致流程如下:分别获取两幅图像(比如其中一幅为参考图像,另一幅为待处理图像)的关键点(比如可以随机产生,也可以利用特征点来做关键点);从存储器存储两幅图像的存储地址处读取所述关键点的图像块,通过进行相似性度量确定两幅图像的图像块之间的相似性,以确定匹配的关键点;然后通过匹配的关键点得到图像空间坐标变换参数;最后基于图像空间坐标变换参数进行目标检测或者目标定位等。其中,针对于上述两幅图像在存储器中的存储方式,可以将所述图像以所述图像块的尺寸被划分为若干块,并在在存储器中以图像块为单位连续存储,后续在读取所述关键点的图像块时,可以以图像块为单位进行读取,这样可以显著提高读取效率。In another exemplary embodiment, for example, in scenarios such as target detection and target positioning, the general flow of another image registration method is as follows: two images are respectively acquired (for example, one is a reference image, and the other is a reference image). is the key point of the image to be processed (for example, it can be randomly generated, or the feature point can be used as the key point); the image block of the key point is read from the memory address where the two images are stored in the memory, and the similarity measurement is carried out Determine the similarity between the image blocks of the two images to determine the matching key points; then obtain the image space coordinate transformation parameters through the matching key points; finally perform target detection or target positioning based on the image space coordinate transformation parameters. Wherein, for the storage method of the above-mentioned two images in the memory, the image can be divided into several blocks according to the size of the image block, and stored continuously in the memory in units of image blocks, and subsequently read The image blocks of the key points can be read in units of image blocks, which can significantly improve the reading efficiency.
在一些实施例中,本申请实施例的所述图像处理方法可以应用于图像处理装置中。In some embodiments, the image processing method in the embodiment of the present application may be applied to an image processing device.
在一种可能的实现方式中,所述图像处理装置可以是具有数据处理能力的电子设备,如电脑、服务器、云端服务器或者终端、可移动平台(例如无人飞行器、无人驾驶车辆或者移动机器人等)等。In a possible implementation, the image processing device may be an electronic device with data processing capabilities, such as a computer, a server, a cloud server or a terminal, a mobile platform (such as an unmanned aerial vehicle, an unmanned vehicle, or a mobile robot) and many more.
在另一种可能的实现方式中,所述图像处理装置也可以是具有数据处理能力的计算机芯片或者集成电路,例如中央处理单元(Central Processing Unit,CPU)、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)或者现成可编程门阵列(Field-Programmable Gate Array,FPGA)等。其中,所述图像处理装置可安装于电子设备上,如所述图像处理装置可以安装在无人飞行器、无人驾驶车辆或者移动机器人等可移动平台;或者所述图像处理装置也可以安装于手持云台。In another possible implementation, the image processing device may also be a computer chip or an integrated circuit with data processing capabilities, such as a central processing unit (Central Processing Unit, CPU), a digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA), etc. Wherein, the image processing device can be installed on an electronic device, such as the image processing device can be installed on a mobile platform such as an unmanned aerial vehicle, an unmanned vehicle or a mobile robot; or the image processing device can also be installed on a handheld PTZ.
在一示例性的应用场景中,所述图像处理装置可以是无人飞行器或者所述图像处理装置可以是安装于无人机中的芯片或者集成电路。请参阅图3,例如所述无人飞行器100可以通过所述图像处理装置来实现目标对象跟随拍摄功能或者目标定位功能等。In an exemplary application scenario, the image processing device may be an unmanned aerial vehicle or the image processing device may be a chip or an integrated circuit installed in an unmanned aerial vehicle. Referring to FIG. 3 , for example, the unmanned aerial vehicle 100 can realize the function of following and photographing a target object or the function of target positioning through the image processing device.
比如针对于目标对象跟随拍摄功能,所述无人飞行器100安装有成像装置200,通过所述成像装置200来采集针对于目标对象的多张图像,进而可以使用所述图像处理装置来执行所述图像处理方法,依次将当前帧(参考图像)与下一帧(待处理图像)进行图像配准,自动跟踪目标对象的运动变化过程,实现无人飞行器100可以根据图像配准的结果对目标对象进行跟随拍摄。For example, for the following shooting function of the target object, the UAV 100 is equipped with an imaging device 200, through which multiple images of the target object are collected, and then the image processing device can be used to perform the The image processing method sequentially performs image registration on the current frame (reference image) and the next frame (image to be processed), and automatically tracks the movement change process of the target object, so that the unmanned aerial vehicle 100 can detect the target object according to the result of image registration. Perform follow-up shooting.
比如针对于目标定位功能,通过所述成像装置200来采集无人飞行器100在飞行过程 中的多张图像,进而可以使用所述图像处理装置来执行所述图像处理方法,依次将当前帧(参考图像)与下一帧(待处理图像)进行图像配准,定位出目标在不同图像中的位置,进而还可以根据定位出的目标的位置来辅助确定无人飞行器100的位置。For example, for the target positioning function, the imaging device 200 is used to collect multiple images of the unmanned aerial vehicle 100 during flight, and then the image processing device can be used to perform the image processing method, and the current frame (refer to image) and the next frame (image to be processed) for image registration to locate the position of the target in different images, and then assist in determining the position of the UAV 100 according to the position of the located target.
接下来对本申请实施例提供的图像处理方法进行说明:请参阅图4,图4为本申请实施例提供的一种图像处理方法的流程示意图,所述方法可以由图像处理装置来执行,所述方法包括:Next, the image processing method provided by the embodiment of the present application will be described: Please refer to FIG. 4, which is a schematic flow chart of an image processing method provided by the embodiment of the present application. The method can be executed by an image processing device. Methods include:
在步骤S101中,从存储器中读取参考图像的第一图像块以及待处理图像的第二图像块。其中,所述参考图像以所述第一图像块的尺寸被切分成多个图像块,所述参考图像在所述存储器中以图像块为单位连续存储;和/或,所述待处理图像以所述第二图像块的尺寸被切分为多个图像块,所述待处理图像在所述存储器中以图像块为单位连续存储。In step S101, a first image block of a reference image and a second image block of an image to be processed are read from a memory. Wherein, the reference image is divided into multiple image blocks according to the size of the first image block, and the reference image is continuously stored in the memory in units of image blocks; and/or, the image to be processed is The size of the second image block is divided into a plurality of image blocks, and the image to be processed is continuously stored in the memory in units of image blocks.
在步骤S102中,使用所述第一图像块和所述第二图像块进行图像配准。In step S102, image registration is performed using the first image block and the second image block.
在一些实施例中,所述参考图像和/或所述待处理图像在存储器中以图像块为单位连续存储,且每一所述图像块中的像素在所述存储器中的存储地址也是连续的,后续在读取所述第一图像块或者所述第二图像块时,可以以图像块为单位从所述存储器中读取,从而有利于提高存储器的读取效率,进而提高图像配准效率。In some embodiments, the reference image and/or the image to be processed are continuously stored in the memory in units of image blocks, and the storage addresses of the pixels in each image block in the memory are also consecutive , when reading the first image block or the second image block, it can be read from the memory in units of image blocks, which is conducive to improving the reading efficiency of the memory, thereby improving the efficiency of image registration .
在一个例子中,对于所述参考图像或者所述待处理图像,请参阅图5,以所述参考图像为例,所述参考图像以所述第一图像块的尺寸(比如16*16)被切分成多个图像块,然后在存储器中以图像块为单位连续存储,并且对于每一图像块中的像素在所述存储器中的存储地址也是连续的。对于所述待处理图像也是相同的处理方式,所述待处理图像以所述第二图像块的尺寸被切分成多个图像块,然后在存储器中以图像块为单位连续存储,并且对于每一图像块中的像素在所述存储器中的存储地址也是连续的。示例性的,所述第一图像块的尺寸和所述第二图像块的尺寸相同,当然,在一些实施例中,所述第一图像块的尺寸和所述第二图像块的尺寸也可以不同,本实施例对此不做任何限制。In an example, for the reference image or the image to be processed, please refer to FIG. 5. Taking the reference image as an example, the reference image is divided into It is divided into a plurality of image blocks, and then stored continuously in the memory in units of image blocks, and the storage addresses of the pixels in each image block in the memory are also continuous. The same processing method is also used for the image to be processed, the image to be processed is divided into multiple image blocks according to the size of the second image block, and then stored continuously in the memory in units of image blocks, and for each The storage addresses of the pixels in the image block in the memory are also continuous. Exemplarily, the size of the first image block and the size of the second image block are the same, of course, in some embodiments, the size of the first image block and the size of the second image block can also be Different, this embodiment does not impose any limitation on this.
这里对所述参考图像以图像块形式存入所述存储器的过程进行说明:在获取所述参考图像之后,请参阅图6,所述图像处理装置可以将所述参考图像缓存在包括多个缓存行的第一缓冲区中,每一所述缓存行用于缓存所述参考图像的一行像素;然后对于所述参考图像的每一个图像块,按照所述第一图像块的尺寸从所述多个缓存行中的目标缓存行读取指定像素,并将所述指定像素在所述存储器中连续存储,图6中以第一图像块的尺寸为16*16示例。The process of storing the reference image in the memory in the form of image blocks is described here: after the reference image is acquired, please refer to FIG. In the first buffer zone of the row, each cache row is used to cache a row of pixels of the reference image; then, for each image block of the reference image, according to the size of the first image block, the The target cache line in the first cache line reads the specified pixel, and stores the specified pixel continuously in the memory. In FIG. 6 , the size of the first image block is 16*16 as an example.
在一些实施例中,所述第一图像块的尺寸包括宽度和高度;所述目标缓存行的数量根据所述高度和宽度中的一者确定;所述指定像素的数量根据所述高度和宽度中的另一者确 定;比如所述第一图像块的尺寸为16*32,目标缓存行的数据为16,指定像素数量为32,即对于每一个图像块,所述图像处理装置需要从16个目标缓存行中的指定位置各读取32个像素,然后将16*32个像素在存储器中连续存储。假设一个像素行有64个像素,则针对于第一个图像块,需要读取第1个~第32个像素,针对于第二个图像块,需要读取第33个~第64个像素。In some embodiments, the size of the first image block includes width and height; the number of the target cache line is determined according to one of the height and width; the number of specified pixels is determined according to the height and width The other one is determined; for example, the size of the first image block is 16*32, the data of the target cache line is 16, and the specified number of pixels is 32, that is, for each image block, the image processing device needs to start from 16 32 pixels are read from the specified positions in each target cache line, and then 16*32 pixels are continuously stored in the memory. Assuming that a pixel row has 64 pixels, for the first image block, the first to 32nd pixels need to be read, and for the second image block, the 33rd to 64th pixels need to be read.
在一些实施例中,所述第一缓冲区中所包括的缓存行的数量至少为所述目标缓存行的数量。比如所述第一图像块的尺寸为16*32,目标缓存行的数据为16,所述第一缓冲区中所包括的缓存行的数量最少为16个。In some embodiments, the number of cache lines included in the first buffer is at least the number of the target cache lines. For example, the size of the first image block is 16*32, the data of the target cache line is 16, and the number of cache lines included in the first buffer zone is at least 16.
这里对所述待处理图像以图像块形式存入所述存储器的过程进行说明:在获取所述待处理图像之后,所述图像处理装置可以将所述待处理图像缓存在包括多个缓存行的第一缓冲区中,每一所述缓存行用于缓存所述待处理图像的一行像素;然后对于所述待处理图像的每一个图像块,按照所述第二图像块的尺寸从所述多个缓存行中的目标缓存行读取指定像素,并将所述指定像素在所述存储器中连续存储。The process of storing the image to be processed in the memory in the form of image blocks is described here: after acquiring the image to be processed, the image processing device may cache the image to be processed in In the first buffer, each cache line is used to cache a row of pixels of the image to be processed; then, for each image block of the image to be processed, according to the size of the second image block from the multiple The target cache line in one cache line reads the specified pixel, and stores the specified pixel in the memory continuously.
在一些实施例中,所述第二图像块的尺寸包括宽度和高度;所述目标缓存行的数量根据所述高度和宽度中的一者确定;所述指定像素的数量根据所述高度和宽度中的另一者确定;比如所述第二图像块的尺寸为16*32,目标缓存行的数据为16,指定像素数量为32,即对于每一个图像块,所述图像处理装置需要从16个目标缓存行中的指定位置各读取32个像素,然后将16*32个像素在存储器中连续存储。In some embodiments, the size of the second image block includes width and height; the number of the target cache line is determined according to one of the height and width; the number of specified pixels is determined according to the height and width The other one is determined; for example, the size of the second image block is 16*32, the data of the target cache line is 16, and the specified number of pixels is 32, that is, for each image block, the image processing device needs to start from 16 32 pixels are read from the specified positions in each target cache line, and then 16*32 pixels are continuously stored in the memory.
在一些实施例中,所述第一缓冲区的数量为至少两个;所述参考图像缓存在其中一个第一缓冲区中;所述待处理图像缓存在另一个第一缓冲区中。在另一些实施例中,为了节省缓存资源,所述第一缓冲区的数量可以为一个;比如可以先使用第一缓冲区对参考图像处理之后,再使用第一缓冲区对待处理图像进行处理;或者可以先使用第一缓冲区对待处理图像处理之后,再使用第一缓冲区对参考图像进行处理。In some embodiments, the number of the first buffers is at least two; the reference image is buffered in one of the first buffers; the image to be processed is buffered in the other first buffer. In other embodiments, in order to save cache resources, the number of the first buffer may be one; for example, the first buffer may be used to process the reference image, and then the image to be processed may be processed using the first buffer; Alternatively, the first buffer zone may be used to process the image to be processed, and then the reference image may be processed using the first buffer zone.
在一些实施例中,为了提高图像配准的准确率,通常会构造参考图像的图像金字塔和待处理图像的图像金字塔来进行图像配准。图像金字塔是一系列以金字塔形状排列的分辨率逐步降低,且来源于同一张原始图的图像集合。对于图像金字塔中的每一图像,都可以使用上述方式将其划分成多个图像块并在存储器中连续存储所述多个图像块,且图像块中的像素在存储器中的存储地址也是连续的。In some embodiments, in order to improve the accuracy of image registration, an image pyramid of a reference image and an image pyramid of an image to be processed are usually constructed for image registration. The image pyramid is a series of images arranged in a pyramid shape with gradually reduced resolution and derived from the same original image. For each image in the image pyramid, the above method can be used to divide it into multiple image blocks and store the multiple image blocks continuously in the memory, and the storage addresses of the pixels in the image block in the memory are also continuous .
示例性的,可以使用突发连续读取方式从存储器中读取所述参考图像的第一图像块以及所述待处理图像的第二图像块。Exemplarily, the first image block of the reference image and the second image block of the image to be processed may be read from the memory in a burst continuous read manner.
相关技术中,对于在存储器中以从上到下及从左到右的方式存储的图像,在实际的读 取过程中,设图像的像素位宽P=8bit,存储器的位宽M=128bit,即存储器中的每个存储单元可以存储16(16=128/8)个像素,采用突发连续读取方式,假设突发(burst)信号L的突发长度为4,表示可以读取连续的4个存储单元中存储的数据,则每次读取操作至少可以读取64个像素(4*16=64),假设需要读取的图像块数据大小为16*16,如图7所示,图7中的灰色部分为本次需要的图像块数据,一个burst信号(突发长度为4)可以读取一行64个像素的数据,图像块数据大小为16*16,则需要16个burst信号(突发长度为4)读取到如图2所示的64*16的数据。另请参阅图8,对于在存储器中以从上到下及从左到右方式存储的图像,在读取一个16*16的图像块数据时存在两种情况(这里以16*16的图像块示例,其他尺寸的图像块也存在相同的情况):(1)图像块数据的一行数据能够使用一个burst信号(突发长度为4)读取到,则针对于16*16的图像块数据需要16个burst信号(突发长度为4)进行读取;(2)图像块数据的一行数据需要使用两个burst信号(突发长度为4)才能读取到,则针对于16*16的图像块数据需要16个burst信号(突发长度为8)进行读取。In the related art, for the image stored in the memory from top to bottom and from left to right, in the actual reading process, the pixel bit width of the image is P=8bit, the bit width of the memory M=128bit, That is, each storage unit in the memory can store 16 (16=128/8) pixels, and the burst continuous reading method is adopted. Assuming that the burst length of the burst signal L is 4, it means that the continuous pixel can be read. For the data stored in 4 storage units, at least 64 pixels (4*16=64) can be read in each read operation, assuming that the image block data size to be read is 16*16, as shown in Figure 7, The gray part in Figure 7 is the image block data required this time. A burst signal (burst length is 4) can read a row of 64 pixel data, and the image block data size is 16*16, so 16 burst signals are required. (burst length is 4) read 64*16 data as shown in FIG. 2 . Also referring to Fig. 8, for the image stored in the memory from top to bottom and from left to right, there are two situations when reading a 16*16 image block data (here with 16*16 image block For example, the same situation exists for image blocks of other sizes): (1) A row of data of image block data can be read using a burst signal (burst length is 4), then for 16*16 image block data needs 16 burst signals (burst length is 4) to read; (2) one line of image block data needs to use two burst signals (burst length is 4) to read, then for 16*16 image Block data requires 16 burst signals (burst length 8) to read.
而在本申请中,由于图像(这里以参考图像为例进行说明)是以图像块为单位在存储器中连续存储,在图像块中的像素在存储器中的存储地址连续,则在读取一个16*16的第一图像块时存在以下三种情况:(1)请参阅图9,第一图像块的数据全部在一个图像块中,则只需要一个burst信号(突发长度为16)即可读取到,需要的读取指令更少;(2)请参阅图10,第一图像块的数据在两个图像块中,则只需要两个burst信号(突发长度为16)即可读取到,需要的读取指令更少;(3)请参阅图11,第一图像块的数据在四个图像块中,则需要4个burst信号(突发长度为16)即可读取到,虽然4个burst信号(突发长度为16)读出的数据量与图8所示实施例中情况(1)中16个burst信号(突发长度为4)所读取的数据量相同,但是由于本申请中burst信号的突发长度更大,突发长度越大,则存储器的访问效率也越高。And in the present application, since the image (here, the reference image is taken as an example) is continuously stored in the memory in units of image blocks, and the storage addresses of the pixels in the image blocks in the memory are continuous, then when reading a 16 * There are the following three situations in the first image block of 16: (1) Please refer to Figure 9, the data of the first image block is all in one image block, then only one burst signal (burst length is 16) is required Read, the required read instruction is less; (2) Please refer to Figure 10, the data of the first image block is in two image blocks, then only two burst signals (burst length is 16) can be read Fetch, the required read instruction is less; (3) Please refer to Figure 11, the data of the first image block is in four image blocks, then need 4 burst signals (burst length is 16) to read , although the data volume read by 4 burst signals (burst length is 16) is the same as the data volume read by 16 burst signals (burst length is 4) in the case (1) in the embodiment shown in Figure 8, However, since the burst length of the burst signal in this application is larger, the greater the burst length, the higher the memory access efficiency.
在一些实施例中,在图像配准过程中,所述图像处理装置可以使用第一突发信号从存储器中读取参考图像的第一图像块,以及,使用第二突发信号从存储器中读取待处理图像的第二图像块。其中,在读取第一图像块和/或第二图像块时存在如图9、图10以及图11三种情况,可以说,所述第一突发信号和/或第二突发信号的数量均小于或等于4。所述第一突发信号的数量根据包含有所述第一图像块的像素的图像块数量确定(比如图10中,包含第一图像块的像素的图像块数量为2,则需要2个第一突发信号);和/或,所述第二突发信号的数量根据包含有所述第二图像块的像素的图像块数量确定。In some embodiments, during the image registration process, the image processing device may use the first burst signal to read the first image block of the reference image from the memory, and use the second burst signal to read the first image block from the memory. Get the second image block of the image to be processed. Wherein, there are three situations as shown in Fig. 9, Fig. 10 and Fig. 11 when reading the first image block and/or the second image block, it can be said that the first burst signal and/or the second burst signal The numbers are all less than or equal to 4. The quantity of the first burst signal is determined according to the number of image blocks containing the pixels of the first image block (such as in FIG. 10, if the number of image blocks containing the pixels of the first image block is 2, then 2 second a burst signal); and/or, the number of the second burst signal is determined according to the number of image blocks including the pixels of the second image block.
在参考图像以图像块为单位在存储器中连续存储,且图像块中的像素也是连续存储的 情况下,可以使用第一突发信号以所述图像块为单位进行读取,一个第一突发信号用于读取一个图像块的数据,则所述第一突发信号的突发长度可以根据所述第一图像块包含的像素数量、像素位宽以及所述存储器的位宽确定;其中,像素位宽以及所述存储器的位宽决定了存储器中一个存储单元所能存储的像素数量,则所述第一图像块包含的像素数量以及一个存储单元所能存储的像素数量可以确定用于存储第一图像块的存储单元个数,该用于存储第一图像块的存储单元个数即为第一突发信号的突发长度。In the case that the reference image is continuously stored in the memory in units of image blocks, and the pixels in the image blocks are also stored continuously, the first burst signal can be used to read in units of image blocks, and a first burst The signal is used to read the data of an image block, and the burst length of the first burst signal can be determined according to the number of pixels contained in the first image block, the pixel bit width and the bit width of the memory; wherein, The pixel bit width and the bit width of the memory determine the number of pixels that can be stored in a storage unit in the memory, then the number of pixels contained in the first image block and the number of pixels that can be stored in a storage unit can be determined for storage The number of storage units for the first image block, the number of storage units for storing the first image block is the burst length of the first burst signal.
同理,在待处理图像以图像块为单位在存储器中连续存储,且图像块中的像素也是连续存储的情况下,可以使用第二突发信号以所述图像块为单位进行读取,一个第二突发信号用于读取一个图像块的数据,则所述第二突发信号的信号长度可以根据所述第二图像块包含的像素数量、像素位宽以及所述存储器的位宽确定;其中,像素位宽以及所述存储器的位宽决定了存储器中一个存储单元所能存储的像素数量,则所述第二图像块包含的像素数量以及一个存储单元所能存储的像素数量可以确定用于存储第二图像块的存储单元个数,该用于存储第二图像块的存储单元个数即为第二突发信号的突发长度。Similarly, when the image to be processed is stored continuously in the memory in units of image blocks, and the pixels in the image blocks are also stored continuously, the second burst signal can be used to read in units of image blocks, one The second burst signal is used to read the data of an image block, and the signal length of the second burst signal can be determined according to the number of pixels contained in the second image block, the pixel bit width and the bit width of the memory ; Wherein, the pixel bit width and the bit width of the memory determine the number of pixels that can be stored in a storage unit in the memory, then the number of pixels included in the second image block and the number of pixels that can be stored in a storage unit can be determined The number of storage units used to store the second image block is the burst length of the second burst signal.
在一些实施例中,所述第一图像块和所述第二图像块根据从所述参考图像中提取的关键点确定,进而根据所述第一图像块和所述第二图像块的图像配准过程来确定关键点在待处理图像中的位置。其中,所述关键点可以随机从所述参考图像中确定,也可以根据从参考图像中提取的特征点或者特征信息确定,所述特征点或者特征信息包括但不限于角点、边缘点、高曲率点、轮廓、交点、线段、封闭边界或者重心等。示例性的,所述第一图像块可以是所述参考图像中以所述关键点为中心的预设尺寸的区域;以及在估计所述关键点在所述待处理图像中的位置之后,所述第二图像块可以是以所述待处理图像中以所述关键点为中心的预设尺寸的区域。In some embodiments, the first image block and the second image block are determined according to the key points extracted from the reference image, and then according to the image configuration of the first image block and the second image block A standard process to determine the position of key points in the image to be processed. Wherein, the key points can be determined randomly from the reference image, or can be determined according to feature points or feature information extracted from the reference image, and the feature points or feature information include but not limited to corner points, edge points, height Curvature points, contours, intersections, line segments, closed boundaries, or centers of gravity, etc. Exemplarily, the first image block may be an area of a preset size centered on the key point in the reference image; and after estimating the position of the key point in the image to be processed, the The second image block may be an area of a preset size centered on the key point in the image to be processed.
在另一些实施例中,所述第一图像块可以根据从参考图像中提取的第一特征点确定,以及所述第二图像块根据从待处理图像中提取的第二特征点确定,进而根据所述第一图像块和所述第二图像块的图像配准过程来获取参考图像与待处理图像之间的相对位姿等。示例性的,所述第一图像块是参考图像中以第一特征点为中心的预设尺寸的区域,所述第二图像块是待处理图像中以第二特征点为中心的预设尺寸的区域。In some other embodiments, the first image block can be determined according to the first feature point extracted from the reference image, and the second image block can be determined according to the second feature point extracted from the image to be processed, and then according to The image registration process of the first image block and the second image block is used to obtain the relative pose and the like between the reference image and the image to be processed. Exemplarily, the first image block is an area of a preset size centered on the first feature point in the reference image, and the second image block is an area of preset size centered on the second feature point in the image to be processed Area.
在一些实施例中,考虑到如图7所示的实施例中,每次在读取图像块时可能会读取比图像块更多的数据,而无关的数据会被舍弃掉,从而造成浪费存储器带宽的情况;而且在某些情况中,比如如图2所示的实施例中,寻找图像I中的关键点u在图像J中的位置,通过是从存储器中读取关键点u在图像I中的第一图像块和在图像J中的第二图像块进行迭代计算,求解关键点u关于图像J的速度向量,进而确定关键点u在图像J中的位置, 其中,迭代的过程需要多次从存储器中读取第二图像块,每次在读取第二图像块时可能会读取比第二图像块更多的数据,而无关的数据会被舍弃掉,从而造成更大的数据浪费。因此,针对于上述问题,在读取所述第一图像块,可以从存储器中读取包括所述第一图像块的参考图像区域,所述参考图像区域中除所述第一图像块之外的数据用于下一次的图像配准过程;在读取所述第二图像块时,也可以从存储器中读取包括所述第二图像块的待处理图像区域,所述待处理图像区域中除所述第二图像块之外的数据用于下一次的图像配准过程。In some embodiments, considering that in the embodiment shown in FIG. 7 , more data than image blocks may be read each time an image block is read, and irrelevant data will be discarded, thereby causing waste The situation of memory bandwidth; And in some cases, such as in the embodiment as shown in Figure 2, find the key point u in image I in the position in image J, by being to read key point u in image from memory The first image block in I and the second image block in image J are iteratively calculated to solve the velocity vector of key point u with respect to image J, and then determine the position of key point u in image J, wherein the iterative process requires Read the second image block from the memory multiple times, each time when reading the second image block may read more data than the second image block, and irrelevant data will be discarded, resulting in a larger Data waste. Therefore, for the above problem, when reading the first image block, the reference image area including the first image block can be read from the memory, and the reference image area except the first image block The data is used for the next image registration process; when reading the second image block, the image area to be processed including the second image block can also be read from the memory, and the image area to be processed Data other than the second image block are used for the next image registration process.
其中,所述参考图像区域和/或所述待处理图像区域可以缓存在第二缓冲区中,本实施例在读取第一图像块和/或第二图像块时,可以读取比第一图像块更多数据和/或读取比第二图像块更多的数据缓存起来,后续可以直接读取缓存的数据来使用,这样可以有效降低对存储器的访问效率,提高数据读取效率,同时也避免所读取的多余数据的浪费。Wherein, the reference image area and/or the image area to be processed can be cached in the second buffer, and in this embodiment, when reading the first image block and/or the second image block, it can read Image blocks with more data and/or read more data than the second image block are cached, and the cached data can be directly read and used later, which can effectively reduce the access efficiency to the memory and improve the data reading efficiency. At the same time It also avoids wasting redundant data that is read.
在一种可能的实现方式中,所述参考图像区域和所述待处理图像区域共用一个第二缓冲区。针对于如图2所示的实施例,图像配准过程是为了寻找图像I(参考图像)中的关键点u在图像J(待处理图像)中的位置,通过从存储器中读取关键点u在图像I中的第一图像块和在图像J中的第二图像块进行迭代计算,求解关键点u关于图像J的速度向量,进而确定关键点u在图像J中的位置,其中,迭代的过程需要多次从存储器中读取第二图像块,则缓存第二图像块更为迫切。因此,在所述第二缓冲区中,所述参考图像区域对应的缓存区间的缓存容量和/或所述待处理图像区域对应的缓存区间的缓存容量均根据从参考图像提取的关键点的数量确定;其中,所述参考图像区域对应的缓存区间的缓存容量与所述关键点的数量呈正相关关系;和/或,所述待处理图像区域对应的缓存区间的缓存容量与所述关键点的数量呈负相关关系;即从所述参考图像中提取的关键点的数量越少,所述参考图像区域对应的缓存区间的缓存容量越小,所述待处理图像区域对应的缓存区间的缓存容量越大。示例性的,在所述第二缓冲区中,所述参考图像区域对应的缓存区间的缓存容量小于所述待处理图像区域对应的缓存区间的缓存容量,从而实现对第二图像块的有效缓存。In a possible implementation manner, the reference image area and the image area to be processed share a second buffer. For the embodiment shown in Figure 2, the image registration process is to find the position of the key point u in the image I (reference image) in the image J (image to be processed), by reading the key point u from the memory The first image block in image I and the second image block in image J are iteratively calculated to solve the velocity vector of key point u with respect to image J, and then determine the position of key point u in image J, where the iterative The process needs to read the second image block from the memory multiple times, so it is more urgent to cache the second image block. Therefore, in the second buffer zone, the buffer capacity of the buffer interval corresponding to the reference image area and/or the buffer capacity of the buffer interval corresponding to the image area to be processed are based on the number of key points extracted from the reference image Determine; wherein, the buffer capacity of the buffer interval corresponding to the reference image area is positively correlated with the number of key points; and/or, the buffer capacity of the buffer interval corresponding to the image area to be processed is related to the number of key points The number is negatively correlated; that is, the smaller the number of key points extracted from the reference image, the smaller the buffer capacity of the buffer interval corresponding to the reference image area, and the smaller the buffer capacity of the buffer interval corresponding to the image area to be processed bigger. Exemplarily, in the second buffer zone, the buffering capacity of the buffering section corresponding to the reference image area is smaller than the buffering capacity of the buffering area corresponding to the image area to be processed, so as to realize effective buffering of the second image block .
在另一种可能的实现方式中,所述第二缓冲区的数量有至少两个;所述参考图像区域缓存在其中一个第二缓冲区中;所述待处理图像区域缓存在另一个第二缓冲区中。示例性的,考虑到如图2所示的实施例中,缓存第二图像块更为迫切,则为了有效利用缓存资源,可以设置所述参考图像区域对应的第二缓冲区的缓存容量小于所述待处理图像对应的第二缓冲区的缓存容量。In another possible implementation manner, there are at least two second buffers; the reference image area is cached in one of the second buffers; the image area to be processed is cached in another second buffer. in the buffer. Exemplarily, considering that it is more urgent to cache the second image block in the embodiment shown in FIG. Cache capacity of the second buffer corresponding to the image to be processed.
在一些实施例中,在从存储器中读取包括所述第一图像块的参考图像区域的过程中, 所述图像处理装置首先确定所述第二缓冲区中是否缓存有所述第一图像块;其中,缓存在所述第二缓冲区中的所述参考图像区域对应有第一存储标识,所述第一存储标识用于指示所述参考图像区域在所述参考图像中的位置;所述图像处理装置可以根据从参考图像中提取的关键点以及所述第一存储标识,确定所述第二缓冲区中是否缓存有关于所述关键点的所述第一图像块。In some embodiments, during the process of reading the reference image area including the first image block from the memory, the image processing device first determines whether the first image block is cached in the second buffer ; Wherein, the reference image area cached in the second buffer zone corresponds to a first storage identifier, and the first storage identifier is used to indicate the position of the reference image area in the reference image; the The image processing device may determine whether the first image block related to the key point is cached in the second buffer according to the key point extracted from the reference image and the first storage identifier.
若所述第二缓冲区中缓存有所述第一图像块,则从所述第二缓冲区中读取所述第一图像块,无需从存储器中读取,有利于提高数据读取效率。若所述第二缓冲区中未缓存有所述第一图像块,则从所述存储器中读取包括所述第一图像块的参考图像区域,同时生成包括所述第一图像块的参考图像区域的第一存储标识。若所述第二缓冲区中缓存有所述第一图像块的部分数据,从所述第二缓冲区中读取所述部分数据以及从所述存储器中读取包括除所述部分数据之外的其他数据的参考图像区域,同时生成包括除所述部分数据之外的其他数据的参考图像区域的第一存储标识。If the first image block is cached in the second buffer, the first image block is read from the second buffer without reading from a memory, which is beneficial to improve data reading efficiency. If the first image block is not cached in the second buffer, read a reference image area including the first image block from the memory, and simultaneously generate a reference image including the first image block The first storage ID for the region. If part of the data of the first image block is buffered in the second buffer, read the part of the data from the second buffer and read from the memory including the data except the part of the data the reference image area of other data, and simultaneously generate the first storage identifier of the reference image area including other data except the partial data.
示例性的,对于关键点邻近的情况,以图12为例,A点坐标和B点坐标很近时,所需的数据都缓存在第二缓冲区中,此时对于B点,将不再需要从存储器中读取关于B点的图像块数据,减少了对于存储器的访问次数,也有利于提高数据读取效率,同时避免读取的多余数据的浪费。Exemplarily, for the case where key points are adjacent, take Figure 12 as an example, when the coordinates of point A and point B are very close, the required data is cached in the second buffer, and at this time, for point B, there will be no It is necessary to read the image block data about point B from the memory, which reduces the number of accesses to the memory, and is also conducive to improving the efficiency of data reading, while avoiding the waste of redundant data read.
在一些实施例中,在从存储器中读取包括所述第二图像块的待处理图像区域的过程中,所述图像处理装置首先确定所述第二缓冲区中是否缓存有所述第二图像块;其中,缓存在所述第二缓冲区中的所述待处理图像区域对应有第二存储标识,所述第二存储标识用于指示所述待处理图像区域在所述待处理图像中的位置;所述图像处理装置可以根据从参考图像中提取的关键点以及所述第二存储标识,确定所述第二缓冲区中是否缓存有关于所述关键点的所述第二图像块。In some embodiments, during the process of reading the image region to be processed including the second image block from the memory, the image processing device first determines whether the second image is cached in the second buffer block; wherein, the image region to be processed cached in the second buffer zone corresponds to a second storage identifier, and the second storage identifier is used to indicate the location of the image region to be processed in the image to be processed location; the image processing apparatus may determine whether the second image block related to the key point is cached in the second buffer according to the key point extracted from the reference image and the second storage identifier.
若所述第二缓冲区中缓存有所述第二图像块,从所述第二缓冲区中读取所述第二图像块,无需从存储器中读取,有利于提高数据读取效率。若所述第二缓冲区中未缓存有所述第二图像块,从所述存储器中读取包括所述第二图像块的待处理图像区域,同时生成包括所述第二图像块的待处理图像区域的第二存储标识。若所述第二缓冲区中缓存有所述第二图像块的部分数据,从所述第二缓冲区中读取所述部分数据以及从所述存储器中读取包括除所述部分数据之外的其他数据的待处理图像区域,同时生成包括除所述部分数据之外的其他数据的待处理图像区域的第二存储标识。本实施例在读取过程中读取更多的数据缓存在第二缓冲区中,可以有效减少了对于存储器的访问次数,也有利于提高数据读取效率,同时避免读取的多余数据的浪费。If the second image block is cached in the second buffer, the second image block is read from the second buffer without reading from a memory, which is beneficial to improve data reading efficiency. If the second image block is not cached in the second buffer, read the image area to be processed including the second image block from the memory, and generate an image area to be processed including the second image block at the same time The second storage ID of the image region. If part of the data of the second image block is cached in the second buffer, read the part of the data from the second buffer and read from the memory including the parts except the part of the data The image area to be processed of other data, and simultaneously generate a second storage identifier of the image area to be processed including other data except the part of data. In this embodiment, more data is read and cached in the second buffer during the reading process, which can effectively reduce the number of accesses to the memory, and is also conducive to improving the efficiency of data reading, while avoiding the waste of redundant data read .
在一些实施例中,所述待处理图像区域和/或所述参考图像区域的数据量可以根据与所述存储器连接的线路的位宽所确定,比如所述待处理图像区域和/或所述参考图像区域的数据量为与所述存储器连接的线路的位宽的整数倍,即每次读取的数据量刚好是与所述存储器连接的线路的最大传输量的整数倍,从而有利于提高数据传输效率。In some embodiments, the data volume of the image area to be processed and/or the reference image area can be determined according to the bit width of the line connected to the memory, such as the image area to be processed and/or the The amount of data in the reference image area is an integer multiple of the bit width of the line connected to the memory, that is, the amount of data read each time is just an integer multiple of the maximum transmission capacity of the line connected to the memory, which is conducive to improving Data transfer efficiency.
在一些实施例中,请参阅图13,本申请实施例还提供了另一种图像处理方法,所述方法可由图像处理装置来执行,所述方法包括:In some embodiments, please refer to FIG. 13 , the embodiment of the present application also provides another image processing method, which can be executed by an image processing device, and the method includes:
在步骤S201中,从存储器中读取包括所述第一图像块的参考图像区域和包括所述第二图像块的待处理图像区域;其中,所述参考图像区域中除所述第一图像块之外的数据用于下一次的图像配准过程;所述待处理图像区域中除所述第二图像块之外的数据用于下一次的图像配准过程。In step S201, the reference image area including the first image block and the image area to be processed including the second image block are read from the memory; wherein, the reference image area excludes the first image block The data other than the second image block is used for the next image registration process; the data other than the second image block in the image area to be processed is used for the next image registration process.
在步骤S202中,使用所述第一图像块和所述第二图像块进行图像配准。In step S202, image registration is performed using the first image block and the second image block.
本实施例在读取第一图像块或者第二图像块时,可以读取比第一图像块更多数据和/或读取比第二图像块更多的数据缓存起来,后续可以直接读取缓存的数据来使用,这样可以有效降低对存储器的访问效率,提高数据读取效率,同时也避免所读取的多余数据的浪费。In this embodiment, when reading the first image block or the second image block, more data than the first image block and/or more data than the second image block can be read and cached, and can be directly read later The cached data is used, which can effectively reduce the access efficiency to the memory, improve the data reading efficiency, and avoid the waste of redundant data read.
相应地,请参阅图14,本申请还提供了一种图像处理装置,包括存储器10、数据载入模块20以及处理器30。Correspondingly, referring to FIG. 14 , the present application also provides an image processing device, including a memory 10 , a data loading module 20 and a processor 30 .
所述存储器10用于存储参考图像和待处理图像。The memory 10 is used for storing reference images and images to be processed.
所述数据载入模块20用于从所述存储器10中读取参考图像的第一图像块以及待处理图像的第二图像块;其中,所述参考图像以所述第一图像块的尺寸被切分成多个图像块,所述参考图像在所述存储器10中以图像块为单位连续存储;和/或,所述待处理图像以所述第二图像块的尺寸被切分为多个图像块,所述待处理图像在所述存储器10中以图像块为单位连续存储。The data loading module 20 is used to read the first image block of the reference image and the second image block of the image to be processed from the memory 10; wherein, the reference image is stored with the size of the first image block Cutting into multiple image blocks, the reference image is continuously stored in the memory 10 in units of image blocks; and/or, the image to be processed is cut into multiple images with the size of the second image block The image to be processed is continuously stored in the memory 10 in units of image blocks.
所述处理器30用于使用所述第一图像块和所述第二图像块进行图像配准。The processor 30 is configured to perform image registration using the first image block and the second image block.
其中,所述存储器10可以包括至少一种类型的存储介质,存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等等。存储器10可以是装置的内部存储单元,例如装置的硬盘或内存。存储器10也可以是装置的外部存储设备,例如装置上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD) 卡,闪存卡(Flash Card)等。进一步地,存储器10还可以既包括装置的内部存储单元也包括外部存储设备。存储器10用于存储参考图像和待处理图像。存储器10还可以用于暂时地存储已经输出或者将要输出的数据。Wherein, the memory 10 may include at least one type of storage medium, and the storage medium includes a flash memory, a hard disk, a multimedia card, a card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access Memory (SRAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Programmable Read Only Memory (PROM), Magnetic Memory, Magnetic Disk, Optical Disk, etc. The storage 10 may be an internal storage unit of the device, such as a hard disk or a memory of the device. The memory 10 can also be an external storage device of the device, such as a plug-in hard disk equipped on the device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash memory card (Flash Card) and the like. Further, the memory 10 may also include both an internal storage unit of the device and an external storage device. The memory 10 is used for storing reference images and images to be processed. The memory 10 can also be used to temporarily store data that has been output or will be output.
在一实施例中,在所述参考图像和/或所述待处理图像中,每一所述图像块中的像素在所述存储器10中的存储地址连续。In an embodiment, in the reference image and/or the image to be processed, pixels in each image block have consecutive storage addresses in the memory 10 .
在一实施例中,请参阅图15,所述装置还包括第一转换模块40。In an embodiment, please refer to FIG. 15 , the device further includes a first conversion module 40 .
所述第一转换模块40用于:在获取所述参考图像之后,将所述参考图像缓存在包括多个缓存行的第一缓冲区11中,每一所述缓存行用于缓存所述参考图像的一行像素;对于所述参考图像的每一个图像块,按照所述第一图像块的尺寸从所述多个缓存行中的目标缓存行读取指定像素,并将所述指定像素在所述存储器10中连续存储。The first conversion module 40 is configured to: after acquiring the reference image, cache the reference image in the first buffer 11 including a plurality of cache lines, each cache line is used to cache the reference image A row of pixels of the image; for each image block of the reference image, read specified pixels from the target cache line in the plurality of cache lines according to the size of the first image block, and place the specified pixel in the stored continuously in the memory 10.
在一实施例中,请参阅图15,所述装置还包括第二转换模块50。In an embodiment, please refer to FIG. 15 , the device further includes a second conversion module 50 .
所述第二转换模块50用于:将所述待处理图像缓存在包括多个缓存行的第一缓冲区11中,每一所述缓存行用于缓存所述待处理图像的一行像素;对于所述待处理图像的每一个图像块,按照所述第二图像块的尺寸从所述多个缓存行中的目标缓存行读取指定像素,并将所述指定像素在所述存储器10中连续存储。The second converting module 50 is used for: buffering the image to be processed in the first buffer 11 comprising a plurality of cache lines, each of which is used to cache a row of pixels of the image to be processed; For each image block of the image to be processed, according to the size of the second image block, a specified pixel is read from a target cache line in the plurality of cache lines, and the specified pixels are continuously stored in the memory 10 storage.
在一实施例中,所述第一图像块和所述第二图像块的尺寸相同;所述第一图像块和所述第二图像块的尺寸包括宽度和高度;所述目标缓存行的数量根据所述高度和宽度中的一者确定;所述指定像素的数量根据所述高度和宽度中的另一者确定。In an embodiment, the size of the first image block and the second image block are the same; the size of the first image block and the second image block includes width and height; the number of the target cache line It is determined according to one of the height and width; the number of specified pixels is determined according to the other of the height and width.
在一实施例中,所述第一缓冲区11的数量为至少两个;所述参考图像缓存在其中一个第一缓冲区11中;所述待处理图像缓存在另一个第一缓冲区11中。In one embodiment, the number of the first buffers 11 is at least two; the reference image is buffered in one of the first buffers 11; the image to be processed is buffered in the other first buffer 11 .
请参阅图15,所述第一转换模块40包括至少一个第一缓冲区11,所述第二转换模块50也包括至少一个第一缓冲区11。Referring to FIG. 15 , the first conversion module 40 includes at least one first buffer 11 , and the second conversion module 50 also includes at least one first buffer 11 .
在一实施例中,所述数据载入模块20具体用于使用突发连续读取方式从存储器10中读取所述参考图像的第一图像块以及所述待处理图像的第二图像块。In an embodiment, the data loading module 20 is specifically configured to read the first image block of the reference image and the second image block of the image to be processed from the memory 10 in a burst continuous reading manner.
在一实施例中,所述数据载入模块20具体用于:使用第一突发信号从存储器10中读取参考图像的第一图像块,以及,使用第二突发信号从存储器10中读取待处理图像的第二图像块。In an embodiment, the data loading module 20 is specifically configured to: use the first burst signal to read the first image block of the reference image from the memory 10, and use the second burst signal to read the first image block of the reference image from the memory 10. Get the second image block of the image to be processed.
在一实施例中,所述第一突发信号的突发长度根据所述第一图像块包含的像素数量、像素位宽以及所述存储器10的位宽确定;和/或,所述第二突发信号的突发长度根据所述第二图像块包含的像素数量、像素位宽以及所述存储器10的位宽确定。In an embodiment, the burst length of the first burst signal is determined according to the number of pixels contained in the first image block, the pixel bit width and the bit width of the memory 10; and/or, the second The burst length of the burst signal is determined according to the number of pixels included in the second image block, the pixel bit width and the bit width of the memory 10 .
在一实施例中,所述第一突发信号和/或第二突发信号的数量均小于或等于4。In an embodiment, the number of the first burst signal and/or the second burst signal is less than or equal to four.
在一实施例中,所述第一突发信号的数量根据包含有所述第一图像块的像素的图像块数量确定;和/或,所述第二突发信号的数量根据包含有所述第二图像块的像素的图像块数量确定。In an embodiment, the number of the first burst signals is determined according to the number of image blocks including the pixels of the first image block; and/or, the number of the second burst signals is determined according to the number of image blocks including the pixels of the first image block The image block number of pixels of the second image block is determined.
在一实施例中,请参阅图16,所述第一图像块和所述第二图像块根据从所述参考图像中提取的关键点确定。请参阅图16,所述数据载入模块20包括第一载入模块21和第二载入模块22。所述第一载入模块21用于根据从所述参考图像中提取的关键点的坐标从存储器10中读取所述第一图像块;所述第二载入模块22用于根据从所述参考图像中提取的关键点的坐标或者所述处理器30迭代计算后的关键点的坐标从存储器10中读取第二图像块。In an embodiment, referring to FIG. 16 , the first image block and the second image block are determined according to key points extracted from the reference image. Please refer to FIG. 16 , the data loading module 20 includes a first loading module 21 and a second loading module 22 . The first loading module 21 is used to read the first image block from the memory 10 according to the coordinates of key points extracted from the reference image; the second loading module 22 is used to read the first image block from the The coordinates of the key points extracted from the reference image or the coordinates of the key points after iterative calculation by the processor 30 are read from the memory 10 to read the second image block.
在一实施例中,所述数据载入模块20具体用于:从存储器10中读取包括所述第一图像块的参考图像区域和/或包括所述第二图像块的待处理图像区域;其中,所述参考图像区域中除所述第一图像块之外的数据用于下一次的图像配准过程;所述待处理图像区域中除所述第二图像块之外的数据用于下一次的图像配准过程。In an embodiment, the data loading module 20 is specifically configured to: read the reference image area including the first image block and/or the image area to be processed including the second image block from the memory 10; Wherein, the data in the reference image area except for the first image block is used for the next image registration process; the data in the image area to be processed except for the second image block is used for the next One-time image registration process.
在一实施例中,请参阅图17,所述数据载入模块20包括有第二缓冲区12,所述参考图像区域和/或所述待处理图像区域缓存在第二缓冲区12。In an embodiment, please refer to FIG. 17 , the data loading module 20 includes a second buffer 12 , and the reference image area and/or the image area to be processed are buffered in the second buffer 12 .
在一实施例中,在所述第二缓冲区12中,所述参考图像区域对应的缓存区间的缓存容量和/或所述待处理图像区域对应的缓存区间的缓存容量均根据从参考图像提取的关键点的数量确定。In an embodiment, in the second buffer zone 12, the buffer capacity of the buffer interval corresponding to the reference image area and/or the buffer capacity of the buffer interval corresponding to the image area to be processed are based on the data extracted from the reference image. The number of keypoints is determined.
在一实施例中,所述参考图像区域对应的缓存区间的缓存容量与所述关键点的数量呈正相关关系;和/或,所述待处理图像区域对应的缓存区间的缓存容量与所述关键点的数量呈负相关关系。In an embodiment, the buffer capacity of the buffer interval corresponding to the reference image area is positively correlated with the number of key points; and/or, the buffer capacity of the buffer interval corresponding to the image area to be processed is related to the key The number of points is negatively correlated.
在一实施例中,在所述第二缓冲区12中,所述参考图像区域对应的缓存区间的缓存容量小于所述待处理图像区域对应的缓存区间的缓存容量。In an embodiment, in the second buffer zone 12, the buffer capacity of the buffer interval corresponding to the reference image area is smaller than the buffer capacity of the buffer interval corresponding to the image area to be processed.
在一实施例中,请参阅图18,所述第二缓冲区12的数量有至少两个;所述参考图像区域缓存在其中一个第二缓冲区12中;所述待处理图像区域缓存在另一个第二缓冲区12中。In one embodiment, referring to FIG. 18, there are at least two second buffers 12; the reference image area is cached in one of the second buffers 12; the image area to be processed is cached in another a second buffer 12.
在一实施例中,所述数据载入模块20具体用于:确定所述第二缓冲区12中是否缓存有所述第一图像块;若所述第二缓冲区12中缓存有所述第一图像块,从所述第二缓冲区12中读取所述第一图像块;若所述第二缓冲区12中未缓存有所述第一图像块,从所述存储器10中读取包括所述第一图像块的参考图像区域;若所述第二缓冲区12中缓存有所述第一图像块的部分数据,从所述第二缓冲区12中读取所述部分数据以及从所述存储器10中读取包括除所述部分数据之外的其他数据的参考图像区域。In one embodiment, the data loading module 20 is specifically configured to: determine whether the first image block is cached in the second buffer 12; if the second buffer 12 has the first image block cached, An image block, read the first image block from the second buffer 12; if the first image block is not cached in the second buffer 12, read from the memory 10 including The reference image area of the first image block; if the second buffer 12 is buffered with partial data of the first image block, read the partial data from the second buffer 12 and read the partial data from the second buffer 12 A reference image area including data other than the partial data is read from the memory 10.
在一实施例中,缓存在所述第二缓冲区12中的所述参考图像区域对应有第一存储标识,所述第一存储标识用于指示所述参考图像区域在所述参考图像中的位置。In an embodiment, the reference image area cached in the second buffer 12 corresponds to a first storage identifier, and the first storage identifier is used to indicate the location of the reference image area in the reference image. Location.
所述数据载入模块20还用于:根据从参考图像中提取的关键点以及所述第一存储标识,确定所述第二缓冲区12中是否缓存有关于所述关键点的所述第一图像块。The data loading module 20 is also used for: according to the key points extracted from the reference image and the first storage identifier, determine whether the first key point related to the key point is cached in the second buffer 12. Image blocks.
在一实施例中,所述数据载入模块20具体用于:确定所述第二缓冲区12中是否缓存有所述第二图像块;若所述第二缓冲区12中缓存有所述第二图像块,从所述第二缓冲区12中读取所述第二图像块;若所述第二缓冲区12中未缓存有所述第二图像块,从所述存储器10中读取包括所述第二图像块的待处理图像区域;若所述第二缓冲区12中缓存有所述第二图像块的部分数据,从所述第二缓冲区12中读取所述部分数据以及从所述存储器10中读取包括除所述部分数据之外的其他数据的待处理图像区域。In one embodiment, the data loading module 20 is specifically configured to: determine whether the second image block is cached in the second buffer 12; if the second image block is cached in the second buffer 12, Two image blocks, read the second image block from the second buffer 12; if the second image block is not cached in the second buffer 12, read from the memory 10 including The to-be-processed image area of the second image block; if the second buffer 12 is buffered with part of the data of the second image block, read the part of the data from the second buffer 12 and read the data from the second buffer 12 The image area to be processed including other data except the partial data is read from the memory 10 .
在一实施例中,缓存在所述第二缓冲区12中的所述待处理图像区域对应有第二存储标识,所述第二存储标识用于指示所述待处理图像区域在所述待处理图像中的位置。In an embodiment, the image region to be processed cached in the second buffer 12 corresponds to a second storage identifier, and the second storage identifier is used to indicate that the image region to be processed is in the position in the image.
所述数据载入模块20具体用于:根据从参考图像中提取的关键点以及所述第二存储标识,确定所述第二缓冲区12中是否缓存有关于所述关键点的所述第二图像块。The data loading module 20 is specifically configured to: according to the key points extracted from the reference image and the second storage identifier, determine whether the second buffer 12 has cached the second data about the key points. Image blocks.
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。As for the device embodiment, since it basically corresponds to the method embodiment, for related parts, please refer to the part description of the method embodiment. The device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network elements. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. It can be understood and implemented by those skilled in the art without creative effort.
这里描述的各种实施方式可以使用例如计算机软件、硬件或其任何组合的计算机可读介质来实施。对于硬件实施,这里描述的实施方式可以通过使用特定用途集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理装置(DSPD)、可编程逻辑装置(PLD)、现场可编程门阵列(FPGA)、处理器、控制器、微控制器、微处理器、被设计为执行这里描述的功能的电子单元中的至少一种来实施。对于软件实施,诸如过程或功能的实施方式可以与允许执行至少一种功能或操作的单独的软件模块来实施。软件代码可以由以任何适当的编程语言编写的软件应用程序(或程序)来实施,软件代码可以存储在存储器中并且由控制器执行。Various implementations described herein can be implemented using a computer readable medium such as computer software, hardware, or any combination thereof. For hardware implementation, the embodiments described herein can be implemented by using Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays ( FPGA), processors, controllers, microcontrollers, microprocessors, electronic units designed to perform the functions described herein. For software implementation, an embodiment such as a procedure or a function may be implemented with a separate software module that allows at least one function or operation to be performed. The software codes can be implemented by a software application (or program) written in any suitable programming language, stored in memory and executed by a controller.
在一实施例中,请参阅图19,当所述图像处理装置为具有数据处理能力的芯片或者集成电路时,所述图像处理装置可以安装于可移动平台上,则本实施例还提供了一种可移动平台,所述可移动平台包括:In one embodiment, please refer to FIG. 19. When the image processing device is a chip or an integrated circuit with data processing capability, the image processing device can be installed on a movable platform, and this embodiment also provides a A kind of movable platform, described movable platform comprises:
机身01; fuselage 01;
动力系统02,安装于所述机身01上,用于为所述可移动平台提供动力;以及,上述的图像处理装置03。The power system 02 is installed on the fuselage 01 and is used to provide power for the movable platform; and the above-mentioned image processing device 03 .
在一实施例中,所述可移动平台包括但不限于无人飞行器、无人驾驶车辆,无人驾驶船只或者移动机器人等。In one embodiment, the mobile platform includes but is not limited to unmanned aerial vehicles, unmanned vehicles, unmanned ships or mobile robots.
在一实施例中,所述可移动平台还包括有成像装置。In one embodiment, the movable platform further includes an imaging device.
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器,上述指令可由装置的处理器执行以完成上述方法。例如,非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium including instructions, such as a memory including instructions, which are executable by a processor of an apparatus to perform the above method. For example, the non-transitory computer readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
一种非临时性计算机可读存储介质,当存储介质中的指令由终端的处理器执行时,使得终端能够执行上述方法。需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。A non-transitory computer-readable storage medium, enabling the terminal to execute the above method when instructions in the storage medium are executed by a processor of the terminal. It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is a relationship between these entities or operations. any such actual relationship or order exists between them. The term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements but also other elements not expressly listed elements, or also elements inherent in such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.
以上对本申请实施例所提供的方法和装置进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The methods and devices provided by the embodiments of the present application have been described in detail above. The principles and implementation methods of the present application have been explained by using specific examples in this paper. The descriptions of the above embodiments are only used to help understand the methods and methods of the present application. core idea; at the same time, for those of ordinary skill in the art, according to the idea of this application, there will be changes in the specific implementation and application scope. In summary, the content of this specification should not be construed as limiting the application .

Claims (46)

  1. 一种图像处理方法,其特征在于,包括:An image processing method, characterized in that, comprising:
    从存储器中读取参考图像的第一图像块以及待处理图像的第二图像块;reading the first image block of the reference image and the second image block of the image to be processed from the memory;
    使用所述第一图像块和所述第二图像块进行图像配准;performing image registration using the first image block and the second image block;
    其中,所述参考图像以所述第一图像块的尺寸被切分成多个图像块,所述参考图像在所述存储器中以图像块为单位连续存储;和/或,所述待处理图像以所述第二图像块的尺寸被切分为多个图像块,所述待处理图像在所述存储器中以图像块为单位连续存储。Wherein, the reference image is divided into multiple image blocks according to the size of the first image block, and the reference image is continuously stored in the memory in units of image blocks; and/or, the image to be processed is The size of the second image block is divided into a plurality of image blocks, and the image to be processed is continuously stored in the memory in units of image blocks.
  2. 根据权利要求1所述的方法,其特征在于,在所述参考图像和/或所述待处理图像中,每一所述图像块中的像素在所述存储器中的存储地址连续。The method according to claim 1, characterized in that, in the reference image and/or the image to be processed, the storage addresses of the pixels in each image block in the memory are continuous.
  3. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:The method according to claim 1 or 2, characterized in that the method further comprises:
    在获取所述参考图像之后,将所述参考图像缓存在包括多个缓存行的第一缓冲区中,每一所述缓存行用于缓存所述参考图像的一行像素;After acquiring the reference image, buffering the reference image in a first buffer comprising a plurality of cache lines, each of which is used to cache a row of pixels of the reference image;
    对于所述参考图像的每一个图像块,按照所述第一图像块的尺寸从所述多个缓存行中的目标缓存行读取指定像素,并将所述指定像素在所述存储器中连续存储。For each image block of the reference image, read specified pixels from a target cache line in the multiple cache lines according to the size of the first image block, and store the specified pixels continuously in the memory .
  4. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:The method according to claim 1 or 2, characterized in that the method further comprises:
    将所述待处理图像缓存在包括多个缓存行的第一缓冲区中,每一所述缓存行用于缓存所述待处理图像的一行像素;Cache the image to be processed in a first buffer comprising a plurality of cache lines, each of which is used to cache a row of pixels of the image to be processed;
    对于所述待处理图像的每一个图像块,按照所述第二图像块的尺寸从所述多个缓存行中的目标缓存行读取指定像素,并将所述指定像素在所述存储器中连续存储。For each image block of the image to be processed, read specified pixels from a target cache line in the multiple cache lines according to the size of the second image block, and store the specified pixels consecutively in the memory storage.
  5. 根据权利要求3或4所述的方法,其特征在于,所述第一图像块和所述第二图像块的尺寸相同;所述第一图像块和所述第二图像块的尺寸包括宽度和高度;The method according to claim 3 or 4, wherein the first image block and the second image block have the same size; the sizes of the first image block and the second image block include width and high;
    所述目标缓存行的数量根据所述高度和宽度中的一者确定;所述指定像素的数量根据所述高度和宽度中的另一者确定。The number of the target cache lines is determined according to one of the height and width; the number of specified pixels is determined according to the other of the height and width.
  6. 根据权利要求3或4所述的方法,其特征在于,所述第一缓冲区的数量为至少两个;The method according to claim 3 or 4, wherein the number of the first buffer zones is at least two;
    所述参考图像缓存在其中一个第一缓冲区中;所述待处理图像缓存在另一个第一缓冲区中。The reference image is cached in one of the first buffers; the image to be processed is cached in the other first buffer.
  7. 根据权利要求1所述的方法,其特征在于,使用突发连续读取方式从存储器中读取所述参考图像的第一图像块以及所述待处理图像的第二图像块。The method according to claim 1, characterized in that, the first image block of the reference image and the second image block of the image to be processed are read from a memory in a burst continuous reading manner.
  8. 根据权利要求7所述的方法,其特征在于,所述从存储器中读取参考图像的第 一图像块以及待处理图像的第二图像块,包括:The method according to claim 7, wherein said reading the first image block of the reference image and the second image block of the image to be processed from the memory comprises:
    使用第一突发信号从存储器中读取参考图像的第一图像块,以及,使用第二突发信号从存储器中读取待处理图像的第二图像块。Using the first burst signal to read the first image block of the reference image from the memory, and using the second burst signal to read the second image block of the image to be processed from the memory.
  9. 根据权利要求8所述的方法,其特征在于,所述第一突发信号的突发长度根据所述第一图像块包含的像素数量、像素位宽以及所述存储器的位宽确定;和/或,所述第二突发信号的突发长度根据所述第二图像块包含的像素数量、像素位宽以及所述存储器的位宽确定。The method according to claim 8, wherein the burst length of the first burst signal is determined according to the number of pixels contained in the first image block, the pixel bit width and the bit width of the memory; and/ Or, the burst length of the second burst signal is determined according to the number of pixels included in the second image block, the pixel bit width, and the bit width of the memory.
  10. 根据权利要求8所述的方法,其特征在于,所述第一突发信号和/或第二突发信号的数量均小于或等于4。The method according to claim 8, wherein the number of the first burst signal and/or the second burst signal is less than or equal to four.
  11. 根据权利要求8或10所述的方法,其特征在于,所述第一突发信号的数量根据包含有所述第一图像块的像素的图像块数量确定;The method according to claim 8 or 10, wherein the number of the first burst signals is determined according to the number of image blocks including pixels of the first image block;
    和/或,所述第二突发信号的数量根据包含有所述第二图像块的像素的图像块数量确定。And/or, the quantity of the second burst signal is determined according to the number of image blocks including the pixels of the second image block.
  12. 根据权利要求1所述的方法,其特征在于,所述第一图像块和所述第二图像块根据从所述参考图像中提取的关键点确定。The method according to claim 1, wherein the first image block and the second image block are determined according to key points extracted from the reference image.
  13. 根据权利要求1所述的方法,其特征在于,所述从存储器中读取参考图像的第一图像块以及待处理图像的第二图像块,包括:The method according to claim 1, wherein reading the first image block of the reference image and the second image block of the image to be processed from the memory comprises:
    从存储器中读取包括所述第一图像块的参考图像区域和/或包括所述第二图像块的待处理图像区域;reading a reference image area including the first image block and/or an image area to be processed including the second image block from a memory;
    其中,所述参考图像区域中除所述第一图像块之外的数据用于下一次的图像配准过程;所述待处理图像区域中除所述第二图像块之外的数据用于下一次的图像配准过程。Wherein, the data in the reference image area except for the first image block is used for the next image registration process; the data in the image area to be processed except for the second image block is used for the next One-time image registration process.
  14. 根据权利要求13所述的方法,其特征在于,所述参考图像区域和/或所述待处理图像区域缓存在第二缓冲区。The method according to claim 13, wherein the reference image area and/or the image area to be processed are cached in a second buffer.
  15. 根据权利要求14所述的方法,其特征在于,在所述第二缓冲区中,所述参考图像区域对应的缓存区间的缓存容量和/或所述待处理图像区域对应的缓存区间的缓存容量均根据从参考图像提取的关键点的数量确定。The method according to claim 14, characterized in that, in the second buffer, the buffer capacity of the buffer interval corresponding to the reference image area and/or the buffer capacity of the buffer interval corresponding to the image area to be processed Both are determined according to the number of keypoints extracted from the reference image.
  16. 根据权利要求15所述的方法,其特征在于,所述参考图像区域对应的缓存区间的缓存容量与所述关键点的数量呈正相关关系;The method according to claim 15, wherein the buffer capacity of the buffer interval corresponding to the reference image area is positively correlated with the number of key points;
    和/或,所述待处理图像区域对应的缓存区间的缓存容量与所述关键点的数量呈负相关关系。And/or, the buffer capacity of the buffer interval corresponding to the image area to be processed has a negative correlation with the number of key points.
  17. 根据权利要求14至16任意一项所述的方法,其特征在于,在所述第二缓冲区中,所述参考图像区域对应的缓存区间的缓存容量小于所述待处理图像区域对应的缓存区间的缓存容量。The method according to any one of claims 14 to 16, characterized in that, in the second buffer, the buffer capacity of the buffer interval corresponding to the reference image area is smaller than that of the buffer interval corresponding to the image area to be processed cache capacity.
  18. 根据权利要求14所述的方法,其特征在于,所述第二缓冲区的数量有至少两个;The method according to claim 14, wherein the number of the second buffer zone is at least two;
    所述参考图像区域缓存在其中一个第二缓冲区中;所述待处理图像区域缓存在另一个第二缓冲区中。The reference image area is cached in one of the second buffers; the image area to be processed is cached in the other second buffer.
  19. 根据权利要求14所述的方法,其特征在于,所述从存储器中读取包括所述第一图像块的参考图像区域,包括:The method according to claim 14, wherein the reading the reference image area including the first image block from the memory comprises:
    确定所述第二缓冲区中是否缓存有所述第一图像块;determining whether the first image block is cached in the second buffer;
    若所述第二缓冲区中缓存有所述第一图像块,从所述第二缓冲区中读取所述第一图像块;If the first image block is cached in the second buffer, read the first image block from the second buffer;
    若所述第二缓冲区中未缓存有所述第一图像块,从所述存储器中读取包括所述第一图像块的参考图像区域;If the first image block is not cached in the second buffer, read a reference image area including the first image block from the memory;
    若所述第二缓冲区中缓存有所述第一图像块的部分数据,从所述第二缓冲区中读取所述部分数据以及从所述存储器中读取包括除所述部分数据之外的其他数据的参考图像区域。If part of the data of the first image block is buffered in the second buffer, read the part of the data from the second buffer and read from the memory including the data except the part of the data Reference image area for other data.
  20. 根据权利要求19所述的方法,其特征在于,缓存在所述第二缓冲区中的所述参考图像区域对应有第一存储标识,所述第一存储标识用于指示所述参考图像区域在所述参考图像中的位置;The method according to claim 19, wherein the reference image area cached in the second buffer zone corresponds to a first storage identifier, and the first storage identifier is used to indicate that the reference image area is in a location in said reference image;
    所述确定所述第二缓冲区中是否缓存有所述第一图像块,包括:The determining whether the first image block is cached in the second buffer includes:
    根据从参考图像中提取的关键点以及所述第一存储标识,确定所述第二缓冲区中是否缓存有关于所述关键点的所述第一图像块。According to the key point extracted from the reference image and the first storage identifier, determine whether the first image block related to the key point is cached in the second buffer.
  21. 根据权利要求14所述的方法,其特征在于,所述从存储器中读取包括所述第二图像块的待处理图像区域,包括:The method according to claim 14, wherein the reading the image area to be processed including the second image block from the memory comprises:
    确定所述第二缓冲区中是否缓存有所述第二图像块;determining whether the second image block is cached in the second buffer;
    若所述第二缓冲区中缓存有所述第二图像块,从所述第二缓冲区中读取所述第二图像块;If the second image block is cached in the second buffer, read the second image block from the second buffer;
    若所述第二缓冲区中未缓存有所述第二图像块,从所述存储器中读取包括所述第二图像块的待处理图像区域;If the second image block is not cached in the second buffer, read the image area to be processed including the second image block from the memory;
    若所述第二缓冲区中缓存有所述第二图像块的部分数据,从所述第二缓冲区中读 取所述部分数据以及从所述存储器中读取包括除所述部分数据之外的其他数据的待处理图像区域。If part of the data of the second image block is cached in the second buffer, read the part of the data from the second buffer and read from the memory including the parts except the part of the data The image area to be processed for other data.
  22. 根据权利要求21所述的方法,其特征在于,缓存在所述第二缓冲区中的所述待处理图像区域对应有第二存储标识,所述第二存储标识用于指示所述待处理图像区域在所述待处理图像中的位置;The method according to claim 21, wherein the region of the image to be processed cached in the second buffer zone corresponds to a second storage identifier, and the second storage identifier is used to indicate the image to be processed The position of the region in the image to be processed;
    所述确定所述第二缓冲区中是否缓存有所述第二图像块,包括:The determining whether the second image block is cached in the second buffer includes:
    根据从参考图像中提取的关键点以及所述第二存储标识,确定所述第二缓冲区中是否缓存有关于所述关键点的所述第二图像块。Determine whether the second image block related to the key point is cached in the second buffer according to the key point extracted from the reference image and the second storage identifier.
  23. 一种图像处理装置,其特征在于,包括存储器、数据载入模块以及处理器;An image processing device, characterized in that it includes a memory, a data loading module, and a processor;
    所述存储器用于存储参考图像和待处理图像;The memory is used to store reference images and images to be processed;
    所述数据载入模块用于从所述存储器中读取参考图像的第一图像块以及待处理图像的第二图像块;其中,所述参考图像以所述第一图像块的尺寸被切分成多个图像块,所述参考图像在所述存储器中以图像块为单位连续存储;和/或,所述待处理图像以所述第二图像块的尺寸被切分为多个图像块,所述待处理图像在所述存储器中以图像块为单位连续存储;The data loading module is used to read the first image block of the reference image and the second image block of the image to be processed from the memory; wherein, the reference image is divided into the size of the first image block A plurality of image blocks, the reference image is continuously stored in the memory in units of image blocks; and/or, the image to be processed is divided into a plurality of image blocks according to the size of the second image block, so The image to be processed is continuously stored in the memory in units of image blocks;
    所述处理器用于使用所述第一图像块和所述第二图像块进行图像配准。The processor is configured to perform image registration using the first image block and the second image block.
  24. 根据权利要求23所述的装置,其特征在于,在所述参考图像和/或所述待处理图像中,每一所述图像块中的像素在所述存储器中的存储地址连续。The device according to claim 23, characterized in that, in the reference image and/or the image to be processed, the storage addresses of the pixels in each image block in the memory are continuous.
  25. 根据权利要求23或24所述的装置,其特征在于,所述装置还包括第一转换模块;The device according to claim 23 or 24, wherein the device further comprises a first conversion module;
    所述第一转换模块用于:在获取所述参考图像之后,将所述参考图像缓存在包括多个缓存行的第一缓冲区中,每一所述缓存行用于缓存所述参考图像的一行像素;对于所述参考图像的每一个图像块,按照所述第一图像块的尺寸从所述多个缓存行中的目标缓存行读取指定像素,并将所述指定像素在所述存储器中连续存储。The first conversion module is configured to: after acquiring the reference image, cache the reference image in a first buffer including a plurality of cache lines, each of the cache lines is used to cache the reference image A row of pixels; for each image block of the reference image, read specified pixels from the target cache line in the plurality of cache lines according to the size of the first image block, and store the specified pixel in the memory in continuous storage.
  26. 根据权利要求23或24所述的装置,其特征在于,所述装置还包括第二转换模块;The device according to claim 23 or 24, wherein the device further comprises a second conversion module;
    所述第二转换模块用于:将所述待处理图像缓存在包括多个缓存行的第一缓冲区中,每一所述缓存行用于缓存所述待处理图像的一行像素;对于所述待处理图像的每一个图像块,按照所述第二图像块的尺寸从所述多个缓存行中的目标缓存行读取指定像素,并将所述指定像素在所述存储器中连续存储。The second conversion module is configured to: cache the image to be processed in a first buffer including a plurality of cache lines, each cache line is used to cache a row of pixels of the image to be processed; for the For each image block of the image to be processed, read specified pixels from a target cache line in the plurality of cache lines according to the size of the second image block, and store the specified pixels continuously in the memory.
  27. 根据权利要求25或26所述的装置,其特征在于,所述第一图像块和所述第二图像块的尺寸相同;所述第一图像块和所述第二图像块的尺寸包括宽度和高度;The device according to claim 25 or 26, wherein the first image block and the second image block have the same size; the sizes of the first image block and the second image block include width and high;
    所述目标缓存行的数量根据所述高度和宽度中的一者确定;所述指定像素的数量根据所述高度和宽度中的另一者确定。The number of the target cache lines is determined according to one of the height and width; the number of specified pixels is determined according to the other of the height and width.
  28. 根据权利要求25或26所述的装置,其特征在于,所述第一缓冲区的数量为至少两个;The device according to claim 25 or 26, wherein the number of the first buffer zones is at least two;
    所述参考图像缓存在其中一个第一缓冲区中;所述待处理图像缓存在另一个第一缓冲区中。The reference image is cached in one of the first buffers; the image to be processed is cached in the other first buffer.
  29. 根据权利要求23所述的装置,其特征在于,所述数据载入模块具体用于使用突发连续读取方式从存储器中读取所述参考图像的第一图像块以及所述待处理图像的第二图像块。The device according to claim 23, wherein the data loading module is specifically configured to read the first image block of the reference image and the image block of the image to be processed from the memory in a burst continuous read mode. the second image block.
  30. 根据权利要求29所述的装置,其特征在于,所述数据载入模块具体用于:使用第一突发信号从存储器中读取参考图像的第一图像块,以及,使用第二突发信号从存储器中读取待处理图像的第二图像块。The device according to claim 29, wherein the data loading module is specifically configured to: use the first burst signal to read the first image block of the reference image from the memory, and use the second burst signal The second image block of the image to be processed is read from the memory.
  31. 根据权利要求30所述的装置,其特征在于,所述第一突发信号的突发长度根据所述第一图像块包含的像素数量、像素位宽以及所述存储器的位宽确定;The device according to claim 30, wherein the burst length of the first burst signal is determined according to the number of pixels included in the first image block, the pixel bit width, and the bit width of the memory;
    和/或,所述第二突发信号的突发长度根据所述第二图像块包含的像素数量、像素位宽以及所述存储器的位宽确定。And/or, the burst length of the second burst signal is determined according to the number of pixels contained in the second image block, the pixel bit width, and the bit width of the memory.
  32. 根据权利要求30所述的装置,其特征在于,所述第一突发信号和/或第二突发信号的数量均小于或等于4。The device according to claim 30, wherein the number of the first burst signal and/or the second burst signal is less than or equal to four.
  33. 根据权利要求30或32所述的装置,其特征在于,所述第一突发信号的数量根据包含有所述第一图像块的像素的图像块数量确定;The device according to claim 30 or 32, wherein the number of the first burst signals is determined according to the number of image blocks including the pixels of the first image block;
    和/或,所述第二突发信号的数量根据包含有所述第二图像块的像素的图像块数量确定。And/or, the quantity of the second burst signal is determined according to the number of image blocks including the pixels of the second image block.
  34. 根据权利要求23所述的装置,其特征在于,所述第一图像块和所述第二图像块根据从所述参考图像中提取的关键点确定。The device according to claim 23, wherein the first image block and the second image block are determined according to key points extracted from the reference image.
  35. 根据权利要求23所述的装置,其特征在于,所述数据载入模块具体用于:从存储器中读取包括所述第一图像块的参考图像区域和/或包括所述第二图像块的待处理图像区域;其中,所述参考图像区域中除所述第一图像块之外的数据用于下一次的图像配准过程;所述待处理图像区域中除所述第二图像块之外的数据用于下一次的图像配准过程。The device according to claim 23, wherein the data loading module is specifically configured to: read the reference image area including the first image block and/or the reference image area including the second image block from the memory. The image area to be processed; wherein, the data in the reference image area except the first image block is used for the next image registration process; the data in the image area to be processed except the second image block The data is used for the next image registration process.
  36. 根据权利要求35所述的装置,其特征在于,所述参考图像区域和/或所述待处理图像区域缓存在第二缓冲区。The device according to claim 35, wherein the reference image area and/or the image area to be processed are cached in a second buffer.
  37. 根据权利要求36所述的装置,其特征在于,在所述第二缓冲区中,所述参考图像区域对应的缓存区间的缓存容量和/或所述待处理图像区域对应的缓存区间的缓存容量 均根据从参考图像提取的关键点的数量确定。The device according to claim 36, wherein in the second buffer, the buffer capacity of the buffer interval corresponding to the reference image area and/or the buffer capacity of the buffer interval corresponding to the image area to be processed Both are determined according to the number of keypoints extracted from the reference image.
  38. 根据权利要求37所述的装置,其特征在于,所述参考图像区域对应的缓存区间的缓存容量与所述关键点的数量呈正相关关系;The device according to claim 37, wherein the buffer capacity of the buffer interval corresponding to the reference image area is positively correlated with the number of key points;
    和/或,所述待处理图像区域对应的缓存区间的缓存容量与所述关键点的数量呈负相关关系。And/or, the buffer capacity of the buffer interval corresponding to the image area to be processed has a negative correlation with the number of key points.
  39. 根据权利要求36至38任意一项所述的装置,其特征在于,在所述第二缓冲区中,所述参考图像区域对应的缓存区间的缓存容量小于所述待处理图像区域对应的缓存区间的缓存容量。The device according to any one of claims 36 to 38, wherein, in the second buffer zone, the buffer capacity of the buffer zone corresponding to the reference image area is smaller than the buffer zone corresponding to the image area to be processed cache capacity.
  40. 根据权利要求36所述的装置,其特征在于,所述第二缓冲区的数量有至少两个;The device according to claim 36, wherein there are at least two second buffer zones;
    所述参考图像区域缓存在其中一个第二缓冲区中;所述待处理图像区域缓存在另一个第二缓冲区中。The reference image area is cached in one of the second buffers; the image area to be processed is cached in the other second buffer.
  41. 根据权利要求36所述的装置,其特征在于,所述数据载入模块具体用于:The device according to claim 36, wherein the data loading module is specifically used for:
    确定所述第二缓冲区中是否缓存有所述第一图像块;determining whether the first image block is cached in the second buffer;
    若所述第二缓冲区中缓存有所述第一图像块,从所述第二缓冲区中读取所述第一图像块;If the first image block is cached in the second buffer, read the first image block from the second buffer;
    若所述第二缓冲区中未缓存有所述第一图像块,从所述存储器中读取包括所述第一图像块的参考图像区域;If the first image block is not cached in the second buffer, read a reference image area including the first image block from the memory;
    若所述第二缓冲区中缓存有所述第一图像块的部分数据,从所述第二缓冲区中读取所述部分数据以及从所述存储器中读取包括除所述部分数据之外的其他数据的参考图像区域。If part of the data of the first image block is buffered in the second buffer, read the part of the data from the second buffer and read from the memory including the data except the part of the data Reference image area for other data.
  42. 根据权利要求41所述的装置,其特征在于,缓存在所述第二缓冲区中的所述参考图像区域对应有第一存储标识,所述第一存储标识用于指示所述参考图像区域在所述参考图像中的位置;The device according to claim 41, wherein the reference image region cached in the second buffer zone corresponds to a first storage identifier, and the first storage identifier is used to indicate that the reference image region is in a location in said reference image;
    所述数据载入模块还用于:根据从参考图像中提取的关键点以及所述第一存储标识,确定所述第二缓冲区中是否缓存有关于所述关键点的所述第一图像块。The data loading module is further configured to: determine whether the first image block related to the key point is cached in the second buffer according to the key point extracted from the reference image and the first storage identifier .
  43. 根据权利要求36所述的装置,其特征在于,所述数据载入模块具体用于:The device according to claim 36, wherein the data loading module is specifically used for:
    确定所述第二缓冲区中是否缓存有所述第二图像块;determining whether the second image block is cached in the second buffer;
    若所述第二缓冲区中缓存有所述第二图像块,从所述第二缓冲区中读取所述第二图像块;If the second image block is cached in the second buffer, read the second image block from the second buffer;
    若所述第二缓冲区中未缓存有所述第二图像块,从所述存储器中读取包括所述第二图像块的待处理图像区域;If the second image block is not cached in the second buffer, read the image area to be processed including the second image block from the memory;
    若所述第二缓冲区中缓存有所述第二图像块的部分数据,从所述第二缓冲区中读取所述部分数据以及从所述存储器中读取包括除所述部分数据之外的其他数据的待处理图像区域。If part of the data of the second image block is cached in the second buffer, read the part of the data from the second buffer and read from the memory including the parts except the part of the data The image area to be processed for other data.
  44. 根据权利要求43所述的装置,其特征在于,缓存在所述第二缓冲区中的所述待处理图像区域对应有第二存储标识,所述第二存储标识用于指示所述待处理图像区域在所述待处理图像中的位置;The device according to claim 43, wherein the region of the image to be processed cached in the second buffer zone corresponds to a second storage identifier, and the second storage identifier is used to indicate the image to be processed The position of the region in the image to be processed;
    所述数据载入模块具体用于:根据从参考图像中提取的关键点以及所述第二存储标识,确定所述第二缓冲区中是否缓存有关于所述关键点的所述第二图像块。The data loading module is specifically configured to: determine whether the second image block related to the key point is cached in the second buffer according to the key point extracted from the reference image and the second storage identifier .
  45. 一种可移动平台,其特征在于,包括:A mobile platform, characterized in that it comprises:
    机身;body;
    动力系统,安装于所述机身上,用于为所述可移动平台提供动力;以及,a power system mounted on the fuselage for powering the movable platform; and,
    如权利要求23至44任意一项所述的图像处理装置。The image processing device according to any one of claims 23 to 44.
  46. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序被所述图像处理装置执行时实现如权利要求1至22任意一项所述的图像处理方法。A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, and when the computer program is executed by the image processing device, the image according to any one of claims 1 to 22 is realized Approach.
PCT/CN2021/094965 2021-05-20 2021-05-20 Image processing method and apparatus, and movable platform and storage medium WO2022241729A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/094965 WO2022241729A1 (en) 2021-05-20 2021-05-20 Image processing method and apparatus, and movable platform and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/094965 WO2022241729A1 (en) 2021-05-20 2021-05-20 Image processing method and apparatus, and movable platform and storage medium

Publications (1)

Publication Number Publication Date
WO2022241729A1 true WO2022241729A1 (en) 2022-11-24

Family

ID=84140123

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/094965 WO2022241729A1 (en) 2021-05-20 2021-05-20 Image processing method and apparatus, and movable platform and storage medium

Country Status (1)

Country Link
WO (1) WO2022241729A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050271300A1 (en) * 2004-06-02 2005-12-08 Pina Robert K Image registration system and method
CN1937773A (en) * 2005-09-23 2007-03-28 三星电子株式会社 External memory device, method of storing image data for the same, and image processor using the method
CN101911701A (en) * 2008-02-13 2010-12-08 高通股份有限公司 Shared block comparison architecture for image registration and video coding
CN108377394A (en) * 2018-03-06 2018-08-07 珠海全志科技股份有限公司 Image data read method, computer installation and the computer readable storage medium of video encoder
CN108701348A (en) * 2017-08-31 2018-10-23 深圳市大疆创新科技有限公司 Handle method, integrated circuit, processor, system and the movable equipment of image

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050271300A1 (en) * 2004-06-02 2005-12-08 Pina Robert K Image registration system and method
CN1937773A (en) * 2005-09-23 2007-03-28 三星电子株式会社 External memory device, method of storing image data for the same, and image processor using the method
CN101911701A (en) * 2008-02-13 2010-12-08 高通股份有限公司 Shared block comparison architecture for image registration and video coding
CN108701348A (en) * 2017-08-31 2018-10-23 深圳市大疆创新科技有限公司 Handle method, integrated circuit, processor, system and the movable equipment of image
CN108377394A (en) * 2018-03-06 2018-08-07 珠海全志科技股份有限公司 Image data read method, computer installation and the computer readable storage medium of video encoder

Similar Documents

Publication Publication Date Title
JP6830139B2 (en) 3D data generation method, 3D data generation device, computer equipment and computer readable storage medium
US9684962B2 (en) Method and system for calibrating surveillance cameras
WO2022142992A1 (en) Fusion positioning method and apparatus, device and computer-readable storage medium
JP2022538927A (en) 3D target detection and intelligent driving
US20200116498A1 (en) Visual assisted distance-based slam method and mobile robot using the same
WO2022000260A1 (en) Map updating method and apparatus, and movable platform and storage medium
US11182908B2 (en) Dense optical flow processing in a computer vision system
WO2020058560A1 (en) Object tracking
WO2021114776A1 (en) Object detection method, object detection device, terminal device, and medium
US20240153105A1 (en) Feature point identification in sparse optical flow based tracking in a computer vision system
CN111639147B (en) Map compression method, system and computer readable storage medium
WO2022206414A1 (en) Three-dimensional target detection method and apparatus
CN114063098A (en) Multi-target tracking method, device, computer equipment and storage medium
US11657485B2 (en) Method for expanding image depth and electronic device
CN110910375A (en) Detection model training method, device, equipment and medium based on semi-supervised learning
CN112650300A (en) Unmanned aerial vehicle obstacle avoidance method and device
WO2022241729A1 (en) Image processing method and apparatus, and movable platform and storage medium
WO2022147655A1 (en) Positioning method and apparatus, spatial information acquisition method and apparatus, and photographing device
WO2021114775A1 (en) Object detection method, object detection device, terminal device, and medium
WO2022188020A1 (en) Image processing method and apparatus, and movable platform and storage medium
WO2022252036A1 (en) Method and apparatus for acquiring obstacle information, movable platform and storage medium
CN113721240B (en) Target association method, device, electronic equipment and storage medium
AU2020294259B2 (en) Object association method, apparatus and system, electronic device, storage medium and computer program
CN112068547B (en) AMCL-based robot positioning method and device and robot
CN113048950B (en) Base station antenna inclination angle measuring method and device, storage medium and computer equipment

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: 21940183

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: 21940183

Country of ref document: EP

Kind code of ref document: A1