Method, apparatus and computer-readable storage medium for implementing image distortion
By splitting the image and using affine matrix processing, the image distortion bandwidth overhead problem under memory capacity limitation is solved, and efficient distortion processing of large images is achieved.
Patent Information
- Application Number
- CN202210894229.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-27
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2042-07-27
AI Technical Summary
In the prior art, due to the limited memory storage capacity during image distortion, huge bandwidth overhead problems are caused, especially when the image is too large, image distortion cannot be efficiently realized.
By image splitting the original image, multiple sub-images are generated, and each sub-image is loaded into memory for image distortion, a reference distortion image is generated using an affine matrix, and finally the target distortion image of the multiple sub-images is determined.
The bandwidth overhead during image distortion is reduced, efficient distortion of large images is achieved, frequent switching of memory contents is reduced, and processing efficiency is improved.
Smart Images

Figure CN115272051B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to image processing technologies, and in particular, to a method, an apparatus, and a computer-readable storage medium for implementing image warping. Background Art
[0002] When accelerating artificial intelligence (AI), in order to implement image warping, an image to be warped is usually loaded onto a memory such as a static random-access memory (SRAM) for calculation. Summary of the Invention
[0003] In order to solve the technical problem that due to the limited storage capacity of the memory, when the image is too large, a huge bandwidth overhead is required to implement image warping of the image, the present disclosure is proposed. Embodiments of the present disclosure provide a method, an apparatus, and a computer-readable storage medium for implementing image warping.
[0004] According to one aspect of the present disclosure, there is provided a method for implementing image warping, including:
[0005] Obtaining an original image and an affine matrix for image warping of the original image;
[0006] Based on the image size supported by the memory, splitting the original image to obtain a plurality of sub-images;
[0007] For each of the plurality of sub-images, loading the sub-image into the memory, and based on the affine matrix, warping the sub-image loaded into the memory to obtain a reference warped image of the original image;
[0008] Based on the plurality of reference warped images corresponding to the plurality of sub-images, determining a target warped image of the original image.
[0009] According to another aspect of the present disclosure, there is provided an apparatus for implementing image warping, including:
[0010] A first obtaining module, configured to obtain an original image and an affine matrix for image warping of the original image;
[0011] A second obtaining module, configured to split the original image obtained by the first obtaining module based on the image size supported by the memory to obtain a plurality of sub-images;
[0012] A processing module, configured to load each of the multiple sub-images obtained by the second obtaining module into the memory, and perform image warping on the sub-image loaded into the memory based on the affine matrix to obtain a reference warped image of the original image;
[0013] A generating module, configured to determine a target warped image of the original image based on the multiple reference warped images corresponding to the multiple sub-images obtained by the processing module.
[0014] According to another aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium storing a computer program for executing the method for implementing image warping as described above.
[0015] According to yet another aspect of the embodiments of the present disclosure, there is provided an electronic device, including:
[0016] A processor;
[0017] A memory for storing executable instructions of the processor;
[0018] The processor is configured to read the executable instructions from the memory and execute the instructions to implement the method for implementing image warping as described above.
[0019] Based on the method, device, computer-readable storage medium, and electronic device for implementing image warping provided in the above embodiments of the present disclosure, the original image to be subjected to image warping can be split into multiple sub-images based on the image size supported by the memory. Next, one sub-image can be loaded into the memory each time, and a corresponding reference warped image can be obtained by using the affine matrix. By combining the multiple reference warped images corresponding to the multiple sub-images, the target warped image of the original image can be determined, thereby implementing the image warping of the original image. It can be seen that in the embodiments of the present disclosure, even if the image to be subjected to image warping is too large (for example, exceeding the image size supported by the memory), the image warping of the image can be achieved by means of image splitting processing. Moreover, compared with the number of pixel points in the image, the number of sub-images obtained by the splitting processing is small. In this way, the content stored in the memory does not need to be switched frequently. Therefore, the embodiments of the present disclosure can greatly reduce the bandwidth overhead required for implementing image warping.
[0020] Next, the technical solutions of the present disclosure will be further described in detail through the accompanying drawings and embodiments. Description of the Drawings
[0021] The above and other objects, features, and advantages of the present disclosure will become more apparent by describing the embodiments of the present disclosure in more detail with reference to the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation to the present disclosure. In the drawings, the same reference numerals generally represent the same components or steps.
[0022] Figure 1 It is a schematic diagram of obtaining a target image from a source image through image distortion in the related art.
[0023] Figure 2 It is a schematic flowchart of a method for implementing image distortion provided by an exemplary embodiment of the present disclosure.
[0024] Figure 3 It is a schematic flowchart of a method for implementing image distortion provided by another exemplary embodiment of the present disclosure.
[0025] Figure 4 It is a schematic diagram of an original image in an exemplary embodiment of the present disclosure.
[0026] Figure 5-1 is Figure 4 a schematic diagram of one of the three sub-images obtained by splitting the original image in
[0027] Figure 5-2 is Figure 4 a schematic diagram of another one of the three sub-images obtained by splitting the original image in
[0028] Figure 5-3 is Figure 4 a schematic diagram of yet another one of the three sub-images obtained by splitting the original image in
[0029] Figure 6 It is a schematic flowchart of a method for implementing image distortion provided by still another exemplary embodiment of the present disclosure.
[0030] Figure 7 It is a schematic flowchart of a method for implementing image distortion provided by yet another exemplary embodiment of the present disclosure.
[0031] Figure 8 It is a schematic diagram of the principle for implementing image distortion in an exemplary embodiment of the present disclosure.
[0032] Figure 9 It is a schematic structural diagram of a device for implementing image distortion provided by an exemplary embodiment of the present disclosure.
[0033] Figure 10It is a schematic structural diagram of a device for implementing image distortion provided by another exemplary embodiment of the present disclosure.
[0034] Figure 11 It is a schematic structural diagram of a device for implementing image distortion provided by still another exemplary embodiment of the present disclosure.
[0035] Figure 12 It is a schematic structural diagram of a device for implementing image distortion provided by yet another exemplary embodiment of the present disclosure.
[0036] Figure 13 It is a structural diagram of an electronic device provided by an exemplary embodiment of the present disclosure. Detailed implementation manners
[0037] Next, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure. It should be understood that the present disclosure is not limited by the exemplary embodiments described herein.
[0038] It should be noted that: unless otherwise specifically stated, the relative arrangements, numerical expressions, and numerical values of the components and steps set forth in these embodiments do not limit the scope of the present disclosure.
[0039] Those skilled in the art can understand that the terms "first", "second", etc. in the embodiments of the present disclosure are only used to distinguish different steps, devices, or modules, etc., and neither represent any specific technical meaning nor indicate an inevitable logical order between them.
[0040] It should also be understood that in the embodiments of the present disclosure, "a plurality of" may refer to two or more, and "at least one" may refer to one, two, or more.
[0041] It should also be understood that for any component, data, or structure mentioned in the embodiments of the present disclosure, without clear limitation or contrary indication in the context, it can generally be understood as one or more.
[0042] In addition, the term "and / or" in the present disclosure is only a description of the association relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in the present disclosure generally represents an "or" relationship between the associated objects before and after.
[0043] It should also be understood that the present disclosure emphasizes the differences between the various embodiments. Their similarities or similarities can be referred to each other. For the sake of brevity, they will not be elaborated one by one.
[0044] Meanwhile, it should be understood that, for ease of description, the dimensions of the various parts shown in the drawings are not drawn in actual proportional relationship.
[0045] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way a limitation on the present disclosure, its application, or its use.
[0046] Technologies, methods, and devices known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, such technologies, methods, and devices should be considered as part of the specification.
[0047] It should be noted that like reference numerals and letters refer to like items in the following drawings, and thus, once an item is defined in one drawing, further discussion thereof in subsequent drawings is not required.
[0048] Embodiments of the present disclosure can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with many other general or special computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments, and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers, etc. include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, minicomputer systems, mainframe computer systems, and distributed cloud computing technology environments including any of the above systems, and so on.
[0049] Electronic devices such as terminal devices, computer systems, servers, etc. can be described in the general context of computer system-executable instructions (such as program modules) executed by a computer system. Generally, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. The computer system / server can be implemented in a distributed cloud computing environment where tasks are executed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.
[0050] Overview of the Application
[0051] Image distortion is a way of geometric transformation of an image, which is used to obtain a target image (such as Figure 1 the shown sourceimage) and an affine matrix, based on a source image (such as Figure 1The (destination image) shown. Generally speaking, image warping is divided into two types, namely Forward Warping and Inverse Warping.
[0052] The principle of Forward Warping is as follows: Traverse each point p_source in the source image, multiply it by the affine matrix from the source image to the destination image, project it onto the destination image to obtain p_destination, and set the pixel value of p_destination equal to the pixel value of p_source. If the coordinates of p_destination are not integers, round them to the nearest integer.
[0053] The principle of Inverse Warping is as follows: Traverse each point p_destination in the destination image, multiply it by the affine matrix from the destination image to the source image to obtain the corresponding point p_source of this point in the source image, and set the pixel value of p_destination equal to the value of p_source. If the coordinates of p_source are not integers, use the method of interpolation approximation for approximation. Optionally, each point output can correspond to 2×2 points input for interpolation.
[0054] When performing AI acceleration, in order to achieve image warping, generally, the image to be warped (i.e., the source image) is loaded onto a memory such as SRAM (which is an on-chip memory) for calculation, so as to avoid the input / output (IO) latency caused by frequent access to Double Data Rate (DDR) and the increase in DDR bandwidth.
[0055] In the process of implementing the present disclosure, by analyzing the principle of Inverse Warping, the inventors found that due to the uncertainty of the affine matrix from the destination image to the source image, the coordinates of any point in the destination image corresponding to the source image are also arbitrary. Therefore, for image warping of the Inverse Warping type, either the entire source image needs to be loaded into the SRAM (suitable for the case where the source image is not too large), or the DDR bandwidth needs to be consumed to switch the data in the SRAM (suitable for the case where the source image is too large).
[0056] A specific example of consuming the DDR bandwidth to switch the data in the SRAM can be: for a point at a certain coordinate in the destination image, if the 2×2 points corresponding to interpolation in the source image do not exist in the SRAM, the content stored in the SRAM can be switched by consuming the DDR bandwidth, so that some data in the SRAM is replaced by the 2×2 points corresponding to interpolation in the source image. It should be noted that there are a large number of pixel points in the destination image, so the above switching operation needs to be frequently performed, which will bring a huge bandwidth overhead.
[0057] Exemplary Method
[0058] Figure 2 It is a schematic flowchart of a method for implementing image warping provided by an exemplary embodiment of the present disclosure. Figure 2 The method shown includes step 210, step 220, step 230, and step 240, which will be described separately below.
[0059] Step 210, obtain the original image and the affine matrix for image warping of the original image.
[0060] It should be noted that in the embodiments of the present disclosure, the type of image warping for implementation can be either Forward Warping or Inverse Warping. In the following, the case where the type is Inverse Warping will be taken as an example for description. In this way, the original image involved in step 210 can be the source image mentioned above, and the affine matrix involved in step 210 can be the affine matrix from the destination image to the source image mentioned above.
[0061] Step 220: Based on the image size supported by the memory, split the original image to obtain multiple sub-images.
[0062] It should be noted that the image size supported by the memory may include the maximum image size that the memory can accommodate, and the image size supported by the memory may be in the form of H×W; where H represents height and W represents width.
[0063] In step 220, the original image can be split with reference to the image size supported by the memory to obtain multiple sub-images, and the image size of each sub-image needs to meet the requirement: less than or equal to the maximum image size that the memory can accommodate.
[0064] Optionally, the number of sub-images can be 2, 3 or more; on the premise that the image size of each sub-image meets the requirements, the number of sub-images can be as small as possible; the image sizes of the respective sub-images can be the same or different.
[0065] Step 230: For each of the multiple sub-images, load the sub-image into the memory, and based on the affine matrix, distort the sub-image loaded into the memory to obtain a reference distorted image of the original image.
[0066] In step 230, the multiple sub-images can be arranged in a certain order. Load the sub-image ranked first into the memory, and use the affine matrix to distort the sub-image loaded into the memory to obtain the image distortion result corresponding to the sub-image ranked first. This image distortion result can be used as a reference distorted image of the original image. Next, the content stored in the memory can be switched so that the memory is updated from storing the sub-image ranked first to storing the sub-image ranked second, and another reference distorted image of the original image can be obtained by using the affine matrix. The subsequent process can be carried out in the same way, so that multiple reference distorted images corresponding to the multiple sub-images can be obtained; among them, there can be a one-to-one correspondence between the multiple sub-images and the multiple reference distorted images.
[0067] Step 240: Based on the multiple reference distorted images corresponding to the multiple sub-images, determine the target distorted image of the original image.
[0068] In step 240, the multiple reference distorted images corresponding to the multiple sub-images can be integrated to utilize the information carried by the multiple reference distorted images to determine the target distorted image of the original image. The target distorted image can be used as the destination image mentioned above.
[0069] In the embodiments of the present disclosure, based on the image size supported by the memory, the original image to be image distorted can be split into multiple sub-images. Next, one sub-image can be loaded into the memory each time, and by using the affine matrix, the corresponding reference distorted image can be obtained. Combining the multiple reference distorted images corresponding to the multiple sub-images, the target distorted image of the original image can be determined, thereby realizing the image distortion of the original image. It can be seen that in the embodiments of the present disclosure, even if the image to be image distorted is too large (for example, exceeding the image size supported by the memory), the image distortion of the image can be realized by means of image splitting processing. Moreover, compared with the number of pixel points in the image, the number of sub-images obtained by the splitting processing is smaller. In this way, the content stored in the memory does not need to be switched frequently. Therefore, the embodiments of the present disclosure can greatly reduce the bandwidth overhead required for realizing image distortion.
[0070] Based on the embodiment shown in Figure 2 as shown in Figure 3 Step 230 includes Step 2301, Step 2303, Step 2305, Step 2307, and Step 2309.
[0071] In Step 2301, for the first sub-image among the multiple sub-images, load the first sub-image into the memory, and based on the affine matrix, determine the second position mapped to the first position on the to-be-generated first reference distorted image; the first reference distorted image is the reference distorted image corresponding to the first sub-image loaded into the memory among the multiple reference distorted images.
[0072] It should be noted that the first sub-image can be any one of the multiple sub-images; the first position can be the position of any pixel point in the first reference distorted image.
[0073] In Step 2301, after loading the first sub-image into the memory, the position coordinates of the first position on the first reference distorted image can be multiplied by the affine matrix to obtain another position coordinate, and the position with this another position coordinate can be used as the second position mapped to the first position.
[0074] Step 2303, determine a preset number of interpolation points associated with the second position.
[0075] Optionally, the preset number can be 4.
[0076] In step 2303, when the coordinates of the second position are not integers, four interpolation points associated with the second position can be determined. Assume that the coordinates of the second position are (u1, v1). Then, u1 can be rounded up and rounded down to obtain the rounded-down result u2 and the rounded-up result u3 of u1, and v1 can be rounded up and rounded down to obtain the rounded-down result v2 and the rounded-up result v3 of v1. The four points corresponding to the four coordinates (u2, v2), (u2, v3), (u3, v2), and (u3, v3) are the four points required to approximately determine the corresponding pixel value for (u1, v1) by using interpolation approximation in the general case. These four points can be considered as the four interpolation points associated with the second position.
[0077] Step 2305: Determine the position type of each interpolation point among the preset number of interpolation points relative to the position of the first sub-image, obtaining a preset number of position types.
[0078] In a specific implementation, step 2305 includes:
[0079] If the first interpolation point is located on the first sub-image loaded into the memory, determine that the position type of the first interpolation point relative to the first sub-image is the first type of position type;
[0080] If the first interpolation point is not located on the first sub-image loaded into the memory and the first interpolation point is located in the invalid area corresponding to the first sub-image determined based on the target splitting line, determine that the position type of the first interpolation point relative to the first sub-image is the second type of position type; where the target splitting line is used to split the first sub-image from the original image;
[0081] If the first interpolation point is not located on the first sub-image loaded into the memory and the first interpolation point is not located in the invalid area, determine that the position type of the first interpolation point relative to the first sub-image is the third type of position type;
[0082] Where the first interpolation point is any interpolation point among the preset number of interpolation points.
[0083] In an example, the original image is as shown in Figure 4 feature. Through image splitting processing on the original image, three sub-images are obtained, which are respectively Figure 5-1 part of the feature in (assuming it is case1), Figure 5-2 part of the feature in (assuming it is case2), Figure 5-3 part of the feature in (assuming it is case3).
[0084] Assume that the first sub-image is case1, then the target splitting line can beFigure 5-1 In Figure 5-1 , for the dashed line X1, the invalid area corresponding to the first sub-image determined based on the target splitting line can be Figure 5-1 the area marked with "non-input area" below the dashed line X1 in Figure 5-1 . If the first interpolation point falls on Figure 5-1 some features in Figure 5-1 , then it can be determined that the position type of the first interpolation point relative to the first sub-image is the first type of position type; if the first interpolation point falls on Figure 5-1 the area marked with "non-input area" below the dashed line X1 in Figure 5-1 , then it can be determined that the position type of the first interpolation point relative to the first sub-image is the second type of position type; if the first interpolation point falls on Figure 5-1 the area above the dashed line X1 in Figure 5-1 , excluding the area where some features are located, then it can be determined that the position type of the first interpolation point relative to the first sub-image is the third type of position type.
[0085] Assume that the first sub-image is case2, then the target splitting line can include Figure 5-2 the dashed line X2 and the dashed line X3 in Figure 5-2 . The invalid area corresponding to the first sub-image determined based on the target splitting line can include Figure 5-2 the area marked with "non-input area" above the dashed line X2 in Figure 5-2 , and the area marked with "non-input area" below the dashed line X3. If the first interpolation point falls on Figure 5-2 some features in Figure 5-2 , then it can be determined that the position type of the first interpolation point relative to the first sub-image is the first type of position type; if the first interpolation point falls on Figure 5-2 the area marked with "non-input area" above the dashed line X2 in Figure 5-2 , or the area marked with "non-input area" below the dashed line X3 in Figure 5-2 , then it can be determined that the position type of the first interpolation point relative to the first sub-image is the second type of position type; if the first interpolation point falls on Figure 5-2 the area between the dashed line X2 and the dashed line X3 in Figure 5-2 , excluding the area where some features are located, then it can be determined that the position type of the first interpolation point relative to the first sub-image is the third type of position type.
[0086] Assume that the first sub-image is case3, then the target splitting line can be Figure 5-3 the dashed line X4 in Figure 5-3 . The invalid area corresponding to the first sub-image determined based on the target splitting line can be Figure 5-3 the area marked with "non-input area" above the dashed line X4 in Figure 5-3 . If the first interpolation point falls on Figure 5-3 some features in Figure 5-3 , then it can be determined that the position type of the first interpolation point relative to the first sub-image is the first type of position type; if the second position falls on Figure 5-3For the area marked with "non-input area" above the dashed line X4, it can be determined that the position type of the first interpolation point relative to the position of the first sub-image is the second type of position type; if the second position falls Figure 5-3 below the dashed line X4, in the area other than the area where some features are located, it can be determined that the position type of the first interpolation point relative to the position of the first sub-image is the third type of position type.
[0087] In this embodiment, by referring to whether the first interpolation point is located on the first sub-image loaded into the memory and whether the first interpolation point is located in the invalid area corresponding to the first sub-image, the position type of the first interpolation point relative to the first sub-image can be determined efficiently and reliably. In a similar manner, the position types of a preset number of points can be determined efficiently and reliably.
[0088] Step 2307, determine the first pixel value based on a preset number of position types.
[0089] In a specific embodiment, step 2307 includes:
[0090] If at least one of the preset number of position types is the second type of position type, determine the preset invalid pixel value as the first pixel value;
[0091] If all of the preset number of position types are position types other than the second type of position type, determine the reference pixel values corresponding to the preset number of interpolation points respectively, obtain the preset number of reference pixel values, perform interpolation operations based on the preset number of reference pixel values, and determine the first pixel value based on the result of the interpolation operation.
[0092] It should be noted that the pixel value is usually represented by an 8-bit number. The preset invalid pixel value can be less than or equal to the minimum value of the 8-bit number, or the preset invalid pixel value can be greater than or equal to the maximum value of the 8-bit number.
[0093] Optionally, determining the reference pixel values corresponding to the preset number of interpolation points respectively includes:
[0094] If the position type of the first interpolation point relative to the first sub-image is the first type of position type, use the actual pixel value at the position of the first interpolation point on the first sub-image as the reference pixel value corresponding to the first interpolation point;
[0095] If the position type of the first interpolation point relative to the first sub-image is the third type of position type, use the preset valid pixel value as the reference pixel value corresponding to the first interpolation point, or use the actual pixel value of the pixel point on the first sub-image that is closest to the first interpolation point as the reference pixel value corresponding to the first interpolation point.
[0096] Optionally, the preset effective pixel value can be greater than the minimum value of the 8-bit number and less than the maximum value of the 8-bit number.
[0097] In one example, the coordinates of the four interpolation points associated with the second position are (u2, v2), (u2, v3), (u3, v2), and (u3, v3) respectively, and the first sub-image is Figure 5-1 case1 in
[0098] If at least one of (u2, v2), (u2, v3), (u3, v2), and (u3, v3) falls within Figure 5-1 the area marked with "non-input area" below the dashed line X1 in
[0099] This indicates that the position types corresponding to at least some of the four interpolation points are the second type of position type. Then, the preset invalid pixel value can be directly determined as the first pixel value. Figure 5-1 If (u2, v2), (u2, v3), (u3, v2), and (u3, v3) all fall within
[0100] some features in Figure 5-1 This indicates that the position types corresponding to each of the four interpolation points are the first type of position type. Then, the actual pixel values of the positions of the four interpolation points on the first sub-image can be determined. Assuming that the four actual pixel values are determined and are the actual pixel value S1, the actual pixel value S2, the actual pixel value S3, and the actual pixel value S4 respectively, then a new pixel value (i.e., the interpolation operation result) can be obtained through the interpolation operation on S1, S2, S3, and S4, and this new pixel value can be used as the first pixel value. Figure 5-1
[0101] If (u2, v2) and (u2, v3) fall within Figure 5-1 the area above the dashed line X1 in Figure 5-1 except for the area where some features are located, and (u3, v2) and (u3, v3) fall within Figure 5-1 some features in
[0101] This indicates that the position types corresponding to the two interpolation points with coordinates (u2, v2) and (u2, v3) are both the third type of position type, and the position types corresponding to the two interpolation points with coordinates (u3, v2) and (u3, v3) are both the first type of position type. Then, the actual pixel value S5 of the pixel point on the first sub-image closest to (u2, v2), the actual pixel value S6 of the pixel point on the first sub-image closest to (u2, v3), the actual pixel value S7 of the position with coordinates (u3, v2) on the first sub-image, and the actual pixel value S8 of the position with coordinates (u3, v3) on the first sub-image can be determined. After that, a new pixel value (i.e., the interpolation operation result) can be obtained through the interpolation operation on S5, S6, S7, and S8, and this new pixel value can be used as the first pixel value.
[0101] In this implementation manner, by referring to whether there is a second type of position type among a preset number of position types, an appropriate method can be adopted to determine the first pixel value.
[0102] Step 2309: Generate a first reference warped image, and the pixel value of the first position on the first reference warped image is the first pixel value.
[0103] It should be noted that for the first sub-image among multiple sub-images, by executing the above steps 2301, 2303, 2305, 2307, and 2309, a first reference warped image corresponding to the first sub-image can be determined. In a similar manner, multiple reference warped images corresponding to the multiple sub-images one by one can be determined, so as to determine the target warped image accordingly.
[0104] In a specific implementation manner, the image sizes of each reference warped image among the multiple reference warped images and the target warped image are the same, and one of the following two items is satisfied:
[0105] The preset invalid pixel value is the preset minimum pixel value, and the pixel value of the third position on the target warped image is: among the pixel values of the fourth positions corresponding to the third position on each of the multiple reference warped images, the pixel value with the largest numerical value;
[0106] The preset invalid pixel value is the preset maximum pixel value, and the pixel value of the third position on the target warped image is: among the pixel values of the fourth positions corresponding to the third position on each of the multiple reference warped images, the pixel value with the smallest numerical value.
[0107] Here, the preset minimum pixel value can be the minimum value of 8-bit numbers, for example, -128; the preset maximum pixel value can be the maximum value of 8-bit numbers, for example, 127.
[0108] In a specific example, the preset invalid pixel value is -128, the number of reference warped images is 3, and the pixel values of the upper left corners (corresponding to the fourth positions on the reference warped images mentioned above) of the 3 reference warped images are -128, -128, and 50 respectively. Since 50 is greater than -128, the pixel value of the upper left corner (corresponding to the third position on the target warped image mentioned above) of the target warped image can be 50.
[0109] In another specific example, the preset invalid pixel value is 127, the number of reference warped images is 3, and the pixel values of the upper right corners (corresponding to the fourth positions on the reference warped images mentioned above) of the 3 reference warped images are 30, 127, and 127 respectively. Since 30 is less than 127, the pixel value of the upper right corner (corresponding to the third position on the target warped image mentioned above) of the target warped image can be 30.
[0110] In this implementation manner, by setting the preset invalid pixel value to the preset maximum pixel value or the preset minimum pixel value, the accurate pixel values (such as the pixel values obtained through interpolation operations) and the inaccurate pixel values (such as the first pixel value determined when at least one of the preset number of position types is the second position type in the above-mentioned text) can be clearly distinguished, so as to determine the accurate pixel values for the points on the target distorted image, thereby ensuring the accuracy and reliability of the finally obtained target distorted image.
[0111] In the embodiments of the present disclosure, for the first sub-image, based on the affine matrix, the second position mapped to the first position on the first reference distorted image can be determined, and based on the preset number of position types corresponding to the preset number of interpolation points associated with the second position, the first pixel value (the first pixel value may be the preset invalid pixel value or the pixel value obtained through interpolation operations) can be determined in a suitable manner, and the pixel value of the first position on the first reference distorted image is set to the first pixel value. In this way, by integrating the application of the preset invalid pixel value into the process of determining the multiple reference distorted images corresponding to the multiple sub-images one by one, when determining the target distorted image, it can provide a reference for determining the accurate pixel values for the points on the target distorted image, thereby ensuring the accuracy and reliability of the finally obtained target distorted image.
[0112] In Figure 2 Based on the embodiment shown, as Figure 6 shown, step 220 includes step 2201.
[0113] Step 2201: Perform image splitting on the original image along a preset direction to obtain multiple sub-images, and any two adjacent sub-images among the multiple sub-images overlap at least one pixel in the preset direction.
[0114] Optionally, the preset direction can be the image width direction (i.e., the W direction), the image height direction (i.e., the H direction), or any other arbitrarily set direction.
[0115] In the embodiments of the present disclosure, by performing image splitting along the set direction, the original image can be efficiently and quickly split into multiple sub-images. By making any two adjacent sub-images among the multiple sub-images overlap at least one pixel in the preset direction, the 4 points used for interpolation approximation at a certain position (such as the second position) will necessarily appear in a certain sub-image at the same time, and the accurate pixel value corresponding to this position can exist on the reference distorted image corresponding to this sub-image. This is beneficial to ensuring the accuracy and reliability of the finally obtained target distorted image.
[0116] In Figure 2 Based on the embodiment shown, as Figure 7 shown, step 220 includes step 2203 and step 2205.
[0117] Step 2203: Determine the splitting positions on the original image based on the image size supported by the memory.
[0118] Assume that the image size supported by the memory is H1×W1, and the original image is as shown by the Figure 4 feature in the figure. Then, 4 splitting positions, namely C1, C2, C3, and C4, can be determined on the right edge line segment AB in the Figure 4 figure. Based on these 4 splitting positions, AB can be divided into three segments, namely AC2, C1C4, and C3B, where AC2, C1C4, and C3B can all be less than or equal to H1.
[0119] Step 2205: Split the original image according to the splitting positions to obtain multiple sub-images.
[0120] Continuing with the above example, in Step 2205, the original image can be split to obtain 3 sub-images. The right edge line segments of these 3 sub-images are AC2, C1C4, and C3B in sequence. In this way, the image size of each of these 3 sub-images can be less than the maximum image size that the memory can accommodate. And the 3 sub-images obtained by image splitting can be represented as case1, case 2, and case 3 in sequence. Case1 only includes Figure 5-1 part of the Figure 5-2 feature in the figure, case2 only includes Figure 5-3 part of the
[0121] It should be noted that Figure 4 , Figure 5-1 , Figure 5-2 , Figure 5-3 the regions marked with padding (i.e., filling) in the figure are all regions that do not exist in the original image.
[0122] In the embodiments of the present disclosure, the splitting positions on the original image can be reasonably determined with reference to the image size supported by the memory, and further, the image is split according to the splitting positions to obtain multiple sub-images. In this way, the original image can be efficiently and quickly split into multiple sub-images.
[0123] In an optional example, as shown in Figure 8As shown, the original image can be first split into images to obtain three sub-images, which can be part1, part2, and part3 respectively. The image sizes of part1, part2, and part3 can be the same or different, and there can be an overlap at the adjacent positions (i.e., overlapping at least one pixel). Next, based on the affine matrix, the reference distorted image out1 corresponding to part1, the reference distorted image out2 corresponding to part2, and the reference distorted image out3 corresponding to part3 can be determined. Each of out1, out2, and out3 includes a certain number of correct results (e.g., accurate pixel values obtained through interpolation processing) and minimum values (i.e., preset minimum pixel values). After that, by integrating out1, out2, and out3, the pixel maximum value at the corresponding position can be obtained for out1, out2, and out3 (the preset invalid pixel value in the above text is the preset minimum pixel value, and the pixel value at the third position on the target distorted image is: among the pixel values at the fourth positions corresponding to the third position in each of the multiple reference distorted images, the pixel value with the largest numerical value), and the target distorted image output can be determined accordingly.
[0124] Any method for implementing image distortion provided by the embodiments of the present disclosure can be executed by any suitable device with data processing capabilities, including but not limited to: terminal devices, servers, etc. Alternatively, any method for implementing image distortion provided by the embodiments of the present disclosure can be executed by a processor. For example, the processor executes any method for implementing image distortion mentioned in the embodiments of the present disclosure by calling the corresponding instructions stored in the memory. This will not be elaborated further below.
[0125] Exemplary Device
[0126] Figure 9 It is a schematic structural diagram of a device for implementing image distortion provided by an exemplary embodiment of the present disclosure. Figure 9 The device shown includes a first acquisition module 910, a second acquisition module 920, a processing module 930, and a generation module 940.
[0127] The first acquisition module 910 is configured to acquire an original image and an affine matrix for image distortion of the original image;
[0128] The second acquisition module 920 is configured to split the original image acquired by the first acquisition module 910 based on the image size supported by the memory to obtain a plurality of sub-images;
[0129] A processing module 930, configured to load each of the multiple sub-images obtained by the second acquisition module 920 into a memory, and perform image distortion on the sub-image loaded into the memory based on an affine matrix, so as to obtain a reference distorted image of the original image;
[0130] A generation module 940, configured to determine a target distorted image of the original image based on the multiple reference distorted images corresponding to the multiple sub-images obtained by the processing module 930.
[0131] In an optional example, as Figure 10 shown, the processing module 930 includes:
[0132] A processing sub-module 9301, configured to load the first sub-image among the multiple sub-images obtained by the second acquisition module 920 into a memory, and determine a second position mapped to a first position on the to-be-generated first reference distorted image based on the affine matrix acquired by the first acquisition module 910; the first reference distorted image is the reference distorted image corresponding to the first sub-image loaded into the memory among the multiple reference distorted images;
[0133] A first determination sub-module 9303, configured to determine a preset number of interpolation points associated with the second position determined by the processing sub-module 9301;
[0134] A second determination sub-module 9305, configured to respectively determine the position type of each of the preset number of interpolation points determined by the first determination sub-module 9303 with respect to the position of the first sub-image, so as to obtain a preset number of position types;
[0135] A third determination sub-module 9307, configured to determine a first pixel value based on the preset number of position types obtained by the second determination sub-module 9305;
[0136] A generation sub-module 9309, configured to generate a first reference distorted image, where the pixel value of the first position on the first reference distorted image is the first pixel value determined by the third determination sub-module 9307.
[0137] In an optional example, the second determination sub-module 9305 includes:
[0138] A first determination unit, configured to determine that the position type of the first interpolation point determined by the first determination sub-module 9303 with respect to the first sub-image is a first type of position type if the first interpolation point determined by the first determination sub-module 9303 is located on the first sub-image loaded into the memory;
[0139] A second determination unit, configured to determine that the position type of the first interpolation point relative to the first sub-image is a second type of position type if the first interpolation point is not located on the first sub-image loaded into the memory and the first interpolation point is located in the invalid area corresponding to the first sub-image determined based on the target splitting line; wherein, the target splitting line is used to split the first sub-image from the original image.
[0140] A third determination unit, configured to determine that the position type of the first interpolation point relative to the first sub-image is a third type of position type if the first interpolation point is not located on the first sub-image loaded into the memory and the first interpolation point is not located in the invalid area.
[0141] Wherein, the first interpolation point is any one of a preset number of interpolation points.
[0142] In an optional example, the third determination sub-module 9307 includes:
[0143] A fourth determination unit, configured to determine the preset invalid pixel value as the first pixel value if at least one of the position types in the preset number of position types obtained by the second determination sub-module 9305 is the second type of position type.
[0144] A fifth determination unit, configured to determine the reference pixel values corresponding to the preset number of interpolation points respectively, obtain the preset number of reference pixel values, perform interpolation operations based on the preset number of reference pixel values, and determine the first pixel value based on the results of the interpolation operations if all of the position types in the preset number of position types obtained by the second determination sub-module 9305 are position types other than the second type of position type.
[0145] In an optional example, the fifth determination unit includes:
[0146] A first determination sub-unit, configured to use the actual pixel value of the position of the first interpolation point on the first sub-image as the reference pixel value corresponding to the first interpolation point if the position type of the first interpolation point determined by the second determination sub-module 9305 relative to the first sub-image is the first type of position type.
[0147] A second determination sub-unit, configured to use the preset valid pixel value as the reference pixel value corresponding to the first interpolation point, or use the actual pixel value of the pixel point closest to the first interpolation point on the first sub-image as the reference pixel value corresponding to the first interpolation point if the position type of the first interpolation point determined by the second determination sub-module 9305 relative to the first sub-image is the third type of position type.
[0148] In an optional example, each of the multiple reference warped images has the same image size as the target warped image, and one of the following two items is satisfied:
[0149] The preset invalid pixel value is the preset minimum pixel value, and the pixel value at the third position on the target distorted image is: among the pixel values at the fourth positions corresponding to the third position in each of the multiple reference distorted images, the pixel value with the largest numerical value;
[0150] The preset invalid pixel value is the preset maximum pixel value, and the pixel value at the third position on the target distorted image is: among the pixel values at the fourth positions corresponding to the third position in each of the multiple reference distorted images, the pixel value with the smallest numerical value.
[0151] In an alternative example, as Figure 11 shown, the second acquisition module 920 includes:
[0152] A fourth determination sub-module 9201 for determining a preset direction;
[0153] A first splitting sub-module 9203 for splitting the original image acquired by the first acquisition module 910 along the preset direction determined by the fourth determination sub-module 9201 to obtain a plurality of sub-images, and any two adjacent sub-images among the plurality of sub-images overlap at least one pixel in the preset direction.
[0154] In an alternative example, as Figure 12 shown, the second acquisition module 920 includes:
[0155] A fifth determination sub-module 9207 for determining a splitting position on the original image based on the image size supported by the memory;
[0156] A second splitting sub-module 9209 for splitting the original image according to the splitting position determined by the fifth determination sub-module 9207 to obtain a plurality of sub-images.
[0157] Exemplary Electronic Device
[0158] Next, refer to Figure 13 to describe the electronic device according to an embodiment of the present disclosure. The electronic device may be either the first device and / or the second device, or a stand-alone device independent of them, and the stand-alone device may communicate with the first device and the second device to receive the input signals collected by them.
[0159] Figure 13 The block diagram of the electronic device according to an embodiment of the present disclosure is illustrated.
[0160] As Figure 13 shown, the electronic device 1300 includes one or more processors 1310 and a memory 1320.
[0161] The processor 1310 can be a central processing unit (CPU) or other forms of processing units with data processing capabilities and / or instruction execution capabilities, and can control other components in the electronic device 1300 to perform desired functions.
[0162] The memory 1320 can include one or more computer program products, and the computer program products can include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory can include, for example, random access memory (RAM) and / or cache memory, etc. The non-volatile memory can include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions can be stored on the computer-readable storage media, and the processor 1310 can run the program instructions to implement the methods for image distortion and / or other desired functions of the various embodiments of the present disclosure described above. Various contents such as audio data can also be stored in the computer-readable storage media.
[0163] In one example, the electronic device 1300 can further include: an input device 1330 and an output device 1340, and these components are interconnected through a bus system and / or other forms of connection mechanisms (not shown).
[0164] For example, when the electronic device is the first device or the second device, the input device 1330 can be a microphone or a microphone array to input the received human voice data. When the electronic device is a stand-alone device, the input device 13 can be a communication network connector for receiving the collected input signals from the first device and the second device.
[0165] In addition, the input device 1330 can further include, for example, a keyboard, a mouse, etc. The input device 1330 can be used to input song selection information.
[0166] The output device 1340 can output various information to the outside, including the mixed audio etc. mentioned above. The output device 1340 can include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.
[0167] Of course, for simplicity, Figure 13 only some of the components in the electronic device 1300 related to the present disclosure are shown in, and components such as buses, input / output interfaces, etc. are omitted. In addition, according to specific application scenarios, the electronic device 1300 can further include any other appropriate components.
[0168] Exemplary Computer Program Product and Computer Readable Storage Medium
[0169] In addition to the above methods and devices, embodiments of the present disclosure may also be computer program products, which include computer program instructions that, when run on a processor, cause the processor to execute the steps in the methods for implementing image distortion according to various embodiments of the present disclosure described in the above "Exemplary Methods" section of this specification.
[0170] The computer program products can be written in any combination of one or more programming languages for programming code to perform the operations of the embodiments of the present disclosure. The programming languages include object-oriented programming languages such as Java, C++, etc., and also include conventional procedural programming languages such as the "C" language or similar programming languages. The programming code can be executed entirely on the user's computing device, partially on the user's device, executed as an independent software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0171] Furthermore, embodiments of the present disclosure may also be computer-readable storage media, on which computer program instructions are stored that, when run on a processor, cause the processor to execute the steps in the methods for implementing image distortion according to various embodiments of the present disclosure described in the above "Exemplary Methods" section of this specification.
[0172] The computer-readable storage media may adopt any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0173] The basic principles of the present disclosure have been described above in conjunction with specific embodiments. However, it should be noted that the advantages, benefits, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, benefits, effects, etc. are essential for each embodiment of the present disclosure. In addition, the above-disclosed specific details are only for the purposes of illustration and facilitation of understanding, rather than limitations. The above details do not limit the present disclosure to necessarily adopt the above specific details for implementation.
[0174] In this specification, each embodiment is described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. For the same or similar parts among the embodiments, reference can be made to each other. For system embodiments, since they basically correspond to method embodiments, they are described relatively simply. For relevant parts, reference can be made to the corresponding descriptions in the method embodiments.
[0175] The block diagrams of the devices, apparatuses, equipment, and systems involved in this disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any way. Words such as "including", "comprising", "having", etc. are open-ended terms, meaning "including but not limited to", and can be used interchangeably with each other. The word "or" and "and" used herein refer to the word "and / or" and can be used interchangeably with it, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to" and can be used interchangeably with it.
[0176] The methods and apparatuses of this disclosure can be implemented in many ways. For example, the methods and apparatuses of this disclosure can be implemented through software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of the steps for the methods is only for illustration. The steps of the methods of this disclosure are not limited to the specific order described above, unless otherwise specifically stated. In addition, in some embodiments, this disclosure can also be implemented as a program recorded in a recording medium, and these programs include machine-readable instructions for implementing the methods according to this disclosure. Therefore, this disclosure also covers the recording medium storing the programs for executing the methods according to this disclosure.
[0177] It should also be noted that in the apparatuses, equipment, and methods of this disclosure, each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent solutions of this disclosure.
[0178] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be very obvious to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to the broadest scope consistent with the principles and novel features disclosed herein.
[0179] The foregoing description has been presented for purposes of illustration and description. In addition, this description is not intended to limit embodiments of the present disclosure to the form disclosed herein. Although several example aspects and embodiments have been discussed above, those skilled in the art will recognize some variations, modifications, alterations, additions, and subcombinations thereof.
Claims
1. A method for implementing image distortion, comprising: Obtaining an original image and an affine matrix for image distortion of the original image; Based on the memory-supported image size, splitting the original image to obtain a plurality of sub-images; For each sub-image among the plurality of sub-images, loading the sub-image into the memory, and based on the affine matrix, performing image distortion on the sub-image loaded into the memory to obtain a reference distorted image of the original image; Based on the plurality of reference distorted images corresponding to the plurality of sub-images, determining a target distorted image of the original image; The step of, for each sub-image among the plurality of sub-images, loading the sub-image into the memory, and based on the affine matrix, performing image distortion on the sub-image loaded into the memory to obtain a reference distorted image of the original image, includes: For a first sub-image among the plurality of sub-images, loading the first sub-image into the memory, and based on the affine matrix, determining a second position mapped to a first position on a to-be-generated first reference distorted image; the first reference distorted image is the reference distorted image corresponding to the first sub-image loaded into the memory among the plurality of reference distorted images; Determining a preset number of interpolation points associated with the second position; Respectively determining the position type of each interpolation point among the preset number of interpolation points relative to the position of the first sub-image to obtain a preset number of position types; Based on the preset number of position types, determining a first pixel value; Generating the first reference distorted image, where the pixel value at the first position on the first reference distorted image is the first pixel value.
2. The method according to claim 1, wherein, The step of respectively determining the position type of each interpolation point among the preset number of interpolation points relative to the position of the first sub-image includes: If a first interpolation point is located on the first sub-image loaded into the memory, determining that the position type of the first interpolation point relative to the first sub-image is a first type of position type; If the first interpolation point is not located on the first sub-image loaded into the memory, and the first interpolation point is located in an invalid area corresponding to the first sub-image determined based on a target splitting line, determining that the position type of the first interpolation point relative to the first sub-image is a second type of position type; wherein, the target splitting line is used to split the first sub-image from the original image; If the first interpolation point is not located on the first sub-image loaded into the memory, and the first interpolation point is not located in the invalid area, determining that the position type of the first interpolation point relative to the first sub-image is a third type of position type; Wherein, the first interpolation point is any interpolation point among the preset number of interpolation points.
3. The method according to claim 2, wherein, The step of, based on the preset number of position types, determining a first pixel value, includes: If at least one of the preset number of position types is the second type of position type, determining a preset invalid pixel value as the first pixel value; If all of the preset number of position types are position types other than the second type of position type, determine the reference pixel values corresponding to the preset number of interpolation points respectively, obtain the preset number of reference pixel values, perform an interpolation operation based on the preset number of reference pixel values, and determine a first pixel value based on the result of the interpolation operation.
4. The method according to claim 3, wherein, The determining the reference pixel values corresponding to the preset number of interpolation points respectively includes: If the position of the first interpolation point relative to the position type of the first sub-image is the first type of position type, use the actual pixel value of the position of the first interpolation point on the first sub-image as the reference pixel value corresponding to the first interpolation point; If the position of the first interpolation point relative to the position type of the first sub-image is the third type of position type, use a preset valid pixel value as the reference pixel value corresponding to the first interpolation point, or use the actual pixel value of the pixel point on the first sub-image that is closest to the first interpolation point as the reference pixel value corresponding to the first interpolation point.
5. The method according to claim 3 or 4, wherein, Each of the multiple reference warped images has the same image size as the target warped image, and one of the following two items is satisfied: The preset invalid pixel value is the preset minimum pixel value, and the pixel value of the third position on the target warped image is: the pixel value with the largest value among the pixel values of the fourth positions corresponding to the third position in each of the multiple reference warped images; The preset invalid pixel value is the preset maximum pixel value, and the pixel value of the third position on the target warped image is: the pixel value with the smallest value among the pixel values of the fourth positions corresponding to the third position in each of the multiple reference warped images.
6. The method according to claim 1, wherein The splitting the original image into multiple sub-images includes: Split the original image along a preset direction to obtain multiple sub-images, and any two adjacent sub-images among the multiple sub-images overlap at least one pixel in the preset direction.
7. The method according to claim 1, wherein The splitting the original image into multiple sub-images based on the image size supported by the memory includes: Determine the splitting positions on the original image based on the image size supported by the memory; Split the original image according to the splitting positions to obtain multiple sub-images.
8. An apparatus for implementing image warping, comprising: A first acquisition module, configured to acquire an original image and an affine matrix for image warping of the original image; A second acquisition module, configured to split the original image acquired by the first acquisition module into multiple sub-images based on the image size supported by the memory; A processing module, configured to, for each of the multiple sub-images obtained by the second acquisition module, load the sub-image into the memory, and warp the sub-image loaded into the memory based on the affine matrix to obtain a reference warped image of the original image; A generation module, configured to determine a target warped image of the original image based on the multiple reference warped images corresponding to the multiple sub-images obtained by the processing module; The processing module includes: A processing sub-module, configured to load a first sub-image among the multiple sub-images obtained by the second acquisition module into a memory, and determine a second position mapped to a first position on a first reference warped image to be generated based on the affine matrix acquired by the first acquisition module; the first reference warped image is the reference warped image corresponding to the first sub-image loaded into the memory among the multiple reference warped images; A first determination sub-module, configured to determine a preset number of interpolation points associated with the second position determined by the processing sub-module; A second determination sub-module, configured to respectively determine the position type of each of the preset number of interpolation points determined by the first determination sub-module relative to the position of the first sub-image, to obtain a preset number of position types; A third determination sub-module, configured to determine a first pixel value based on the preset number of position types obtained by the second determination sub-module; A generation sub-module, configured to generate the first reference warped image, where the pixel value at the first position on the first reference warped image is the first pixel value determined by the third determination sub-module.
9. A computer-readable storage medium storing a computer program for executing the method for image warping according to any one of claims 1-7 above.
10. An electronic device, the electronic device includes: A processor; A memory for storing executable instructions of the processor; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the method for image warping according to any one of claims 1-7 above.
Citation Information
Patent Citations
Road sign recognition method and device based on region of interest and storage medium
CN112560708A
Image processing method, image processing device, electronic equipment and storage medium
CN114387165A