Image processing method, electronic device, storage medium, program product and vehicle

By obtaining the cells to be compensated in the infrared thermal imager and determining their compensation priority and/or neighboring cell weighting values ​​for compensation, the problem of large differences between the blind cells and surrounding cells is solved, and the image imaging quality is improved.

CN119762628APending Publication Date: 2025-04-04BYD CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411680664.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

After the blind element compensation in the prior art, there is still a significant difference between the blind element and the surrounding image cells, interfering with subsequent image object detection and recognition and reducing imaging quality.

Method used

By acquiring the cells to be compensated for the image data, determining their compensation priority and/or neighborhood cell weighting values, and compensating based on these values, the target image is obtained.

Benefits of technology

The difference between the compensated blind elements and the surrounding cells is reduced, the image imaging quality is improved, and the interference of blind elements on target detection and recognition in subsequent images is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119762628A_ABST
    Figure CN119762628A_ABST
Patent Text Reader

Abstract

The invention provides an image processing method, electronic equipment, a storage medium, a program product and a vehicle. The method comprises the following steps: acquiring a to-be-compensated pixel of image data; determining a compensation priority of the pixel to be compensated and / or a neighborhood pixel weighted value of the pixel to be compensated; and compensating the to-be-compensated pixel according to the compensation priority and / or the neighborhood pixel weighted value of the to-be-compensated pixel to obtain a target image. According to the method and the device, the to-be-compensated pixel, namely the blind pixel, is compensated through the compensation priority of the to-be-compensated pixel and / or the neighborhood pixel weighted value of the to-be-compensated pixel, so that the difference between the compensated blind pixel and the surrounding pixel is reduced, and the imaging quality of the image is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and in particular to an image processing method, electronic equipment, storage medium, program product and vehicle. Background Art

[0002] Blind pixel compensation in infrared thermal imagers is very important for the imaging quality of the image. In the related technology, the blind pixels in the image are first detected, and then the blind pixel grayscale value is replaced by the eight-neighborhood mean of the blind pixel. The flash pixel is detected based on the image sequence without blind pixels, and the grayscale value of the flash pixel when it appears as a normal pixel in the K-frame image sequence is used to replace the grayscale value of the flash pixel when it appears as a bad pixel in the image sequence, thereby completing the compensation for the blind pixel.

[0003] However, when blind pixels are compensated in the above manner, there is still a relatively obvious difference between the compensated blind pixels and the surrounding pixels, which will interfere with the subsequent detection and recognition of the target in the image and reduce the imaging quality of the image. Summary of the invention

[0004] The present invention aims to solve at least one of the technical problems existing in the prior art.

[0005] To this end, an object of the present invention is to provide an image processing method, which reduces the difference between the compensated blind pixels and the surrounding pixels and improves the imaging quality of the image.

[0006] To this end, a second objective of the present invention is to provide an electronic device.

[0007] To this end, a third object of the present invention is to provide a computer-readable storage medium.

[0008] To this end, a fourth object of the present invention is to provide a computer program product.

[0009] To this end, a fifth object of the present invention is to provide a vehicle.

[0010] In order to achieve the above-mentioned purpose, an embodiment of the first aspect of the present invention proposes an image processing method, which includes: obtaining a pixel to be compensated of image data; determining the compensation priority of the pixel to be compensated and / or the weighted value of the neighboring pixels of the pixel to be compensated; compensating the pixel to be compensated according to the compensation priority and / or the weighted value of the neighboring pixels of the pixel to be compensated to obtain a target image.

[0011] According to the image processing method of the embodiment of the present invention, by acquiring the pixel to be compensated of the image data, determining the compensation priority of the pixel to be compensated and / or the weighted value of the neighboring pixels of the pixel to be compensated, and compensating the pixel to be compensated according to the compensation priority and / or the weighted value of the neighboring pixels of the pixel to be compensated to obtain the target image, so as to reduce the difference between the compensated blind pixel and the surrounding pixels and improve the imaging quality of the image.

[0012] In some embodiments, determining the compensation priority of the pixel to be compensated includes: obtaining non-blind pixels in the neighborhood pixels of the pixel to be compensated; and determining the compensation priority of the pixel to be compensated according to the number of the non-blind pixels.

[0013] In some embodiments, determining the compensation priority of the pixel to be compensated according to the number of the non-blind pixels includes: sorting the number of the non-blind pixels to obtain a non-blind pixel sorting; and using the non-blind pixel sorting as the compensation priority of the pixel to be compensated.

[0014] In some embodiments, determining the weighted value of the neighboring pixels of the pixel to be compensated includes: obtaining the mean value of the neighboring pixels of the pixel to be compensated; determining the weighted value of the neighboring pixels according to the mean value of the neighboring pixels; In some embodiments, determining the neighborhood pixel weighted value based on the neighborhood pixel mean includes: obtaining the neighborhood pixel mean and the deviation value of the neighborhood pixel; determining the deviation sum of the deviation values ​​based on the deviation value; determining the deviation value ratio of the neighborhood pixel based on the deviation value and the deviation sum value; and determining the neighborhood pixel weighted value based on the deviation value ratio.

[0015] In some embodiments, obtaining the pixels to be compensated in the image data includes: collecting the image data; and performing pixel detection on the image data to determine the pixels to be compensated.

[0016] In some embodiments, performing pixel detection on the image data to determine the pixel to be compensated includes: if a pixel value in the image data is a preset pixel value, determining that a pixel point corresponding to the pixel value is a first pixel to be compensated.

[0017] In some embodiments, pixel detection is performed on the image data to determine the pixel to be compensated, including: if the pixel value in the image data is a non-preset pixel value and the storage type value of the pixel value is a preset type value, determining that the pixel point corresponding to the pixel value is a second pixel to be compensated.

[0018] In some embodiments, pixel detection is performed on the image data to determine the pixel to be compensated, including: if the pixel value in the image data is a non-preset pixel value and the storage type value of the pixel value is a non-preset type value, obtaining the mean and standard deviation of the pixel value; when the mean and the standard deviation meet preset requirements, determining that the pixel point corresponding to the pixel value is the third pixel to be compensated.

[0019] In some embodiments, before collecting image data, the method further includes: performing a barrier correction on the imaging device according to a preset time.

[0020] In some embodiments, after collecting the image data and before performing pixel detection on the image data, it also includes: performing time domain averaging on the image data.

[0021] In order to achieve the above-mentioned purpose, an embodiment of the second aspect of the present invention proposes an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores an image processing program executable by the at least one processor, and when the image processing program is executed by the at least one processor, the at least one processor executes the image processing method described in the above-mentioned embodiment.

[0022] According to the electronic device of an embodiment of the present invention, by acquiring the pixel to be compensated of the image data, the compensation priority of the pixel to be compensated and / or the weighted value of the neighboring pixels of the pixel to be compensated are determined, and the pixel to be compensated is compensated according to the compensation priority and / or the weighted value of the neighboring pixels of the pixel to be compensated to obtain the target image, so as to reduce the difference between the compensated blind pixel and the surrounding pixels and improve the imaging quality of the image.

[0023] In order to achieve the above-mentioned purpose, an embodiment of the third aspect of the present invention proposes a computer-readable storage medium, on which an image processing program is stored. When the image processing program is executed by a processor, a device installed with the image processing program implements the image processing method described in the above-mentioned embodiment.

[0024] In order to achieve the above-mentioned object, an embodiment of the fourth aspect of the present invention provides a computer program product, the computer program product includes a computer program, and when the computer program is executed by a processor, the image processing method as described in the above-mentioned embodiment is implemented. According to the computer program product of an embodiment of the present invention, by acquiring the pixels to be compensated in the image data, the compensation priority of the pixels to be compensated is determined, and the pixels to be compensated are compensated according to the compensation priority to obtain the target image, so as to reduce the difference between the compensated blind pixels and the surrounding pixels and improve the imaging quality of the image.

[0025] In order to achieve the above-mentioned object, an embodiment of a fifth aspect of the present invention provides a vehicle, and the vehicle includes: the electronic device as described in the above-mentioned embodiment.

[0026] According to a vehicle of an embodiment of the present invention, the vehicle has the electronic device of the above-mentioned embodiment, which obtains the pixel to be compensated of the image data, determines the compensation priority of the pixel to be compensated and / or the weighted value of the neighboring pixels of the pixel to be compensated, and compensates the pixel to be compensated according to the compensation priority and / or the weighted value of the neighboring pixels of the pixel to be compensated to obtain the target image, so as to reduce the difference between the compensated blind pixel and the surrounding pixels and improve the imaging quality of the image.

[0027] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which: Figure 1 is a flow chart of an image processing method according to an embodiment of the present invention; Figure 2 is a flow chart of an image processing method according to another embodiment of the present invention; Figure 3 is a block diagram of an electronic device according to an embodiment of the present invention; Figure 4 is a block diagram of a vehicle according to one embodiment of the present invention.

[0029] Reference numerals: Electronics 101; Vehicle 100; Processor 101; Memory 102. DETAILED DESCRIPTION

[0030] Embodiments of the present invention are described in detail below. The embodiments described with reference to the accompanying drawings are exemplary. Embodiments of the present invention are described in detail below.

[0031] Affected by various factors such as device preparation process, infrared sensitive elements, semiconductor material characteristics, imaging conditions, etc., infrared thermal imagers generally have blind pixel problems during the imaging process. Blind pixels usually appear as dark spots or bright spots on the image, which seriously affect the imaging quality, so blind pixels need to be compensated.

[0032] In the related art, for example, a calibration method or a scene-based detection method is used to detect blind pixels in an image, and the detected blind pixels are compensated by an eight-neighborhood pixel filtering method to obtain a target image.

[0033] However, using the above-mentioned blind pixel detection and compensation methods, the calibration method cannot perform blind pixel detection in real time according to scene changes, and cannot locate the flash pixels that appear randomly during the imaging process; the scene-based blind flash pixel detection method has the problems of missed detection and over-detection; the eight-neighborhood pixel filtering method is used to compensate for the blind pixels, and the compensated blind pixels still have obvious differences from the surrounding pixels, which will interfere with the subsequent detection and recognition of targets in the image.

[0034] Therefore, the image processing method of the embodiment of the present invention is adopted to obtain the pixels to be compensated in the image data, determine the compensation priority of the pixels to be compensated, and compensate the pixels to be compensated according to the compensation priority to obtain the target image, so as to reduce the difference between the compensated blind pixels and the surrounding pixels, improve the imaging quality of the image, and avoid the interference of the blind pixels on the detection and recognition of targets in subsequent images.

[0035] Combine the following Figure 1-Figure 2 An image processing method according to an embodiment of the present invention is described.

[0036] like Figure 1 FIG. 1 is a flowchart of an image processing method according to an embodiment of the present invention. The image processing method according to the embodiment of the present invention at least includes steps S1 to S3.

[0037] Step S1, obtaining pixels to be compensated of image data.

[0038] In an embodiment, the pixels to be compensated are blind pixels, for example, bad pixels, overheated pixels and flash pixels, etc. The data of the infrared thermal imager imaging is collected, and the collected data is detected, and the blind pixels in the data are detected as pixels to be compensated. It can be understood that the pixels to be compensated are abnormal pixels, and their existence affects the image quality, so it is necessary to compensate the pixels to be compensated. The pixels to be compensated by obtaining the image data provide a data basis for compensating the pixels to be compensated.

[0039] Step S2, determining the compensation priority of the pixel to be compensated and / or the weighted value of the neighboring pixels of the pixel to be compensated.

[0040] In an embodiment, the compensation priority of the pixel to be compensated is determined, for example, the coordinate position of the pixel to be compensated is determined and its pixel value is set to zero, the number of pixels that are not blind pixels in the neighboring pixels of the pixel to be compensated in eight directions of up, down, left, right, upper left, upper right, lower left, and lower right, referred to as the number of non-blind pixels, is obtained, and the pixels to be compensated are sorted according to the number of non-blind pixels. It can be understood that the more non-blind pixels the pixel to be compensated has in the neighboring pixels, the better the quality of the pixel to be compensated. Therefore, the more non-blind pixels the pixel to be compensated has in the neighboring pixels, the higher the compensation priority, and then the compensation priority of the pixel to be compensated is determined; the weighted value of the neighboring pixels of the pixel to be compensated is determined, for example, the mean value of the neighboring pixels of the pixel to be compensated is obtained, which can be It is understood that the neighborhood pixel mean is a relatively smooth and accurate pixel value. Using the neighborhood pixel mean to determine the neighborhood pixel weighted value can make the neighborhood pixel weighted value more accurate. The difference between the neighborhood pixel value and the neighborhood pixel mean is taken as the deviation value, and the deviation values ​​are summed to obtain the deviation sum value. The eight neighborhood pixel deviation values ​​are taken as the numerator and the deviation sum value is taken as the denominator to obtain the deviation value ratio of the neighborhood pixels. The inverse of the deviation value ratio of the neighborhood pixels is taken, and the data is normalized to obtain the neighborhood pixel weighted value. It can be understood that the smaller the deviation value, the greater the weighted value. By determining the compensation priority of the pixel to be compensated and / or the neighborhood pixel weighted value of the pixel to be compensated, the difference between the compensated blind pixel and the surrounding pixels can be reduced.

[0041] Step S3, compensating the pixels to be compensated according to the compensation priority and / or the weighted values ​​of the neighborhood pixels of the pixels to be compensated to obtain a target image.

[0042] In an embodiment, after the compensation priority of the pixel to be compensated and / or the weighted value of the neighborhood pixels of the pixel to be compensated are determined, the pixel to be compensated is compensated according to the compensation priority and / or the weighted value of the neighborhood pixels of the pixel to be compensated, and a target image is obtained after compensation. Since the compensation priority is determined according to the number of non-blind pixels of the pixel to be compensated in the neighborhood pixels, the quality of the pixels compensated with priority is better; the weighted value of the neighborhood pixels is determined according to the deviation value of the neighborhood pixels, etc., and has more accurate and smooth characteristics; therefore, the pixel to be compensated is compensated according to the compensation priority and / or the weighted value of the neighborhood pixels of the pixel to be compensated to obtain the target image, which reduces the difference between the compensated blind pixels and the surrounding pixels, improves the imaging quality of the image, and avoids the interference of the blind pixels on the target detection and recognition in the subsequent images.

[0043] According to the image processing method of the embodiment of the present invention, by acquiring the pixels to be compensated in the image data, the compensation priority of the pixels to be compensated is determined, and the pixels to be compensated are compensated according to the compensation priority to obtain the target image, so as to reduce the difference between the compensated blind pixels and the surrounding pixels and improve the imaging quality of the image.

[0044] In some embodiments, determining the compensation priority of the pixel to be compensated includes: obtaining non-blind pixels in the neighborhood pixels of the pixel to be compensated; and determining the compensation priority of the pixel to be compensated according to the number of non-blind pixels.

[0045] In an embodiment, a neighborhood pixel, for example, takes a pixel to be compensated as a reference pixel, and adjacent pixels in eight directions around it are neighborhood pixels, and the eight directions are respectively up, down, left, right, upper left, upper right, lower left, and lower right, i.e., eight neighborhoods; a non-blind pixel is a pixel that is not a blind pixel; when determining the compensation priority of a pixel to be compensated, relevant information of the pixel to be compensated is input, the coordinate position of the pixel to be compensated is determined and its pixel value is set to zero, and the non-blind pixels in the neighborhood pixels up, down, left, right, upper left, upper right, lower left, and lower right of the pixel to be compensated as a reference pixel are obtained, as data basis for determining the priority of the pixel to be compensated; the compensation priority of the pixel to be compensated is determined according to the number of non-blind pixels of the pixel to be compensated in the neighborhood pixels, so as to realize the determination of the compensation order of the pixels to be compensated.

[0046] In some embodiments, determining the compensation priority of the pixels to be compensated according to the number of non-blind pixels includes: sorting the number of non-blind pixels to obtain a non-blind pixel sorting; and using the non-blind pixel sorting as the compensation priority of the pixels to be compensated.

[0047] In an embodiment, after determining the number of non-blind pixels of the pixel to be compensated in the neighborhood pixels, the pixel to be compensated is sorted according to the number of non-blind pixels in the neighborhood pixels to obtain a non-blind pixel sorting, so as to determine the priority of the pixel to be compensated according to the sorting. For example, the number of non-blind pixels of blind pixel one in the neighborhood pixels is 6, the number of non-blind pixels of blind pixel two in the neighborhood pixels is 5, and the number of non-blind pixels of blind pixel three in the neighborhood pixels is 4. Then the non-blind pixels are sorted from large to small as follows: blind pixel one, blind pixel two and blind pixel three. It can be understood that the more non-blind pixels there are in the neighborhood pixels, the better the quality of the pixel to be compensated. Therefore, the more non-blind pixels there are in the neighborhood pixels, the higher the compensation priority is, so as to achieve priority compensation for high-quality pixels. For example, the compensation priority of blind pixel one, blind pixel two and blind pixel three is: blind pixel one is greater than blind pixel two, which is greater than blind pixel three.

[0048] In some embodiments, determining the weighted value of the neighboring pixels of the pixel to be compensated includes: obtaining the mean value of the neighboring pixels of the pixel to be compensated; and determining the weighted value of the neighboring pixels according to the mean value of the neighboring pixels. In the embodiment, the neighborhood pixel mean is the mean of the eight neighborhood pixel values ​​of the pixel to be compensated; when compensating the pixel to be compensated according to the compensation priority, the neighborhood pixel mean of the pixel to be compensated is obtained as a data basis for determining the weighted value of the neighborhood pixel; for example, assuming that the eight neighborhood pixel values ​​of the pixel to be compensated are , then the neighborhood pixel mean is , in, is the mean value of the neighborhood pixels, ; According to the mean value of the neighboring pixels Determine the neighborhood pixel weighted value. It can be understood that the neighborhood pixel mean is a relatively smooth and accurate pixel value. Using the neighborhood pixel mean to determine the neighborhood pixel weighted value can make the neighborhood pixel weighted value more accurate. In some embodiments, determining a neighborhood pixel weighted value based on a neighborhood pixel mean value includes: obtaining a neighborhood pixel mean value and a deviation value of the neighborhood pixel; determining a deviation sum of the deviation values ​​based on the deviation value; determining a deviation value ratio of the neighborhood pixel based on the deviation value and the deviation sum value; and determining a neighborhood pixel weighted value based on the deviation value ratio.

[0049] In the embodiment, when determining the neighborhood pixel weighted value according to the neighborhood pixel mean, the difference between the neighborhood pixel value and the neighborhood pixel mean is used as the deviation value, and the eight neighborhood pixel deviation values ​​are set to: , which is used as the data basis to determine the deviation value ratio of the neighboring pixels; sum the deviation values ​​of the eight neighboring pixels to obtain the deviation sum value, which is set as ,Right now , as a data basis for determining the deviation value ratio of the neighborhood pixels; taking the deviation value of the eight neighborhood pixels as the numerator and the deviation and value as the denominator, the deviation value ratio of the neighborhood pixels is obtained as , as the data basis for determining the weighted value of the neighborhood pixel; take the inverse of the deviation value ratio of the neighborhood pixel, and normalize the data to obtain the weighted value of the neighborhood pixel. It can be understood that the smaller the deviation value, the larger the weighted value, so that the weighted value of the neighborhood pixel obtained by the deviation value is more accurate and the difference between the blind pixel and the surrounding pixels is reduced.

[0050] In some embodiments, obtaining pixels to be compensated in image data includes: collecting image data; performing pixel detection on the image data to determine the pixels to be compensated.

[0051] In an embodiment, when obtaining the pixels to be compensated of the image data, image data is collected on the image captured by the infrared thermal imager to provide a data basis for pixel detection; pixel detection is performed on the collected image data to detect blind pixels and non-blind pixels, and the blind pixels are used as pixels to be compensated to determine the compensation object.

[0052] In some embodiments, performing pixel detection on the image data to determine the pixel to be compensated includes: if the pixel value in the image data is a preset pixel value, determining the pixel point corresponding to the pixel value as the first pixel to be compensated.

[0053] In an embodiment, a preset pixel value, for example, a pixel value having bad pixel characteristics, is a value preset based on demand and bad pixel characteristics. For example, a pixel value having a pixel value of zero in the image data is set as a preset pixel value, and a pixel that meets the preset pixel value is a bad pixel; the first pixel to be compensated is a pixel that meets the preset pixel value; when the pixel value in the image data is zero, the pixel point corresponding to the pixel value is marked as the first pixel to be compensated, and the set of pixels marked as the first pixel to be compensated in the image data is used as a bad pixel set, so as to accurately determine the bad pixels in the image data, improve the detection accuracy of bad pixels, and provide a data basis for compensating for bad pixels.

[0054] In some embodiments, pixel detection is performed on image data to determine pixels to be compensated, including: if a pixel value in the image data is a non-preset pixel value and the storage type value of the pixel value is a preset type value, determining that the pixel point corresponding to the pixel value is a second pixel to be compensated.

[0055] In an embodiment, a preset type value, for example, a pixel value having an overheated pixel characteristic, is a value preset based on demand and overheated pixel characteristics. For example, a pixel value whose pixel grayscale value in the image data is expressed as the maximum value of the storage data type is set as a preset type value, and a pixel that meets the preset type value is an overheated pixel; the second pixel to be compensated is a pixel that meets the preset type value; when the pixel value in the image data is not the preset pixel value, the pixel is not a bad pixel, and further detection of the pixel is required. When the pixel grayscale value in the image data is expressed as the maximum value of the storage data type, the pixel point corresponding to the pixel value is marked as the second pixel to be compensated, and the set of pixels marked as the second pixel to be compensated in the image data is used as an overheated pixel set, so as to accurately determine the overheated pixels in the image data, improve the detection accuracy of the overheated pixels, and provide a data basis for compensating the overheated pixels.

[0056] In some embodiments, pixel detection is performed on image data to determine pixels to be compensated, including: if a pixel value in the image data is a non-preset pixel value and a storage type value of the pixel value is a non-preset type value, obtaining a mean and a standard deviation of the pixel value; when the mean and the standard deviation meet preset requirements, determining that the pixel point corresponding to the pixel value is a third pixel to be compensated.

[0057] In an embodiment, the preset requirements, for example, the requirements for pixels with flash pixel characteristics, are preset requirements based on demand and flash pixel characteristics. For example, the pixel value is within three standard deviations around the mean, and the pixel that meets the preset requirements is a flash pixel; the third pixel to be compensated is a pixel that meets the preset requirements; when the pixel value in the image data is not the preset pixel value and the preset type value, then the pixel is not a bad pixel or an overheated pixel, and the pixel needs to be further detected, and all pixels that are not the preset pixel value and the preset type value are averaged and standard deviation operations are performed to determine the third pixel to be compensated. As the data basis; when the pixel value is within the range of three standard deviations around the mean, the pixel point corresponding to the pixel value is marked as the third pixel to be compensated, and the pixel set marked as the third pixel to be compensated in the image data is used as the flash pixel set, so as to accurately determine the flash pixels in the image data, improve the detection accuracy of the flash pixels, and serve as the data basis for compensating for the flash pixels. When the pixel value is not within the range of three standard deviations around the mean, no processing is done, and the marked bad pixel set, overheated pixel set and flash pixel set are taken as the union to obtain the blind flash pixel set of the image data, and the pixels in the blind flash pixel set are all pixels to be compensated.

[0058] In some embodiments, before collecting image data, the method further includes: performing a barrier correction on the imaging device according to a preset time.

[0059] In an embodiment, baffle correction is a non-uniformity correction method in an infrared thermal imager, for example, a baffle is added in front of the movement of the infrared thermal imager; the preset time is an interval time for data collection set according to requirements and experiments, for example, it is set to 1s; before collecting image data, the baffle operation can be performed with equal time differences during the imaging process of the infrared thermal imager, and data collection is performed with the baffle as the background, wherein the data collection time is set to 1s, so as to achieve real-time, high-precision, intelligent extraction and compensation of pixels to be compensated generated in the imaging process of the infrared thermal imager without interrupting the normal operation of the product in actual applications.

[0060] In some embodiments, after collecting the image data and before performing pixel detection on the image data, the method further includes: performing time domain averaging on the image data.

[0061] In an embodiment, time domain averaging is performed to reduce the influence of random noise by segmenting, superimposing and averaging the signal in the time domain; after acquiring the image data and before performing pixel detection on the image data, the acquired image data needs to be processed by time domain averaging to eliminate the influence of random noise generated during the imaging process.

[0062] Reference below Figure 2 The image processing method according to the embodiment of the present invention is described in detail.

[0063] like Figure 2FIG. 1 is a flowchart of an image processing method according to another embodiment of the present invention. The image processing method according to the embodiment of the present invention at least includes steps S14 to S34.

[0064] Step S14, performing shutter calibration on the imaging device according to a preset time.

[0065] Step S15, collecting image data.

[0066] Step S16, performing time domain averaging on the image data.

[0067] Step S17, determining whether the pixel value in the image data is a preset pixel value. If yes, executing step S18; otherwise, executing step S19.

[0068] Step S18: determining the pixel point corresponding to the pixel value as the first pixel to be compensated.

[0069] Step S19, determining whether the storage type value of the pixel value is a preset type value.

[0070] Step S20: determining the pixel point corresponding to the pixel value as the second pixel to be compensated.

[0071] Step S21, obtaining the mean and standard deviation of the pixel values.

[0072] Step S22, determine whether the mean and standard deviation meet the preset requirements. If yes, execute step S23; otherwise, execute step S24.

[0073] Step S23, determining that the pixel point corresponding to the pixel value is the third pixel to be compensated.

[0074] Step S24: no processing is performed.

[0075] Step S25, obtaining non-blind pixels in the neighborhood of the pixel to be compensated.

[0076] Step S26, sorting the number of non-blind pixels to obtain a non-blind pixel sorting.

[0077] Step S27: sorting the non-blind pixels as the compensation priority of the pixels to be compensated.

[0078] Step S28, obtaining the mean value of the neighboring pixels of the pixel to be compensated.

[0079] Step S29, obtaining the neighborhood pixel mean and the neighborhood pixel deviation value.

[0080] Step S30, determining a deviation and a value of the deviation value according to the deviation value.

[0081] Step S31, determining the deviation value ratio of the neighborhood pixel according to the deviation value and the deviation sum value.

[0082] Step S32, determining the weighted value of the neighborhood pixel according to the deviation value ratio.

[0083] Step S33: Compensate the pixel to be compensated according to the compensation priority and / or the weighted value of the neighboring pixel.

[0084] Step S34, obtaining the target image.

[0085] According to the image processing method of the embodiment of the present invention, by acquiring the pixel to be compensated of the image data, determining the compensation priority of the pixel to be compensated and / or the weighted value of the neighboring pixels of the pixel to be compensated, and compensating the pixel to be compensated according to the compensation priority and / or the weighted value of the neighboring pixels of the pixel to be compensated to obtain the target image, so as to reduce the difference between the compensated blind pixel and the surrounding pixels and improve the imaging quality of the image.

[0086] Reference below Figure 3 An electronic device according to an embodiment of the present invention is described.

[0087] like Figure 3 , which is a block diagram of an electronic device according to an embodiment of the present invention, the electronic device 90 according to the embodiment of the present invention comprises: at least one processor 101; and a memory 102 in communication with the at least one processor 101; The memory 102 stores an image processing program that can be executed by at least one processor 101. When the image processing program is executed by the at least one processor 101, the at least one processor 101 executes the image processing method as described in the above embodiment.

[0088] According to the electronic device of an embodiment of the present invention, the processor 101 obtains the pixel to be compensated of the image data, determines the compensation priority of the pixel to be compensated and / or the weighted value of the neighboring pixels of the pixel to be compensated, and compensates the pixel to be compensated according to the compensation priority and / or the weighted value of the neighboring pixels of the pixel to be compensated to obtain the target image, so as to reduce the difference between the compensated blind pixel and the surrounding pixels and improve the imaging quality of the image.

[0089] In some embodiments, the processor 101 determines the compensation priority of the pixel to be compensated, including: obtaining non-blind pixels in the neighborhood pixels of the pixel to be compensated; and determining the compensation priority of the pixel to be compensated according to the number of non-blind pixels.

[0090] In some embodiments, the processor 101 determines the compensation priority of the pixels to be compensated according to the number of non-blind pixels, including: sorting the number of non-blind pixels to obtain a non-blind pixel sorting; and using the non-blind pixel sorting as the compensation priority of the pixels to be compensated.

[0091] In some embodiments, the processor 101 determines the weighted value of the neighboring pixels of the pixel to be compensated, including: obtaining the mean value of the neighboring pixels of the pixel to be compensated; determining the weighted value of the neighboring pixels according to the mean value of the neighboring pixels; and compensating the pixel to be compensated according to the compensation priority and the weighted value of the neighboring pixels.

[0092] In some embodiments, the processor 101 determines the weighted value of the neighborhood pixel based on the neighborhood pixel mean, including: obtaining the neighborhood pixel mean and the deviation value of the neighborhood pixel; determining the deviation sum of the deviation value based on the deviation value; determining the deviation value ratio of the neighborhood pixel based on the deviation value and the deviation sum value; and determining the neighborhood pixel weighted value based on the deviation value ratio.

[0093] In some embodiments, the processor 101 obtains pixels to be compensated in the image data, including: collecting the image data; performing pixel detection on the image data to determine the pixels to be compensated.

[0094] In some embodiments, the processor 101 performs pixel detection on the image data to determine the pixel to be compensated, including: if the pixel value in the image data is a preset pixel value, determining that the pixel point corresponding to the pixel value is the first pixel to be compensated.

[0095] In some embodiments, the processor 101 performs pixel detection on the image data to determine the pixels to be compensated, including: if the pixel value in the image data is a non-preset pixel value and the storage type value of the pixel value is a preset type value, determining that the pixel point corresponding to the pixel value is the second pixel to be compensated.

[0096] In some embodiments, the processor 101 performs pixel detection on the image data to determine the pixels to be compensated, including: if the pixel value in the image data is a non-preset pixel value and the storage type value of the pixel value is a non-preset type value, obtaining the mean and standard deviation of the pixel value; when the mean and standard deviation meet the preset requirements, determining that the pixel point corresponding to the pixel value is the third pixel to be compensated.

[0097] In some embodiments, before the processor 101 collects image data, the process further includes: performing a shutter correction on the imaging device according to a preset time.

[0098] In some embodiments, after the processor 101 acquires the image data and before performing pixel detection on the image data, it further includes: performing time domain averaging on the image data.

[0099] According to the electronic device of the embodiment of the present invention, the processor 101 obtains the pixel to be compensated of the image data, determines the compensation priority of the pixel to be compensated and / or the weighted value of the neighboring pixels of the pixel to be compensated, and compensates the pixel to be compensated according to the compensation priority and / or the weighted value of the neighboring pixels of the pixel to be compensated to obtain the target image, so as to reduce the difference between the compensated blind pixel and the surrounding pixels and improve the imaging quality of the image.

[0100] The following describes a computer-readable storage medium according to an embodiment of the present invention.

[0101] An image processing program is stored on the computer-readable storage medium. When the image processing program is executed by the processor, the device installed with the image processing program implements the image processing method as described in the above embodiment.

[0102] The following describes a computer program product according to an embodiment of the present invention.

[0103] The computer program product includes a computer program, and when the computer program is executed by a processor, the image processing method as described in the above embodiment is implemented.

[0104] According to the computer program product of the embodiment of the present invention, by acquiring the pixel to be compensated of the image data, determining the compensation priority of the pixel to be compensated and / or the weighted value of the neighboring pixels of the pixel to be compensated, and compensating the pixel to be compensated according to the compensation priority and / or the weighted value of the neighboring pixels of the pixel to be compensated to obtain the target image, so as to reduce the difference between the compensated blind pixel and the surrounding pixels and improve the imaging quality of the image.

[0105] Reference below Figure 4 A vehicle according to an embodiment of the present invention is described.

[0106] like Figure 4 2 is a block diagram of a vehicle according to an embodiment of the present invention, wherein the vehicle 100 includes an electronic device 90 according to the above-mentioned embodiment.

[0107] According to the vehicle 100 of the embodiment of the present invention, the vehicle 100 is provided with the electronic device 90 of the above-mentioned embodiment, which obtains the pixel to be compensated of the image data, determines the compensation priority of the pixel to be compensated and / or the weighted value of the neighboring pixels of the pixel to be compensated, and compensates the pixel to be compensated according to the compensation priority and / or the weighted value of the neighboring pixels of the pixel to be compensated to obtain the target image, so as to reduce the difference between the compensated blind pixels and the surrounding pixels and improve the imaging quality of the image.

[0108] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", 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. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example.

[0109] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

Claims

1. An image processing method, characterized in that: include: Acquire the pixel to be compensated of the image data; Determining the compensation priority of the pixel to be compensated and / or the weighted value of the neighboring pixels of the pixel to be compensated; The pixels to be compensated are compensated according to the compensation priority and / or the weighted values ​​of the neighborhood pixels of the pixels to be compensated to obtain a target image.

2. The image processing method according to claim 1, characterized in that: Determining the compensation priority of the pixel to be compensated includes: Acquire non-blind pixels in the neighborhood of the pixel to be compensated; The compensation priority of the to-be-compensated pixels is determined according to the number of the non-blind pixels.

3. The image processing method according to claim 2, characterized in that: Determining the compensation priority of the to-be-compensated pixel according to the number of the non-blind pixel comprises: Sorting the number of the non-blind pixels to obtain a non-blind pixel sorting; The non-blind pixel ranking is used as the compensation priority of the to-be-compensated pixel.

4. The image processing method according to claim 1, characterized in that: Determining the weighted value of the neighboring pixel of the pixel to be compensated includes: Obtaining the mean value of the neighboring pixels of the pixel to be compensated; The neighborhood pixel weight value is determined according to the neighborhood pixel mean value.

5. The image processing method according to claim 4, characterized in that: Determining the neighborhood pixel weighted value according to the neighborhood pixel mean value includes: Obtaining the neighborhood pixel mean and the neighborhood pixel deviation value; determining a deviation and a value of the deviation value according to the deviation value; Determine the deviation value ratio of the neighborhood pixel according to the deviation value and the deviation sum value; The neighborhood pixel weight value is determined according to the deviation value ratio.

6. The image processing method according to claim 1, characterized in that: Obtaining the pixels to be compensated in the image data, including: Collecting image data; Perform pixel detection on the image data to determine the pixels to be compensated.

7. The image processing method according to claim 6, characterized in that: Performing pixel detection on the image data to determine the pixels to be compensated includes: If the pixel value in the image data is a preset pixel value, it is determined that the pixel point corresponding to the pixel value is the first pixel to be compensated.

8. The image processing method according to claim 6 or 7, characterized in that: Performing pixel detection on the image data to determine the pixels to be compensated includes: If the pixel value in the image data is a non-preset pixel value and the storage type value of the pixel value is a preset type value, it is determined that the pixel point corresponding to the pixel value is a second pixel to be compensated.

9. The image processing method according to any one of claims 6 to 8, characterized in that: Performing pixel detection on the image data to determine the pixels to be compensated includes: If the pixel value in the image data is a non-preset pixel value and the storage type value of the pixel value is a non-preset type value, obtaining the mean and standard deviation of the pixel value; When the mean value and the standard deviation meet preset requirements, the pixel point corresponding to the pixel value is determined as the third pixel to be compensated.

10. The image processing method according to claim 6, characterized in that: Before collecting image data, it also includes: Perform shutter correction on the imaging device according to the preset time.

11. The image processing method according to claim 6, characterized in that: After collecting the image data and before performing pixel detection on the image data, the method further includes: The image data is averaged in the time domain.

12. An electronic device, characterized in that: include: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores an image processing program executable by the at least one processor, and when the image processing program is executed by the at least one processor, the at least one processor executes the image processing method according to any one of claims 1 to 11.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an image processing program, and when the image processing program is executed by a processor, a device installed with the image processing program implements the image processing method according to any one of claims 1 to 11.

14. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the image processing method according to any one of claims 1 to 11 is implemented.

15. A vehicle, characterized in that: include: The electronic device as claimed in claim 12.