Method and device for generating exposure distribution diagram and computer readable medium
By preprocessing and convolution processing on the original image, the exposure distribution map is generated, and the problem of difficult to intuitively feedback on image exposure in the prior art is solved, visual evaluation and real-time adjustment of image quality are realized, and shooting efficiency and image specifications are improved. sex.
Patent Information
- Application Number
- CN202411051935.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-12-13
AI Technical Summary
The prior art cannot intuitively feedback image exposure, making it difficult for photographers to quickly adjust the camera state and affect image quality, especially in application scenarios with high real-time requirements, such as medical image processing.
By pre-processing, color space conversion and convolution processing of the original image, an exposure distribution map is generated, which realizes visual display and objective evaluation of exposure, and provides real-time feedback to help photographers adjust camera parameters.
Improves the standardization and shooting efficiency of image quality, reduces the need for image reshooting, provides quantifiable indicators for medical professionals to make decisions, and improves work efficiency.
Smart Images

Figure CN119131164A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of image processing technology, and in particular, relates to a method and device for generating an exposure distribution map, and a computer-readable medium. Background Art
[0002] As more and more image-based application scenarios with large data volumes and high real-time requirements are being used, the requirement for image exposure is becoming more and more indispensable. Images with poor exposure will cause many image-based application functions to not function properly, such as face recognition and video surveillance.
[0003] The existing technology only has a scoring method for image exposure, for example: 201810516492.8. However, this scoring method is not intuitive and cannot provide real-time feedback to the photographer, which is not conducive to the photographer adjusting the camera status. Therefore, a method that can intuitively present the exposure of the image is needed so that the photographer can quickly and in real time adjust the camera to achieve the best state of the camera and improve shooting efficiency, especially in the application of medical images. Summary of the invention
[0004] In view of the above problems existing in the prior art, the embodiments of the present invention provide a method, device and computer-readable medium for generating an exposure distribution map. The method can automatically generate an exposure distribution image for a target image, which not only realizes a visual display of the exposure of the original image, thereby providing real-time feedback to the photographer, but also can objectively evaluate the image quality based on the exposure distribution map, thereby improving the standardization of the captured image.
[0005] According to a first aspect of an embodiment of the present invention, a method for generating an exposure distribution map is provided, the method comprising: preprocessing an original image to generate a target image; performing color space conversion on the target image to obtain a brightness channel image; wherein the brightness channel image comprises a luminance channel image or a brightness channel image; performing convolution processing on the brightness channel image to generate a convolved first channel image; performing convolution processing on at least two color channel images corresponding to the target image to generate a convolved second channel image; performing fusion processing on the convolved first channel image and the convolved second channel image to generate an exposure distribution map.
[0006] Optionally, the brightness channel image is convolved to generate a first channel image after convolution; including: using convolution kernels of different scales to convolve the brightness channel image to generate brightness channel images of different scales; determining the brightness weight corresponding to the brightness channel image at each scale according to the grayscale values corresponding to the brightness channel images of different scales; applying the corresponding brightness weight to the brightness channel image at each scale, and weighted processing all the brightness channel images with applied weights to generate the first channel image after convolution.
[0007] Optionally, the convolution processing is performed on at least two color channel images corresponding to the target image to generate a convolved second channel image; including: performing color channel splitting processing on the target image to generate at least two color channel images; wherein the at least two color channel images include: a red channel image, and / or a green channel image, and / or a blue channel image; for any color channel image: performing convolution processing on the color channel image using convolution kernels of different scales to generate color channel images of different scales; determining the color weight corresponding to the color channel image at each scale according to the grayscale values corresponding to the color channel images of different scales; applying the corresponding color weight to the color channel image at each scale, and performing weighted processing on all the weighted color channel images to generate a convolved color channel image; determining the convolved second channel image based on the convolved color channel image corresponding to each of the color channel images.
[0008] Optionally, the preprocessing of the original image to generate the target image includes: extracting a region of interest from the original image to generate a region of interest image; and denoising the region of interest image to generate the target image.
[0009] Optionally, the method further includes: detecting the exposure distribution map to obtain a detection result; if the detection result indicates that the exposure distribution map meets a first preset requirement, outputting a prompt message indicating that the image is qualified; if the detection result indicates that the exposure distribution map does not meet the first preset requirement, selecting an exposure area to be tested whose exposure does not meet a second preset requirement from the exposure distribution map, performing image recognition processing on the exposure area to be tested, obtaining a part to be photographed of the target object corresponding to the exposure area to be tested, and feeding back to the user.
[0010] Optionally, the exposure distribution map is detected to obtain a detection result; including: detecting the exposure value of each position in the exposure distribution map; if the detection result indicates that there is an exposure area to be tested in the exposure distribution map and the area of the exposure area to be tested is greater than a preset threshold, then it is determined that the exposure distribution map does not meet the first preset requirement; wherein the exposure area to be tested is used to indicate a continuous area in the exposure distribution map formed by pixel points whose exposure values do not meet the second preset requirement; if the detection result indicates that there is no exposure area to be tested in the exposure distribution map or that there is an exposure area to be tested and the area of the exposure area is not greater than the preset threshold, then it is determined that the exposure distribution map does not meet the first preset requirement.
[0011] Optionally, the convolutional first channel image and the convolutional second channel image are fused to generate an exposure distribution map; including: applying a first preset weight to the convolutional first channel image, and applying a second preset weight to the convolutional second channel image; wherein the first preset weight is greater than the second preset weight; and adding the first channel image to which the first preset weight is applied and the second channel image to which the second preset weight is applied to generate an exposure distribution map.
[0012] Optionally, the method of determining the brightness weight corresponding to the brightness channel image at each scale based on the grayscale values corresponding to the brightness channel images at different scales includes: obtaining the average grayscale value of the brightness channel image at each scale; and determining the brightness weight corresponding to the brightness channel image at each scale based on the positive proportional relationship between the average grayscale value and the brightness weight.
[0013] According to the second aspect of an embodiment of the present invention, there is also provided an image quality assessment method based on an exposure distribution map, the method comprising: determining an image score related to image exposure quality based on the exposure distribution map; if the image score is less than a first preset score, determining that the target image is in an overexposed state or an underexposed state; if the image score is not less than the first preset score, determining that the target image is in a normal exposure state.
[0014] According to a third aspect of an embodiment of the present invention, a camera adjustment method based on an exposure distribution map is also provided, which is applied to a camera device; the method comprises: obtaining original exposure parameters of the camera; adjusting the original exposure parameters based on the exposure area to be tested to generate new exposure parameters; replacing the original exposure parameters with the new exposure parameters; wherein the exposure area to be tested is used to indicate a continuous area in the exposure distribution map formed by pixel points whose exposure values do not meet a second preset requirement.
[0015] According to a fourth aspect of an embodiment of the present invention, a device for generating an exposure distribution map is also provided, the device comprising: a generation module, used to pre-process an original image to generate a target image; a space conversion module, used to perform color space conversion on the target image to obtain a brightness channel image; wherein the brightness channel image comprises a luminance channel image or a brightness channel image; a first convolution processing module, used to perform convolution processing on the brightness channel image to generate a convolved first channel image; a second convolution processing module, used to perform convolution processing on at least two color channel images corresponding to the target image to generate a convolved second channel image; and a fusion processing module, used to perform fusion processing on the convolved first channel image and the convolved second channel image to generate an exposure distribution map.
[0016] According to a fifth aspect of an embodiment of the present invention, there is further provided an electronic device, comprising: a processor; a memory for storing instructions executable by the processor; the processor for reading the executable instructions from the memory and executing the instructions to implement the method described in the first aspect.
[0017] According to a sixth aspect of an embodiment of the present invention, there is further provided a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, the method described in the first aspect is implemented.
[0018] The embodiment of the present invention provides a method, device and computer-readable medium for generating an exposure distribution map. The method comprises: first, preprocessing an original image to generate a target image; second, performing color space conversion on the target image to obtain a brightness channel image; wherein the brightness channel image includes a lightness channel image or a brightness channel image; then, performing convolution processing on the brightness channel image to generate a convolved first channel image; performing convolution processing on at least two color channel images corresponding to the target image to generate a convolved second channel image; finally, performing fusion processing on the convolved first channel image and the convolved second channel image to generate an exposure distribution map. In this embodiment, color space conversion and convolution processing are first combined to effectively obtain all exposure distribution conditions in the target image; then, the convolved first channel image and the convolved second channel image are fused to completely obtain the exposure distribution map of the target image. Therefore, the method of this embodiment can provide objective image quality evaluation results based on the analysis of the exposure distribution map, and is conducive to the standardization of the captured images; this is very important for medical professionals because they can make decisions based on quantifiable indicators. The method of this embodiment can also present the distribution of exposure in a visual manner; thereby helping medical professionals to more intuitively understand and explain image quality issues and take corresponding measures to improve them. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Hereinafter, some specific embodiments of the present invention will be described in detail in an exemplary and non-limiting manner with reference to the accompanying drawings. The same reference numerals in the accompanying drawings indicate the same or similar components or parts. It should be understood by those skilled in the art that these drawings are not necessarily drawn to scale. In the accompanying drawings:
[0020] Figure 1 A schematic diagram of a flow chart of a method for generating an exposure distribution map provided by an embodiment of the present invention;
[0021] Figure 2 A schematic diagram of a process for generating a first channel image after convolution in one embodiment of the present invention;
[0022] Figure 3 A schematic diagram of the structure of a device for generating an exposure distribution map provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only 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 those skilled in the art without creative work are within the scope of protection of the present invention.
[0024] like Figure 1 , which is a schematic flow chart of a method for generating an exposure distribution map provided by an embodiment of the present invention.
[0025] A method for generating an exposure distribution map, the method comprising at least the following steps:
[0026] S101, preprocessing the original image to generate a target image;
[0027] S102, performing color space conversion on the target image to obtain a brightness channel image; wherein the brightness channel image includes a luminance channel image or a brightness channel image;
[0028] S103, performing convolution processing on the brightness channel image to generate a convolved first channel image;
[0029] S104, performing convolution processing on at least two color channel images corresponding to the target image to generate a convolved second channel image.
[0030] S105, fusing the convolved first channel image and the convolved second channel image to generate an exposure distribution map.
[0031] In S101, the original image may be any captured image, such as a fundus image, a coronary artery image, a liver image, or a brain image, etc. The original image may also be an image captured during an industrial production process.
[0032] Exemplarily, a region of interest is extracted from an original image to generate a region of interest image; and denoising is performed on the region of interest image to generate a target image.
[0033] The region of interest is extracted from the original image based on a neural network algorithm to generate a region of interest image; then the region of interest image is denoised to generate a target image.
[0034] Here, the denoising process, for example, uses filtering to perform denoising, so that the denoising process can effectively remove the noise caused by the camera itself and / or the camera shooting.
[0035] In S102, color space conversion includes HSV space conversion, HIS space conversion, and CIELab space conversion, etc. For example, the target image is converted into HSV space to obtain a brightness channel image; the target image is converted into HIS space to obtain a luminance channel image.
[0036] In other words, the brightness channel image is used to indicate the lightness channel images or brightness channel images corresponding to all color channel images in the target image.
[0037] The lightness channel image or the brightness channel image can be synthesized; it can also be a synthesis of any channel image among the red channel image, the green channel image, and the blue channel image; it can also be a synthesis of any two channel images therein, or it can be formed by splitting the hyperspectral image into several channels.
[0038] In S103 and S104, the brightness channel image is convolved using convolution kernels of different scales to generate a convolved first channel image; and at least two color channel images corresponding to the target image are convolved using convolution kernels of different scales to generate a convolved second channel image.
[0039] For example, the at least two color channel images may be a red channel image and a green channel image; or a red channel image and a blue channel image, or a green channel image and a blue channel image; or a red channel image, a green channel image, and a blue channel image.
[0040] When at least two color channel images are a red channel image and a green channel image, the red channel image is convolved using convolution kernels of different scales to generate a convolved red channel image; the green channel image is convolved using convolution kernels of different scales to generate a convolved green channel image; and the convolved red channel image and the convolved green channel image are used together as a convolved second channel image.
[0041] The convolution kernels of different scales used for convolution processing on the color channel image and the convolution kernels of different scales used for convolution processing on the brightness channel image may be the same or different.
[0042] In S105, the convolution first channel image and the convolution second channel image may be fused based on a neural network algorithm, or may be fused based on a preset rule. There is no particular limitation here, as long as the exposure distribution map corresponding to the target image can be obtained.
[0043] Exemplarily, a first preset weight is applied to the first channel image after convolution, and a second preset weight is applied to the second channel image after convolution; wherein the first preset weight is greater than the second preset weight; the first channel image applied with the first preset weight and the second channel image applied with the second preset weight are added together to generate an exposure distribution map.
[0044] This embodiment firstly obtains the brightness channel image corresponding to the target image through color space conversion, and then performs convolution processing on the brightness channel image and at least two color channel images corresponding to the target image; thereby, the loss of brightness information in the target image can be avoided, so that its exposure distribution can be accurately obtained through the target image; finally, the convolved first channel image and the convolved second channel image are fused, so that all exposure values in the target image can be completely obtained. Thus, the exposure distribution map of the area of interest can be generated based on the original image, which not only realizes the automatic generation of the exposure distribution map; but also realizes the visualization of the exposure of the original image, and feeds back the display results to the photographer in real time, so that the photographer can adjust the camera status in time to improve the image quality; thereby, the need for reshooting the image can be reduced, saving time and resources.
[0045] In an optional embodiment, the method further includes: detecting the exposure distribution map to obtain a detection result; if the detection result indicates that the exposure distribution map meets a first preset requirement, outputting a prompt message indicating that the image is qualified; if the detection result indicates that the exposure distribution map does not meet the first preset requirement, selecting an exposure area to be tested whose exposure does not meet a second preset requirement from the exposure distribution map, performing image recognition processing on the exposure area to be tested, obtaining a part to be photographed of the target object corresponding to the exposure area to be tested, and feeding back to the user.
[0046] Exemplarily, the exposure distribution map is detected to obtain a detection result; including: detecting the exposure value of each position in the exposure distribution map; if the detection result indicates that there is an exposure area to be tested in the exposure distribution map and the area of the exposure area to be tested is greater than a preset threshold, then it is determined that the exposure distribution map does not meet the first preset requirement; wherein the exposure area to be tested is used to indicate a continuous area in the exposure distribution map formed by pixel points whose exposure values do not meet the second preset requirement; if the detection result indicates that there is no exposure area to be tested in the exposure distribution map or that there is an exposure area to be tested and the area of the exposure area is not greater than the preset threshold, then it is determined that the exposure distribution map meets the first preset requirement.
[0047] For example: obtaining the exposure value of each position in the exposure distribution map; counting whether there are continuous exposure areas in the exposure distribution map whose exposure values do not meet the preset exposure range; if the statistical result indicates that there are continuous exposure areas whose exposure values do not meet the preset exposure range, then determining the exposure area as the exposure area to be tested; and determining whether the area of the exposure area to be tested is greater than a preset threshold; if so, performing image recognition processing on the exposure area to be tested, obtaining the part to be photographed of the target object corresponding to the exposure area to be tested, and feeding back to the user.
[0048] If the statistical result indicates that there is no continuous exposure area whose exposure value does not meet the preset exposure range, or if the statistical result indicates that all exposure values meet the preset exposure range, then a prompt message indicating that the image is qualified is output. If the statistical result indicates that there is a continuous exposure area whose exposure value does not meet the preset exposure range, then the exposure area is determined as the exposure area to be tested; if the exposure area to be tested is not greater than the preset threshold, then a prompt message indicating that the image is qualified is output.
[0049] This embodiment determines the exposure area to be measured in the exposure distribution map based on the exposure value, and determines the part to be photographed of the target object based on the image recognition result of the exposure area to be measured, and feeds back to the photographer in real time; thereby, the photographer can take targeted photos and avoid the photographer repeating invalid photos; and the whole process does not require human intervention, which improves the work efficiency of the photographer and reduces the possibility that the shooting quality does not meet the image processing requirements due to human subjective factors.
[0050] In addition, the method of this embodiment can also automatically perform exposure distribution analysis on medical images without human intervention, thereby improving work efficiency, reducing human errors, and providing consistent evaluation results.
[0051] It should be noted that the photographer can obtain the exposure distribution map of the area of interest when shooting; if there is a part of the exposure distribution map that is underexposed, the to-be-shot part of the target object corresponding to the exposure area to be tested will be output at the same time and fed back to the photographer. The photographer only needs to shoot the to-be-shot part the next time; then the images shot two or more times are stitched together for use in subsequent image processing applications.
[0052] In another preferred implementation of this embodiment, the exposure distribution diagram may be displayed in a variety of ways according to different application scenario requirements, and is not limited too much here.
[0053] In an optional embodiment, the brightness weight corresponding to the brightness channel image at each scale is determined according to the grayscale values corresponding to the brightness channel images at different scales; including: obtaining the average grayscale value of the brightness channel image at each scale; and determining the brightness weight corresponding to the brightness channel image at each scale based on the positive proportional relationship between the average grayscale value and the brightness weight.
[0054] Specifically, the corresponding brightness weight or color weight is determined based on the average grayscale value corresponding to the channel images of different scales; the larger the average grayscale value corresponding to the channel image, the larger the corresponding weight. For example: there are brightness channel images of three scales; the brightness of the brightness channel images of the three scales are sorted in the following order; the brightness channel image of the first scale> the brightness channel image of the third scale> the brightness channel image of the second scale; the brightness weights corresponding to the brightness channel images of the three scales are also sorted in the above order, for example: the brightness weight corresponding to the brightness channel image of the first scale> the brightness weight corresponding to the brightness channel image of the third scale> the brightness weight corresponding to the brightness channel image of the second scale. The selection of color weight is similar to the selection process of brightness weight, so it will not be repeated here.
[0055] like Figure 2FIG. 1 is a schematic diagram of a process for generating a first channel image after convolution in one embodiment of the present invention.
[0056] Generating the first channel image after convolution includes at least the following steps:
[0057] S201, performing convolution processing on the brightness channel image using convolution kernels of different scales to generate brightness channel images of different scales;
[0058] S202, determining a brightness weight corresponding to the brightness channel image at each scale according to the grayscale values corresponding to the brightness channel images at different scales;
[0059] S203, applying corresponding brightness weights to the brightness channel images at each scale, and performing weighted processing on all brightness channel images to which weights are applied, to generate a convolved first channel image.
[0060] When the original image is a fundus image, the thickness of blood vessels or the size of lesions in each person's fundus are different. However, the closer the scale of the convolution kernel is to the size of the area of interest, the better the pixel distribution effect after convolution processing. For this reason, convolution kernels of different scales are used to perform convolution processing on the brightness channel image or the color channel image, which can fully cover the blood vessels of different thicknesses or lesions of different sizes in the fundus image, thereby improving the accuracy and timeliness of the convolution processing results.
[0061] This embodiment performs convolution processing on the brightness channel image based on convolution kernels of different scales, which can improve the exposure display effect in the brightness channel image; determines the brightness weight corresponding to the brightness channel image after convolution based on the pixels of the brightness channel image at different scales, and applies the corresponding brightness weight to the brightness channel image after convolution; thereby preventing the brightness channel image with high exposure at a certain scale from being flattened at other scales, thereby making the exposure distribution map have a better effect.
[0062] Analysis and processing of the exposure distribution map In another preferred implementation of this embodiment, the exposure distribution map can be displayed in a variety of ways according to different application scenario requirements, and is not limited here. For example: the exposure distribution map is displayed in a differentiated manner by color; and / or the exposure distribution map is displayed in a differentiated manner by numbers, and / or the exposure distribution map is displayed in a differentiated manner by contour lines; and / or the exposure distribution map is displayed in a differentiated manner by distinguishing marks, and / or the exposure distribution map is displayed in a two-dimensional or three-dimensional manner. For example, dark colors are used to represent underexposed and low-exposure areas, and bright colors are used to represent overexposed and high-exposure areas, or cold colors such as blue and green are used to represent low-exposure areas, and warm colors such as red and yellow are used to represent high-exposure areas; or, the exposure distribution map is differentiated by contour maps, such as low-exposure areas are represented by low-lying and concave areas, and high-exposure areas are represented by highlands and convex areas; or the two are combined to draw a color three-dimensional image, using different colors to represent different heights while characterizing the exposure distribution through the vertical dimension. The above method makes it intuitive and easy for doctors and patients to understand, and at the same time, the exposure is quantified by different features in a comprehensive and easy-to-understand way to achieve the distinction of exposure levels in different areas of the image, and the exposure level is clear at a glance, which helps to accurately locate the problem part in the image. The method of the present application can highlight the changes in details in the image, and even very subtle exposure differences can be clearly displayed through contour lines or different intervals of colors. The exposure distribution map of the fundus image of the present application can provide intuitive and accurate visual information, help to quickly identify the problem area in the image, and support further image processing or analysis decisions.
[0063] An image quality assessment method based on an exposure distribution map, comprising:
[0064] S1, determining an image score related to image exposure quality based on the exposure distribution map;
[0065] S2, if the image score is less than a first preset score, determining that the target image is in an overexposed state or an underexposed state;
[0066] S3: If the image score is not less than a first preset score, determining that the target image is in a normal exposure state.
[0067] Exemplarily, according to preset rules, an image score related to the image exposure quality is determined based on the exposure distribution map; or the exposure distribution map is input into a quality assessment model to output an image score related to the image exposure quality.
[0068] This embodiment can evaluate image quality based on image scoring related to image exposure quality, realize automated image quality evaluation and screening, improve the level of image quality control, and facilitate image standardization and regularization.
[0069] A camera adjustment method based on an exposure distribution map, applied to a camera device; comprising:
[0070] S1, obtain the original exposure parameters of the camera;
[0071] S2, adjusting the original exposure parameters based on the exposure area to be measured to generate new exposure parameters; wherein the exposure area to be measured is used to indicate a continuous area in the exposure distribution map formed by pixels whose exposure values do not meet a second preset requirement;
[0072] S3: Replace the original exposure parameters with the new exposure parameters.
[0073] Exemplarily, if the average exposure value corresponding to the exposure area to be measured is less than the first preset exposure value, the original exposure parameter is adjusted up; if the average exposure value corresponding to the exposure area to be measured is greater than the second preset exposure value, the original exposure parameter is adjusted down; wherein the first preset exposure value is less than the second preset exposure value. For example, the original exposure parameter is adjusted up by increasing the aperture, and / or extending the exposure time, and / or increasing the exposure. The camera obtains the new exposure parameters to automatically shoot the exposure area to be measured.
[0074] This embodiment can determine new exposure parameters corresponding to the exposure area to be measured based on the exposure distribution map, and send the new exposure parameters to the camera, so that the camera can automatically shoot the exposure area to be measured based on the shooting instructions; thereby, the camera can achieve the best shooting state and the best shooting effect; it is particularly suitable for the medical field. When shooting medical images (for example: fundus images), the application of this method can improve medical efficiency and save medical resources.
[0075] The following will describe in detail a method for generating an exposure distribution map provided by this embodiment in conjunction with specific application scenarios.
[0076] A method for generating an exposure distribution map comprises at least the following steps:
[0077] S1, extracting a region of interest from an original image to generate a region of interest image; and performing denoising processing on the region of interest image to generate a target image.
[0078] S2, performing color space conversion on the target image to obtain a brightness channel image; wherein the brightness channel image is used to indicate a lightness channel image or a brightness channel image;
[0079] S3, performing convolution processing on the brightness channel image using convolution kernels of different scales to generate brightness channel images of different scales; obtaining the average grayscale value of the brightness channel image at each scale; determining the brightness weight corresponding to the brightness channel image at each scale based on the positive proportional relationship between the average grayscale value and the brightness weight; applying the corresponding brightness weight to the brightness channel image at each scale, and performing weighted processing on all brightness channel images to which weights are applied to generate the first channel image after convolution.
[0080] S4, performing color channel splitting processing on the target image to generate at least two color channel images; wherein the at least two color channel images include: a red channel image, and / or a green channel image, and / or a blue channel image;
[0081] For any color channel image: use convolution kernels of different scales to perform convolution processing on the color channel image to generate color channel images of different scales; obtain the average grayscale value of the color channel image at each scale; based on the positive proportional relationship between the average grayscale value and the color weight, determine the color weight corresponding to the color channel image at each scale; apply the corresponding color weight to the color channel image at each scale, and perform weighted processing on all the color channel images with weights applied to generate a convolved color channel image; based on the convolved color channel image corresponding to each of the color channel images, determine the convolved second channel image.
[0082] S5, applying a first preset weight to the first channel image after convolution, and applying a second preset weight to the second channel image after convolution; wherein the first preset weight is greater than the second preset weight; adding the first channel image applied with the first preset weight and the second channel image applied with the second preset weight to generate an exposure distribution map.
[0083] S6, detecting the exposure value of each position in the exposure distribution map;
[0084] If the detection result indicates that there is an exposure area to be tested in the exposure distribution map and the area of the exposure area to be tested is greater than a preset threshold, it is determined that the exposure distribution map does not meet the first preset requirement; image recognition processing is performed on the exposure area to be tested to obtain the to-be-photographed part of the target object corresponding to the exposure area to be tested, and the part is fed back to the user; wherein the exposure area to be tested is used to indicate that there is a continuous area in the exposure distribution map and the exposure value does not meet the second preset requirement.
[0085] If the detection result indicates that there is no exposure area to be tested in the exposure distribution map, or there is the exposure area to be tested and the area of the exposure area is not greater than a preset threshold, it is determined that the exposure distribution map meets the first preset requirement, and a prompt message indicating that the image is qualified is output.
[0086] This method can output the exposure distribution map corresponding to the region of interest of the original image according to the input original image. The application of this method can evaluate the image quality, realize automatic image quality evaluation and screening, and improve the level of image quality control. On the other hand, it can provide real-time feedback on the camera status, which is convenient for the photographer to adjust the camera parameters in real time so that the camera can achieve the best shooting state and the best shooting effect. It is especially suitable for the medical field. When shooting medical images, such as fundus images, the application of this method can improve medical efficiency and avoid wasting medical resources.
[0087] The method of this embodiment can detect the exposure distribution of medical images, which is very important for medical professionals because image quality is crucial for correct diagnosis and treatment decisions; by accurately evaluating image quality, the standardization and usability of medical images can be improved.
[0088] like Figure 3 , which is a schematic diagram of the structure of a device for generating an exposure distribution diagram provided by an embodiment of the present invention.
[0089] A device for generating an exposure distribution map, the device 300 includes: a generation module 301, used to pre-process an original image to generate a target image; a space conversion module 302, used to perform color space conversion on the target image to obtain a brightness channel image; wherein the brightness channel image is used to indicate a lightness channel image or a luminance channel image; a first convolution processing module 303, used to perform convolution processing on the brightness channel image to generate a convolved first channel image; a second convolution processing module 304, used to perform convolution processing on at least two color channel images corresponding to the target image to generate a convolved second channel image; and a fusion processing module 305, used to perform fusion processing on the convolved first channel image and the convolved second channel image to generate an exposure distribution map.
[0090] In a preferred embodiment, the first convolution processing module includes: a convolution unit, which is used to perform convolution processing on the brightness channel image using convolution kernels of different scales to generate brightness channel images of different scales; a determination unit, which is used to determine the brightness weight corresponding to the brightness channel image at each scale according to the grayscale values corresponding to the brightness channel images of different scales; a weighting unit, which is used to apply the corresponding brightness weight to the brightness channel image at each scale, and perform weighted processing on all brightness channel images with weights applied to generate the first channel image after convolution.
[0091] In a preferred embodiment, the second convolution processing module includes: a splitting unit, which is used to perform color channel splitting processing on the target image to generate at least two color channel images; wherein the at least two color channel images include: a red channel image, and / or a green channel image, and / or a blue channel image; a convolution processing unit, which is used to: for any color channel image: perform convolution processing on the color channel image using convolution kernels of different scales to generate color channel images of different scales; determine the color weight corresponding to the color channel image at each scale according to the grayscale values corresponding to the color channel images of different scales; apply the corresponding color weight to the color channel image at each scale, and perform weighted processing on all the color channel images to which the weights are applied to generate a convolved color channel image; a determination unit, which is used to determine the convolved second channel image based on the convolved color channel image corresponding to each of the color channel images.
[0092] In a preferred embodiment, the generation module includes: an extraction unit for extracting a region of interest from an original image to generate a region of interest image; and a denoising unit for denoising the region of interest image to generate a target image.
[0093] In a preferred embodiment, the device also includes: a detection module, which is used to detect the exposure distribution map and obtain a detection result; an output module, which is used to output a prompt message that the image is qualified if the detection result indicates that the exposure distribution map meets the first preset requirement; a feedback module, which is used to select an exposure area to be tested whose exposure does not meet the second preset requirement from the exposure distribution map if the detection result indicates that the exposure distribution map does not meet the first preset requirement, and perform image recognition processing on the exposure area to be tested, obtain the to-be-photographed part of the target object corresponding to the exposure area to be tested, and feedback to the user.
[0094] In a preferred embodiment, the detection module includes: a detection unit, which is used to detect the exposure value of each position in the exposure distribution map; a first determination unit, which is used to determine that the exposure distribution map does not meet the first preset requirement if the detection result indicates that there is an exposure area to be measured in the exposure distribution map and the area of the exposure area to be measured is greater than a preset threshold; wherein the exposure area to be measured is used to indicate a continuous area in the exposure distribution map formed by pixel points whose exposure values do not meet the second preset requirement; and a second determination unit, which is used to determine that the exposure distribution map meets the first preset requirement if the detection result indicates that there is no exposure area to be measured in the exposure distribution map or that there is an exposure area to be measured and the area of the exposure area is not greater than the preset threshold.
[0095] In a preferred embodiment, the fusion processing module includes: a weight applying unit, used to apply a first preset weight to the first channel image after convolution, and to apply a second preset weight to the second channel image after convolution; wherein the first preset weight is greater than the second preset weight; a generating unit, used to add the first channel image applied with the first preset weight and the second channel image applied with the second preset weight to generate an exposure distribution map.
[0096] In a preferred embodiment, the determination unit includes: an acquisition subunit for acquiring the average grayscale value of the brightness channel image at each scale; and a determination subunit for determining the brightness weight corresponding to the brightness channel image at each scale based on the positive proportional relationship between the average grayscale value and the brightness weight.
[0097] An image quality assessment device based on an exposure distribution map comprises: a first determination module, used to determine an image score related to image exposure quality based on the exposure distribution map; a second determination module, used to determine that the target image is in an overexposed state or an underexposed state if the image score is less than a first preset score; and a third determination module, used to determine that the target image is in a normal exposure state if the image score is not less than the first preset score.
[0098] A camera adjustment device based on an exposure distribution diagram is applied to a camera device; it comprises: an acquisition module, used for acquiring original exposure parameters of a camera; an adjustment module, used for adjusting the original exposure parameters based on the exposure area to be tested to generate new exposure parameters; wherein the exposure area to be tested is used to indicate a continuous area in the exposure distribution diagram formed by pixel points whose exposure values do not meet a second preset requirement; and a replacement module, used for replacing the original exposure parameters with the new exposure parameters.
[0099] The above device can execute the method for generating an exposure distribution map provided in an embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the method for generating an exposure distribution map. For technical details not fully described in this embodiment, please refer to the method for generating an exposure distribution map provided in an embodiment of the present invention.
[0100] The present invention also provides an electronic device, comprising: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the method for generating an exposure distribution map described in the present invention.
[0101] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the method according to various embodiments of the present application described in the above-mentioned "Exemplary Method" section of this specification.
[0102] The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0103] In addition, an embodiment of the present application may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the method according to the following embodiments of the present application described in the above "Exemplary Method" section of this specification.
[0104] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0105] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present application. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, not for limitation, and the above details do not limit the present application to being implemented by adopting the above specific details.
[0106] The block diagrams of the devices, apparatuses, equipment, and systems involved in this application are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.
[0107] It should also be noted that in the apparatus, device and method of the present application, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present application.
[0108] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present application. Therefore, the present application is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0109] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present application to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
[0110] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.
[0111] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0112] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for generating an exposure distribution map, characterized in that: include: Preprocess the original image to generate the target image; Performing color space conversion on the target image to obtain a brightness channel image; wherein the brightness channel image includes a luminance channel image or a brightness channel image; Performing convolution processing on the brightness channel image to generate a convolved first channel image; Performing convolution processing on at least two color channel images corresponding to the target image to generate a convolved second channel image; The convolved first channel image and the convolved second channel image are fused to generate an exposure distribution map.
2. The method according to claim 1, characterized in that The step of performing convolution processing on the brightness channel image to generate a convolved first channel image comprises: Performing convolution processing on the brightness channel image using convolution kernels of different scales to generate brightness channel images of different scales; Determining the brightness weight corresponding to the brightness channel image at each scale according to the grayscale values corresponding to the brightness channel images at different scales; The corresponding brightness weight is applied to the brightness channel image at each scale, and all the brightness channel images with weights applied are weighted to generate the first channel image after convolution.
3. The method according to claim 1, characterized in that The step of performing convolution processing on at least two color channel images corresponding to the target image to generate a convolved second channel image comprises: Performing color channel splitting processing on the target image to generate at least two color channel images; wherein the at least two color channel images include: a red channel image, and / or a green channel image, and / or a blue channel image; For any color channel image: convolution kernels of different scales are used to perform convolution processing on the color channel image to generate color channel images of different scales; according to the grayscale values corresponding to the color channel images of different scales, the color weight corresponding to the color channel image at each scale is determined; the corresponding color weight is applied to the color channel image at each scale, and all the color channel images with weights applied are weighted to generate a convolved color channel image; Based on the convolved color channel image corresponding to each of the color channel images, a convolved second channel image is determined.
4. The method according to claim 1, characterized in that Also includes: Detecting the exposure distribution diagram to obtain a detection result; If the detection result indicates that the exposure distribution diagram meets the first preset requirement, outputting prompt information indicating that the image is qualified; If the detection result indicates that the exposure distribution map does not meet the first preset requirement, an exposure area to be tested whose exposure does not meet the second preset requirement is selected from the exposure distribution map, and image recognition processing is performed on the exposure area to be tested to obtain the part to be photographed of the target object corresponding to the exposure area to be tested, and feedback is given to the user.
5. The method according to claim 4, characterized in that The step of detecting the exposure distribution diagram to obtain a detection result comprises: Detecting the exposure value of each position in the exposure distribution map; If the detection result indicates that there is an exposure area to be tested in the exposure distribution map and the area of the exposure area to be tested is greater than a preset threshold, it is determined that the exposure distribution map does not meet the first preset requirement; wherein the exposure area to be tested is used to indicate a continuous area in the exposure distribution map formed by pixel points whose exposure values do not meet the second preset requirement; If the detection result indicates that there is no exposure area to be tested in the exposure distribution map, or there is the exposure area to be tested and the area of the exposure area is not greater than a preset threshold, it is determined that the exposure distribution map meets the first preset requirement.
6. The method according to claim 1, characterized in that The step of fusing the convolved first channel image and the convolved second channel image to generate an exposure distribution map comprises: Applying a first preset weight to the first channel image after convolution, and applying a second preset weight to the second channel image after convolution; wherein the first preset weight is greater than the second preset weight; The first channel image to which the first preset weight is applied and the second channel image to which the second preset weight is applied are added together to generate an exposure distribution map.
7. The method according to claim 2, characterized in that: The step of determining the brightness weight corresponding to the brightness channel image at each scale according to the grayscale values corresponding to the brightness channel images at different scales comprises: Get the average gray value of the brightness channel image at each scale; Based on the positive proportional relationship between the average gray value and the brightness weight, the brightness weight corresponding to the brightness channel image at each scale is determined.
8. An image quality assessment method based on an exposure distribution diagram, characterized in that: include: determining an image score associated with image exposure quality based on the exposure profile; If the image score is less than a first preset score, determining that the target image is in an overexposed state or an underexposed state; If the image score is not less than the first preset score, it is determined that the target image is in a normal exposure state.
9. A camera adjustment method based on an exposure distribution diagram, characterized in that: Applies to camera devices; includes: Get the original exposure parameters of the camera; The original exposure parameters are adjusted based on the exposure area to be measured to generate new exposure parameters; wherein the exposure area to be measured is used to indicate a continuous area in the exposure distribution map formed by pixel points whose exposure values do not meet a second preset requirement; The new exposure parameters are used to replace the original exposure parameters.
10. A device for generating an exposure distribution map, characterized in that: include: A generation module is used to preprocess the original image and generate a target image; A space conversion module, used for performing color space conversion on the target image to obtain a brightness channel image; wherein the brightness channel image includes a lightness channel image or a brightness channel image; A first convolution processing module, used for performing convolution processing on the brightness channel image to generate a convolved first channel image; A second convolution processing module, used for performing convolution processing on at least two color channel images corresponding to the target image to generate a convolved second channel image; The fusion processing module is used to fuse the convolved first channel image and the convolved second channel image to generate an exposure distribution map.
11. A computer readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Physical guidance low-light image enhancement method based on illumination exposure joint modeling
CN122115254A
