Image deformation acceleration processing method and device, electronic device and readable storage medium

By dividing the image into sub-blocks and fitting using simple polynomial functions, the problem of slow image deformation processing caused by complex operations in the prior art is solved, and the real-time and efficiency of the processing are improved.

CN112258386BActive Publication Date: 2025-01-10INST OF MICROELECTRONICS CHINESE ACAD OF SCI LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011159599.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-26
Publication Date
2025-01-10
Estimated Expiration
2040-10-26

AI Technical Summary

Technical Problem

In the existing image deformation methods, complex mathematical operations cause the processor to run slowly and cannot meet the real-time requirements.

Method used

By dividing the image into multiple sub-blocks, replacing complex image space inverse transformation functions with simple polynomial functions, including only addition and multiplication operations, fitting the mapping error of each sub-block area, and combining and updating based on preset errors, establishing Datasets to speed up image deformation processing.

Benefits of technology

Without reducing accuracy, the real-time performance of the algorithm is improved and the accelerated processing of image deformation is realized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112258386B_ABST
    Figure CN112258386B_ABST
Patent Text Reader

Abstract

The present disclosure provides an image deformation acceleration processing method and device, an electronic device and a readable storage medium, the method comprising establishing a data set, the data set including at least one sub-block range and a first function corresponding to each sub-block range; creating a new blank image, and dividing the blank image into blocks according to the sub-block ranges in the data set to obtain multiple sub-block ranges; obtaining the first function corresponding to each sub-block range by querying the data set; substituting each pixel point in the sub-block range into the first function to obtain the approximate coordinates corresponding to the original image; assigning the pixel values ​​of the approximate coordinates to the blank image to obtain a deformed output image. The present disclosure uses a simple polynomial to locally replace a complex image processing formula to improve the real-time performance of the algorithm without reducing the accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing, and in particular to an image deformation acceleration processing method and device adapted to a programmable controller, an electronic device and a readable storage medium. Background Art

[0002] Image deformation is a basic operation in the field of image processing and is widely used in image matching, image registration and various image preprocessing.

[0003] Most existing image deformation methods use function mapping, but the biggest disadvantage of this method is that most mapping functions contain complex mathematical operations, such as division, exponential, logarithmic, etc. For the processor, these complex operations will cause the program to run slowly or even fail to meet real-time requirements.

[0004] Therefore, there is an urgent need to provide a processing method that can accelerate image deformation. Summary of the invention

[0005] 1. Technical issues to be resolved

[0006] The present disclosure provides an image deformation acceleration processing method and device, an electronic device and a readable storage medium to solve the technical problems raised above.

[0007] (II) Technical solution

[0008] According to one aspect of the present disclosure, a method for accelerating image deformation processing is provided, comprising:

[0009] Establishing a data set, wherein the data set includes at least one sub-block range and a first function corresponding to each sub-block range;

[0010] Creating a new blank image, and dividing the blank image into blocks according to the sub-block ranges in the data set to obtain a plurality of sub-block ranges;

[0011] Obtaining a first function corresponding to each sub-block range by querying a data set;

[0012] Substituting each pixel point in the sub-block range into the first function to obtain the approximate coordinates corresponding to the original image;

[0013] The pixel values ​​of the approximate coordinates are assigned to the blank image to obtain a deformed output image.

[0014] In some embodiments of the present disclosure, the establishment of the data set includes:

[0015] Dividing the training output image into a plurality of sub-blocks, wherein the training output image is a deformed image generated by mapping the training input image through a second function;

[0016] Fitting a first function to each of the sub-blocks in the training output image, and selecting any sub-block as a central sub-block;

[0017] Merging the central sub-block and the sub-blocks adjacent to the central sub-block to obtain the sub-block region;

[0018] Refitting the first function to the sub-block area, and calculating a mapping error of the sub-block area, wherein the mapping error is a difference between a mapping loss generated by mapping the training input image through a second function and a mapping loss generated by mapping the training input image through a first function;

[0019] Determining whether the mapping error is less than a preset error;

[0020] If the mapping error is smaller than a preset error, the sub-block area is saved;

[0021] Determining whether all the sub-blocks adjacent to the sub-block area have been visited;

[0022] If all the sub-blocks adjacent to the central sub-block are not visited, the process returns to merging the central sub-block and the sub-blocks adjacent to the central sub-block to obtain a sub-block region, and continues to update the sub-block region.

[0023] In some embodiments of the present disclosure, after determining whether the mapping error is less than a preset error, the method further includes:

[0024] If the mapping error is greater than a preset error, determining whether all the sub-blocks adjacent to the central sub-block have been visited;

[0025] If all the sub-blocks adjacent to the central sub-block have been visited, the sub-block area finally merged and the first function corresponding to the sub-block area finally merged are stored in the data set.

[0026] In some embodiments of the present disclosure, the first function uses the least squares method to fit a binary polynomial; the first function only includes addition and multiplication operations of fixed-point numbers; the second function at least includes addition and multiplication, division, exponential, and logarithmic operations of floating-point numbers.

[0027] In some embodiments of the present disclosure, the number of sub-blocks is

[0028]

[0029] Among them, w is the length of the training output image, h is the width of the training output image, m is the length of the sub-block, and n is the width of the sub-block.

[0030] In some embodiments of the present disclosure, the training output image has The sub-blocks are arranged in order without overlap; the training output image has The sub-blocks are arranged in order without overlap.

[0031] In some embodiments of the present disclosure, m and n are integer multiples of 4.

[0032] According to one aspect of the present disclosure, there is provided an image deformation acceleration processing device, comprising:

[0033] A data set establishing module, used to establish a data set; the data set includes at least one sub-block range and a first function corresponding to each sub-block range;

[0034] An image segmentation module, used for dividing the blank image into blocks according to the sub-block ranges in the data set to obtain a plurality of sub-block ranges;

[0035] A query module, configured to obtain a first function corresponding to each sub-block range by querying a data set;

[0036] A calculation module, used for substituting each pixel point in the sub-block range into the first function to obtain the approximate coordinates corresponding to the original image;

[0037] The output module is used to assign pixel values ​​of the approximate coordinates to the blank image to obtain a deformed output image.

[0038] According to one aspect of the present disclosure, there is provided an electronic device, including:

[0039] one or more programmable controllers;

[0040] A memory for storing one or more instructions;

[0041] When the one or more instructions are executed by the one or more programmable controllers, the one or more programmable controllers implement the method as described above.

[0042] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which executable instructions are stored. When the instructions are executed by a programmable controller, the programmable controller implements the method described above.

[0043] (III) Beneficial effects

[0044] It can be seen from the above technical solutions that the image deformation acceleration processing method and device, electronic device and readable storage medium disclosed in the present invention have at least one or part of the following beneficial effects:

[0045] The present disclosure uses simple polynomials to locally replace complex image processing formulas, so as to improve the real-time performance of the algorithm without reducing the accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 An exemplary system architecture to which the image deformation acceleration processing method and device disclosed in the present invention can be applied is schematically shown;

[0047] Figure 2 The flowchart of the image deformation acceleration processing method according to an embodiment of the present disclosure is schematically shown.

[0048] Figure 3 The flowchart of establishing a data set according to an embodiment of the present disclosure is schematically shown.

[0049] Figure 4 The following is a schematic diagram of a sub-block merging process of an image deformation acceleration processing method according to an embodiment of the present disclosure.

[0050] Figure 5 The following is a schematic diagram showing the sub-block merging results of the image deformation acceleration processing method according to an embodiment of the present disclosure.

[0051] Figure 6 The block diagram of the image deformation acceleration processing device according to an embodiment of the present disclosure is schematically shown.

[0052] Figure 7 A block diagram of a computer system suitable for implementing an image deformation acceleration processing method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0053] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0054] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0055] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.

[0056] In the case of using expressions such as "at least one of A, B, and C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.). In the case of using expressions such as "at least one of A, B, or C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, or C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0057] The embodiments of the present disclosure provide an image deformation acceleration processing method and device, an electronic device and a readable storage medium. The method includes establishing a data set, the data set includes at least one sub-block range and a first function corresponding to each sub-block range; creating a new blank image, and dividing the blank image into blocks according to the sub-block ranges in the data set to obtain multiple sub-block ranges; obtaining the first function corresponding to each sub-block range by querying the data set; substituting each pixel point in the sub-block range into the first function to obtain the approximate coordinates corresponding to the original image; assigning the pixel values ​​of the approximate coordinates to the blank image to obtain the deformed output image.

[0058] Figure 1 The exemplary system architecture 100 to which the image deformation acceleration processing method and apparatus of the present disclosure can be applied according to an embodiment of the present disclosure is schematically shown. It should be noted that: Figure 1 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.

[0059] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.

[0060] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients and / or social platform software, etc. (only as examples).

[0061] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0062] The server 105 may be a server that provides various services, such as a background management server (only an example) that provides support for websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0063] It should be noted that the image deformation acceleration processing method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the image deformation acceleration processing device provided in the embodiment of the present disclosure can generally be set in the server 105. The image deformation acceleration processing method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the image deformation acceleration processing device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Alternatively, the image deformation acceleration processing method provided in the embodiment of the present disclosure can also be executed by the terminal devices 101, 102, or 103, or can also be executed by other terminal devices different from the terminal devices 101, 102, or 103. Correspondingly, the image deformation acceleration processing device provided in the embodiment of the present disclosure may also be arranged in the terminal device 101 , 102 , or 103 , or in other terminal devices different from the terminal device 101 , 102 , or 103 .

[0064] For example, the original image to be processed may be originally stored in any one of the terminal devices 101, 102, or 103 (for example, the terminal device 101, but not limited thereto), or stored in an external storage device and may be imported into the terminal device 101. Then, the terminal device 101 may locally execute the image deformation acceleration processing method provided by the embodiment of the present disclosure, or send the original image to be processed to other terminal devices, servers, or server clusters, and the other terminal devices, servers, or server clusters that receive the image to be processed may execute the image deformation acceleration processing method provided by the embodiment of the present disclosure.

[0065] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0066] Figure 2 The flowchart of the image deformation acceleration processing method according to an embodiment of the present disclosure is schematically shown.

[0067] like Figure 2 As shown, the image deformation acceleration processing method includes operations S201 to S205.

[0068] In operation S201, a data set is established, wherein the data set includes at least one sub-block range and a first function corresponding to each sub-block range.

[0069] Specifically, Figure 3 The flowchart of establishing a data set according to an embodiment of the present disclosure is schematically shown.

[0070] like Figure 3 As shown, the establishment of the data set includes operations S2011 to S201

[0071] In the current image deformation training process, the pixels of the input image and the output image are often not one-to-one corresponding. If the pixel coordinates of the input image are transformed to the pixel coordinates of the output image, it often causes pixel discontinuity. Therefore, the general image transformation uses the inverse transformation f'(u, v) of f(x, y) to find the corresponding pixel value in the input image for each pixel of the output image. That is,

[0072] (x, y) = f′(u, v)

[0073] P out (u, v) = P in (x, y)

[0074] Among them, P out (u, v) is the output image, P in(x, y) is the input image, and f′(u, v) is the inverse transformation function of the image space.

[0075] However, the image space inverse transformation function f′(u, v) is usually a very complex function, which may include complex operations such as exponential, logarithmic, and division. The calculation time of the above complex operations on the programmable controller is thousands of times longer than that of simple addition and multiplication.

[0076] In order to solve this problem, the present disclosure adopts a first function containing only addition and multiplication to replace the complex image space inverse transformation function f′(u, v). The first function here is equivalent to a simple function, which only includes addition and multiplication operations of fixed-point numbers (integer numbers). Due to the complexity of the image space inverse transformation function f′(u, v), a simple function obviously cannot well fit the global characteristics of the image space inverse transformation function f′(u, v). In order to deal with such problems, the present application divides the image into a number of rectangular sub-blocks, and in each sub-block, a simple formula containing only addition and multiplication and only a small number of parameters is used to fit the characteristics of the image space inverse transformation function f′(u, v) in the sub-block.

[0077] Operation S2011, dividing the training output image into a plurality of sub-blocks, wherein the training output image is a deformed image generated by mapping the training input image through a second function. Here, the second function is equivalent to a complex function, which at least includes addition, multiplication, division, exponentiation, and logarithm operations of floating point numbers.

[0078] Specifically, the training output image B(u, v) is a deformed image generated by the training input image A(x, y) through a mapping formula f(x, y), which is commonly used in image processing in but not limited to affine transformation, distortion processing and other fields.

[0079] The training output image B(u, v) is divided into m*n rectangular sub-blocks by horizontal dividing lines and / or vertical dividing lines, and there is no overlapping between the sub-blocks.

[0080] Specifically, in the image with a training output image length of w and a training output image width of h, we will eventually get Sub-blocks, such as Figure 4 shown.

[0081] Operation S2012: Fit a first function to each of the sub-blocks in the training output image, and select any sub-block as a central sub-block.

[0082] For example, a picture is divided into z sub-blocks, and a bivariate polynomial is fitted as the first function for each sub-block using the least squares method. In practical applications, the bivariate polynomial can be freely selected as long as we ensure that it only contains multiplication and addition. For example, we can use the following formula:

[0083] X=a0+a1*u+a2*v+a3*u*v+a4*u 2 +a5*v 2

[0084] y=b0+b1*u+b2*v+b3*u*v+b4*u 2 +b5*v 2

[0085] Therefore, based on the current sub-block, the originally complex (x, y)=f'(u, v) can be converted into a first function consisting of only 10 parameters, 10 additions and 18 multiplications.

[0086] Operation S2013: Merge the central sub-block and the sub-blocks adjacent to the central sub-block to obtain the sub-block region.

[0087] like Figure 4 As shown in the figure, the gray sub-block represents the central sub-block, which can be merged with four adjacent sub-blocks, namely, sub-blocks 1, 2, 3, and 4, adjacent to the central sub-block. In the merged example image pointed by the arrow, it is assumed that after the central sub-block is merged with the adjacent sub-block 2, the mapping error is less than d and is the smallest in the four directions, then the merger will be performed to obtain a sub-block area.

[0088] Operation S2014: refit the first function to the sub-block area and calculate the mapping error of the sub-block area. It should be noted that the mapping error is the difference between the mapping loss generated by mapping the training input image through a second function and the mapping loss generated by mapping the training input image through a first function.

[0089] Operation S2015: determine whether the mapping error is less than a preset error. The preset error can be set according to specific circumstances, for example, the preset error is set to 0.1, 0.2, etc., which will not be listed here one by one.

[0090] Operation S2016: If the mapping error is less than a preset error, the sub-block area is saved.

[0091] Operation S2017: determining whether all the sub-blocks adjacent to the sub-block area have been visited.

[0092] In operation S2018, if all the sub-blocks adjacent to the central sub-block are not visited, the process returns to operation S2013 to continue updating the sub-block area.

[0093] In another embodiment of establishing a data set, after operation S2015, the process further includes:

[0094] In operation S2019, if the mapping error is greater than a preset error, it is determined whether all the sub-blocks adjacent to the central sub-block have been visited.

[0095] Operation S2020: After all the sub-blocks adjacent to the central sub-block have been visited, the sub-block area finally merged and the first function corresponding to the sub-block area finally merged are stored in the data set. Figure 5 As shown, the merged sub-block areas share a first function, which can further reduce the parameters in the data set.

[0096] It should be noted that there is a difference between the two storages in operation S2016 and operation S2020. Operation S2016 is a locally saved variable, while operation S2020 saves the optimal solution. This step saves the optimal solution to the data set for subsequent search.

[0097] In operation S202, a new blank image is created, and the blank image is divided into blocks according to the sub-block ranges in the data set to obtain a plurality of sub-block ranges.

[0098] In operation S203, a first function corresponding to each sub-block range is obtained by querying the data set.

[0099] In operation S204, each pixel point in the sub-block range is substituted into the first function to obtain the approximate coordinates corresponding to the original image.

[0100] In operation S205, pixel values ​​of the approximate coordinates are assigned to the blank image to obtain a deformed output image.

[0101] Specifically, after each pixel point in the blank image is traversed and searched, a deformed output image is obtained, and bilinear interpolation is performed on the deformed output image to reduce the coordinate mapping error caused by the simplification of the mapping formula.

[0102] For each new image, as long as we need to deform the image deformation formula f(x, y), we can simply query the dataset for calculation. It should be noted that there is a one-to-one correspondence between the dataset and the image deformation formula. If the image deformation formula is changed, the dataset needs to be recalculated.

[0103] This embodiment uses a simple polynomial that only contains fixed-point operations to partially replace image processing formulas that contain complex operations such as floating-point operations, division, and exponential operations, so that any algorithm containing the above operations can be run on devices such as FPGA that can only perform fixed-point operations, and the real-time performance of the algorithm is improved without reducing readiness.

[0104] Figure 6The block diagram of the image deformation acceleration processing device according to an embodiment of the present disclosure is schematically shown.

[0105] like Figure 6 As shown, the image deformation acceleration processing device 600 includes a data set establishment module 610 , a picture segmentation module 620 , a query module 630 , a calculation module 640 and an output module 650 .

[0106] The data set establishing module 610 is used to establish a data set; the data set includes at least one sub-block range and a first function corresponding to each of the sub-block ranges.

[0107] The image segmentation module 620 is used to divide the blank image into blocks according to the sub-block ranges in the data set to obtain multiple sub-block ranges.

[0108] The query module 630 is used to obtain the first function corresponding to each sub-block range by querying the data set.

[0109] The calculation module 640 is used to substitute each pixel point in the sub-block range into the first function to obtain the approximate coordinates corresponding to the original image.

[0110] The output module 650 is used to assign pixel values ​​of the approximate coordinates to the blank image to obtain a deformed output image.

[0111] According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems on chips, systems on substrates, systems on packages, application specific integrated circuits (ASICs), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, submodules, units, and subunits can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be performed.

[0112] For example, any multiple of the data set establishment module 610, the image segmentation module 620, the query module 630, the calculation module 640 and the output module 650 can be combined in one module / unit / sub-unit for implementation, or any one of the modules / units / sub-units can be split into multiple modules / units / sub-units. Alternatively, at least part of the functions of one or more of these modules / units / sub-units can be combined with at least part of the functions of other modules / units / sub-units and implemented in one module / unit / sub-unit. According to an embodiment of the present disclosure, at least one of the data set establishment module 610, the image segmentation module 620, the query module 630, the calculation module 640 and the output module 650 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in an appropriate combination of any of them. Alternatively, at least one of the dataset building module 610, the image segmentation module 620, the query module 630, the calculation module 640 and the output module 650 may be at least partially implemented as a computer program module, which may perform corresponding functions when executed.

[0113] It should be noted that the data processing system part in the embodiments of the present disclosure corresponds to the data processing method part in the embodiments of the present disclosure. The description of the data processing system part specifically refers to the data processing method part, which will not be repeated here.

[0114] Figure 7 A block diagram of a computer system suitable for implementing an image deformation acceleration processing method according to an embodiment of the present disclosure is schematically shown. Figure 7 The computer system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0115] like Figure 7As shown, the computer system 700 according to the embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 702 or the program loaded from the storage part 708 to the random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include an onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present disclosure.

[0116] In RAM 703, various programs and data required for the operation of system 700 are stored. Processor 701, ROM 702 and RAM 703 are connected to each other through bus 704. Processor 701 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 702 and / or RAM 703. It should be noted that the program can also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.

[0117] According to an embodiment of the present disclosure, the system 700 may further include an input / output (I / O) interface 705, which is also connected to the bus 704. The system 700 may further include one or more of the following components connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.

[0118] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.

[0119] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

[0120] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include, but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.

[0121] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 702 and / or the RAM 703 described above and / or one or more memories other than the ROM 702 and the RAM 703 .

[0122] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions. It can be understood by those skilled in the art that the features recorded in the various embodiments and / or claims of the present disclosure can be combined and / or combined in a variety of ways, even if such a combination or combination is not explicitly recorded in the present disclosure. In particular, without departing from the spirit and teaching of the present disclosure, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0123] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A method for accelerating image deformation processing, comprising: Establishing a data set, wherein the data set includes at least one sub-block range and a first function corresponding to each sub-block range, wherein the first function uses a least squares method to fit a bivariate polynomial; and the first function only includes addition and multiplication operations of fixed-point numbers; Wherein, the establishment of the data set includes: Dividing a training output image into a plurality of sub-blocks, wherein the training output image is a deformed image generated by mapping the training input image through a second function, wherein the second function at least includes addition, multiplication, division, exponentiation, and logarithm operations of floating-point numbers; Fitting a first function to each of the sub-blocks in the training output image, and selecting any sub-block as a central sub-block; Merging the central sub-block and the sub-blocks adjacent to the central sub-block to obtain the sub-block region; Refitting the first function to the sub-block area, and calculating a mapping error of the sub-block area, wherein the mapping error is a difference between a mapping loss generated by mapping the training input image through a second function and a mapping loss generated by mapping the training input image through a first function; Determining whether the mapping error is less than a preset error; If the mapping error is smaller than a preset error, the sub-block area is saved; Determining whether all the sub-blocks adjacent to the sub-block area have been visited; If all the sub-blocks adjacent to the central sub-block are not visited, the process returns to merging the central sub-block with the sub-blocks adjacent to the central sub-block to obtain a sub-block region, and continues to update the sub-block region; Wherein, after determining whether the mapping error is less than a preset error, the method further includes: If the mapping error is greater than a preset error, determining whether all the sub-blocks adjacent to the central sub-block have been visited; If all the sub-blocks adjacent to the central sub-block have been visited, the finally merged sub-block area and the first function corresponding to the finally merged sub-block area are stored in the data set; Creating a new blank image, and dividing the blank image into blocks according to the sub-block ranges in the data set to obtain a plurality of sub-block ranges; Obtaining a first function corresponding to each sub-block range by querying a data set; Substituting each pixel point in the sub-block range into the first function to obtain the approximate coordinates corresponding to the original image; The pixel values ​​of the approximate coordinates are assigned to the blank image to obtain a deformed output image.

2. The image deformation acceleration processing method according to claim 1, wherein: The number of sub-blocks is Among them, w is the length of the training output image, h is the width of the training output image, m is the length of the sub-block, and n is the width of the sub-block.

3. The image deformation acceleration processing method according to claim 1, wherein: The training output image has The sub-blocks are arranged in order without overlap; the training output image has The sub-blocks are arranged in order without overlap.

4. The image deformation acceleration processing method according to claim 2, wherein: m and n are integer multiples of 4.

5. An image deformation acceleration processing device, comprising: A data set establishment module, used to establish a data set; the data set includes at least one sub-block range and a first function corresponding to each sub-block range, wherein the first function uses the least squares method to fit a bivariate polynomial; the first function only includes addition and multiplication operations of fixed-point numbers; Wherein, the establishment of the data set includes: Dividing a training output image into a plurality of sub-blocks, wherein the training output image is a deformed image generated by mapping the training input image through a second function, wherein the second function at least includes addition, multiplication, division, exponentiation, and logarithm operations of floating-point numbers; Fitting a first function to each of the sub-blocks in the training output image, and selecting any sub-block as a central sub-block; Merging the central sub-block and the sub-blocks adjacent to the central sub-block to obtain the sub-block region; Refitting the first function to the sub-block area, and calculating a mapping error of the sub-block area, wherein the mapping error is a difference between a mapping loss generated by mapping the training input image through a second function and a mapping loss generated by mapping the training input image through a first function; Determining whether the mapping error is less than a preset error; If the mapping error is smaller than a preset error, the sub-block area is saved; Determining whether all the sub-blocks adjacent to the sub-block area have been visited; If all the sub-blocks adjacent to the central sub-block are not visited, the process returns to merging the central sub-block with the sub-blocks adjacent to the central sub-block to obtain a sub-block region, and continues to update the sub-block region; Wherein, after determining whether the mapping error is less than a preset error, the method further includes: If the mapping error is greater than a preset error, determining whether all the sub-blocks adjacent to the central sub-block have been visited; If all the sub-blocks adjacent to the central sub-block have been visited, the finally merged sub-block area and the first function corresponding to the finally merged sub-block area are stored in the data set; An image segmentation module, used for segmenting a blank image into blocks according to the sub-block ranges in the data set to obtain a plurality of sub-block ranges; A query module, configured to obtain a first function corresponding to each sub-block range by querying a data set; A calculation module, used for substituting each pixel point in the sub-block range into the first function to obtain the approximate coordinates corresponding to the original image; The output module is used to assign pixel values ​​of the approximate coordinates to the blank image to obtain a deformed output image.

6. An electronic device comprising: one or more programmable controllers; A memory for storing one or more instructions; Wherein, when the one or more instructions are executed by the one or more programmable controllers, the one or more programmable controllers implement the method as described in any one of claims 1 to 4.

7. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a programmable controller, enables the programmable controller to implement the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Method for accelerating computation speed of image deformation fusion

    CN101453555A

  • Image processing method and apparatus, electronic device, and computer-readable storage medium

    CN109087238A