Image definition improving method and device, electronic equipment and program product
By aligning the images from the phase detection image sensor, determining the optimal relative position offset, and performing pixel fusion, the problem of image blurring in the out-of-focus state is solved, and image clarity is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- RDA MICROELECTRONICS SHANGHAICO LTD
- Filing Date
- 2026-01-13
- Publication Date
- 2026-05-19
AI Technical Summary
In a defocused state, during the image synthesis process of an image sensor with full-pixel phase difference detection, there is a natural misalignment between the scene texture information recorded by the original image data of the left phase and the original image data of the right phase. This results in the synthesized image having blurred texture and lost details, failing to meet the user's demand for a clear image.
By acquiring a first phase image and a second phase image from a phase detection image sensor, the optimal relative position offset between the two is determined, and the target image is generated based on this image alignment. Specific steps include calculating the image content difference within a preset translation range, selecting the offset that minimizes the difference, and performing pixel alignment and fusion.
It improves the sharpness of images in out-of-focus conditions, generating sharper target images than traditional methods, and ensuring minimal differences in image content.
Smart Images

Figure CN122069441A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a method, apparatus, electronic device, and program product for improving image sharpness. Background Technology
[0002] Currently, image sensors with full-pixel phase difference detection have become the mainstream configuration for various focusing devices and are widely used in products such as mobile phone cameras, digital cameras, and drone cameras. These sensors synchronously collect scene light signals through two independent pixel units, left phase and right phase, to provide raw data support for image generation.
[0003] Currently, image synthesis for phase detection image sensors mainly involves directly overlaying the raw left-phase and raw right-phase image data at the same coordinate position to generate the raw image data for backend display. In out-of-focus scenes, light passing through the lens creates signals with slight parallax on the left-phase and right-phase pixel units. This causes the scene texture information recorded in the raw left-phase and raw right-phase image data to not correspond perfectly, resulting in a natural misalignment. Consequently, the synthesized raw image data suffers from texture blurring and loss of detail, failing to meet the user's core requirement for a clear image in out-of-focus conditions.
[0004] Therefore, there is an urgent need to provide an image sharpness improvement method that can solve the problem of blurring after the original left and right phase images of a phase detection image sensor are synthesized, thereby improving image sharpness. Summary of the Invention
[0005] This application provides a method, apparatus, electronic device, and program product for improving image sharpness.
[0006] In a first aspect, this application provides a method for improving image sharpness, including: Acquire the first and second phase images from the phase detection image sensor; Determine the optimal relative position offset between the first phase image and the second phase image; Based on the optimal relative position offset, the first phase image and the second phase image are aligned, and the target image is generated.
[0007] In some embodiments, the first phase image and the second phase image are the left phase image and the right phase image, respectively.
[0008] In some embodiments, the optimal relative position offset is the offset at which the difference in image content between the first phase image and the second phase image is minimized.
[0009] In some embodiments, determining the optimal relative position offset between the first phase image and the second phase image includes: Using the first phase image as a reference, the second phase image is translated within a preset translation range; Calculate the difference in image content between the second phase image and the first phase image at each translation position; Based on the calculated differences in the content of each image, the optimal relative position offset is determined.
[0010] In some embodiments, the image content difference is determined by calculating the sum of the absolute differences between the first phase image and the second phase image.
[0011] In some embodiments, aligning the first phase image with the second phase image based on an optimal relative position offset and generating a target image includes: Adjust the pixel coordinates of the second phase image based on the optimal relative position offset; The second phase image, after coordinate adjustment, is added to the pixel values at the corresponding coordinates in the first phase image to generate the target image.
[0012] Secondly, this application provides an image sharpness enhancement device, comprising: The image acquisition module is configured to acquire a first phase image and a second phase image from a phase detection image sensor; The offset determination module is configured to determine the optimal relative position offset between the first phase image and the second phase image. The image processing module is configured to align the first phase image and the second phase image based on the optimal relative position offset, and generate the target image.
[0013] In some embodiments, the offset determination module includes: The image translation submodule is configured to translate the second phase image within a preset translation range, based on the first phase image. The difference calculation submodule is configured to calculate the difference in image content between the second phase image and the first phase image at each translation position. The offset selection submodule is configured to determine the optimal relative position offset based on the calculated differences in the content of each image.
[0014] Thirdly, this application provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to implement any of the image sharpness improvement methods.
[0015] Fourthly, this application provides a computer program product, including a computer-readable storage medium on which a computer program is stored, wherein the computer program, when executed by a processor, implements any of the methods for improving image sharpness.
[0016] The at least one technical solution employed in this application can achieve the following beneficial effects: by calculating the image content difference of the dual-phase image output by the phase detection image sensor under different relative offsets, the optimal relative position offset that minimizes the image content difference is found, and the two images are aligned and pixel-fused accordingly. This solution, through the processing order of alignment followed by fusion, ensures that the dual-phase image used for synthesis in the out-of-focus state is in a state of minimum image content difference, thereby generating a target image with higher clarity than traditional methods. Therefore, compared to traditional methods that directly synthesize without this alignment processing, this solution can effectively improve the clarity of the target image generated in the out-of-focus state.
[0017] It should be understood that both the foregoing general description and the following detailed description are exemplary and intended to provide further illustration of the claimed technology. Attached Figure Description
[0018] The above and other objects, features, and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain this application and do not constitute a limitation thereof. In the accompanying drawings, the same reference numerals generally represent the same components or steps.
[0019] Figure 1 This illustration schematically shows an overall process diagram of an image sharpness improvement method according to an embodiment of this application; Figure 2 This illustration schematically shows a process for determining the optimal relative position offset in an image sharpness enhancement method according to an embodiment of this application. Figure 3 This illustration schematically shows a target image generation process of an image sharpness enhancement method according to an embodiment of this application; Figure 4 This illustration schematically shows an overall structural diagram of an image sharpness enhancement device according to an embodiment of this application; Figure 5 This illustration schematically shows a structural diagram of an offset determination module of an image sharpness enhancement device according to an embodiment of this application; Figure 6 An exemplary block diagram of a computer program product of an image sharpness improvement method according to an embodiment of this application is shown schematically.
[0020] In the diagram: 401, Image Acquisition Module; 402, Offset Determination Module; 403, Image Processing Module; 404, Image Translation Submodule; 405, Difference Calculation Submodule; 406, Offset Selection Submodule; 601, Computer Program. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this application more apparent, exemplary embodiments according to this application will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments of this application. It should be understood that this application is not limited to the exemplary embodiments described herein.
[0022] Figure 1 The illustration shows an overall flowchart of an image sharpness improvement method according to an embodiment of this application.
[0023] like Figure 1 As shown, the steps are as follows: S101, acquire the first phase image and the second phase image acquired by the phase detection image sensor. Specifically, synchronously read the two raw image data generated at the same exposure time from the phase detection image sensor, namely the first phase image and the second phase image. The first phase image and the second phase image are acquired by pixel units with different light-sensing directions in the phase detection image sensor, respectively, and record the phase information with slight parallax in the same scene.
[0024] In a preferred embodiment, the first phase image is a left-phase original image, and the second phase image is a right-phase original image, both generated by an image sensor with full-pixel phase difference detection capability. The pixel array of the phase detection image sensor employs an alternating layout of left-phase and right-phase pixels, with the light-sensing directions of the left and right phase pixels symmetrically arranged horizontally. This ensures that the two phase pixels can synchronously receive light signals from the same scene, guaranteeing the temporal consistency between the first and second phase images.
[0025] Preferably, each effective pixel unit of the phase detection image sensor integrates independent left and right phase sensing sub-units. The light receiving paths of the two sensing sub-units are parallel and the spacing is fixed, which can capture subtle parallax information of the scene.
[0026] In a preferred embodiment, the raw data of both the first phase image and the second phase image are stored in an uncompressed format with a bit depth of 10 bits, 12 bits or 14 bits, corresponding to the RAW10, RAW12 or RAW14 standard formats, respectively, in order to maximize the preservation of the dynamic range of the optical signal.
[0027] S102, determine the optimal relative position offset between the first phase image and the second phase image. Specifically, evaluate the content matching degree between the first phase image and the second phase image under different relative offsets. Quantify the content matching degree by calculating the image content difference between the first phase image and the second phase image under different offsets. From all evaluated offsets, select the offset that minimizes the content difference between the first phase image and the second phase image, and determine this offset as the optimal relative position offset.
[0028] In a preferred embodiment, the image content difference is calculated using an absolute difference summation algorithm, and the translation range is limited to the horizontal direction. , This is an adjustable positive integer, and the offset has a quantitative relationship with the lens defocus, as shown in Formula 1: Δx = k × Δd (Formula 1) in, k This represents the pixel offset per unit of out-of-focus distance, in pixels per second. mm Specifically k = 1 / ( p × ),in p For the pixel size of the phase detection image sensor, The focal length of the lens; Δd This is the actual defocus distance, in units of mm For example, if the pixel size of the phase detection image sensor... p = 1.4 μm Lens focal length = 5 mm ,but k = 1 / (1.4 × 10 -3 mm × 5 mm )≈142.86 pixels / mm ,when Δd = 0.02 mm hour, Δx ≈ 142.86 pixels / mm × 0.02 mm ≈ 2.86 pixels, therefore The value is usually 3 to 5 pixels, which can completely cover the offset range in most actual out-of-focus scenarios, so as to ensure the effectiveness of subsequent translation and alignment operations.
[0029] S103: Based on the optimal relative position offset, the first phase image and the second phase image are aligned, and a target image is generated. Based on the obtained optimal relative position offset, the pixel coordinates of the second phase image are translated to align it spatially with the first phase image. Then, the pixel values at the same coordinate position in the first and second phase images after coordinate alignment are added point by point to generate and output the target image.
[0030] Figure 2 The illustration shows a schematic diagram of the process for determining the optimal relative position offset in an image sharpness improvement method according to an embodiment of this application.
[0031] like Figure 2 As shown, the steps are as follows: S201, using the first phase image as a reference, the second phase image is translated within a preset translation range. Specifically, the first phase image is fixed as a reference, and within the preset translation range, for example, in the horizontal direction... , The second phase image is translated sequentially using a positive integer set according to experience or scenario requirements, with a step size of one pixel.
[0032] In a preferred embodiment, the translation is only in the horizontal direction, with no vertical offset. This is determined by the hardware design characteristics of the phase detection image sensor, where the left and right phase pixels are separated only in the horizontal direction, and there is no parallax difference in the vertical direction, thus eliminating the need for additional vertical translation. For example, within the preset translation range... The value is calculated using Formula 2, specifically: (Formula 2) in, Lens focal length, unit: mm , This is the angle of maximum parallax, typically ranging from 0.03° to 0.05°. ° It can be adjusted according to needs. p The pixel size of the phase detection image sensor, in units of μm , ceil () is the floor function.
[0033] Taking common mobile phone camera parameters as an example, select the lens focal length. = 5 mm , = 0.03°、 p = 1.4 μm Substitute the values into the formula to perform the calculation: First, Convert to radians, 0.03° × ≈0.0005236 radians, then calculate the value of the numerator. × = 5 mm × 0.0005236 ≈ 0.002618 mm After conversion, it becomes 2.618. μm , divided by p = 1.4 μm The value is approximately 1.87, after rounding up. ceil () after processing = 2. If the product is a digital camera, and the requirement for out-of-focus coverage is higher, you can select... = 0.04°, with other parameters remaining unchanged, the calculation yields = ceil ( 5 × 0.04 × ÷ 0.0014 )= ceil (0.00349 / 0.0014)≈ceil(2.49)=3. By setting appropriately... Parameters that can be adapted to different products. Value requirements.
[0034] S202, for each translation position of the second phase image, calculate the image content difference degree between it and the first phase image. Specifically, for each translation position, calculate the image content difference degree between the second phase image and the first phase image at that position. In one embodiment, the image content difference degree is obtained by calculating the sum of the absolute values of the differences between the pixel values of all corresponding pixels in the second phase image and the first phase image. The smaller the sum of the absolute values of the pixel value differences, the smaller the image content difference degree.
[0035] In a preferred embodiment, the degree of difference is calculated using the absolute difference summation algorithm, as shown in Formula 3: (Formula 3) in, w Image width, in pixels. h Image height, in pixels. L ( x , y ) is the first phase image at coordinates ( x , y The pixel value at () R ( x + Δx , y (After translation) Δx The second phase image after that is in coordinates ( x , yThe pixel value at () is used. Formula 3 reflects the degree of texture misalignment by calculating the sum of the absolute values of the differences between corresponding pixel values in the first phase image and the second phase image. The smaller the sum of the absolute differences, the higher the texture overlap between the first phase image and the second phase image, and the smaller the misalignment deviation.
[0036] In a preferred embodiment, optimization processing is performed by block calculation, which uniformly divides the image into small blocks of 16×16 or 32×32. The sum of the absolute differences of multiple small blocks is processed simultaneously by GPU parallel computing, and finally the sum of the absolute differences of the whole is obtained, so as to accelerate the calculation process of the sum of absolute differences.
[0037] In a preferred embodiment, optimization is performed by skipping invalid pixels when... L ( x , y )or R ( x + Δx A value of 0 for y indicates a dead pixel, or 2 indicates a dead pixel. N -1 represents an overexposed pixel. N If the bit depth is low, the pixel is not included in the calculation to avoid abnormal pixels interfering with the difference judgment.
[0038] In a preferred embodiment, optimization is achieved through edge processing. x + Δx If the image exceeds the width range, the edge copying rule is used, and the boundary pixel values are used in the calculation to ensure the accuracy of the difference calculation in the image edge area.
[0039] S203, determine the translation position with the minimum image content difference from all calculated image content difference degrees. Specifically, compare all obtained image content difference degrees, select the smallest image content difference degree, and determine the translation position of the second phase image corresponding to that image content difference degree as the translation position with the minimum image content difference degree.
[0040] In a preferred embodiment, the minimum image content difference and its corresponding translation position are determined by iterative comparison. For example, the image content difference corresponding to each translation position is compared with the minimum value recorded at the current position in turn, and the minimum difference record and its corresponding translation position are updated when the current value is smaller, until all translation positions have been traversed.
[0041] In a preferred embodiment, if multiple translation positions correspond to image content with the same or similar differences, a predetermined decision rule can be used to select the final translation position. For example, a position with zero translation can be preferentially selected to maintain the natural alignment of the image; or, in a continuous frame processing scenario, the position closest to the translation used in the previous frame can be selected to maintain inter-frame stability and avoid visual jitter caused by abrupt changes in translation.
[0042] In a preferred embodiment, to improve the robustness of the translation position selection, outlier filtering can be performed on the calculated set of image content differences before determining the minimum difference. For example, a reasonable range is set based on the statistical characteristics of the set, such as the mean and standard deviation; difference values that significantly deviate from this range are considered outliers and excluded; then, the minimum difference and its corresponding translation position are determined based on the remaining valid difference values.
[0043] S204, the translation position where the image content difference is minimized is determined as the optimal relative position offset. Specifically, the translation position where the image content difference is minimized is determined as the optimal relative position offset between the first phase image and the second phase image.
[0044] Figure 3 The illustration shows a schematic diagram of the target image generation process of an image sharpness improvement method according to an embodiment of the present application.
[0045] like Figure 3 As shown, the steps are as follows: S301, adjust the pixel coordinates of the second phase image according to the optimal relative position offset. Specifically, perform a translation transformation on the pixel coordinates of the second phase image according to the optimal relative position offset, so that the second phase image is spatially aligned with the first phase image.
[0046] Specifically, using the pixel coordinate system of the first phase image as the reference coordinate system, for any original coordinate in the second phase image... The pixel, its target coordinates after translation transformation Determined by the following formula: (Formula 4) (Formula 5) in, The optimal relative position offset determined in the preceding steps has a range of values. , This is a preset positive integer, in pixels.
[0047] , These are the horizontal coordinates of the pixels in the second phase image before and after translation. , These are the vertical coordinates before and after the translation.
[0048] Based on the hardware structure characteristics of the phase detection image sensor, the left and right phase pixels are only separated in the horizontal direction, and no parallax occurs in the vertical direction. Therefore, the vertical coordinates do not need to be translated; only the horizontal coordinates need to be translated to eliminate the misalignment between the two images. At that time, the second phase image shifts horizontally to the left. 1 pixel; when At that time, the second phase image shifts horizontally to the right. 1 pixel; when When the two images are in a natural alignment state, no additional translation operation is needed.
[0049] It should be noted that the above-described method of translating the second phase image based on the first phase image is merely an exemplary embodiment, and this application is not limited thereto. In other embodiments, the first phase image can also be translated horizontally within a preset translation range using the second phase image as a reference, and the same calculation logic can be used to calculate the sum of the absolute differences between the two images after each translation to determine the image content difference. The translation position that minimizes the image content difference is then selected as the optimal relative position offset. The principles and implementation effects of the two reference selection methods are completely consistent; only the correspondence between the translated object and the reference is reversed. Both methods can achieve precise alignment of the two phase images, thereby improving the clarity of the target image.
[0050] S302, the second phase image after coordinate adjustment is added to the pixel value at the corresponding coordinate in the first phase image. Specifically, the pixel value of each pixel in the second phase image after coordinate adjustment is added to the pixel value at the corresponding coordinate position in the first phase image.
[0051] In a preferred embodiment, the coordinate adjustment employs pixel translation transformation, and the fusion method involves adding the corresponding pixel values and then normalizing them to avoid pixel value overflow, as shown in Formula 6: (Formula 6) in, P ( x , y ) is the target image at coordinates ( x , y The pixel value at () L ( x , y ) represents the pixel values of the first phase image. R' ( x , y() represents the second phase image pixel value after coordinate adjustment. This normalization scheme is applicable to most common scenarios.
[0052] For high dynamic range scenarios, a truncated normalization scheme is used, as shown in Equation 7: (Formula 7) in N For the original image bit depth, in a 10-bit bit depth scenario, 2 N -1=1023, when L ( x , y = 1000 R' ( x , y When ) = 1000, the result after stacking is 2000, and after truncation, it is retained as 1023, ensuring the integrity of details in the bright areas.
[0053] S303, output the synthesized image as the target image. Specifically, the target image is generated and output based on the pixel values at each coordinate position obtained by adding the pixel values at corresponding coordinates of the first phase image and the second phase image.
[0054] Figure 4 The illustration shows a schematic diagram of the overall structure of an image sharpness enhancement device according to an embodiment of this application.
[0055] like Figure 4 As shown, the device includes an image acquisition module 401, an offset determination module 402, and an image processing module 403.
[0056] The image acquisition module 401 is configured to synchronously acquire a first phase image and a second phase image generated at the same exposure time from the phase detection image sensor; wherein the first phase image and the second phase image are respectively the left phase original image and the right phase original image acquired by pixel units with different light-sensing directions in the phase detection image sensor.
[0057] The offset determination module 402 is configured to determine the optimal relative position offset that minimizes the difference in image content by evaluating the difference between the first phase image and the second phase image under different relative offsets.
[0058] The image processing module 403 is configured to translate the second phase image by pixel coordinates according to the optimal relative position offset, so that it is spatially aligned with the first phase image, and to fuse the pixel values of corresponding coordinates in the aligned two images to generate and output the target image.
[0059] Figure 5The diagram illustrates a schematic representation of the offset determination module structure of an image sharpness enhancement device according to an embodiment of this application.
[0060] like Figure 5 As shown, the offset determination module 402 includes an image translation submodule 404, a difference calculation submodule 405, and an offset selection submodule 406.
[0061] The image translation submodule 404 is configured to translate the second phase image horizontally within a preset translation range, using the first phase image as a reference, with a step size of pixels.
[0062] The difference calculation submodule 405 is configured to calculate the image content difference between the second phase image and the first phase image for each translation position, wherein the image content difference is obtained by calculating the sum of the absolute differences of corresponding pixels in the two images.
[0063] The offset selection submodule 406 is configured to select the translation position that minimizes the image content difference based on the calculated image content difference degree corresponding to each translation position, and determine the translation amount corresponding to this translation position as the optimal relative position offset.
[0064] Figure 6 An exemplary block diagram of a computer program product of an image sharpness improvement method according to an embodiment of this application is shown schematically.
[0065] like Figure 6 As shown, the computer program product stores a computer program 601, which, when executed by a processor, implements the method provided in any embodiment of this application.
[0066] The basic principles of this application have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this application are merely examples and not limitations, and should not be considered as essential features of each embodiment of this application. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the application to the necessity of employing the aforementioned specific details for implementation.
[0067] The block diagrams of devices, apparatuses, devices, and systems involved in this application are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.
[0068] Additionally, as used herein, the "or" used in a list of items beginning with "at least one" indicates a separate list, such that a list of, for example, "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not imply that the described example is preferred or better than other examples.
[0069] It should also be noted that in the system and method of this application, the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered as equivalent solutions of this application.
[0070] Various changes, substitutions, and modifications can be made to the technology described herein without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of this application is not limited to the specific aspects of the processes, machines, manufacturing, events, means, methods, and actions described above. Currently existing or later-developed processes, machines, manufacturing, events, means, methods, or actions that perform substantially the same function or achieve substantially the same result as the corresponding aspects described above can be utilized. Therefore, the appended claims include such processes, machines, manufacturing, events, means, methods, or actions within their scope.
[0071] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this application. Various modifications to these aspects will be readily apparent 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 application. Therefore, this application is not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0072] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this application to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.
Claims
1. A method for improving image sharpness, characterized in that, include: Acquire the first and second phase images from the phase detection image sensor; Determine the optimal relative position offset between the first phase image and the second phase image; Based on the optimal relative position offset, the first phase image and the second phase image are aligned, and a target image is generated.
2. The image sharpness improvement method as described in claim 1, characterized in that, The first phase image and the second phase image are the left phase image and the right phase image, respectively.
3. The image sharpness improvement method as described in claim 1, characterized in that, The optimal relative position offset is the offset at which the difference in image content between the first phase image and the second phase image is minimized.
4. The image sharpness improvement method as described in claim 3, characterized in that, Determining the optimal relative position offset between the first phase image and the second phase image includes: Using the first phase image as a reference, the second phase image is translated within a preset translation range; Calculate the image content difference between the second phase image and the first phase image at each translation position; Based on the calculated differences in the content of each image, the optimal relative position offset is determined.
5. The image sharpness improvement method as described in claim 4, characterized in that, The image content difference is determined by calculating the sum of the absolute differences between the first phase image and the second phase image.
6. The image sharpness improvement method as described in claim 1, characterized in that, Based on the optimal relative position offset, the first phase image and the second phase image are aligned, and a target image is generated, including: Adjust the pixel coordinates of the second phase image according to the optimal relative position offset; The second phase image, after coordinate adjustment, is added to the pixel value at the corresponding coordinate in the first phase image to generate the target image.
7. An image sharpness enhancement device, characterized in that, include: The image acquisition module is configured to acquire a first phase image and a second phase image from a phase detection image sensor; The offset determination module is configured to determine the optimal relative position offset between the first phase image and the second phase image. The image processing module is configured to align the first phase image and the second phase image based on the optimal relative position offset, and generate a target image.
8. The image sharpness enhancement device as described in claim 7, characterized in that, The offset determination module includes: The image translation submodule is configured to translate the second phase image within a preset translation range, based on the first phase image; The difference calculation submodule is configured to calculate the image content difference between the second phase image and the first phase image at each translation position; The offset selection submodule is configured to determine the optimal relative position offset based on the calculated differences in the content of each of the images.
9. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the image sharpness improvement method according to any one of claims 1 to 6.
10. A computer program product comprising a computer-readable storage medium on which a computer program is stored, characterized in that, When the computer program is executed by a processor, it implements the image sharpness improvement method according to any one of claims 1 to 6.