Image contrast enhancement method, head-mounted display device and computer readable storage medium
By performing multi-level processing and weighted merging of images, the problems of noise amplification and detail loss during image contrast improvement in the prior art are solved, and the image quality is maintained while improving contrast.
Patent Information
- Application Number
- CN202510259583.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-05
- Publication Date
- 2025-07-18
AI Technical Summary
The prior art is difficult to neither amplify noise nor retain detailed information in the process of improving image contrast, resulting in a degradation of image quality.
By extracting at least three frequency band details layers of the input image in turn, performing histogram equalization and interpolation processing, combining global contrast enhancement, and finally weighting the band details layer and image blocks, fusing the enhanced detail layer to generate the target image.
While improving image contrast, it effectively limits noise increase, reduces loss of detailed information, achieves the best balance between image noise amplification and retains detailed information, and improves the overall image quality.
Smart Images

Figure CN120339144A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of display devices, and particularly to an image contrast enhancement method, a head-mounted display device, and a computer-readable storage medium. Background Art
[0002] Currently, head-mounted display devices such as VR (Virtual Reality) devices and AR (Augmented Reality) devices need to present high-quality video images in order to bring users an immersive visual experience. The high quality of video images mainly focuses on the presentation of aspects such as the contrast, color, and details of video images. Among them, the contrast of video images has become the most critical link in the presentation of high-quality images. Currently, there are various methods for enhancing the contrast of video images in the industry. For example, the most basic histogram equalization, dynamic contrast enhancement (DCE), etc. However, each of them has its own advantages and disadvantages, and it is difficult to ensure that while enhancing the image contrast, it can also avoid the amplification of image noise as much as possible and reduce the loss of detail information to ensure the overall image quality.
[0003] That is, in the process of enhancing the image contrast of a display device, it is difficult to achieve the best balance between image noise amplification and retaining detail information. Summary of the Invention
[0004] The main purpose of the present application is to provide an image contrast enhancement method, a head-mounted display device, and a computer-readable storage medium, aiming to solve the technical problem that it is difficult to achieve the best balance between image noise amplification and retaining detail information in the process of enhancing the image contrast of a display device.
[0005] To achieve the above object, the present application provides an image contrast enhancement method, and the method includes: Sequentially extract at least three frequency band detail layers of an input image, where the frequency bands of each frequency band detail layer are different; Divide the base layer image corresponding to the input image into multiple first image blocks, and perform histogram equalization processing on each first image block to obtain each second image block; Based on the brightness values and distances of the image blocks adjacent to each second image block, perform interpolation processing on the brightness values of each pixel point of each second image block to obtain each third image block; Merge each of the third image blocks to obtain a fourth image, and perform global contrast enhancement processing on the fourth image to obtain a fifth image; Perform weighted merging on the at least three frequency band detail layers to obtain an enhanced detail layer, and fuse the fifth image with the enhanced detail layer to obtain a target image.
[0006] In one embodiment, the step of sequentially extracting at least three frequency band detail layers of the input image includes: Sequentially extracting at least three frequency band detail layers of the input image through at least three edge-preserving filters; Wherein, the number of the extracted frequency band detail layers corresponds to the number of the edge-preserving filters, and the smoothing coefficients of each edge-preserving filter for filtering are different.
[0007] In one embodiment, the step of sequentially extracting at least three frequency band detail layers of the input image through at least three bilateral filters includes: Based on a first bilateral filter, filtering the input image to obtain a first filtered image, and extracting a first frequency band detail layer based on the first filtered image; Based on a second bilateral filter, filtering the first filtered image to obtain a second filtered image, and extracting a second frequency band detail layer based on the second filtered image, wherein the frequency band of the first frequency band detail layer is higher than that of the second frequency band detail layer; Based on a third bilateral filter, filtering the second filtered image to obtain a third filtered image, and extracting a third frequency band detail layer based on the third filtered image, wherein the frequency band of the second frequency band detail layer is higher than that of the third frequency band detail layer, and the base layer image is the third filtered image.
[0008] In one embodiment, the step of extracting a first frequency band detail layer based on the first filtered image includes: Subtracting the first filtered image from the input image to obtain a first frequency band detail layer; The step of extracting a second frequency band detail layer based on the second filtered image includes: Subtracting the second filtered image from the first filtered image to obtain a second frequency band detail layer; The step of extracting a third frequency band detail layer based on the third filtered image includes: Subtracting the third filtered image from the second filtered image to obtain a third frequency band detail layer.
[0009] In one embodiment, the step of weighted-combining the at least three frequency band detail layers to obtain an enhanced detail layer includes: Adding the first frequency band detail layer with a first preset weight, the second frequency band detail layer with a second preset weight, and the third frequency band detail layer with a third preset weight to obtain an enhanced detail layer.
[0010] In one embodiment, after the step of performing global contrast enhancement processing on the fourth image to obtain a fifth image, the method further includes: Detect the eye gaze direction of the wearer, and determine the region of interest of the wearer with respect to the fifth image according to the eye gaze direction; Obtain the luminance mapping curve corresponding to the fifth image, and determine the gray level difference between the first gray level information and the second gray level information in the luminance mapping curve, where the first gray level information is the gray level information of a first pixel block, the first pixel block is located in the region of interest, the second gray level information is the gray level information of a second pixel block, and the first pixel block and the second pixel block are adjacent; If the gray level difference is less than the first visibility threshold corresponding to the first gray level information, determine whether there is insufficient contrast enhancement for the first pixel block; If there is insufficient contrast enhancement for the first pixel block, adjust the brightness enhancement coefficient of the first pixel block, and perform local contrast enhancement processing on the first pixel block based on the brightness enhancement coefficient to obtain an updated fifth image.
[0011] In one embodiment, determining whether there is insufficient contrast enhancement for the first pixel block includes: Determine the contrast enhancement value of the first pixel block; If the contrast enhancement value is less than the second visibility threshold corresponding to the first gray level information, determine that there is insufficient contrast enhancement for the first pixel block.
[0012] In one embodiment, the step of adjusting the brightness enhancement coefficient of the first pixel block includes: Obtain the brightness enhancement coefficient threshold corresponding to the second visibility threshold; Adjust the brightness enhancement coefficient of the first pixel block to the brightness enhancement coefficient threshold.
[0013] In one embodiment, after the step of determining the gray level difference between the first gray level information and the second gray level information in the luminance mapping curve, the method further includes: If the gray level difference is greater than or equal to the first visibility threshold corresponding to the first gray level information, determine that there is over-enhanced contrast for the first pixel block; If there is over-enhanced contrast for the first pixel block, adjust the luminance mapping curve according to the first visibility threshold, and based on the adjusted luminance mapping curve, perform global contrast enhancement processing on the fourth image again to obtain an updated fifth image.
[0014] In one embodiment, successively extracting at least three frequency band detail layers of the input image includes: Based on the RGB data of each pixel point of the input image, determine the brightness data of each pixel point; Based on the brightness data of each pixel point, sequentially extract at least three frequency band detail layers of the input image.
[0015] In addition, to achieve the above object, the present application further provides a head-mounted display device, where the head-mounted display device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the computer program is executed by the processor, it implements the image contrast enhancement method as described above.
[0016] In addition, to achieve the above object, the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the image contrast enhancement method as described above.
[0017] The embodiments of the present application provide an image contrast enhancement method, a head-mounted display device, and a computer-readable storage medium. The technical solution of the embodiments of the present application is to sequentially extract at least three frequency band detail layers of the input image, where the frequency bands of each frequency band detail layer are different. Divide the base layer image corresponding to the input image into multiple first image blocks, and perform histogram equalization processing on each first image block to obtain each second image block. Then, based on the brightness values and distances of the adjacent image blocks corresponding to each second image block, perform interpolation processing on the brightness values of each pixel point of each second image block to obtain each third image block. Merge each third image block to obtain a fourth image, and perform global contrast enhancement processing on the fourth image to obtain a fifth image. Then, perform weighted merging on the at least three frequency band detail layers to obtain an enhanced detail layer, and fuse the fifth image and the enhanced detail layer to obtain a target image, so that the embodiments of the present application combine different contrast enhancement methods, and the contrast enhancement scale ranges from pixel level to image block level to global level, optimizing the contrast in each dimension and scale of the display device. In addition, the contrast enhancement method used in the embodiments of the present application improves the image contrast from multiple dimensions, including the image detail dimension and the image histogram dimension, ensuring better contrast effects in each dimension. And in the contrast enhancement at the image block level and the global level in the embodiments of the present application, by performing contrast enhancement on the base layer (that is, sequentially extracting at least three frequency band detail layers of the input image, where the frequency bands of each frequency band detail layer are different, which is convenient for subsequent output after fusing the fifth image with the enhanced detail layer), the increase of noise is effectively limited. Therefore, the embodiments of the present application can maximize the image contrast while minimizing the amplification of image noise and reducing the loss of detail information to ensure the overall image quality. Furthermore, in the process of enhancing the image contrast of the display device, an optimal balance between image noise amplification and retaining detail information is effectively achieved.
[0018] It is worth mentioning that the embodiments of the present application can improve the contrast in multiple dimensions and scales, and are more suitable for improving the clarity / contrast of head-mounted display devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings herein are incorporated into and constitute a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required for use in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on the structures shown in these drawings.
[0021] Figure 1 Schematic flow chart provided for the first embodiment of the image contrast enhancement method of the present application; Figure 2 Schematic flow chart provided for the second embodiment of the image contrast enhancement method of the present application; Figure 3 Schematic flow chart provided for the third embodiment of the image contrast enhancement method of the present application; Figure 4 Schematic flow chart of the contrast enhancement method in a specific embodiment of the present application; Figure 5 Schematic architecture diagram of pixel-level contrast enhancement in a specific embodiment of the present application; Figure 6 Schematic flow chart of image block-level contrast enhancement in a specific embodiment of the present application; Figure 7 Schematic scene diagram of image block-level contrast enhancement in a specific embodiment of the present application; Figure 8 Schematic flow chart of global-level contrast enhancement in a specific embodiment of the present application; Figure 9 Schematic device structure diagram of the hardware operating environment involved in the image contrast enhancement method of the embodiments of the present application.
[0022] The realization of the purpose, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0023] Exemplary embodiments will be described in detail herein, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0024] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not used to limit the present application.
[0025] Traditional image contrast enhancement methods, such as histogram equalization, dynamic contrast enhancement, etc., although they can significantly improve the overall contrast of the image, they generally do not distinguish between useful information and noise in the image. While increasing the contrast, they will also amplify the noise in the image or introduce new artifacts, resulting in a decrease in image quality. In addition, this global operation method is also prone to ignoring the local details of the image, making some important structural features in the image smoothed or lost.
[0026] In response to this, the main solution of the embodiments of the present application is an image contrast enhancement method, including: sequentially extracting at least three frequency band detail layers of an input image, where the frequency bands of each frequency band detail layer are different; dividing the base layer image corresponding to the input image into a plurality of first image blocks, and performing histogram equalization processing on each of the first image blocks to obtain each second image block; based on the brightness values and distances of the image blocks adjacent to each of the second image blocks, performing interpolation processing on the brightness values of each pixel point of each of the second image blocks to obtain each third image block; merging each of the third image blocks to obtain a fourth image, and performing global contrast enhancement processing on the fourth image to obtain a fifth image; performing weighted merging on the at least three frequency band detail layers to obtain an enhanced detail layer, and fusing the fifth image and the enhanced detail layer to obtain a target image.
[0027] In the embodiments of the present application, by combining different contrast enhancement methods, the contrast enhancement scale ranges from the pixel level to the image block level and then to the global level, optimizing the contrast in all dimensions and scales of the display device. In addition, the contrast enhancement methods used in the embodiments of the present application improve the image contrast from multiple dimensions, including the image detail dimension and the image histogram dimension, ensuring better contrast effects in all dimensions. Moreover, in the contrast enhancement at the image block level and the global level, by performing contrast enhancement in the base layer (that is, sequentially extracting at least three frequency band detail layers of the input image, where the frequency bands of each frequency band detail layer are different, facilitating subsequent output after fusing the enhanced detail layer with the fifth image), the increase in noise is effectively limited. As a result, the embodiments of the present application can maximize the improvement of image contrast while minimizing image noise amplification and reducing the loss of detail information to ensure the overall image quality. Furthermore, in the process of improving the image contrast of the display device, an optimal balance is effectively achieved between image noise amplification and retaining detail information.
[0028] It is worth mentioning that the embodiments of the present application can enhance the contrast in multiple dimensions and scales, and are more suitable for improving the clarity / contrast of head-mounted display devices.
[0029] It should be noted that the method disclosed in the embodiments of the present application is applicable to display devices, such as head-mounted display devices, and may include, but are not limited to, devices such as MR (Mixed Reality) devices (such as MR glasses, MR helmets), AR (Augmented Reality) devices (such as AR glasses, AR helmets), VR (Virtual Reality) devices (such as VR glasses, VR helmets), XR (Extended Reality) devices (such as XR glasses, XR helmets), or any head-mounted display device capable of implementing the above functions. The embodiments of the present application do not make specific limitations in this regard. Hereinafter, taking the application to a head-mounted display device as an example, the following embodiments of the present application will be described.
[0030] To better understand the technical solution of the present application, the following will be described in detail in conjunction with the accompanying drawings of the specification and specific implementation manners.
[0031] The present application proposes an image contrast enhancement method for the first embodiment.
[0032] Please refer to Figure 1 , Figure 1 which is a schematic flowchart provided for the first embodiment of the image contrast enhancement method of the present application.
[0033] In this embodiment, the image contrast enhancement method is applied to a head-mounted display device, and may include steps S100 to S500: Step S100: successively extract at least three frequency band detail layers of the input image, where the frequency bands of each frequency band detail layer are different; It should be noted that the frequency band detail layer refers to the image layer of a specific frequency range (i.e., the frequency band) extracted from the input image. Between different frequency band detail layers, the frequency bands (i.e., the frequency ranges) are different, and each frequency band detail layer represents the detail information of the input image at a certain scale.
[0034] In this embodiment, at least three frequency band detail layers with different frequency bands can be separated from the input image through algorithms such as wavelet transform and Laplacian pyramid, or at least three frequency band detail layers with different frequency bands can be extracted from the input image through edge-preserving filters with different smoothing coefficients.
[0035] In the first feasible implementation manner, the step of successively extracting at least three frequency band detail layers of the input image in step S100 may include steps S110 to S120: Step S110: Based on the RGB data of each pixel point of the input image, determine the brightness data of each pixel point; It should be noted that RGB (Red-Green-Blue) data refers to the color information of pixel points in an image, which consists of three color channels: red, green, and blue. The brightness data refers to a single value representation calculated from the RGB data through a certain conversion formula, representing the gray level.
[0036] In this implementation manner, converting the RGB data of each pixel point in the input image into brightness data can effectively reduce the computational complexity of image processing, thereby simplifying subsequent operations.
[0037] Step S120: Based on the brightness data of each pixel point, successively extract at least three frequency band detail layers of the input image.
[0038] In this implementation manner, after calculating the brightness data of each pixel point in the input image through step S110, at least three frequency band detail layers with different frequency ranges (different frequency ranges mean different frequency bands) can be separated from the input image through algorithms such as wavelet transform and Laplacian pyramid based on this brightness data, so as to facilitate subsequent contrast enhancement processing at different scales.
[0039] It can be understood that in addition to extracting the frequency band detail layer based on the brightness data, the frequency band detail layer can also be directly extracted based on the RGB data.
[0040] In the second feasible implementation manner, the step of sequentially extracting at least three frequency band detail layers of the input image in step S100 may further include step S130: Step S130, sequentially extracting at least three frequency band detail layers of the input image through at least three edge-preserving filters; Wherein, the number of the extracted frequency band detail layers corresponds to the number of the edge-preserving filters, and the smoothing coefficients for filtering by each edge-preserving filter are different.
[0041] As known to those skilled in the art, an edge-preserving filter is a filter that can keep the edges clear while smoothing the image, mainly including bilateral filters, guided filters, weighted least squares filters, etc., and is suitable for removing noise without destroying the image structure.
[0042] In this implementation manner, the input image can be processed through at least three edge-preserving filters with different smoothing coefficients, so as to extract at least three frequency band detail layers of different frequency ranges of the input image. Compared with the first feasible implementation manner, the method of extracting frequency band detail layers by using edge-preserving filters in this implementation manner can remove the noise in the frequency band detail layers while extracting the frequency band detail layers, and can retain the important edge information of the image to the greatest extent, which helps to achieve the best balance between image noise amplification and detail information retention, thereby improving the contrast and detail expressiveness of the final output image.
[0043] It should be noted that in this implementation manner, the filtering results of each edge-preserving filter for processing the input image can be obtained through parallel processing, and then the input image is subtracted from each filtering result to obtain multiple frequency band detail layers of different frequency ranges. It can also be processed step by step. First, the input image is processed through the edge-preserving filter with the largest smoothing coefficient, and then the input image is subtracted from the filtering result corresponding to the edge-preserving filter with the largest smoothing coefficient (i.e., the subsequent first filtered image) to obtain the frequency band detail layer with the highest frequency. Then, the filtering result corresponding to the edge-preserving filter with the largest smoothing coefficient is processed through the edge-preserving filter with the second largest smoothing coefficient. Subsequently, the filtering result corresponding to the edge-preserving filter with the largest smoothing coefficient is subtracted from the filtering result corresponding to the edge-preserving filter with the second largest smoothing coefficient (i.e., the subsequent second filtered image) to obtain the frequency band detail layer with the second highest frequency, and so on until the frequency band detail layer with the lowest frequency is obtained, so as to obtain multiple frequency band detail layers of different frequency ranges.
[0044] It should be particularly noted that in this implementation manner, edge-preserving filters such as bilateral filters can be applied to extract frequency band detail layers based on RGB data, or edge-preserving filters such as bilateral filters can be applied to extract frequency band detail layers based on luminance data. This implementation manner does not make specific restrictions on this.
[0045] Step S200: Divide the base layer image corresponding to the input image into multiple first image blocks, and perform histogram equalization processing on each first image block to obtain each second image block; As known to those skilled in the art, histogram equalization processing is an image processing technique that enhances image contrast by adjusting the brightness distribution of the image. Specifically, it redistributes the frequency of image pixel values to make the brightness distribution of the image more uniform.
[0046] It should be noted that in this embodiment, the base layer image refers to the low-frequency part of the input image, the first image block refers to the image block obtained by dividing the base layer image into image blocks, and the second image block refers to the image block whose image contrast is enhanced after the first image block undergoes histogram equalization processing. In this embodiment, after dividing the base layer image corresponding to the input image into multiple first image blocks, histogram equalization processing is performed on each first image block, so as to enhance the contrast at the image block level and obtain second image blocks with higher contrast.
[0047] It should be especially noted that the contrast enhancement at the image block level in this embodiment is achieved on the base layer image, which can effectively prevent the increase of image noise during the process of contrast enhancement at the image block level, so as to achieve the best balance between image noise amplification and preservation of detail information during the process of enhancing image contrast.
[0048] Step S300: Based on the brightness values and distances of the image blocks adjacent to each second image block, perform interpolation processing on the brightness values of each pixel point of each second image block to obtain each third image block; It should be noted that the third image block refers to the image block with more uniform brightness after the brightness values of each pixel point in the second image block undergo interpolation processing.
[0049] In this embodiment, first determine the other image blocks (or other second image blocks) adjacent to each second image block, and then perform interpolation processing on the brightness values of each pixel point of each second image block based on the brightness values and distances of the adjacent other image blocks to obtain each third image block.
[0050] After the image contrast enhancement is completed at the image block level in this embodiment, considering that during the process of contrast enhancement, while the image noise is amplified, some detail information will also be lost. Therefore, through interpolation algorithms such as bilinear interpolation and bicubic interpolation, the luminance values of each second image block are interpolated using adjacent image blocks, thereby smoothing the image noise over-amplified by histogram equalization to retain more detail information. At the same time, the luminance transition between adjacent image blocks becomes smoother, avoiding obvious luminance jumps, and thus making the final output image look more natural and unified.
[0051] Step S400: Merge each third image block to obtain a fourth image, and perform global contrast enhancement processing on the fourth image to obtain a fifth image. It should be noted that the fourth image is a complete image formed by merging all the third image blocks. Global contrast enhancement processing means performing contrast enhancement with the entire complete image as a unit. The fifth image is an image that has good contrast and visual effects at the global scale after the fourth image undergoes global contrast enhancement processing.
[0052] After completing the contrast enhancement at the image block level in this embodiment, as well as the smoothing between the image noise amplification and detail information retention at the image block level, by merging the third image blocks, the overall structure and content of the image are restored to ensure that the image remains complete at the macroscopic level. Thus, through global contrast enhancement processing, global (also known as image-level) contrast enhancement is achieved, improving the overall visibility and quality of the image, so that the final output image not only has good contrast and detail performance locally, but also has high quality and consistency as a whole, ensuring that the final output image has good contrast and visual effects at both the local (image block level) and global (image level) scales.
[0053] It should be particularly noted that the image-level contrast enhancement in this embodiment is achieved based on the base-layer image, which can effectively prevent the increase in image noise during the image-level contrast enhancement process, thereby achieving the best balance between image noise amplification and detail information retention during the process of enhancing the image contrast.
[0054] Step S500: Weightedly merge at least three frequency band detail layers to obtain an enhanced detail layer, and fuse the fifth image with the enhanced detail layer to obtain a target image.
[0055] It should be noted that the enhanced detail layer is a detail layer obtained by weightedly merging the at least three frequency band detail layers with preset weight coefficients. Through the weighted merging with preset weight coefficients, the enhanced detail layer achieves pixel-level contrast enhancement.
[0056] It should also be noted that the target image refers to the image that realizes contrast enhancement at the pixel, image patch, and image scales after the enhanced detail layer is fused with the fifth image.
[0057] It should be particularly noted that in this embodiment, when the at least three frequency band detail layers are extracted based on RGB data, the target image can be the final output image, that is, the image after the input image realizes contrast enhancement at the pixel, image patch, and image scales. When the at least three frequency band detail layers are extracted based on luminance data, the input image can be contrast-enhanced according to the ratio of the luminance data of the target image to the luminance data of the input image, so as to obtain the final output image.
[0058] In this embodiment, by weighted combining multiple frequency band detail layers, the detail information of the image at different frequency bands can be effectively enhanced, so as to realize contrast enhancement at the pixel level and achieve a better contrast effect in the image detail dimension. At the same time, by fusing the fifth image with the enhanced detail layer, this embodiment can also highlight the detail information at the pixel level while maintaining the overall contrast and local contrast, so that the final output image not only has a good overall contrast, but also can show rich detail information at each scale. Furthermore, in the process of improving the image contrast of the display device, the best balance between image noise amplification and detail information retention can be achieved.
[0059] In this embodiment, by combining different contrast enhancement methods, the contrast enhancement scale ranges from the pixel level to the image patch level and then to the global level, optimizing the contrast at each dimension and scale of the head-mounted display device. In addition, the contrast enhancement method used in this application embodiment improves the image contrast from multiple dimensions, including the image detail dimension and the image histogram dimension, ensuring a better contrast effect in each dimension. And in the contrast enhancement at the image patch level and the global level, by performing contrast enhancement on the base layer (that is, sequentially extracting at least three frequency band detail layers of the input image, where the frequency bands of each frequency band detail layer are different, which is convenient for the subsequent fifth image to fuse with the enhanced detail layer and then output), the increase in noise is effectively limited. Therefore, this application embodiment can not only maximize the image contrast, but also avoid image noise amplification as much as possible and reduce the loss of detail information to ensure the overall image quality. Furthermore, in the process of improving the image contrast of the display device, the best balance between image noise amplification and detail information retention can be effectively achieved.
[0060] It is worth mentioning that this embodiment can improve the contrast at multiple dimensions and scales, and is more suitable for improving the clarity / contrast of the head-mounted display device.
[0061] Based on the above first embodiment, an image contrast enhancement method according to the second embodiment of the present application is proposed.
[0062] In the second embodiment of the present application, for the content that is the same as or similar to the above embodiment, reference can be made to the above introduction and will not be repeated hereinafter.
[0063] Please refer to Figure 2 , Figure 2 which is a schematic flowchart provided for the second embodiment of the image contrast enhancement method of the present application.
[0064] In this embodiment, step S130 extracts at least three frequency band detail layers of the input image through at least three edge-preserving filters, which may include steps S131 to S133: Step S131, filter the input image based on the first bilateral filter to obtain a first filtered image, and extract a first frequency band detail layer based on the first filtered image; Step S132, filter the first filtered image based on the second bilateral filter to obtain a second filtered image, and extract a second frequency band detail layer based on the second filtered image, where the frequency band of the first frequency band detail layer is higher than that of the second frequency band detail layer; Step S133, filter the second filtered image based on the third bilateral filter to obtain a third filtered image, and extract a third frequency band detail layer based on the third filtered image, where the frequency band of the second frequency band detail layer is higher than that of the third frequency band detail layer, and the base layer image is the third filtered image.
[0065] It should be noted that in this embodiment, the at least three edge-preserving filters are composed of three bilateral filters configured with different smoothing coefficients, namely the first bilateral filter, the second bilateral filter, and the third bilateral filter, where the smoothing coefficient configured by the first bilateral filter is greater than the smoothing coefficient configured by the second bilateral filter, and the smoothing coefficient configured by the second bilateral filter is greater than the smoothing coefficient configured by the third bilateral filter.
[0066] In this embodiment, through a step-by-step processing method, the input image is first filtered by a first bilateral filter with the largest smoothing coefficient to remove the high-frequency components in the input image, and the filtering result corresponding to the first bilateral filter, that is, the first filtered image, is obtained. Then, the first filtered image is filtered by a second bilateral filter with the second largest smoothing coefficient to remove the intermediate-frequency components in the first filtered image, and the filtering result corresponding to the second bilateral filter, that is, the second filtered image, is obtained. Finally, the second filtered image is filtered by a third bilateral filter with the smallest smoothing coefficient to remove the low-frequency components in the second filtered image, and the filtering result corresponding to the third bilateral filter, that is, the third filtered image, is obtained. Thus, by subtracting the input image from the first filtered image, the detail layer of the input image in the high-frequency band, that is, the first frequency band detail layer, is extracted. By subtracting the first filtered image from the second filtered image, the detail layer of the input image in the intermediate-frequency band, that is, the second frequency band detail layer, is extracted. And by subtracting the second filtered image from the third filtered image, the detail layer of the input image in the low-frequency band, that is, the third frequency band detail layer, is extracted.
[0067] Specifically, the step of extracting the first frequency band detail layer based on the first filtered image in step S131 may include step A10: Step A10, subtract the first filtered image from the input image to obtain the first frequency band detail layer; The step of extracting the second frequency band detail layer based on the second filtered image in step S132 may include step B10: Step B10, subtract the second filtered image from the first filtered image to obtain the second frequency band detail layer; The step of extracting the third frequency band detail layer based on the third filtered image in step S133 may include step C10: Step C10, subtract the third filtered image from the second filtered image to obtain the third frequency band detail layer.
[0068] In this embodiment, by gradually applying bilateral filters to extract the detail layers of each frequency band, the input image can be effectively decomposed into multiple levels with different frequency ranges, thereby capturing the features of the input image at different scales and achieving more comprehensive image analysis and processing.
[0069] In this embodiment, the filter with a larger smoothing coefficient first removes most of the noise and high-frequency details, and then gradually reduces the smoothing coefficient to retain more detail information. This strategy can maximize the retention of the important features of the image while removing noise.
[0070] Finally, by weighted combining these detail layers of different frequency bands, this embodiment can obtain a high-quality, detail-rich and less noisy enhanced detail layer with contrast enhancement achieved at the pixel level.
[0071] Further, in a feasible implementation, the step of obtaining the enhanced detail layer by weighted combination of at least three frequency band detail layers in step S500 may further include step S510: Step S510, adding the first frequency band detail layer with a first preset weight, the second frequency band detail layer with a second preset weight, and the third frequency band detail layer with a third preset weight to obtain the enhanced detail layer.
[0072] It should be noted that the first preset weight is a weight coefficient preset for the first frequency band detail layer, used to adjust the proportion of the first frequency band detail layer in pixel-level contrast enhancement. The second preset weight is a weight coefficient preset for the second frequency band detail layer, used to adjust the proportion of the second frequency band detail layer in pixel-level contrast enhancement. The third preset weight is a weight coefficient preset for the third frequency band detail layer, used to adjust the proportion of the third frequency band detail layer in pixel-level contrast enhancement.
[0073] Exemplarily, the first preset weight, the second preset weight, and the third weight are all greater than 1, so as to achieve the effect of enhancing the detail layers of each frequency band, and it is determined that the image detail layers of each frequency band can be presented to the user more clearly.
[0074] In this implementation, by presetting the corresponding weight coefficients for the frequency band detail layers of each frequency band, the corresponding weight coefficients are directly applied to weight the frequency band detail layers of each frequency band in actual application, and the weighted frequency band detail layers of each frequency band are combined to obtain the enhanced detail layer, thereby completing the contrast enhancement at the pixel level, so that the final output image can bring a good visual experience to the wearer at the pixel scale.
[0075] Based on the above embodiments, the image contrast enhancement method of the third embodiment of the present application is proposed.
[0076] In the third embodiment of the present application, the same or similar content as the above embodiments can be referred to the above introduction and will not be repeated hereinafter.
[0077] Please refer to Figure 3 , Figure 3 which is the flowchart provided for the third embodiment of the image contrast enhancement method of the present application.
[0078] In this embodiment, after the step of globally enhancing the contrast of the fourth image to obtain the fifth image in step S400, the image contrast enhancement method may further include steps S600 to S900: Step S600, detecting the eye gaze direction of the wearer and determining the region of interest of the wearer for the fifth image according to the eye gaze direction; It should be noted that the eye gaze direction refers to the direction that the eyes of the wearer look at when using the head-mounted display device, and this eye gaze direction can be detected by an eye tracking technology. The region of interest refers to the region that the wearer may be interested in in the fifth image under this eye gaze direction.
[0079] Step S700: Obtain the brightness mapping curve corresponding to the fifth image, and determine the gray level difference between the first gray level information and the second gray level information in the brightness mapping curve. Here, the first gray level information is the gray level information of the first pixel block, the first pixel block is located in the region of interest, the second gray level information is the gray level information of the second pixel block, and the first pixel block and the second pixel block are adjacent. It should be noted that the brightness mapping curve is a curve used to reflect the brightness of each pixel point in the image. The gray level information refers to the gray level, that is, the brightness, and the gray level difference refers to the difference in gray levels, that is, the difference in brightness.
[0080] In this embodiment, the brightness mapping curve can be drawn or fitted by obtaining the brightness data of each pixel point in the fifth image.
[0081] It should also be noted that in this embodiment, taking pixel blocks as units, one pixel block can be selected from the region of interest as the first pixel block, and then one or more adjacent pixel blocks thereof can be used as the second pixel blocks. Thus, according to the brightness mapping curve, the first gray level information corresponding to the first pixel block and the second gray level information corresponding to the second pixel block can be obtained. Then, by the gray level difference between the first gray level information and the second gray level information, it can be determined whether there may be a phenomenon of insufficient contrast enhancement in the first pixel block. So as to, when the contrast enhancement of the first pixel block is insufficient, perform local contrast enhancement processing on the first pixel block, thereby improving the contrast of the first pixel block and ensuring that the image contrast in the region of interest of the wearer is high enough.
[0082] Step S800: If the gray level difference is less than the first visibility threshold corresponding to the first gray level information, determine whether there is insufficient contrast enhancement in the first pixel block. Among them, there is a first mapping relationship between the first gray level information and the first visibility threshold. In this first mapping relationship, different first gray level information maps to different first visibility thresholds.
[0083] It should be noted that the first visibility threshold is a preset brightness threshold, which is used to determine whether the gray level difference between adjacent pixel blocks is significant enough to ensure good visual visibility. Through this first visibility threshold, this embodiment can determine whether there may be a phenomenon of excessive contrast enhancement in the first pixel block.
[0084] This embodiment selects pixel blocks from the region of interest in sequence as the first pixel block, and then compares the grayscale difference with the visibility threshold, so as to accurately detect which pixel blocks in the region of interest may have the problem of insufficient contrast enhancement, thereby performing targeted local contrast enhancement processing, improving the overall visual quality of the region of interest, and investing the limited computing resources of the head-mounted display device in the place that can most affect the wearer's visual experience.
[0085] Specifically, in a feasible implementation manner, the step of determining whether the contrast enhancement of the first pixel block is insufficient in step S800 may include steps S810 to S820: Step S810, determining a contrast enhancement value of a first pixel block; It should be noted that the contrast enhancement value refers to the brightness of the first pixel block in the fifth image, compared with the brightness enhancement in the input image.
[0086] In this embodiment, the brightness of the first pixel block in the fifth image and the brightness of the first pixel block in the input image may be obtained, and then the two brightnesses may be subtracted to obtain the contrast enhancement value.
[0087] Step S820: If the contrast enhancement value is less than the second visibility threshold corresponding to the first grayscale information, it is determined that the contrast enhancement of the first pixel block is insufficient.
[0088] The first grayscale information and the second visibility threshold have a second mapping relationship, in which different second grayscale information are mapped to different second visibility thresholds. It should be noted that the first mapping relationship is different from the second mapping relationship, and the first visibility threshold mapped to the same second grayscale information is greater than the second visibility threshold. For example, if the first visibility threshold mapped to the second grayscale information A is a, and the second visibility threshold mapped to the second grayscale information A is b, then a is greater than b.
[0089] In this embodiment, the second visibility threshold is a preset brightness threshold, which is used to determine whether the contrast enhancement degree of the pixel block is significant enough to ensure good visual visibility. Through the second visibility threshold, this embodiment can further determine whether the first pixel block has a problem of insufficient contrast enhancement, thereby determining whether it is necessary to perform local contrast enhancement processing on the area.
[0090] Step S900: If the contrast enhancement of the first pixel block is insufficient, the brightness enhancement coefficient of the first pixel block is adjusted, and local contrast enhancement processing is performed on the first pixel block based on the brightness enhancement coefficient to obtain an updated fifth image.
[0091] It should be noted that the brightness enhancement coefficient is a parameter used to adjust the brightness of a specific area in an image, and local contrast enhancement processing refers to performing contrast enhancement processing on a specific area in the image.
[0092] After determining that there is a problem of insufficient contrast enhancement in the first pixel block in this embodiment, the local contrast of the first pixel block in the fifth image can be enhanced by adjusting the brightness enhancement coefficient of the first pixel block, so as to obtain an updated fifth image with stronger contrast at the first pixel block, ensuring that there is no problem of insufficient contrast enhancement in the region of interest, and ensuring that the image has a sufficiently high clarity in the area where the wearer's eyes are looking, thus bringing a better visual experience to the wearer.
[0093] Specifically, in a feasible implementation manner, the step of adjusting the brightness enhancement coefficient of the first pixel block in step S900 may include steps S910 to S920: Step S910, obtaining the brightness enhancement coefficient threshold corresponding to the second visibility threshold; In one embodiment, there is a mapping relationship between the second visibility threshold and the brightness enhancement coefficient threshold, and different second visibility thresholds map to different brightness enhancement coefficient thresholds.
[0094] It should be noted that the brightness enhancement coefficient threshold is a preset value used to ensure that there is no problem of insufficient contrast enhancement after the pixel block undergoes local contrast enhancement processing.
[0095] Step S920, adjusting the brightness enhancement coefficient of the first pixel block to the brightness enhancement coefficient threshold.
[0096] In this implementation manner, by presetting a corresponding brightness enhancement coefficient threshold for each second visibility threshold, when there is a problem of excessive contrast enhancement in the first pixel block, the brightness enhancement coefficient of the first pixel block is adjusted to the preset brightness enhancement coefficient threshold for local contrast enhancement processing, thereby ensuring that the contrast of the first pixel block in the updated fifth image is high enough.
[0097] Furthermore, in a feasible implementation manner, after the step of determining the gray level difference between the first gray level information and the second gray level information in the brightness mapping curve in step S600, the image contrast enhancement method may further include steps D10 to D20: Step D10, if the gray level difference is greater than or equal to the first visibility threshold corresponding to the first gray level information, it is determined that there is excessive contrast enhancement in the first pixel block; Step D20: If there is excessive contrast enhancement in the first pixel block, adjust the brightness mapping curve according to the first visibility threshold, and based on the adjusted brightness mapping curve, perform global contrast enhancement processing on the fourth image again to obtain an updated fifth image.
[0098] In this embodiment, the first visibility threshold is also used to determine whether there is a problem of excessive contrast enhancement in the pixel block. When the gray level difference between the pixel block and its adjacent pixels is greater than or equal to the corresponding first visibility threshold, it indicates that there is a problem of excessive contrast enhancement in the pixel block.
[0099] In this embodiment, the first visibility threshold is used to detect whether there is a problem of excessive contrast enhancement in the first pixel block. When it is determined that the first pixel block has this problem, the brightness mapping curve is adjusted according to the first visibility threshold to ensure that in the adjusted brightness mapping curve, the gray level difference between the gray level information of the first pixel block and the gray level information of the second pixel block is less than the first visibility threshold. Then, based on the adjusted brightness mapping curve, global contrast enhancement processing is performed on the fourth image again to obtain an updated fifth image.
[0100] Exemplarily, the gray level difference between the first gray level information and the second gray level information in the adjusted brightness mapping curve can be made less than the first visibility threshold. Specifically, the gray level difference between the first gray level information and the second gray level information in the adjusted brightness mapping curve can be made equal to the first visibility threshold.
[0101] It should be specifically noted that when solving the problems of insufficient contrast enhancement and / or excessive contrast enhancement in the first pixel block in the region of interest in this embodiment, the pixel blocks in the region of interest are sequentially selected as the first pixel block in units of pixel blocks to ensure that in the finally obtained fifth image, none of the pixel blocks in the region of interest have the above problems.
[0102] To facilitate understanding of the technical concept or technical principle of the above embodiments of the image contrast enhancement method of the present application, a specific embodiment is given: In this specific embodiment, through the effective combination of multi-dimensional local contrast enhancement and global contrast enhancement algorithms, the contrast of the input image is ensured at multiple dimensions and scales. First, through the combination of different contrast enhancement methods in this specific embodiment, the contrast enhancement scale ranges from the pixel level to the image block level and then to the global level, ensuring the contrast optimization at each image scale. Second, the contrast enhancement methods used in this specific embodiment improve the image contrast from multiple dimensions, including the image detail dimension and the image histogram dimension, ensuring better contrast effects at each dimension. Finally, in this specific embodiment, during the contrast enhancement at the image block level and the global level, the increase of image noise is effectively restricted by performing contrast enhancement at the base layer. The image contrast enhancement method provided by this specific embodiment can improve the contrast at multiple dimensions and scales, and is more suitable for improving the clarity / contrast of near-eye display devices.
[0103] As Figure 4 shown, the process of this specific embodiment is as follows: Step S11, input RGB; In this specific embodiment, first, the RGB data of each pixel point in the input image is obtained to facilitate subsequent contrast enhancement.
[0104] Step S12, brightness calculation; In this specific embodiment, the brightness data Y is calculated from the RGB data. One method for calculating brightness is: ; where R represents the pixel value of the pixel point on the red channel, G represents the pixel value of the pixel point on the green channel, B represents the pixel value of the pixel point on the blue channel, and blend is a preset weight wiping ability used to balance the weighted average of the pixel values of the pixel point on the red, green, and blue channels and the maximum pixel value of the pixel point on the red, green, and blue channels (i.e., )'s influence on the final brightness data Y.
[0105] That is, based on the RGB data of each pixel point of the input image, the brightness data of each pixel point is determined.
[0106] Step S13, pixel-level contrast enhancement; In this specific embodiment, based on the brightness data Y, pixel-level contrast enhancement is performed.
[0107] As Figure 5As shown, first, in this specific embodiment, multiple (e.g., 3 times) edge-preserving filters (including but not limited to edge-preserving filters such as bilateral filters, guided filters, weighted least squares filters, etc.) are used to successively extract multiple frequency band detail layers of the luminance data Y. That is, at least three edge-preserving filters are used to successively extract at least three frequency band detail layers of the input image.
[0108] Exemplarily, a bilateral filter can be used for edge-preserving filtering, and the specific formula is as follows: ; ; ; ; where x is the coordinate of the current pixel point, Ω is the processing window centered on the current pixel point, x i is the coordinate of the pixel point in Ω, I(x) is the luminance data corresponding to x in the input image, I(x i ) is the luminance data corresponding to x i in the input image, I f (x) is the luminance data corresponding to x in the filtered image, I f (x i ) is the luminance data corresponding to x i in the filtered image, W p refers to the weight between x and x i , f r is the kernel function for calculating the luminance weight, σ r is the smoothing parameter in f r ; g s is the kernel function for calculating the distance weight, σ d is the smoothing parameter in g s .
[0109] In this specific embodiment, the luminance data Y of each pixel point in the input image can be filtered three times with a bilateral filter, and three different smoothing coefficients are set to successively obtain three smoothed base layers Y0, Y1, and Y2. Among them, Y0 is the filtered image (i.e., the first filtered image) obtained by filtering Y with the bilateral filter with the largest smoothing coefficient (i.e., the first bilateral filter), and can be expressed by the following formula: ; Y1 is the filtered image (i.e., the second filtered image) obtained by filtering Y0 with the bilateral filter with the second largest smoothing coefficient (i.e., the second bilateral filter), and can be expressed by the following formula: ; Y2 is a filtered image (i.e., the third filtered image) obtained by filtering Y1 with a bilateral filter having the smallest smoothing coefficient (i.e., the third bilateral filter), and can be expressed by the following formula: ; Subsequently, the high-frequency first band detail layer can be extracted by the formula ; and the intermediate-frequency second band detail layer can be extracted by the formula ; and the low-frequency third band detail layer can be extracted by the formula ; .
[0110] That is, based on the first bilateral filter, the input image is filtered to obtain the first filtered image, and the input image is subtracted from the first filtered image to obtain the first band detail layer; based on the second bilateral filter, the first filtered image is filtered to obtain the second filtered image, and the first filtered image is subtracted from the second filtered image to obtain the second band detail layer, where the frequency band of the first band detail layer is higher than that of the second band detail layer; based on the third bilateral filter, the second filtered image is filtered to obtain the third filtered image, and the second filtered image is subtracted from the third filtered image to obtain the third band detail layer, where the frequency band of the second band detail layer is higher than that of the third band detail layer.
[0111] Next, this specific embodiment presets three enhancement gain coefficients Gain1 (i.e., the first preset weight), Gain2 (i.e., the second preset weight), and Gain3 (i.e., the third preset weight), which are used to control the contrast enhancement intensity of the high, middle, and low three frequency bands. Finally, the detail layers of each frequency band are merged to obtain the total enhanced detail layer D, and the formula is as follows: ; That is, the first band detail layer with the first preset weight, the second band detail layer with the second preset weight, and the third band detail layer with the third preset weight are added together to obtain the enhanced detail layer.
[0112] Step S14, image block-level contrast enhancement; In this specific embodiment, on the last basic layer Y2 after filtering in the above step S13, image block-level contrast enhancement is performed. Performing image block-level contrast enhancement on the basic layer can effectively prevent noise amplification.
[0113] Specifically, as Figure 6 and Figure 7As shown, in this specific embodiment, the image corresponding to Y2 (i.e., the base layer image) is first divided into M*N image blocks (i.e., the first image blocks). For each image block, its block histogram is statistically calculated, and a certain truncation is performed on the upper end of the block histogram to control the intensity of contrast enhancement. Subsequently, the block cumulative histogram is calculated on the truncated block histogram as the block mapping curve corresponding to each image block. That is, the base layer image corresponding to the input image is divided into multiple first image blocks, and histogram equalization processing is performed on each first image block to obtain each second image block.
[0114] Finally, to prevent the image block effect from occurring when each image block separately applies its own block mapping curve, when processing each image block, the block mapping curves of adjacent multiple image blocks are also fused according to the distance, and finally the base layer data (i.e., the brightness data of each pixel point in each third image block) is obtained. Among them, the fusion methods include but are not limited to linear interpolation, bilinear interpolation, bicubic interpolation, etc. That is, based on the brightness values and distances of the adjacent image blocks corresponding to each second image block, interpolation processing is performed on the brightness values of each pixel point of each second image block to obtain each third image block.
[0115] Step S15, global-level contrast enhancement; In this specific embodiment, on the basis of the base layer processed in the above step S14 image-level (i.e., global-level) contrast enhancement is performed. Similarly, performing global-level contrast enhancement on the base layer can effectively prevent noise amplification.
[0116] Specifically, as Figure 8 shown, in this specific embodiment, the global histogram of the image corresponding to the base layer (i.e., the fourth image) is first statistically calculated. To reduce the computational amount, histogram statistics can be performed on the data obtained by downsampling the base layer . Subsequently, the cumulative histogram is calculated, and the position of the rightmost end of the histogram is obtained on the cumulative histogram according to the set ratio. Then, according to the position of the rightmost end of the histogram, a mapping curve for global contrast enhancement is adaptively generated to perform global contrast enhancement on the base layer to obtain the base layer ( the corresponding image is the fifth image). That is, each third image block is merged to obtain the fourth image, and global contrast enhancement processing is performed on the fourth image to obtain the fifth image.
[0117] The base layer after the processing of step S15 , superimposed with the enhanced detail layer D obtained in step S13, can obtain the contrast-enhanced brightness data Y CE (Y CEThe corresponding image is the target image), and the formula is as follows: ; Step S16, output RGB data.
[0118] In this specific embodiment, the Y of each pixel point obtained in the above step S15 CE , corresponding to dividing by the Y of each pixel point, can obtain the contrast enhancement coefficient Gain corresponding to each pixel point CE , and the specific formula is as follows: ; On this basis, in this specific embodiment, the RGB data of the pixel points in the input image can be multiplied by the corresponding Gain CE , to obtain the contrast-enhanced RGB data of the pixel point in the output image, and the specific formula is as follows: ; ; ; Among them, R input is the pixel value corresponding to the red channel in the RGB data of the pixel point in the input image, and R out is the pixel value corresponding to the red channel in the contrast-enhanced RGB data of the pixel point in the output image, G input is the pixel value corresponding to the green channel in the RGB data of the pixel point in the input image, and G out is the pixel value corresponding to the green channel in the contrast-enhanced RGB data of the pixel point in the output image, B input is the pixel value corresponding to the blue channel in the RGB data of the pixel point in the input image, and B out is the pixel value corresponding to the blue channel in the contrast-enhanced RGB data of the pixel point in the output image.
[0119] It should be noted that the above examples are only used to assist in understanding the present application and do not constitute a limitation on the image contrast enhancement method of the present application. Based on this technical concept, more forms of simple transformations are within the protection scope of the present application.
[0120] In addition, please refer to Figure 9 , Figure 9 is a schematic diagram of the device structure of the hardware operating environment involved in the image contrast enhancement method in the embodiment of the present application.
[0121] The present application also provides a head-mounted display device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the steps of the image contrast enhancement method in the above embodiments.
[0122] Reference is made below Figure 9 , which shows a schematic structural diagram of a head-mounted display device suitable for implementing the embodiments of the present application. The head-mounted display device in the embodiments of the present application may include, but is not limited to, such as MR (Mixed Reality) devices (such as MR glasses, MR helmets), AR (Augmented Reality) devices (such as AR glasses, AR helmets), VR (Virtual Reality) devices (such as VR glasses, VR helmets), XR (Extended Reality) devices (such as XR glasses, XR helmets), or any head-mounted display device capable of implementing the above functions. Figure 5 The head-mounted display device shown is only an example and should not impose any limitation on the functions and usage scope of the embodiments of the present application.
[0123] As Figure 9 shown, the head-mounted display device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which may execute various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. In the RAM 1004, various programs and data required for the operation of the head-mounted display device are also stored. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are connected to each other through a bus 1005. An input / output interface 1006 is also connected to the bus. Generally, the following systems may be connected to the input / output interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the head-mounted display device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a head-mounted display device having various systems, it should be understood that it is not required to implement or include all the shown systems. More or fewer systems may be alternatively implemented or included.
[0124] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product that includes a computer program carried on a computer-readable medium, and the computer program contains program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a read-only memory 1002. When the computer program is executed by a processing device 1001, the above functions defined in the methods of the embodiments disclosed in the present application are executed.
[0125] The head-mounted display device provided in the present application adopts the image contrast enhancement method in the above embodiment, and can solve the technical problem that it is difficult to achieve the best balance between image noise amplification and detail information retention in the process of improving the image contrast of the display device. Compared with the prior art, the beneficial effects of the head-mounted display device provided in the present application are the same as those of the image contrast enhancement method provided in the above embodiment, and other technical features in the head-mounted display device are the same as those disclosed in the above embodiment method, which will not be elaborated here.
[0126] It should be understood that the various parts disclosed in the present application can be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0127] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, and all of them should be covered by the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the above-mentioned claims.
[0128] In addition, the present application also provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the steps of the image contrast enhancement method in the above embodiment.
[0129] The computer-readable storage medium provided by this application can, for example, be a USB flash drive, 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 of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memories, read-only memories, erasable programmable read-only memories, optical fibers, portable compact disk read-only memories, optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0130] The above computer-readable storage medium can be included in a head-mounted display device; or it can exist separately and not be assembled into the head-mounted display device.
[0131] The above computer-readable storage medium carries one or more programs. When the one or more programs are executed by the head-mounted display device, the head-mounted display device is caused to: sequentially extract at least three frequency band detail layers of an input image, where the frequency bands of each frequency band detail layer are different; divide the base layer image corresponding to the input image into a plurality of first image blocks, and perform histogram equalization processing on each first image block to obtain each second image block; based on the brightness values and distances of the image blocks adjacent to each second image block, perform interpolation processing on the brightness values of each pixel point of each second image block to obtain each third image block; merge the third image blocks to obtain a fourth image, and perform global contrast enhancement processing on the fourth image to obtain a fifth image; perform weighted merging on at least three frequency band detail layers to obtain an enhanced detail layer, and fuse the fifth image with the enhanced detail layer to obtain a target image.
[0132] Computer program code for performing the operations of this application can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, by connecting through the Internet using an Internet service provider).
[0133] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0134] The modules described in the embodiments of this application can be implemented in software or in hardware. Among them, the name of the module does not constitute a limitation to the unit itself in some cases.
[0135] The computer-readable storage medium provided by this application stores computer-readable program instructions (i.e., computer programs) for performing the steps of the above-mentioned image contrast enhancement method, and can solve the technical problem of being difficult to achieve the best balance between image noise amplification and retaining detail information during the process of enhancing the image contrast of a display device. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by this application are the same as those of the image contrast enhancement method provided in the above embodiments, and will not be elaborated here.
[0136] In addition, an embodiment of the present application further provides a computer program product, including a computer program, which implements the steps of the image contrast enhancement method in the above embodiment when executed by a processor.
[0137] The computer program product provided by the present application can solve the technical problem that it is difficult to achieve the best balance between image noise amplification and detail information retention in the process of enhancing the image contrast of a display device. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present application are the same as those of the image contrast enhancement method provided by the above embodiment, and will not be elaborated here.
[0138] The above are only partial embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structural transformation made by using the content of the specification and drawings of the present application under the technical concept of the present application, or direct / indirect application in other related technical fields, is included in the patent protection scope of the present application.
Claims
1. An image contrast enhancement method, characterized in that, The method includes: Successively extracting at least three frequency band detail layers of the input image, where the frequency bands of each frequency band detail layer are different; Dividing the base layer image corresponding to the input image into multiple first image blocks, and performing histogram equalization processing on each first image block to obtain each second image block; Interpolating the brightness values of each pixel point of each second image block based on the brightness values and distances of the adjacent image blocks corresponding to each second image block to obtain each third image block; Merging each of the third image blocks to obtain a fourth image, and performing global contrast enhancement processing on the fourth image to obtain a fifth image; Performing weighted merging on the at least three frequency band detail layers to obtain an enhanced detail layer, and fusing the fifth image and the enhanced detail layer to obtain a target image.
2. The image contrast enhancement method according to claim 1, wherein The step of successively extracting at least three frequency band detail layers of the input image includes: Successively extracting at least three frequency band detail layers of the input image through at least three edge-preserving filters; Wherein, the number of the extracted frequency band detail layers corresponds to the number of the edge-preserving filters, and the smoothing coefficients for filtering by each edge-preserving filter are different.
3. The image contrast enhancement method according to claim 2, wherein, The step of successively extracting at least three frequency band detail layers of the input image through at least three bilateral filters includes: Filtering the input image based on a first bilateral filter to obtain a first filtered image, and extracting a first frequency band detail layer based on the first filtered image; Filtering the first filtered image based on a second bilateral filter to obtain a second filtered image, and extracting a second frequency band detail layer based on the second filtered image, wherein the frequency band of the first frequency band detail layer is higher than the frequency band of the second frequency band detail layer; Filtering the second filtered image based on a third bilateral filter to obtain a third filtered image, and extracting a third frequency band detail layer based on the third filtered image, wherein the frequency band of the second frequency band detail layer is higher than the frequency band of the third frequency band detail layer, and the base layer image is the third filtered image.
4. The image contrast enhancement method according to claim 3, wherein The step of extracting the first frequency band detail layer based on the first filtered image includes: Subtracting the first filtered image from the input image to obtain the first frequency band detail layer; The step of extracting the second frequency band detail layer based on the second filtered image includes: Subtracting the second filtered image from the first filtered image to obtain the second frequency band detail layer; The step of extracting the third frequency band detail layer based on the third filtered image includes: Subtracting the third filtered image from the second filtered image to obtain the third frequency band detail layer.
5. The image contrast enhancement method according to claim 3 or 4, characterized in that The step of performing weighted merging on the at least three frequency band detail layers to obtain an enhanced detail layer includes: Adding the first frequency band detail layer with a first preset weight, the second frequency band detail layer with a second preset weight, and the third frequency band detail layer with a third preset weight to obtain an enhanced detail layer.
6. The image contrast enhancement method according to claim 1, characterized in that After the step of performing global contrast enhancement processing on the fourth image to obtain a fifth image, the method further includes: Detect the eye gaze direction of the wearer, and determine the region of interest of the wearer for the fifth image according to the eye gaze direction; Obtain the brightness mapping curve corresponding to the fifth image, and determine the gray level difference between the first gray level information and the second gray level information in the brightness mapping curve, where the first gray level information is the gray level information of the first pixel block, the first pixel block is located in the region of interest, the second gray level information is the gray level information of the second pixel block, and the first pixel block and the second pixel block are adjacent; If the gray level difference is less than the first visibility threshold corresponding to the first gray level information, determine whether there is insufficient contrast enhancement for the first pixel block; If there is insufficient contrast enhancement for the first pixel block, adjust the brightness enhancement coefficient of the first pixel block, and perform local contrast enhancement processing on the first pixel block based on the brightness enhancement coefficient to obtain an updated fifth image.
7. The image contrast enhancement method according to claim 6, wherein Determining whether there is insufficient contrast enhancement for the first pixel block includes: Determine the contrast enhancement value of the first pixel block; If the contrast enhancement value is less than the second visibility threshold corresponding to the first gray level information, determine that there is insufficient contrast enhancement for the first pixel block.
8. The image contrast enhancement method according to claim 7, characterized in that The step of adjusting the brightness enhancement coefficient of the first pixel block includes: Obtain the brightness enhancement coefficient threshold corresponding to the second visibility threshold; Adjust the brightness enhancement coefficient of the first pixel block to the brightness enhancement coefficient threshold.
9. The image contrast enhancement method according to any one of claims 6 to 8, characterized in that, After the step of determining the gray level difference between the first gray level information and the second gray level information in the brightness mapping curve, the method further includes: If the gray level difference is greater than or equal to the first visibility threshold corresponding to the first gray level information, determine that there is excessive contrast enhancement for the first pixel block; If there is excessive contrast enhancement for the first pixel block, adjust the brightness mapping curve according to the first visibility threshold, and based on the adjusted brightness mapping curve, re-perform global contrast enhancement processing on the fourth image to obtain an updated fifth image.
10. The image contrast enhancement method according to any one of claims 1 to 4, characterized in that Successively extract at least three frequency band detail layers of the input image, including: Based on the RGB data of each pixel point of the input image, determine the brightness data of each pixel point; Based on the brightness data of each pixel point, successively extract at least three frequency band detail layers of the input image.
11. A head-mounted display device, characterized in that, Including: A memory, a processor, and a computer program stored on the memory and executable on the processor, where when the computer program is executed by the processor, it implements the image contrast enhancement method according to any one of claims 1 to 10.
12. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by the processor, it implements the image contrast enhancement method according to any one of claims 1 to 10.