Offset vector determination method and apparatus
By dividing the image into P rows and Q columns, local block matching algorithm estimation and filtering are performed on the image blocks, and consistency constraints are combined to solve the problem of low efficiency in determining the image block offset vector, thus achieving efficient offset vector determination.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-21
- Publication Date
- 2026-03-31
AI Technical Summary
Existing matching algorithms based on local pixel similarity are inefficient in determining image block offset vectors and require additional neighboring image blocks for region vector filtering, resulting in high latency and low efficiency.
The image is divided into P rows and Q columns. The first offset vector is estimated for the image block in the T-th row. The third offset vector of the first R rows of image blocks is used for filtering. The third offset vector is determined by consistency constraints to avoid using additional neighboring image blocks for region vector filtering.
It improves the efficiency of determining image block offset vectors, reduces computational latency, and enhances the accuracy of offset vectors.
Smart Images

Figure CN116843730B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of image processing technology, specifically relating to a method and apparatus for determining an offset vector. Background Technology
[0002] Image registration is a fundamental algorithm in image processing, widely used in image fusion and multi-frame image denoising, such as high dynamic range image fusion and multispectral image fusion. Based on their principles, they can be categorized into feature-point-based matching algorithms, local pixel similarity-based matching algorithms, and neural network algorithms.
[0003] Matching algorithms based on local pixel similarity are also known as local block matching algorithms. This algorithm calculates the offset vector between pixels by calculating the difference between the central image block and the neighboring image blocks. This algorithm has high noise resistance and low algorithm complexity, but the accuracy of the calculated offset vector is poor.
[0004] Related technologies mainly use region vector filtering to improve the accuracy of offset vectors. However, using region vector filtering requires additional neighboring image blocks. The larger the neighboring image block, the higher the latency and the lower the efficiency of determining the offset vector of the image block. Summary of the Invention
[0005] The purpose of this application is to provide an offset vector determination method and apparatus that can solve the problem of low efficiency in determining the offset vector of an image block.
[0006] In a first aspect, embodiments of this application provide a method for determining an offset vector, including:
[0007] The first image is divided into P rows and Q columns to obtain P×Q image blocks, where P and Q are positive integers;
[0008] For row T, estimate the first offset vector of the image patch in row T, where T is a positive integer less than or equal to P;
[0009] Based on the third offset vector of the image block in the first R rows of the T row, the first offset vector is filtered to obtain the second offset vector of the image block in the T row, where R is a positive integer;
[0010] Apply consistency constraints to the second offset vector to determine the third offset vector of the T-row image block.
[0011] Secondly, embodiments of this application provide an offset vector determination device, comprising:
[0012] The partitioning module is used to divide the first image into P rows and Q columns, resulting in P×Q image blocks, where P and Q are positive integers;
[0013] An estimation module is used to estimate the first offset vector of the image patch in row T for row T, where T is a positive integer less than or equal to P;
[0014] The filtering module is used to filter the first offset vector based on the third offset vector of the image block in the first R rows of the T row, so as to obtain the second offset vector of the image block in the T row, where R is a positive integer;
[0015] The constraint module is used to apply consistency constraints to the second offset vector to determine the third offset vector of the T-row image block.
[0016] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, wherein the memory stores a program or instructions that can run on the processor, and the program or instructions, when executed by the processor, implement the steps of the offset vector determination method provided in the first aspect of embodiments of this application.
[0017] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, and when the program or instructions are executed by a processor, the steps of the offset vector determination method provided in the first aspect of embodiments of this application are implemented.
[0018] Fifthly, embodiments of this application provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the steps of the offset vector determination method provided in the first aspect of embodiments of this application.
[0019] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the steps of the offset vector determination method provided in the first aspect of embodiments of this application.
[0020] In this embodiment, the first image is divided into P rows and Q columns, resulting in P×Q image blocks. For the T-th row, a first offset vector is estimated for the image block in the T-th row. Based on the third offset vector of the image blocks in the preceding R rows of the T-th row, the first offset vector is filtered to obtain a second offset vector for the image block in the T-th row. A consistency constraint is applied to the second offset vector to determine the third offset vector for the image block in the T-th row. This eliminates the need for additional neighboring image blocks for region vector filtering, thus improving the efficiency of determining the image block offset vector. Attached Figure Description
[0021] Figure 1 This is a flowchart illustrating the offset vector determination method provided in an embodiment of this application;
[0022] Figure 2This is a first schematic diagram of the second image block provided in the embodiments of this application;
[0023] Figure 3 This is a second schematic diagram of the second image block provided in the embodiments of this application;
[0024] Figure 4 This is a third schematic diagram of the second image block provided in the embodiments of this application;
[0025] Figure 5 This is a first schematic diagram of the third image block provided in the embodiments of this application;
[0026] Figure 6 This is a second schematic diagram of the third image block provided in the embodiments of this application;
[0027] Figure 7 This is a third schematic diagram of the third image block provided in the embodiments of this application;
[0028] Figure 8 This is a schematic diagram of the supplementary offset vector provided in the embodiments of this application;
[0029] Figure 9 This is a schematic diagram of the filtering offset vector provided in an embodiment of this application;
[0030] Figure 10 This is a schematic diagram of the updated offset vector provided in an embodiment of this application;
[0031] Figure 11 This is a schematic diagram of the offset vector determination device provided in the embodiments of this application;
[0032] Figure 12 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;
[0033] Figure 13 This is a schematic diagram of the hardware structure of an electronic device that implements the embodiments of this application. Detailed Implementation
[0034] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0035] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0036] The method and apparatus for determining offset vectors provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0037] Figure 1 This is a flowchart illustrating the offset vector determination method provided in an embodiment of this application. The offset vector determination method may include:
[0038] Step 101: Divide the first image into P rows and Q columns to obtain P×Q image blocks, where P and Q are positive integers;
[0039] In some possible implementations of the embodiments of this application, in step 101, it is assumed that the first image is an image with a resolution of H×W. In step 101, the image is divided into P×Q image blocks, and the resolution of each image block is M×N, where M=H / P, N=W / Q; for the T-th row of data after image division, it corresponds to the data from the M×(T-1)+1-th row to the M×T row in the H×W image.
[0040] Step 102: For row T, estimate the first offset vector of the image patch in row T, where T is a positive integer less than or equal to P;
[0041] In some possible implementations of the embodiments of this application, in step 102, a local block matching algorithm can be used to estimate the first offset vector of the T-row image block.
[0042] Local block matching algorithms are all algorithms that require offset or motion estimation of local image pixels, including but not limited to: grayscale projection method, minimum absolute error sum method and motion estimation algorithm based on optical flow.
[0043] The following explanation uses the least absolute error method as an example to illustrate the estimation of the first offset vector of an image patch.
[0044] Image block B in row T and the qth position. T,q Select a K×K search window centered on the image, where K>M, K>N. Then select an M×N image patch within the search window. Where a is a positive integer greater than or equal to 1 and less than or equal to KM, and b is a positive integer greater than or equal to 1 and less than or equal to KN.
[0045] Calculate B T,q and The value of the sum of absolute differences (SAD) is Δ(a,b), where Δ(a,b) is shown in the following formula (1).
[0046]
[0047] The offset vector V of the q-th image patch in row T T,q As shown in formula (2) below.
[0048]
[0049] In formula (2), and are the offset vectors of the q-th image block in the T-th row in the x and y directions, respectively. a min and b min These are the minimum values of a and b when Δ(a,b) reaches its minimum value, respectively.
[0050] Step 103: Based on the third offset vector of the image block in the first R rows of the T row, filter the first offset vector to obtain the second offset vector of the image block in the T row, where R is a positive integer;
[0051] In some possible implementations of embodiments of this application, step 103 may include: for a first image block in row T, determining Z second image blocks based on the first image block, wherein the first image block is any one of the Q image blocks in row T, and the Z second image blocks are Z consecutive image blocks in row T that include the first image block; determining Z×(R+1) third image blocks based on the Z second image blocks, wherein the Z×(R+1) third image blocks include the Z second image blocks and Z×R target blocks in the first R rows that are respectively in the same column as the Z second image blocks; and filtering the offset vectors of the Z×(R+1) third image blocks according to a first filtering rule.
[0052] In some possible implementations of the embodiments of this application, determining Z second image blocks based on the first image block may include: determining Z consecutive image blocks in the Tth row centered on the first image block as Z second image blocks.
[0053] For example, taking the q-th image block in row T, with Z=3, the three second image blocks are as follows: Figure 2 As shown. In Figure 2In the image, the three second image blocks include the image block at row T-1, the image block at row T-q, and the image block at row T+1.
[0054] In some possible implementations of the embodiments of this application, determining Z second image blocks based on the first image block may include: determining Z consecutive image blocks in the T-th row that have the first image block as the last image block as Z second image blocks.
[0055] For example, taking the q-th image block in row T, with Z=3, the three second image blocks are as follows: Figure 3 As shown. In Figure 3 In the image, the three second image blocks include the image block at row T (q-2), the image block at row T (q-1), and the image block at row T (q).
[0056] In some possible implementations of the embodiments of this application, determining Z second image blocks based on the first image block may include: determining Z consecutive image blocks in the Tth row that have the first image block as their first image block as Z second image blocks.
[0057] For example, taking the q-th image block in row T, with Z=3, the three second image blocks are as follows: Figure 4 As shown. In Figure 4 In the image, the three second image blocks include the image block at row T, the image block at row T+1, and the image block at row T+2.
[0058] The following explanation uses Z = 3 and R = 2 as an example to illustrate Z × (R + 1) third image blocks.
[0059] Corresponding to Figure 2 3 × (2 + 1) = 9 third image blocks, such as Figure 5 As shown. In Figure 5 In the image, the nine image blocks include: the image block at row (t-2)-1, the image block at row (t-2)-q, the image block at row (t-2)-q+1, the image block at row (t-1)-q, the image block at row (t-1)-q, the image block at row (t-1)-q+1, the image block at row (t)-q, the image block at row (t)-q, and the image block at row (t)-q+1.
[0060] Corresponding to Figure 3 Nine third image blocks, such as Figure 6 As shown. In Figure 6 In the image, the nine image blocks include: the image block at row T-2 (q-2), the image block at row T-2 (q-1), the image block at row T-2 (q), the image block at row T-1 (q-2), the image block at row T-1 (q-1), the image block at row T-1 (q-1), the image block at row T-2 (q-2), the image block at row T-1 (q-1), and the image block at row T-2 (q-2), the image block at row T-1 (q-1), and the image block at row T-2 (q-2).
[0061] Corresponding to Figure 4 Nine third image blocks, such as Figure 7 As shown. In Figure 7 The nine image blocks include:
[0062] The image blocks in row T-2, q-th, q+1, q+2, q-1, q+1, q+2, q-1, q+2, q-1, q+2, q-1, q- ...1, q-2, q-2, q-2, q-2, q-2, q-2, q-2, q-2,
[0063] In some possible implementations of the embodiments of this application, when T is less than or equal to R, there are only RT rows before the Tth row, which is less than R rows. In this case, the third offset vector of the first row image block can be used to supplement the third offset vector of the R rows of image blocks before the Tth row.
[0064] For example, T=2 and R=3 are used to supplement the third offset vector. In some possible implementations of embodiments of this application, taking... This represents the third offset vector of the q-th block in the T-th row. For example... Figure 8 As shown, Figure 8 This is a schematic diagram of the supplementary offset vector provided in the embodiments of this application.
[0065] In some possible implementations of the embodiments of this application, when filtering the offset vectors of Z×(R+1) third image blocks according to the first filtering rule, the offset vectors of Z×(R+1) third image blocks in the x and y directions can be sorted according to the magnitude of their absolute values, and 1 / 3 of the offset vectors can be removed in descending order of absolute value.
[0066] Specifically, the absolute values of the offset vectors in the x-direction are sorted to obtain the sequence VS, which can be represented by the following formula (3).
[0067] VS = {v1, v2, ..., v (R+1)×Z}, v1≥v2≥...≥v (R+1)×Z (3)
[0068] In formula (3), v i Let Z×(R+1) image blocks be the offset vector at position i after sorting them according to the absolute value of the offset vector in the x-direction; i is a positive integer greater than or equal to 1 and less than or equal to Z×(R+1).
[0069] The first 1 / 3 of the offset vectors in sequence VS are removed to obtain the filtered sequence VS' and its corresponding spatial coordinates. The sequence VS' can be represented by the following formula (4).
[0070] VS'={v (R+1)×Z / 3 ,...,v (R+1)×Z} (4)
[0071] For example, such as Figure 9 As shown, Figure 9 This is a schematic diagram of the filtering offset vector provided in the embodiments of this application.
[0072] Step 104: Apply consistency constraints to the second offset vector to determine the third offset vector of the T-row image block.
[0073] In some possible implementations of the embodiments of this application, in step 104, the least squares fitting can be used to apply consistency constraints to the filtered offset vector.
[0074] In some possible implementations of the embodiments of this application, the vectors of the j-th block in the T-th row can be fitted in the x-direction and y-direction respectively. and The fitting formula can be any function that conforms to the coordinates being vectors, such as affine transformation.
[0075] In some possible implementations of the embodiments of this application, the embodiments of this application use a first-order plane function for fitting. Accordingly, the fitting formula is shown in the following formula (5).
[0076] v T,j =c1·T+c2·j+c3 (5)
[0077] In formula (5), v T,j Let c1, c2, and c3 be the offset vector of the j-th image block in the T-th row, and c1, c2, and c3 be the fitting coefficients.
[0078] Construct the system of equations shown in formula (6).
[0079]
[0080] In formula (6), the rows in matrix A correspond to the coordinates of the offset vector, and B is the offset vector.
[0081] Taking Z=3 as an example, in the x direction, matrix A is as shown in formula (7).
[0082]
[0083] In the x-direction, matrix B is shown in formula (8).
[0084]
[0085] Using least squares to solve for the fitting coefficients c1, c2 and c3 of formula (6), we obtain the value of fitting coefficient c1 as c′1, the value of fitting coefficient c2 as c′2 and the value of fitting coefficient c3 as c′3.
[0086] Based on coefficients c′1, c′2, and c′3, calculate the consistency constraint offset vector of the T-row image patch in the x-direction, then:
[0087]
[0088] Similarly, the consistency constraint offset vector of the T-row image patch in the y-direction can be calculated.
[0089] This yields the third offset vector of the image patch in row T. Then, the offset vector of the image patch in row T is updated using the obtained third offset vector. For example, as shown... Figure 10 As shown, Figure 10 This is a schematic diagram of the updated offset vector provided in an embodiment of this application.
[0090] In this embodiment, the first image is divided into P rows and Q columns, resulting in P×Q image blocks. For the T-th row, a first offset vector is estimated for the image block in the T-th row. Based on the third offset vector of the image blocks in the preceding R rows of the T-th row, the first offset vector is filtered to obtain a second offset vector for the image block in the T-th row. A consistency constraint is applied to the second offset vector to obtain a third offset vector for the image block in the T-th row. This eliminates the need for additional neighboring image blocks for region vector filtering, thus improving the efficiency of determining the image block offset vector.
[0091] The offset vector determination method provided in this application can be executed by an offset vector determination device. This application uses an offset vector determination device executing the offset vector determination method as an example to illustrate the offset vector determination device provided in this application.
[0092] Figure 11 This is a schematic diagram of the offset vector determining device provided in an embodiment of this application. The offset vector determining device 1100 may include:
[0093] The partitioning module 1101 is used to divide the first image into P rows and Q columns to obtain P×Q image blocks, where P and Q are positive integers;
[0094] Estimation module 1102 is used to estimate the first offset vector of the image patch in row T for row T, where T is a positive integer less than or equal to P;
[0095] The filtering module 1103 is used to filter the first offset vector based on the third offset vector of the image block in the first R rows of the T row to obtain the second offset vector of the image block in the T row, where R is a positive integer;
[0096] Constraint module 1104 is used to apply consistency constraints to the second offset vector to determine the third offset vector of the T-row image block.
[0097] In this embodiment, the first image is divided into P rows and Q columns, resulting in P×Q image blocks. For the T-th row, a first offset vector is estimated for the image block in the T-th row. Based on the third offset vector of the image blocks in the preceding R rows of the T-th row, the first offset vector is filtered to obtain a second offset vector for the image block in the T-th row. A consistency constraint is applied to the second offset vector to obtain a third offset vector for the image block in the T-th row. This eliminates the need for additional neighboring image blocks for region vector filtering, thus improving the efficiency of determining the image block offset vector.
[0098] In some possible implementations of the embodiments of this application, the estimation module 1102 may specifically be used for:
[0099] The first offset vector of the T-row image block is estimated using a local block matching algorithm.
[0100] In some possible implementations of embodiments of this application, the filtering module 1103 may include:
[0101] The first determining submodule is used to determine Z second image blocks based on the first image block in the T-th row, wherein the first image block is any one of the Q image blocks in the T-th row, and the Z second image blocks are Z consecutive image blocks in the T-th row that include the first image block.
[0102] The second determining submodule is used to determine Z×(R+1) third image blocks based on Z second image blocks, wherein the Z×(R+1) third image blocks include Z second image blocks and Z×R target blocks that are in the same column as the Z second image blocks in the first R rows.
[0103] The filtering submodule is used to filter the offset vectors of Z×(R+1) third image blocks according to the first filtering rule.
[0104] In some possible implementations of the embodiments of this application, the first determining submodule is specifically used for:
[0105] In row T, the Z consecutive image blocks centered on the first image block are identified as the Z second image blocks.
[0106] In some possible implementations of the embodiments of this application, the offset vector determination device provided in the embodiments of this application may further include:
[0107] The supplementary module is used to supplement the third offset vector of the first row of image blocks with the third offset vector of the first row of image blocks.
[0108] The offset vector determination device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.
[0109] The offset vector determination device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit it.
[0110] The offset vector determination device provided in this application embodiment can achieve... Figures 1 to 10 The various processes implemented in the method embodiment for determining the offset vector will not be described again here to avoid repetition.
[0111] Optionally, such as Figure 12 As shown, this application embodiment also provides an electronic device 1200, including a processor 1201 and a memory 1202. The memory 1202 stores a program or instructions that can run on the processor 1201. When the program or instructions are executed by the processor 1201, they implement the various steps of the above-described offset vector determination method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0112] Figure 13 This is a schematic diagram of the hardware structure of an electronic device that implements the embodiments of this application.
[0113] The electronic device 1300 includes, but is not limited to, components such as: radio frequency unit 1301, network module 1302, audio output unit 1303, input unit 1304, sensor 1305, display unit 1306, user input unit 1307, interface unit 1308, memory 1309, and processor 1310.
[0114] Those skilled in the art will understand that the electronic device 1300 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 1310 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 13 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0115] The processor 1310 is configured to: divide the first image into P rows and Q columns to obtain P×Q image blocks, where P and Q are positive integers; estimate the first offset vector of the image block in the T-th row for the T-th row, where T is a positive integer less than or equal to P; filter the first offset vector according to the third offset vector of the image blocks in the preceding R rows of the T-th row to obtain the second offset vector of the image block in the T-th row, where R is a positive integer; and apply consistency constraints to the second offset vector to determine the third offset vector of the image block in the T-th row.
[0116] In this embodiment, the first image is divided into P rows and Q columns, resulting in P×Q image blocks. For the T-th row, a first offset vector is estimated for the image block in the T-th row. Based on the third offset vector of the image blocks in the preceding R rows of the T-th row, the first offset vector is filtered to obtain a second offset vector for the image block in the T-th row. A consistency constraint is applied to the second offset vector to determine the third offset vector for the image block in the T-th row. This eliminates the need for additional neighboring image blocks for region vector filtering, thus improving the efficiency of determining the image block offset vector.
[0117] In some possible implementations of the embodiments of this application, the processor 1310 may specifically be used for:
[0118] The first offset vector of the T-row image block is estimated using a local block matching algorithm.
[0119] In some possible implementations of the embodiments of this application, the processor 1310 may specifically be used for:
[0120] For the first image block in row T, Z second image blocks are determined based on the first image block, wherein the first image block is any one of the Q image blocks in row T, and the Z second image blocks are Z consecutive image blocks in row T that include the first image block;
[0121] Based on Z second image blocks, determine Z×(R+1) third image blocks, where the Z×(R+1) third image blocks include Z second image blocks and Z×R target blocks that are in the same column as the Z second image blocks and in the first R rows.
[0122] According to the first filtering rule, the offset vectors of the Z×(R+1) third image blocks are filtered.
[0123] In some possible implementations of the embodiments of this application, the processor 1310 may specifically be used for:
[0124] In row T, the Z consecutive image blocks centered on the first image block are identified as the Z second image blocks.
[0125] In some possible implementations of the embodiments of this application, the processor 1310 may also be used for:
[0126] The third offset vector of the first row of image blocks is used to supplement the third offset vector of the first R rows of image blocks in row T.
[0127] It should be understood that, in this embodiment, the input unit 1304 may include a graphics processing unit (GPU) 13041 and a microphone 13042. The GPU 13041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 1306 may include a display panel 13061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 1307 includes a touch panel 13071 and at least one of other input devices 13072. The touch panel 13071 is also called a touch screen. The touch panel 13071 may include a touch detection device and a touch controller. Other input devices 13072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.
[0128] The memory 1309 can be used to store software programs and various data. The memory 1309 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 1309 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 1309 in this embodiment includes, but is not limited to, these and any other suitable types of memory.
[0129] Processor 1310 may include one or more processing units; optionally, processor 1310 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 1310.
[0130] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described offset vector determination method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0131] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0132] This application also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described offset vector determination method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.
[0133] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0134] This application also provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above-described offset vector determination method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0135] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0136] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0137] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A method of determining an offset vector, characterized by, The method comprises: dividing a first image into P rows and Q columns to obtain P*Q image blocks, wherein P and Q are positive integers; estimating a first offset vector of the image blocks in the Tth row, wherein T is a positive integer less than or equal to P; screening the first offset vector according to the third offset vectors of the image blocks in the first R rows of the Tth row to obtain a second offset vector of the image blocks in the Tth row, wherein R is a positive integer; performing consistency constraint on the second offset vector to determine a third offset vector of the image blocks in the Tth row; the screening the first offset vector according to the third offset vectors of the image blocks in the first R rows of the Tth row to obtain a second offset vector of the image blocks in the Tth row comprises: determining Z second image blocks according to the first image block for the first image block in the Tth row, wherein the first image block is any one of the Q image blocks in the Tth row, and the Z second image blocks are Z image blocks in the Tth row that are continuous and include the first image block; determining Z*(R+1) third image blocks according to the Z second image blocks, wherein the Z*(R+1) third image blocks include the Z second image blocks and Z*R target blocks in the first R rows that are in the same column as the Z second image blocks respectively; screening offset vectors of the Z*(R+1) third image blocks according to a first screening rule.
2. The method of claim 1, wherein, the estimating a first offset vector of the image blocks in the Tth row comprises: estimating the first offset vector of the image blocks in the Tth row by using a local block matching algorithm.
3. The method of claim 1, wherein, the determining Z second image blocks according to the first image block comprises: determining Z image blocks in the Tth row that are continuous and centered on the first image block as the Z second image blocks.
4. The method of claim 1, wherein, in the case where T is less than or equal to R, before the screening the first offset vector according to the third offset vectors of the image blocks in the first R rows of the Tth row to obtain a second offset vector of the image blocks in the Tth row, the method further comprises: complementing the third offset vectors of the image blocks in the first R rows of the Tth row by using the third offset vector of the image blocks in the first row.
5. An offset vector determination apparatus characterized by comprising: The device comprises: a division module configured to divide a first image into P rows and Q columns to obtain P*Q image blocks, wherein P and Q are positive integers; an estimation module configured to estimate a first offset vector of the image blocks in the Tth row, wherein T is a positive integer less than or equal to P; a screening module configured to screen the first offset vector according to the third offset vectors of the image blocks in the first R rows of the Tth row to obtain a second offset vector of the image blocks in the Tth row, wherein R is a positive integer; a constraint module configured to perform consistency constraint on the second offset vector to determine a third offset vector of the image blocks in the Tth row; the screening module comprises: The first determining sub-module is configured to determine Z second image blocks according to the first image block, for the first image block of the Tth row, wherein the first image block is any one of the Q image blocks of the Tth row, and the Z second image blocks are Z image blocks of the Tth row that are continuous and include the first image block; The second determining sub-module is configured to determine Z×(R+1) third image blocks according to the Z second image blocks, wherein the Z×(R+1) third image blocks include the Z second image blocks and Z×R target blocks of the previous R rows that are respectively in the same column as the Z second image blocks; The screening sub-module is configured to screen offset vectors of the Z×(R+1) third image blocks according to a first screening rule.
6. The apparatus of claim 5, wherein, The estimating module is specifically configured to: estimate the first offset vector of the Tth row image block by using a local block matching algorithm.
7. The apparatus of claim 5, wherein, The first determining sub-module is specifically configured to: determine the Z image blocks that are continuous and centered on the first image block in the Tth row as the Z second image blocks.
8. The apparatus of claim 5, wherein, The device further includes: The supplementing module is configured to supplement the third offset vector of the image blocks of the previous R rows of the Tth row by using the third offset vector of the image blocks of the 1st row.
Citation Information
Patent Citations
Method and equipment for determining image offsets
CN107977989A
Interferometric SAR complex image registration method and system
CN108022259A