Image contrast adjustment method and device

By selecting the region of interest in medical images and performing image processing, and adjusting the contrast using the brightness response curve and JND index value, the problem of time-consuming and laborious manual adjustment of window width and window level is solved, thus improving the readability of image display and work efficiency.

CN114202517BActive Publication Date: 2024-11-08BEIJING DEWEI WISDOM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111441772.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-30
Publication Date
2024-11-08
Estimated Expiration
2041-11-30

AI Technical Summary

Technical Problem

Adjusting window width and level in current medical imaging is time-consuming and laborious, affecting doctors' work efficiency, and manual adjustment is not ideal, resulting in low image readability.

Method used

By selecting an area of ​​interest on the display screen, image processing is performed to determine the range of brightness values, and image contrast is adjusted according to the brightness response curve and JND index value, reducing the number of manual adjustments.

Benefits of technology

It improves the readability of image display information, reduces the number of times window width and window level adjustments are needed, and improves work efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114202517B_ABST
    Figure CN114202517B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for adjusting image contrast, the method comprising: selecting an area of ​​interest on a display screen, selecting an image of the area of ​​interest as a target image, processing the target image, obtaining a brightness value range of each pixel in the target image, expanding the brightness value range of each pixel in the target image, calculating the adjusted brightness value of each pixel in the target image according to the expanded brightness value range, adjusting the brightness of each pixel in the target image according to the adjusted brightness value, obtaining a contrast-adjusted target image, improving the readability of the image display by improving the contrast of the image display, and reducing the number of times the image is adjusted. The present invention can effectively improve the one-time reading rate of image display information, reduce the number of times the image is adjusted in window width and window position, and improve work efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to an image contrast adjustment method and device. Background Art

[0002] In the field of medical image display, it is very important to improve the readability of image display. At present, the image display readability is generally improved by adjusting the window width and window position; among them, the window width and window position are common concepts in medical image processing. The window width refers to the range of medical image data displayed, which is an important indicator for image truncation. The width of the window width directly affects the clarity and contrast of the image. If a narrow window width is used, the displayed medical image data range is small, the amplitude of the medical image data represented by each grayscale is small, and the contrast is strong; on the contrary, if a wide window width is used, the displayed medical image data range is large, the amplitude of the medical image data represented by each grayscale is large, and the image contrast is poor; the window position is the center position of the medical image data. For the same window width, due to different window positions, the medical image data included in the medical image data range is also different. For example, if the window width is 100H, when the window position is 0H, the medical image data range is -50~+50H; if the window position is +35H, the medical image data range is -15~+85H. Usually, if one wants to observe a certain tissue structure and the pathological changes that occur, the medical imaging data of the tissue should be used as the window position.

[0003] In existing medical images, each tissue has a relatively stable grayscale range, and fixed window width and window position are not suitable parameters for the image of the region of interest. Doctors need to fine-tune the window width and window position to increase the significance of symptom points in specific tissues. However, the window adjustment process is time-consuming and labor-intensive, which can easily lead to a decrease in the doctor's work efficiency. In addition, due to the limited experience of imaging doctors, the image display effect after manual window adjustment is not ideal and the display readability is very low. Summary of the invention

[0004] The present invention provides a method and device for adjusting image contrast, which are used to solve the problem in the prior art that in order to improve the readability of medical image display, the window width and window position need to be manually adjusted multiple times, which causes a decrease in doctor's work efficiency. The method effectively improves the one-time reading rate of image display information, reduces the number of times the image window width and window position are adjusted, and improves work efficiency.

[0005] In a first aspect, the present invention provides a method for adjusting image contrast, comprising:

[0006] Select a region of interest on the display screen;

[0007] The image of the region of interest is selected as a target image, and the target image is processed to obtain a brightness value range of each pixel in the target image;

[0008] The brightness value range of each pixel in the target image is expanded, the adjusted brightness value of each pixel in the target image is calculated according to the expanded brightness value range, and the brightness of each pixel in the target image is adjusted according to the adjusted brightness value to obtain the target image after contrast adjustment.

[0009] Furthermore, before selecting the image of the region of interest as the target image, the method further includes:

[0010] The brightness of the area outside the area of ​​interest on the display screen is reduced.

[0011] Further, the target image is processed to obtain a brightness value range of each pixel in the target image, including:

[0012] Performing grayscale analysis on the target image to obtain all grayscales corresponding to the target image;

[0013] Calculate the brightness values ​​corresponding to all grayscales that can be displayed on the display screen according to the brightness value, contrast value and brightness response curve of the display screen;

[0014] According to all the grayscales corresponding to the target image and the brightness values ​​corresponding to all the grayscales that can be displayed by the display screen, the brightness values ​​of all the grayscales of the target image are determined to obtain the brightness value range of each pixel in the target image.

[0015] Further, the brightness value range of each pixel in the target image is expanded, and the adjusted brightness value of each pixel in the target image is calculated according to the expanded brightness value range, including:

[0016] Determine the first JND index value of all grayscales of the target image according to the brightness values ​​of all grayscales of the target image; expand the brightness value range of the target image, and determine the linear expansion ratio of the first JND index value according to the expanded brightness value range;

[0017] According to the linear expansion ratio, adjusting the first JND index values ​​of all grayscales of the target image to obtain second JND index values ​​of all grayscales of the target image;

[0018] Calculating the JND index values ​​corresponding to all the grayscales that can be displayed by the display screen according to the brightness values ​​corresponding to all the grayscales that can be displayed by the display screen;

[0019] Determining the grayscale corresponding to each pixel in the target image after adjustment according to the second JND index values ​​of all grayscales of the target image and the JND index values ​​corresponding to all grayscales that can be displayed by the display screen;

[0020] The adjusted brightness value of each pixel in the target image is calculated according to the grayscale corresponding to each pixel in the target image after adjustment and the brightness values ​​corresponding to all grayscales that can be displayed by the display screen.

[0021] Furthermore, the calculation of the brightness values ​​corresponding to all grayscales that can be displayed by the display screen according to the brightness value, contrast value and brightness response curve of the display screen includes:

[0022] Determine the brightness value corresponding to the maximum grayscale value and the brightness value corresponding to the minimum grayscale value that can be displayed on the display screen according to the maximum brightness value, the minimum brightness value and the contrast value of the display screen;

[0023] According to the brightness value corresponding to the maximum grayscale value that can be displayed by the display screen, the brightness value corresponding to the minimum grayscale value and the brightness response curve, the brightness values ​​corresponding to other grayscales among all grayscales that can be displayed by the display screen except the maximum grayscale value and the minimum grayscale value are calculated.

[0024] Further, the calculation of the brightness values ​​corresponding to the grayscales other than the maximum grayscale value and the minimum grayscale value among all the grayscales that can be displayed by the display screen according to the brightness value corresponding to the maximum grayscale value, the brightness value corresponding to the minimum grayscale value, and the brightness response curve includes:

[0025] In the case where the brightness response curve is DICOM, the brightness values ​​corresponding to the other grayscales except the grayscale maximum value and the grayscale minimum value among all grayscales that can be displayed by the display screen are calculated according to the first formula: the first formula is:

[0026]

[0027] Among them, a=-1.3011877, b=-2.5840191E-2, c=8.0242636E-2, d=-1.0320229E-1, e=1.3646699E-1, f=2.8745620E-2, g=-2.5468404E-2, h=-3.1978977E-3, k=1.2992634E-4, m=1.3635334E-3.

[0028] Further, determining the first JND index values ​​of all grayscales of the target image according to the brightness values ​​of all grayscales of the target image includes:

[0029] According to the brightness values ​​of all grayscales of the target image, the first JND index values ​​of all grayscales of the target image are determined by a second formula; the second formula is:

[0030] j(L)=A+B·Log 10 (L)+C·(Log 10 (L) 2 +D·(Log 10 (L) 3 +E·(Log 10 (L) 4 +F·(Log 10 (L) 5 +G·(Log 10 (L) 6 +H·(Log 10 (L) 7 +I·(Log 10 (L) 8

[0031] Among them, A=71.498068, B=94.593053, C=41.912053, D=9.8247004, E=0.28175407, F=-1.1878455, G=-0.18014349, H=0.14710899, I=-0.017046845.

[0032] In a second aspect, the present invention further provides a device for adjusting image contrast, comprising: a selection module, an image processing module, and an extended acquisition module, wherein:

[0033] A selection module, used to select a region of interest on the display screen;

[0034] An image processing module, used for selecting the image of the region of interest as a target image, processing the target image, and obtaining a brightness value range of each pixel in the target image;

[0035] The expansion acquisition module is used to expand the brightness value range of each pixel in the target image, calculate the adjusted brightness value of each pixel in the target image according to the expanded brightness value range, adjust the brightness of each pixel in the target image according to the adjusted brightness value, and obtain the target image after contrast adjustment.

[0036] In a third aspect, the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-mentioned methods for adjusting image contrast are implemented.

[0037] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described methods for adjusting image contrast.

[0038] The present invention provides a method and device for adjusting image contrast. The method and device select an area of ​​interest on a display screen, select an image of the area of ​​interest as a target image, process the target image, obtain a brightness value range of each pixel in the target image, expand the brightness value range of each pixel in the target image, calculate the adjusted brightness value of each pixel in the target image according to the expanded brightness value range, adjust the brightness of each pixel in the target image according to the adjusted brightness value, and obtain a target image after contrast adjustment, thereby effectively improving the one-time recognition rate of image display information, reducing the number of times the image adjusts the window width and window position, and improving work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0040] Figure 1 is a flow chart of a method for adjusting image contrast provided by an embodiment of the present invention;

[0041] Figure 2 It is a conventional image schematic diagram provided by the present invention;

[0042] Figure 3 is a schematic diagram of reducing the brightness of an area outside an area of ​​interest on a display screen provided by another embodiment of the present invention;

[0043] Figure 4 is a flowchart of a method for adjusting image contrast provided by another embodiment of the present invention;

[0044] Figure 5 is a schematic diagram of a method for adjusting image contrast provided by another embodiment of the present invention;

[0045] Figure 6 is a schematic diagram after contrast adjustment provided by yet another embodiment of the present invention;

[0046] Figure 7 is a structural block diagram of a device for adjusting image contrast provided by another embodiment of the present invention;

[0047] Figure 8 It is a structural block diagram of an electronic device provided by another embodiment of the present invention. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] Figure 1 is a flow chart of a method for adjusting image contrast provided by this embodiment, see Figure 1 , the method comprising:

[0050] Step 101: Selecting a region of interest on a display screen;

[0051] It should be further explained that the device providing the display screen can be a mobile device such as a mobile phone or a tablet computer, or a fixed device such as a computer or an exterior wall LED screen. Those skilled in the art can devise more embodiments according to actual needs, which will not be elaborated here.

[0052] In this embodiment, the region of interest is a lesion site on a specific tissue that the doctor wants to know about. In other embodiments, the region of interest may also be other types of regions that the user is concerned about, such as a face region in an image. The shape of the region of interest may be circular, rectangular, or other shapes, which are not limited here.

[0053] Specifically, before selecting the region of interest on the display screen, what is seen is a conventional image schematic diagram, such as Figure 2 As shown, on this basis, the region of interest is selected on the display screen using the selection button provided by the device providing the display screen.

[0054] Step 102: Select the image of the region of interest as a target image, process the target image, and obtain a brightness value range of each pixel in the target image;

[0055] Specifically, the image of the area of ​​interest is selected as the target image using the crop or screenshot button on the menu bar of the display screen, and grayscale analysis is performed on the target image to obtain all grayscales corresponding to the target image. The brightness values ​​corresponding to all grayscales that can be displayed on the display screen are calculated according to the brightness value, contrast value and brightness response curve of the display screen. Based on all grayscales corresponding to the target image and the brightness values ​​corresponding to all grayscales that can be displayed on the display screen, the brightness values ​​of all grayscales of the target image are determined to obtain the brightness value range of each pixel in the target image.

[0056] Step 103: Expand the brightness value range of each pixel in the target image, calculate the adjusted brightness value of each pixel in the target image according to the expanded brightness value range, adjust the brightness of each pixel in the target image according to the adjusted brightness value, and obtain the target image after contrast adjustment.

[0057] Specifically, according to the brightness values ​​of all grayscales of the target image, the first JND index values ​​of all grayscales of the target image are determined; the brightness value range of the target image is expanded, and the linear expansion ratio of the first JND index value is determined according to the expanded brightness value range; according to the linear expansion ratio, the first JND index values ​​of all grayscales of the target image are adjusted to obtain the second JND index values ​​of all grayscales of the target image; according to the brightness values ​​corresponding to all grayscales that can be displayed by the display screen, the JND index values ​​corresponding to all grayscales that can be displayed by the display screen are calculated; according to the second JND index values ​​of all grayscales of the target image and the JND index values ​​corresponding to all grayscales that can be displayed by the display screen, the grayscale corresponding to each pixel in the target image after adjustment is determined; according to the grayscale corresponding to each pixel in the target image after adjustment and the brightness values ​​corresponding to all grayscales that can be displayed by the display screen, the brightness value of each pixel in the target image after adjustment is calculated.

[0058] The present embodiment provides a method for adjusting the contrast of an image, by selecting an area of ​​interest on a display screen, selecting an image of the area of ​​interest as a target image, processing the target image to obtain a brightness value range of each pixel in the target image, expanding the brightness value range of each pixel in the target image, calculating the adjusted brightness value of each pixel in the target image according to the expanded brightness value range, adjusting the brightness of each pixel in the target image according to the adjusted brightness value, and obtaining a target image after contrast adjustment, thereby effectively improving the one-time recognition rate of image display information, reducing the number of times the image is adjusted in window width and window position, and thus improving work efficiency.

[0059] In another embodiment of the present application, before selecting the image of the region of interest as the target image, the method further includes: reducing the brightness of the area outside the region of interest on the display screen.

[0060] Specifically, Figure 3 This is a schematic diagram of reducing the brightness of areas outside the region of interest after the region of interest is selected in this embodiment. In this embodiment, after the region of interest is selected, the brightness of all unselected areas is reduced to 20% of the initial brightness, wherein the brightness reduction is mainly achieved by programming a related algorithm for reducing the image brightness, which is not further limited herein.

[0061] This embodiment provides a method for adjusting image contrast. Before selecting the image of the region of interest as the target image, the brightness of the area outside the region of interest on the display screen is reduced to highlight the region of interest that needs to be focused on, thereby preliminarily enhancing the display effect of the region of interest.

[0062] Reference Figure 4 , Figure 4 Based on the above embodiment, a schematic flow chart of a method for processing the target image to obtain a brightness value range of each pixel in the target image includes the following steps:

[0063] Step 1021: performing grayscale analysis on the target image to obtain all grayscales corresponding to the target image;

[0064] Step 1022: Calculate the brightness values ​​corresponding to all grayscales that can be displayed on the display screen according to the brightness value, contrast value and brightness response curve of the display screen;

[0065] Specifically, according to the maximum brightness value, the minimum brightness value and the contrast value of the display screen, the brightness value corresponding to the maximum grayscale value and the brightness value corresponding to the minimum grayscale value that the display screen can display are determined; according to the brightness value corresponding to the maximum grayscale value and the brightness value corresponding to the minimum grayscale value that the display screen can display and the brightness response curve, the brightness values ​​corresponding to other grayscales of all grayscales that the display screen can display, except for the maximum grayscale value and the minimum grayscale value, are calculated;

[0066] In one embodiment of the present application, the maximum brightness value of the display screen is 400.051, the minimum brightness value is 0.400, and the contrast value is 1000. According to the maximum brightness value, the minimum brightness value and the contrast value of the display screen, it is determined that the brightness value corresponding to the maximum grayscale value of 255 that the display screen can display is 400.051, and the brightness value corresponding to the minimum grayscale value of 0 is 0.400. In combination with the brightness response curve, the brightness values ​​corresponding to the other grayscales of all the grayscales that the display screen can display except the maximum grayscale value of 255 and the minimum grayscale value of 0 are calculated.

[0067] Step 1023: According to all grayscales corresponding to the target image and the brightness values ​​corresponding to all grayscales that can be displayed by the display screen, the brightness values ​​of all grayscales of the target image are determined to obtain the brightness value range of each pixel in the target image.

[0068] Specifically, in this embodiment, all grayscales corresponding to the target image can be found through the 0-255 grayscales that can be displayed by the display screen, and will not exceed this grayscale range. All grayscales that can be displayed by the display screen have corresponding brightness values. By making a one-to-one correspondence between the grayscales of the target image and the grayscales that can be displayed by the display screen, the brightness values ​​of all grayscales of the target image are determined, and the brightness value range of each pixel in the target image is obtained.

[0069] The present embodiment provides a method for adjusting image contrast. Since the brightness corresponding to the grayscales displayed on different display screens is different, all grayscales corresponding to the target image are matched with the brightness values ​​corresponding to the grayscales that can be displayed by the display screen to obtain the brightness value range of each pixel in the target image. The brightness values ​​of all grayscales of the target image are matched more accurately, the one-time recognition rate of the image display information is effectively improved, the number of times the image window width and window position are adjusted is reduced, and thus the work efficiency is improved.

[0070] Further, on the basis of the above embodiment, according to the brightness value corresponding to the maximum grayscale value that can be displayed by the display screen, the brightness value corresponding to the minimum grayscale value, and the brightness response curve, the brightness values ​​corresponding to other grayscales except the maximum grayscale value and the minimum grayscale value among all grayscales that can be displayed by the display screen are calculated, including:

[0071] In the case where the brightness response curve is DICOM, the brightness values ​​corresponding to the other grayscales except the grayscale maximum value and the grayscale minimum value among all grayscales that can be displayed by the display screen are calculated according to the first formula: the first formula is:

[0072]

[0073] Among them, j is the JND index value, L(j) is the brightness value corresponding to the JND index value, a=-1.3011877, b=-2.5840191E-2, c=8.0242636E-2, d=-1.0320229E-1, e=1.3646699E-1, f=2.8745620E-2, g=-2.5468404E-2, h=-3.1978977E-3, k=1.2992634E-4, m=1.3635334E-3.

[0074] Among them, DICOM is an international standard for medical images and related information, which defines a medical image format that can be used for data exchange and has quality that meets clinical needs.

[0075] In a specific embodiment, referring to Table 1, grayscale analysis is performed on the target image to obtain all grayscale values ​​of the image. In this embodiment, an 8-bit image, that is, an image with a grayscale of 256, is used. The minimum grayscale value of the target image is 36, and the maximum grayscale value is 203. The current brightness, contrast, and brightness response curve are read from the display device, and the brightness is 400cd / m 2 , the contrast ratio is 1000:1, the brightness response curve is DICOM, and the brightness value corresponding to the grayscale that the display device can display is calculated according to the first formula, as shown in Table 1, from which the brightness values ​​corresponding to all grayscales of the target image are obtained, that is, the brightness values ​​corresponding to each order in the range of 36 to 203; among which, the brightness of 36 order is 3.099cd / m 2 The brightness corresponding to the 203rd level is 163.525cd / m 2 .

[0076] Table 1

[0077]

[0078] In the case where the brightness response curve is not DICOM, the brightness values ​​corresponding to the other grayscales except the grayscale maximum value and the grayscale minimum value in all grayscales that can be displayed by the display screen are still calculated according to the actual brightness response curve formula of the display: the brightness response curve formula of the display, one embodiment is:

[0079]

[0080] Where L is brightness, i is grayscale, I is maximum grayscale, and γ is the exponent of the brightness response curve; commonly used γ values ​​are 2.0, 2.2, etc.

[0081] The present embodiment provides a method for adjusting image contrast. By considering two different types of brightness response curves respectively, the brightness values ​​corresponding to the other grayscales except the grayscale maximum value and the grayscale minimum value in all grayscales that can be displayed on the display screen are more targeted, and the brightness value range of each pixel in the target image is made more accurate, which effectively improves the one-time recognition rate of the image display information, reduces the number of times the image adjusts the window width and window position, and thus improves the work efficiency.

[0082] Reference Figure 5 , Figure 5 Based on the above embodiment, a schematic flow chart of a method for expanding the brightness value range of each pixel in the target image and calculating the adjusted brightness value of each pixel in the target image according to the expanded brightness value range includes the following steps:

[0083] Step 1031: determining first JND index values ​​of all grayscales of the target image according to the brightness values ​​of all grayscales of the target image; expanding the brightness value range of the target image, and determining a linear expansion ratio of the first JND index value according to the expanded brightness value range;

[0084] Specifically, determining the first JND index values ​​of all grayscales of the target image according to the brightness values ​​of all grayscales of the target image includes:

[0085] According to the brightness values ​​of all grayscales of the target image, the first JND index values ​​of all grayscales of the target image are determined by a second formula; the second formula is:

[0086] j(L)=A+B·Log 10 (L)+C·(Log 10 (L) 2 +D·(Log 10 (L) 3 +E·(Log 10 (L) 4

[0087] +F·(Log 10 (L) 5 +G·(Log 10 (L) 6 +H·(Log 10 (L) 7 +I·(Log 10 (L) 8

[0088] Among them, L is the brightness value, j(L) is the JND index value corresponding to the brightness value, A=71.498068, B=94.593053, C=41.912053, D=9.8247004, E=0.28175407, F=-1.1878455, G=-0.18014349, H=0.14710899, I=-0.017046845.

[0089] Referring to Table 1, in this embodiment, the second formula can be used to obtain the first JND index value corresponding to the 36th level in Table 1 as 129.24, the first JND index value corresponding to the 203rd level as 543.73, and the first JND index values ​​corresponding to the intermediate gray levels are no longer listed one by one.

[0090] Step 1032: adjusting the first JND index values ​​of all grayscales of the target image according to the linear expansion ratio to obtain second JND index values ​​of all grayscales of the target image;

[0091] Step 1033: Calculate the JND index values ​​corresponding to all the grayscales that can be displayed by the display screen according to the brightness values ​​corresponding to all the grayscales that can be displayed by the display screen;

[0092] Specifically, based on the above embodiment, in this embodiment, the JND index value corresponding to the maximum grayscale value that the display screen can display is subtracted from the minimum grayscale value that the display screen can display, and the result is divided by the number of grayscales occupied by the target image, so as to obtain the JND index value that the target image should increase per grayscale on average. Referring to Table 1, the maximum grayscale value that the display screen can display is 255, and the corresponding JND index value is 672.80. The minimum grayscale value that the display screen can display is 0, and the corresponding JND index value is 39.89. According to the above embodiment, the minimum grayscale value of the target image is 36, and the maximum grayscale value is 203, so the number of grayscales occupied is 167. The JND index value corresponding to the maximum grayscale value that the display screen can display is subtracted from the minimum grayscale value that the display screen can display, and the result is divided by the number of grayscales occupied by the target image, so as to obtain the JND index value that the target image should increase per grayscale on average is 3.79. Referring to Table 2, the second JND index value after adjustment is shown.

[0093] Table 2

[0094]

[0095]

[0096] Step 1034: determining the grayscale corresponding to each pixel in the target image after adjustment according to the second JND index values ​​of all grayscales of the target image and the JND index values ​​corresponding to all grayscales that can be displayed by the display screen;

[0097] On the basis of the above embodiment, according to the adjusted second JND index value of a certain pixel of the target image, the closest grayscale value is found from the JND index values ​​corresponding to all grayscales that can be displayed on the display screen, and the found grayscale value is used as the adjusted grayscale of the certain pixel of the target image. For example, in combination with Table 1 and Table 2, assuming that the second JND index value corresponding to pixel A in the target image is 521.20, the first JND index value closest to the second JND index value can be found in Table 1 as 521.40. In Table 1, the grayscale that can be displayed on the display screen corresponding to the first JND index value of 521.40 is 194. This grayscale is used as the grayscale corresponding to the aforementioned pixel A and is recorded in Table 2, thereby obtaining the grayscale corresponding to the pixel A in the target image after adjustment. Repeat the above operation to determine the grayscale corresponding to each pixel in the target image after adjustment.

[0098] Step 1035: Calculate the brightness value of each pixel in the target image after adjustment according to the grayscale corresponding to each pixel in the target image after adjustment and the brightness values ​​corresponding to all grayscales that can be displayed by the display screen.

[0099] In the previous steps, the grayscale corresponding to each pixel in the target image after adjustment and the brightness value corresponding to all grayscales that can be displayed on the display screen are calculated respectively. Therefore, the brightness value of each pixel in the target image after adjustment can be calculated according to the first formula mentioned above.

[0100] After calculating the adjusted brightness value of each pixel in the target image, the target image after contrast adjustment can be obtained. Figure 6 In order to expand the brightness value range of each pixel in the target image, a schematic diagram of the brightness value of each pixel in the target image after adjustment according to the expanded brightness value range is provided, that is, a schematic diagram after contrast processing.

[0101] The present embodiment provides a method for adjusting image contrast, which comprises determining first JND index values ​​of all grayscales of the target image according to the brightness values ​​of all grayscales of the target image; expanding the brightness value range of the target image, and determining a linear expansion ratio of the first JND index value according to the expanded brightness value range; adjusting the first JND index values ​​of all grayscales of the target image according to the linear expansion ratio to obtain second JND index values ​​of all grayscales of the target image; calculating JND index values ​​corresponding to all grayscales that can be displayed by the display screen according to the brightness values ​​corresponding to all grayscales that can be displayed by the display screen; determining the grayscale corresponding to each pixel in the target image after adjustment according to the second JND index value of all grayscales of the target image and the JND index value corresponding to all grayscales that can be displayed by the display screen; calculating the brightness value of each pixel in the target image after adjustment according to the grayscale corresponding to each pixel in the target image after adjustment and the brightness value corresponding to each grayscale that can be displayed by the display screen, and obtaining the target image after contrast adjustment, thereby effectively improving the one-time recognition rate of image display information, reducing the number of times of image adjustment window width and window position, and thus improving work efficiency.

[0102] In this embodiment, the display screen is 8 bits, i.e., 256 levels. An area of ​​interest is selected on the computer display screen. The area of ​​interest may be circular, rectangular, or other shapes. In this embodiment, the area of ​​interest is circular.

[0103] In this embodiment, the brightness of the area outside the region of interest is reduced to 20%, and the region of interest is selected as an image for grayscale analysis to obtain all grayscale values ​​of the image. In this embodiment, the grayscale values ​​range from a minimum value of 36 to a maximum value of 203;

[0104] The current brightness, contrast and brightness response curve are read from the display. In this embodiment, the brightness is 400 cd / m2, the contrast is 1000:1, and the brightness response curve is DICOM. The brightness corresponding to the grayscale that the display can display is calculated according to the first formula, and the brightness of all grayscales of the image in the region of interest is obtained, that is, the brightness values ​​corresponding to each order in the range of 36 to 203, where the brightness of 36 is 3.099 cd / m2, and the brightness corresponding to 203 is 163.525 cd / m 2 ;

[0105] Calculate the JND index j of the grayscale within the display range using the second formula;

[0106] From the previously calculated data, find out the brightness values ​​and JND index values ​​of all gray levels of the image in the region of interest, where the j of the 36th level is 129.24 and the j of the 203rd level is 543.73;

[0107] Linearly enlarge the JND index values ​​of all gray levels of the image to the display range to obtain a new JND index value;

[0108] The new JND index value is found from the JND index value table of the display range of the display to the closest image grayscale, and the image of the region of interest is processed and displayed to achieve the effect of adjusting the contrast.

[0109] On the other hand, taking grayscale as an example, the present invention can process the red, green and blue channels separately, so that the display effect is more refined; the display standard in the present invention can be set manually, can be directly identified from the image information, and can be read from the display.

[0110] An image contrast adjustment device provided by the present invention is described below. The image contrast adjustment device described below and the image contrast adjustment method described above can be referred to each other.

[0111] Figure 7 This is a structural block diagram of the image contrast adjustment device provided in this embodiment. The device includes a selection module 701, an image processing module 702, and an extended acquisition module 703, wherein:

[0112] A selection module 701 is used to select an area of ​​interest on the display screen;

[0113] It should be further explained that the device providing the display screen can be a mobile device such as a mobile phone or a tablet computer, or a fixed device such as a computer or an exterior wall LED screen. Those skilled in the art can devise more embodiments according to actual needs, which will not be elaborated here.

[0114] In this embodiment, the region of interest is a lesion site on a specific tissue that the doctor wants to know about. In other embodiments, the region of interest may also be other types of regions that the user is concerned about, such as a face region in an image. The shape of the region of interest may be circular, rectangular, or other shapes, which are not limited here.

[0115] Specifically, before selecting the region of interest on the display screen, what is seen is a conventional image schematic diagram, such as Figure 2 As shown, on this basis, the region of interest is selected on the display screen using the selection button provided by the device providing the display screen.

[0116] An image processing module 702 is used to select the image of the region of interest as a target image, process the target image, and obtain a brightness value range of each pixel in the target image;

[0117] Specifically, the image of the area of ​​interest is selected as the target image using the crop or screenshot button on the menu bar of the display screen, and grayscale analysis is performed on the target image to obtain all grayscales corresponding to the target image. The brightness values ​​corresponding to all grayscales that can be displayed on the display screen are calculated according to the brightness value, contrast value and brightness response curve of the display screen. Based on all grayscales corresponding to the target image and the brightness values ​​corresponding to all grayscales that can be displayed on the display screen, the brightness values ​​of all grayscales of the target image are determined to obtain the brightness value range of each pixel in the target image.

[0118] The extended acquisition module 703 is used to expand the brightness value range of each pixel in the target image, calculate the adjusted brightness value of each pixel in the target image according to the expanded brightness value range, adjust the brightness of each pixel in the target image according to the adjusted brightness value, and obtain the target image after contrast adjustment.

[0119] Specifically, according to the brightness values ​​of all grayscales of the target image, the first JND index values ​​of all grayscales of the target image are determined; the brightness value range of the target image is expanded, and the linear expansion ratio of the first JND index value is determined according to the expanded brightness value range; according to the linear expansion ratio, the first JND index values ​​of all grayscales of the target image are adjusted to obtain the second JND index values ​​of all grayscales of the target image; according to the brightness values ​​corresponding to all grayscales that can be displayed by the display screen, the JND index values ​​corresponding to all grayscales that can be displayed by the display screen are calculated; according to the second JND index values ​​of all grayscales of the target image and the JND index values ​​corresponding to all grayscales that can be displayed by the display screen, the grayscale corresponding to each pixel in the target image after adjustment is determined; according to the grayscale corresponding to each pixel in the target image after adjustment and the brightness values ​​corresponding to all grayscales that can be displayed by the display screen, the brightness value of each pixel in the target image after adjustment is calculated.

[0120] The present embodiment provides a device for adjusting image contrast, which includes a selection module 701 for selecting an area of ​​interest on a display screen; an image processing module 702 for selecting an image of the area of ​​interest as a target image, processing the target image, and obtaining a brightness value range of each pixel in the target image; an extended acquisition module 703 for expanding the brightness value range of each pixel in the target image, calculating the adjusted brightness value of each pixel in the target image according to the expanded brightness value range, adjusting the brightness of each pixel in the target image according to the adjusted brightness value, and obtaining a target image after contrast adjustment, thereby effectively improving the one-time recognition rate of image display information, reducing the number of times the image is adjusted in window width and window position, and thus improving work efficiency.

[0121] Optionally, the device further comprises: an adjustment module;

[0122] The adjustment module is used to reduce the brightness of the area outside the area of ​​interest on the display screen before selecting the image of the area of ​​interest as the target image.

[0123] This embodiment provides a device for adjusting image contrast. Before selecting an image of a region of interest as a target image, an adjustment module is used to reduce the brightness of areas outside the region of interest on the display screen, thereby highlighting the region of interest that requires special attention, thereby preliminarily enhancing the display effect of the region of interest.

[0124] Optionally, the image processing module further includes: a first analysis module, a first calculation module, and a first determination module;

[0125] A first analysis module, configured to perform grayscale analysis on the target image to obtain all grayscales corresponding to the target image;

[0126] A first calculation module, used to calculate the brightness values ​​corresponding to all grayscales that can be displayed by the display screen according to the brightness value, contrast value and brightness response curve of the display screen;

[0127] The first determination module determines the brightness values ​​of all grayscales of the target image according to all grayscales corresponding to the target image and the brightness values ​​corresponding to all grayscales that can be displayed by the display screen, and obtains the brightness value range of each pixel in the target image.

[0128] The present embodiment provides a device for adjusting image contrast. Since the brightness corresponding to the grayscales displayed on different display screens is different, all grayscales corresponding to the target image are matched with the brightness values ​​corresponding to the grayscales that can be displayed on the display screen to obtain the brightness value range of each pixel in the target image. The brightness values ​​of all grayscales of the target image are matched more accurately, the one-time recognition rate of the image display information is effectively improved, the number of times the image window width and window position are adjusted is reduced, and thus the work efficiency is improved.

[0129] Optionally, the extended acquisition module further includes: a first processing module, a second processing module, and a third processing module;

[0130] A first processing module, configured to determine first JND index values ​​of all grayscales of the target image according to brightness values ​​of all grayscales of the target image;

[0131] Optionally, the first processing module includes: a first processing determination module;

[0132] The first processing and determining module is used to determine the first JND index values ​​of all grayscales of the target image by a second formula according to the brightness values ​​of all grayscales of the target image; the second formula is:

[0133] j(L)=A+B·Log 10 (L)+C·(Log 10 (L) 2 +D·(Log 10 (L) 3 +E·(Log 10 (L) 4

[0134] +F·(Log 10 (L) 5 +G·(Log 10 (L) 6 +H·(Log 10 (L) 7 +I·(Log 10 (L) 8

[0135] Among them, A=71.498068, B=94.593053, C=41.912053, D=9.8247004, E=0.28175407, F=-1.1878455, G=-0.18014349, H=0.14710899, I=-0.017046845.

[0136] A second processing module is used to expand the brightness value range of the target image, determine the linear expansion ratio of the first JND index value according to the expanded brightness value range; adjust the first JND index values ​​of all grayscales of the target image according to the linear expansion ratio to obtain second JND index values ​​of all grayscales of the target image;

[0137] The third processing module is used to calculate the JND index value corresponding to all the grayscales that can be displayed by the display screen according to the brightness values ​​corresponding to all the grayscales that can be displayed by the display screen; determine the grayscale corresponding to each pixel in the target image after adjustment according to the second JND index value of all the grayscales of the target image and the JND index value corresponding to all the grayscales that can be displayed by the display screen; calculate the brightness value of each pixel in the target image after adjustment according to the grayscale corresponding to each pixel in the target image after adjustment and the brightness value corresponding to all the grayscales that can be displayed by the display screen.

[0138] The present embodiment provides a device for adjusting image contrast, wherein a first processing module determines first JND index values ​​of all grayscales of the target image according to brightness values ​​of all grayscales of the target image, a second processing module expands the brightness value range of the target image, and determines a linear expansion ratio of the first JND index value according to the expanded brightness value range; the first JND index values ​​of all grayscales of the target image are adjusted according to the linear expansion ratio to obtain second JND index values ​​of all grayscales of the target image, and a third processing module calculates JND index values ​​corresponding to all grayscales that can be displayed on the display screen according to brightness values ​​corresponding to all grayscales that can be displayed on the display screen. D index value; according to the second JND index value of all grayscales of the target image and the JND index value corresponding to all grayscales that can be displayed by the display screen, determine the grayscale corresponding to each pixel in the target image after adjustment; according to the grayscale corresponding to each pixel in the target image after adjustment and the brightness value corresponding to all grayscales that can be displayed by the display screen, calculate the brightness value of each pixel in the target image after adjustment, adjust the brightness of each pixel in the target image according to the adjusted brightness value, and obtain the target image after contrast adjustment, which effectively improves the one-time recognition rate of image display information, reduces the number of times the image adjusts the window width and window position, and thus improves work efficiency.

[0139] Optionally, the first calculation module further includes:

[0140] Used to determine the brightness value corresponding to the maximum grayscale value and the brightness value corresponding to the minimum grayscale value that can be displayed by the display screen according to the maximum brightness value, the minimum brightness value and the contrast value of the display screen;

[0141] Used to calculate the brightness values ​​corresponding to the other grayscales of all grayscales that can be displayed by the display screen except the maximum grayscale value and the minimum grayscale value according to the brightness value corresponding to the maximum grayscale value, the brightness value corresponding to the minimum grayscale value and the brightness response curve;

[0142] In the case where the brightness response curve is DICOM, the brightness values ​​corresponding to the other grayscales except the grayscale maximum value and the grayscale minimum value among all grayscales that can be displayed by the display screen are calculated according to the first formula: the first formula is:

[0143]

[0144] Among them, a=-1.3011877, b=-2.5840191E-2, c=8.0242636E-2, d=-1.0320229E-1, e=1.3646699E-1, f=2.8745620E-2, g=-2.5468404E-2, h=-3.1978977E-3, k=1.2992634E-4, m=1.3635334E-3.

[0145] The present embodiment provides a device for adjusting image contrast. By considering two different types of brightness response curves respectively, the brightness values ​​corresponding to the grayscales other than the grayscale maximum value and the grayscale minimum value in all grayscales that can be displayed on the display screen are more specifically calculated. The brightness value range of each pixel in the target image is also made more accurate, which effectively improves the one-time recognition rate of the image display information, reduces the number of times the image adjusts the window width and window position, and thus improves the work efficiency.

[0146] Figure 8 A schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention is shown in FIG. Figure 8As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other through the bus 840. The bus 840 can be used for information transmission between the electronic device and the sensor. The processor 810 can call the logic instructions in the memory 830 to execute the following method: select an area of ​​interest on the display screen; select the image of the area of ​​interest as the target image, process the target image, and obtain the brightness value range of each pixel in the target image; expand the brightness value range of each pixel in the target image, calculate the adjusted brightness value of each pixel in the target image according to the expanded brightness value range, adjust the brightness of each pixel in the target image according to the adjusted brightness value, and obtain the target image after contrast adjustment.

[0147] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0148] On the other hand, an embodiment of the present invention provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions enable a computer to execute a method for adjusting image contrast provided in the above embodiment, for example, including: selecting an area of ​​interest on a display screen; selecting an image of the area of ​​interest as a target image, processing the target image, and obtaining a brightness value range of each pixel in the target image; expanding the brightness value range of each pixel in the target image, calculating the adjusted brightness value of each pixel in the target image according to the expanded brightness value range, and adjusting the brightness of each pixel in the target image according to the adjusted brightness value to obtain a target image with contrast adjusted.

[0149] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0150] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for adjusting image contrast, characterized in that: include: Select a region of interest on the display screen; The image of the region of interest is selected as a target image, and the target image is processed to obtain a brightness value range of each pixel in the target image; Processing the target image to obtain a brightness value range of each pixel in the target image includes: Performing grayscale analysis on the target image to obtain all grayscales corresponding to the target image; Calculate the brightness values ​​corresponding to all grayscales that can be displayed on the display screen according to the brightness value, contrast value and brightness response curve of the display screen; Determine the brightness values ​​of all grayscales of the target image according to all grayscales corresponding to the target image and the brightness values ​​of all grayscales that can be displayed by the display screen, and obtain the brightness value range of each pixel in the target image; Expanding the brightness value range of each pixel in the target image, calculating the adjusted brightness value of each pixel in the target image according to the expanded brightness value range, and adjusting the brightness of each pixel in the target image according to the adjusted brightness value to obtain a target image after contrast adjustment; The step of expanding the brightness value range of each pixel in the target image and calculating the adjusted brightness value of each pixel in the target image according to the expanded brightness value range includes: Determine the first JND index value of all grayscales of the target image according to the brightness values ​​of all grayscales of the target image; expand the brightness value range of the target image, and determine the linear expansion ratio of the first JND index value according to the expanded brightness value range; According to the linear expansion ratio, adjusting the first JND index values ​​of all grayscales of the target image to obtain second JND index values ​​of all grayscales of the target image; Calculating the JND index values ​​corresponding to all the grayscales that can be displayed by the display screen according to the brightness values ​​corresponding to all the grayscales that can be displayed by the display screen; Determining the grayscale corresponding to each pixel in the target image after adjustment according to the second JND index values ​​of all grayscales of the target image and the JND index values ​​corresponding to all grayscales that can be displayed by the display screen; The adjusted brightness value of each pixel in the target image is calculated according to the grayscale corresponding to each pixel in the target image after adjustment and the brightness values ​​corresponding to all grayscales that can be displayed by the display screen.

2. The image contrast adjustment method according to claim 1, characterized in that: Before selecting the image of the region of interest as the target image, the method further includes: The brightness of the area outside the area of ​​interest on the display screen is reduced.

3. The image contrast adjustment method according to claim 1, characterized in that: The step of calculating the brightness values ​​corresponding to all grayscales that can be displayed on the display screen according to the brightness value, contrast value and brightness response curve of the display screen includes: Determine the brightness value corresponding to the maximum grayscale value and the brightness value corresponding to the minimum grayscale value that can be displayed on the display screen according to the maximum brightness value, the minimum brightness value and the contrast value of the display screen; According to the brightness value corresponding to the maximum grayscale value that can be displayed by the display screen, the brightness value corresponding to the minimum grayscale value and the brightness response curve, the brightness values ​​corresponding to other grayscales among all grayscales that can be displayed by the display screen except the maximum grayscale value and the minimum grayscale value are calculated.

4. The image contrast adjustment method according to claim 3, characterized in that: The step of calculating the brightness values ​​corresponding to the grayscale maximum value and the grayscale minimum value among all grayscales that can be displayed by the display screen according to the brightness value corresponding to the grayscale minimum value and the brightness response curve, includes: In the case where the brightness response curve is DICOM, the brightness values ​​corresponding to the other grayscales except the grayscale maximum value and the grayscale minimum value among all grayscales that can be displayed by the display screen are calculated according to the first formula: the first formula is: ; Among them, a = -1.3011877, b = -2.5840191E-2, c = 8.0242636E-2, d = -1.0320229E-1, e = 1.3646699E-1, f = 2.8745620E-2, g = -2.5468404E-2, h = -3.1978977E-3, k = 1.2992634E-4, m = 1.3635334E-3.

5. The image contrast adjustment method according to claim 1, characterized in that: The step of determining first JND index values ​​of all grayscales of the target image according to the brightness values ​​of all grayscales of the target image comprises: According to the brightness values ​​of all grayscales of the target image, the first JND index values ​​of all grayscales of the target image are determined by a second formula; the second formula is: ; Among them, A = 71.498068, B = 94.593053, C = 41.912053, D = 9.8247004, E = 0.28175407, F = -1.1878455, G = -0.18014349, H = 0.14710899, I = -0.017046845.

6. An image contrast adjustment device, characterized in that: include: Selection module, image processing module, extended acquisition module, among which: A selection module, used to select a region of interest on the display screen; An image processing module, used for selecting the image of the region of interest as a target image, processing the target image, and obtaining a brightness value range of each pixel in the target image; Processing the target image to obtain a brightness value range of each pixel in the target image includes: Performing grayscale analysis on the target image to obtain all grayscales corresponding to the target image; calculating the brightness values ​​corresponding to all grayscales that can be displayed on the display screen according to the brightness value, contrast value and brightness response curve of the display screen; determining the brightness values ​​of all grayscales of the target image according to all grayscales corresponding to the target image and the brightness values ​​corresponding to all grayscales that can be displayed on the display screen, and obtaining the brightness value range of each pixel in the target image; an expansion acquisition module, used to expand the brightness value range of each pixel in the target image, calculate the adjusted brightness value of each pixel in the target image according to the expanded brightness value range, adjust the brightness of each pixel in the target image according to the adjusted brightness value, and obtain the target image after contrast adjustment; The step of expanding the brightness value range of each pixel in the target image and calculating the adjusted brightness value of each pixel in the target image according to the expanded brightness value range includes: Determine the first JND index value of all grayscales of the target image according to the brightness values ​​of all grayscales of the target image; expand the brightness value range of the target image, and determine the linear expansion ratio of the first JND index value according to the expanded brightness value range; According to the linear expansion ratio, adjusting the first JND index values ​​of all grayscales of the target image to obtain second JND index values ​​of all grayscales of the target image; Calculating the JND index values ​​corresponding to all the grayscales that can be displayed by the display screen according to the brightness values ​​corresponding to all the grayscales that can be displayed by the display screen; Determining the grayscale corresponding to each pixel in the target image after adjustment according to the second JND index values ​​of all grayscales of the target image and the JND index values ​​corresponding to all grayscales that can be displayed by the display screen; The adjusted brightness value of each pixel in the target image is calculated according to the grayscale corresponding to each pixel in the target image after adjustment and the brightness values ​​corresponding to all grayscales that can be displayed by the display screen.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the image contrast adjustment method as described in any one of claims 1 to 5 are implemented.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the image contrast adjustment method as claimed in any one of claims 1 to 5 are implemented.