WO2021016846A1 - Image processing method and system, movable platform, and storage medium - Google Patents

Image processing method and system, movable platform, and storage medium Download PDF

Info

Publication number
WO2021016846A1
WO2021016846A1 PCT/CN2019/098329 CN2019098329W WO2021016846A1 WO 2021016846 A1 WO2021016846 A1 WO 2021016846A1 CN 2019098329 W CN2019098329 W CN 2019098329W WO 2021016846 A1 WO2021016846 A1 WO 2021016846A1
Authority
WO
WIPO (PCT)
Prior art keywords
image data
coefficient
value
processed
image
Prior art date
Application number
PCT/CN2019/098329
Other languages
French (fr)
Chinese (zh)
Inventor
岳书威
杜捷
张树汉
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to PCT/CN2019/098329 priority Critical patent/WO2021016846A1/en
Priority to CN201980034340.7A priority patent/CN112166598B/en
Publication of WO2021016846A1 publication Critical patent/WO2021016846A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/741Circuitry for compensating brightness variation in the scene by increasing the dynamic range of the image compared to the dynamic range of the electronic image sensors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/76Circuitry for compensating brightness variation in the scene by influencing the image signals

Definitions

  • the embodiments of the present application relate to the field of automatic driving, and in particular, to an image processing method, system, movable platform, and storage medium.
  • autonomous driving technology With the research and development of autonomous driving technology, autonomous driving technology and autonomous driving equipment have begun to be applied.
  • Autopilot equipment such as autonomous vehicles, drones, etc.
  • the automatic driving equipment needs to collect images of the current environment, and then analyze and process the images to complete automatic driving or complete predetermined tasks.
  • the captured image is a high-bit image. Due to data transmission limitations and hardware limitations of the display device, it is necessary to compress the high dynamic range image into a low dynamic range image; thereby completing image analysis or predetermined tasks.
  • the image can be subjected to global mapping processing, that is, a preset function is used to process the pixel value of the image to obtain the processed image.
  • global mapping processing that is, a preset function is used to process the pixel value of the image to obtain the processed image.
  • the image is processed by the global mapping processing method, because the pixel values of all pixels are processed uniformly, the local detail information of the image will be lost, and the contrast and brightness of the obtained image are poor, such as the brightness of the image. Too dark or bright; the resulting image is of poor quality.
  • Normal image processing can also perform local mapping processing on the image, that is, using different mapping curves according to changes in the dynamic range of different regions, which can improve the local contrast of the mapping result and show more details, but will lose a certain global imaging effect.
  • the collected images are often high dynamic range images; and because the automatic driving equipment is driving or flying, the collected images are It is used for subsequent algorithm processing, so it has high requirements on the processing effect, data volume and real-time processing of the captured image.
  • the aforementioned general global mapping processing is difficult to obtain stable processing effects, and the local mapping processing is computationally complex. It is difficult to meet real-time requirements, and it is difficult to meet the requirements for image processing on automatic driving equipment.
  • the embodiments of the application provide an image processing method, system, removable platform, and storage medium to retain local detailed information of the image, and the contrast and brightness of the obtained image are better, improve the quality of low dynamic range images, and facilitate real-time ⁇ Calculations.
  • an image processing method including:
  • Acquiring image data to be processed where the image data to be processed is environmental image data acquired by a visual sensor mounted on a movable platform;
  • the second image data is used for online image processing of the movable platform.
  • an embodiment of the present application provides an image processing system, including: a processor, a memory, and a vision sensor;
  • the memory is used to store program codes
  • the vision sensor is used to obtain image data to be processed, wherein the image data to be processed is carried on a movable platform, and the image data to be processed is environmental image data;
  • the processor calls the program code, and when the program code is executed, is used to perform the following operations:
  • the second image data is used for online image processing of the movable platform.
  • an embodiment of the present application provides a movable platform, including a processor, a memory, and a vision sensor;
  • the memory is used to store program codes
  • the visual sensor is used to obtain image data to be processed, and the image data to be processed is environmental image data;
  • the processor calls the program code, and when the program code is executed, is used to perform the following operations:
  • an embodiment of the present application provides a readable storage medium with a computer program stored on the readable storage medium; when the computer program is executed, the image described in the embodiment of the present application in the first aspect is realized. Approach.
  • an embodiment of the present application provides a program product, the program product includes a computer program, the computer program is stored in a readable storage medium, and at least one processor of an image processing system or a movable platform can download from the The readable storage medium reads the computer program, and the at least one processor executes the computer program to enable the image processing system or the mobile platform to implement the image processing method described in the embodiment of the present application in the first aspect.
  • the image processing method, system, movable platform, and storage medium provided by the embodiments of the application obtain the image data to be processed by acquiring the environment image data of the environment in which the movable platform is in the process of moving; then, the environment image data is sequentially processed After global brightness adjustment and contrast adjustment, low dynamic range images are obtained; since the acquired image data to be processed is the environmental image data of the environment in which the movable platform is moving, the second image data generated can be used Online image processing on a mobile platform.
  • the processing process is simple and clear, and the image data to be processed with high dynamic range can be compressed quickly, with fast calculation speed and high real-time performance; and , Adaptive global brightness adjustment, can make the details of the image data to be processed be preserved as much as possible; Contrast adjustment method can improve the contrast of the image after brightness adjustment; Adaptive global brightness adjustment and contrast adjustment adjustment process It is stable, and the image data to be processed can be processed stably without noise, halo, etc.
  • Figure 1 is a schematic diagram 1 of the application scenario provided by this application.
  • Figure 2 is a second schematic diagram of the application scenario provided by this application.
  • Figure 3 is the third schematic diagram of the application scenario provided by this application.
  • Figure 4 is the fourth schematic diagram of the application scenario provided by this application.
  • FIG. 5 is a flowchart of an image processing method provided by an embodiment of the application.
  • FIG. 6 is a flowchart of an image processing method provided by another embodiment of this application.
  • FIG. 7 is a schematic diagram 1 of the prior art image provided by this application.
  • FIG. 8 is the first image diagram of the second image data provided by this application.
  • FIG. 9 is a second schematic diagram of an image of the prior art provided by this application.
  • FIG. 10 is a second image diagram of the second image data provided by this application.
  • FIG. 11 is a third image diagram of the prior art provided by this application.
  • FIG. 12 is a third image diagram of the second image data provided by this application.
  • FIG. 13 is a schematic structural diagram of an image processing system provided by an embodiment of this application.
  • FIG. 14 is a schematic structural diagram of a movable platform provided by an embodiment of this application.
  • 15 is a schematic structural diagram of an image processing system provided by another embodiment of this application.
  • FIG. 16 is a schematic structural diagram of a movable platform provided by another embodiment of this application.
  • a component when a component is said to be “fixed to” another component, it can be directly on the other component or a central component may also exist. When a component is considered to be “connected” to another component, it can be directly connected to another component or there may be a centered component at the same time.
  • FIG. 1 is a schematic diagram of the first application scenario provided by this application
  • Figure 2 is a schematic diagram of the second application scenario provided by this application
  • Figure 3 is a schematic diagram three of the application scenario provided by this application, as shown in Figures 1 to 3, the image processing method can be applied
  • the image processing system includes but is not limited to any one of the following devices: network device 1, terminal device 2, vehicle 3.
  • the network device 1 includes but is not limited to: Transmission Reception Point (TRP), base station (eg, gNB), Radio Network Controller (RNC), Node B (Node B, NB) , Base Station Controller (Base Station Controller, referred to as BSC), BTS (Base Transceiver Station), HeNB (Home Evolved NodeB), or HNB (Home Node B), Baseband Unit (Baseband Uit, referred to as BBU), etc.
  • TRP Transmission Reception Point
  • base station eg, gNB
  • RNC Radio Network Controller
  • Node B Node B
  • BSC Base Station Controller
  • BTS Base Transceiver Station
  • HeNB Home Evolved NodeB
  • HNB Home Node B
  • Baseband Uit Baseband Uit
  • Terminal equipment 2 includes but is not limited to vehicle terminals, vehicle terminals, vehicle equipment, mobile terminals, public terminals, etc., where vehicle terminals include, but are not limited to, vehicle navigators, etc., and mobile terminals include, but are not limited to, mobile phones, wearable devices, and tablets Wait.
  • the vehicle 3 includes but is not limited to ordinary vehicles, autonomous vehicles, unmanned vehicles, and so on.
  • Figure 4 is the fourth schematic diagram of the application scenario provided by this application. As shown in Figure 4, the image processing method can be applied to a movable platform, which includes but is not limited to UAV 4 and so on.
  • the image processing method can also be applied to any device or system to complete the image processing process provided in this application.
  • the automatic driving equipment needs to collect images of the current environment, and then analyze and process the images to complete automatic driving or complete predetermined tasks.
  • the High Dynamic Range image records the rich details of the image
  • the High Dynamic Range image can be applied to security monitoring, equipment imaging, medical imaging, automatic driving, automatic flight and other technical fields; among them, high Dynamic range images can also be called high-bit images.
  • high Dynamic range images can also be called high-bit images.
  • the technical field involved in this application after acquiring the high dynamic range image, due to the large high dynamic range image, the data transmission is slower, the image display is slower, and the storage space is occupied more.
  • the high dynamic range image is compressed into a low dynamic range image, and then the image analysis or predetermined task is completed.
  • a global mapping processing method or a local mapping processing method can usually be used.
  • the overall effect of the image can be better presented, and the calculation efficiency of the global mapping processing method is higher; however, when the image is processed by the global mapping processing method, because it is for all pixels
  • the unified processing of the pixel value of the image will lose the local detail information of the image, and the contrast and brightness of the image will be poor, such as the brightness of the image is dark or bright; the quality of the resulting image is poor, and the image processing The effect is poor.
  • the local mapping processing method can adopt different mapping curves according to the dynamic range of different regions, it can improve the local contrast of the image and show more details of the image; but the local mapping processing is adopted When processing the image in this way, a certain global imaging effect is lost, and it is easy to produce halo, noise, etc. in the image, and the calculation complexity of the local mapping processing method is relatively high.
  • the automatic driving equipment has high requirements for the algorithm response speed and image processing effects of the collected high dynamic range images; the global mapping processing method is difficult to obtain stable processing effects Moreover, it is impossible to perform good compression for high dynamic range images; the high computational complexity of the local mapping processing method is difficult to meet the real-time requirements, and it is difficult to meet the requirements for image processing on automatic driving equipment.
  • the image processing method, system, removable platform, and storage medium provided in this embodiment can solve the foregoing problems.
  • FIG. 5 is a flowchart of an image processing method provided by an embodiment of this application. As shown in FIG. 5, the method of this embodiment may include:
  • the execution subject of this embodiment may be an image processing system, or an image processing device, or a movable platform. This embodiment is described with the execution subject as the image processing system.
  • a visual sensor is provided on the movable platform, where the movable platform may be an automatic driving vehicle, an automatic flying device, and so on. Vision sensors are used to obtain environmental image data.
  • the image processing system can obtain the environmental image data obtained by the visual sensor, and further, the image processing system can obtain the image data to be processed.
  • the image data to be processed is a high dynamic range image, that is, the image data to be processed is a high-bit image.
  • the image processing system and the movable platform are two different devices.
  • the movable platform is equipped with a vision sensor, and the image processing system is connected to the vision sensor; as the movable platform moves, the vision sensor can be acquired in real time Environmental image data, and then obtain high dynamic range images; then, the image processing system can obtain real-time environmental image data collected by the vision sensor.
  • the image processing system and the movable platform are the same equipment, that is, the image processing system is a movable platform; the movable platform is equipped with a vision sensor, and the movable platform is connected to the vision sensor; With the movement of the platform, the visual sensor can obtain real-time environmental image data, and then obtain high dynamic range images, so that the movable platform can obtain real-time environmental image data collected by the visual sensor.
  • the image processing system is an autonomous driving vehicle.
  • the autonomous driving vehicle can obtain environmental image data in the driving environment of the autonomous driving vehicle through the visual sensor.
  • the image processing system is an automatic flight device.
  • the automatic flight device can obtain the environmental image data of the flight environment of the automatic flight device through the visual sensor.
  • S102 Perform adaptive global brightness adjustment on the image data to be processed to obtain first image data.
  • the image processing system after obtaining the image data to be processed, adopts an adaptive processing method to perform global brightness adjustment on the image data to be processed, and then generates the first image data.
  • the adaptive processing method is an adaptive function, for example, the adaptive function is a gamma correction function, or the adaptive function is another correction function in the prior art.
  • the contrast adjustment is performed on the obtained first image data to generate the second image data.
  • the contrast adjustment method may be the use of histogram equalization, or an adaptive histogram equalization algorithm, an interpolation acceleration algorithm, etc.; the above algorithm is an image contrast adjustment algorithm provided in the prior art.
  • the acquired image data to be processed is the environmental image data of the environment in which the mobile platform is moving during the movement process, and the second image data generated is to sequentially adjust the global brightness of the environmental image data,
  • the image obtained after the contrast adjustment; the second image data can be used for online image processing of the mobile platform, that is, the mobile platform can perform online image processing on the second image data.
  • the movable platform may directly display the second image data, or the movable platform may recognize objects in the second image data.
  • the above-mentioned second image data is a low dynamic range image.
  • the image processing system and the movable platform are two different devices.
  • the image processing system can obtain the environmental image data collected by the visual sensor in real time; After the global brightness adjustment and contrast adjustment are performed, the second image data is obtained; the image processing system can send the second image data to the movable platform for image processing.
  • the image processing system and the movable platform are the same equipment.
  • the movable platform can obtain the environmental image data collected by the visual sensor in real time; the movable platform performs sequential processing on the environmental image data After adjusting the global brightness and contrast, the second image data is obtained; then, the movable platform directly performs image processing on the second image data.
  • the image processing system is a self-driving vehicle.
  • the self-driving vehicle can obtain the environmental image data in the driving environment of the self-driving vehicle through the visual sensor; because the environmental image data obtained by the self-driving vehicle is High dynamic range images.
  • the image size of high dynamic range images is relatively large.
  • Autonomous vehicles need to compress the high dynamic range images into low dynamic range images in order to process or transmit the images quickly; then the autonomous vehicles will respond to the environment After the image data is adjusted for global brightness and contrast in sequence, the second image data is obtained, and then the low dynamic range image is obtained; then, the autonomous vehicle performs subsequent image analysis, image display, etc. processes on the second image data.
  • the image processing system is an automatic flight device.
  • the automatic flight device can obtain the environmental image data of the flight environment of the automatic flight device through the vision sensor; due to the environmental image obtained by the automatic flight device The data is a high dynamic range image, and the image size of the high dynamic range image is relatively large.
  • the automatic flight equipment needs to compress the high dynamic range image into a low dynamic range image in order to quickly process or transmit the image; then the automatic flight equipment After global brightness adjustment and contrast adjustment are sequentially performed on the environmental image data, the second image data is obtained, and then the low dynamic range image is obtained; then, the autopilot device performs subsequent image analysis and image display processes on the second image data.
  • the image data to be processed is environmental image data acquired by a visual sensor mounted on a movable platform; adaptive global brightness adjustment is performed on the image data to be processed to obtain the first image data; The contrast of the first image data is adjusted to obtain the second image data; the second image data is used for online image processing of the movable platform.
  • the processed image data is environmental image data of the environment in which the movable platform is in the process of moving, so that the generated second image data can be used for online image processing by the movable platform.
  • the processing process is simple and clear, and the image data to be processed with high dynamic range can be compressed quickly, with fast calculation speed and high real-time performance; and , Adaptive global brightness adjustment, can make the details of the image data to be processed be preserved as much as possible; Contrast adjustment method can improve the contrast of the image after brightness adjustment; Adaptive global brightness adjustment and contrast adjustment adjustment process It is stable, and the image data to be processed can be processed stably without noise, halo, etc.
  • FIG. 6 is a flowchart of an image processing method provided by another embodiment of this application. As shown in FIG. 6, the method in this embodiment may include:
  • the execution subject of this embodiment may be an image processing system, or an image processing device, or a movable platform. This embodiment is described with the execution subject as the image processing system.
  • a visual sensor is provided on the movable platform, where the movable platform may be an automatic driving vehicle, an automatic flying device, and so on. Vision sensors are used to obtain environmental image data.
  • the visual sensor on the movable platform can obtain real-time environmental image data of the surrounding environment, where the environmental image data is a high dynamic range image; then, the image processing system can obtain the data collected by the visual sensor Environment image data, that is, the image processing system acquires the captured image.
  • the above-mentioned image processing system and the above-mentioned movable platform may be the same device or different devices.
  • the image processing system is an autonomous driving vehicle
  • the vision sensor is set on the autonomous driving vehicle; during the driving process of the autonomous driving vehicle, the vision sensor can collect environmental image data in real time, that is, the captured image; The self-driving vehicle acquires the captured image.
  • the image processing system is an automatic flight device, and a vision sensor is provided on the automatic flight device; during the flight of the automatic flight device, the vision sensor can collect environmental image data in real time, that is, collect captured images; , The automatic flight equipment acquires the captured image.
  • S202 Perform normalization processing on the captured image, and perform compression processing on the normalized captured image to obtain image data to be processed.
  • the image processing system needs to compress the captured image.
  • the image processing system Before performing compression processing, the image processing system first needs to normalize the captured image to obtain the normalized captured image. Specifically, if the captured image is a grayscale image, the image processing system needs to normalize the pixel value of each pixel in the captured image to a preset range, for example, the preset range is the pixel value [0, 1 ].
  • the image processing system can convert the RGB image into a YUV (Luminance Chrominance Chroma) image; then, the image processing system converts the value of the image data in the Y dimension , Normalize to a preset range, and normalize the value of the image data in the U dimension to another preset range, and normalize the value of the image data in the V dimension to Within a preset range; or, the image processing system can only normalize the value of the image data in the Y dimension, and the image processing system can normalize the value of the image data in the Y dimension to a preset range. Set within the range, and then in the subsequent image processing process, the image processing system only analyzes the image data in the Y dimension.
  • RGB Red Green Blue
  • the image processing system can compress the normalized captured image, and then obtain the image data to be processed, which is a low dynamic range image.
  • an existing compression algorithm can be used to compress the high dynamic range captured image into a low dynamic range image, that is, to obtain image data to be processed.
  • L out (A*log(B+L in ))/(log(C+D*L in )) can be used to obtain the compressed image data to be processed, where Lin is the return In the photographed image after unified processing, L out is the image data to be processed, and A, B, C and D are all preset compression parameters.
  • the data volume of the captured image can be reduced, and the processing speed of the subsequent image processing process can be improved.
  • the image processing system is a self-driving vehicle. After the self-driving vehicle acquires the captured image, since the self-driving vehicle is in the process of driving, the control device in the self-driving vehicle also needs to control the entire driving process of the self-driving vehicle, so the need to reduce
  • the complexity of image processing is to prevent image processing from affecting the control process and response time of the control equipment in the autonomous vehicle; therefore, the autonomous vehicle needs to compress the captured image, and then the autonomous vehicle can perform the above compression process .
  • the image processing system is an automatic flight device.
  • the control device in the automatic flight device also needs to control the entire flight process of the automatic flight device. Reduce the complexity of image processing to prevent image processing from affecting the control process and response time of the control device in the automatic flight equipment; thus, the automatic flight equipment needs to compress the captured image, and then the automatic flight equipment can perform the above compression processing process.
  • S203 Determine cumulative histogram information of the image data to be processed according to the pixel values of the image data to be processed, where the cumulative histogram information includes cumulative probability distribution values of the pixel values of the image data to be processed.
  • the image processing system needs to perform adaptive global brightness adjustment and contrast adjustment on the compressed image data to be processed in sequence; before performing adaptive global brightness adjustment on the image data to be processed, image processing The system needs to determine the coefficients required for adaptive global brightness adjustment and the coefficients required for contrast adjustment.
  • the image processing system needs to count the accumulated histogram information of the image data to be processed. Specifically, each pixel in the image data to be processed has a pixel value, so the image data to be processed has a different pixel value; for each pixel value, the image processing system calculates the number of pixels on each pixel value. Then, the image processing system divides the number of pixels on each pixel value by the total number of pixels in the image data to be processed to obtain the pixel probability of each pixel value; then, the image processing system depends on the pixel The value of each pixel value is accumulated in turn to obtain the cumulative probability distribution value of each pixel value; the cumulative probability distribution value of each pixel value constitutes the cumulative histogram information of the image data to be processed.
  • the pixel value of each pixel is k, which belongs to a preset range; for example, the image data to be processed is a grayscale image, then k ⁇ [ 0,L], k and L are integers. If the number of pixels with pixel value k is n k , then the probability of pixel points with pixel value k is n k /P; the cumulative probability distribution value of pixel value k is Among them, j ⁇ [0,k], j is an integer.
  • the cumulative probability distribution value of the pixel values having the first coefficient and the second coefficient is greater than a preset threshold.
  • step S204 specifically includes the following process:
  • the selected value set includes N selected values, and each selected value is a pixel of the image data to be processed Value, the i-th selected value is less than the i+1-th selected value, N is a positive integer greater than or equal to 1, i ⁇ [1, N], i is a positive integer.
  • the i-th first preselection coefficient in the preset first preselection set will be determined as the first coefficient
  • the i-th second preselection coefficient in the preset second preselection set will be determined as the second Coefficients, where the first preselection set includes N+1 first preselection coefficients, the i-th first preselection coefficient is smaller than the i+1th first preselection coefficient, and the second preselection set includes N+1 second preselection coefficients Coefficient, the i-th second preselection coefficient is greater than the i+1th second preselection coefficient.
  • step S204 further includes the following process: when the cumulative probability distribution value of the N-1th selected value in the selected value set is less than or equal to the preset threshold, if it is determined that the Nth selected value set is If the cumulative probability distribution value of the selected value is less than or equal to the preset threshold, the N+1 first preselection coefficient in the first preselection set is determined as the first coefficient, and the Nth preselection coefficient in the preset second preselection set is determined +1 second preselection coefficient is the second coefficient.
  • the image processing system can directly divide the first coefficient for global brightness adjustment and the second coefficient for contrast adjustment according to the cumulative probability distribution value of the pixel values in the cumulative histogram information.
  • the image processing system selects N pixel values from the pixel values of the image data to be processed, and uses these N pixel values as N selection values, and the N selection values form a selection value set; It is convenient to determine the appropriate first coefficient and second coefficient according to the value of the pixel value of the image data to be processed, so as to adjust the brightness and contrast of the image data to be processed.
  • the selected value set you can The N selected values are placed in the selected value set according to the order of the selected values from small to large; thus, in the selected value set, the i-th selected value is less than the i+th 1 selected value.
  • each of the N pixel values has a cumulative probability distribution value
  • each of the N selected values also has a corresponding cumulative probability distribution value; that is, the value of the i-th pixel value
  • the cumulative probability distribution value and the cumulative probability distribution value of the i-th selected value are the same between the two.
  • the image processing system is configured with different N+1 first preselection coefficients and different N+1 second preselection coefficients.
  • the N+1 first preselection coefficients are used to form a first preselection set, and each first preselection coefficient is used as a candidate for the first coefficient; and, since the first coefficient is used for global brightness adjustment of the image, it is convenient to To select a suitable first preselection coefficient as the first coefficient, it is necessary to multiply the N+1 first preselection coefficients into the first preselection set according to the descending order of the N+1 first preselection coefficients, namely , The i-th first pre-selection coefficient is smaller than the i+1-th first pre-selection coefficient.
  • N+1 second preselection coefficients are used to form a second preselection set, and each second preselection coefficient is used as a candidate for the second coefficient; and, since the second coefficient is used to adjust the contrast of the image, it can be selected for convenience
  • the image processing system analyzes the selected values in turn. First, the image processing system determines whether the cumulative probability distribution value of the first selected value is greater than a preset threshold; if the image processing system determines the value of the first selected value If the cumulative probability distribution value is greater than a preset threshold, the image processing system can use the first first preselected coefficient as the first coefficient for global brightness adjustment, and use the first second preselected coefficient as the The second coefficient for contrast adjustment; if the image processing system determines that the cumulative probability distribution value of the first selected value is less than or equal to the aforementioned preset threshold, the image processing system needs to analyze the second selected value.
  • the image processing system determines whether the cumulative probability distribution value of the second selected value is greater than the above preset threshold; if the image processing system determines that the cumulative probability distribution value of the second selected value is greater than the above preset threshold, the image processing The system can use the second first preselected coefficient as the first coefficient for global brightness adjustment, and the second second preselected coefficient as the second coefficient for contrast adjustment; if the image processing system determines If the cumulative probability distribution value of the second selected value is less than or equal to the above preset threshold, the image processing system needs to analyze the third selected value.
  • the image processing system determines whether the cumulative probability distribution value of the i-th selected value is greater than the aforementioned preset threshold; if the image processing system determines that the cumulative probability distribution value of the i-th selected value is greater than the aforementioned preset threshold, then The image processing system may use the i-th first preselected coefficient as the first coefficient for global brightness adjustment, and use the i-th second preselected coefficient as the second coefficient for contrast adjustment; if image processing The system determines that the cumulative probability distribution value of the i-th selected value is less than or equal to the aforementioned preset threshold, and the image processing system needs to analyze the i-th selected value. And so on, until the first coefficient and the second coefficient can be determined.
  • the image processing system when the image processing system analyzes the Nth selected value according to the above process, and determines that the cumulative probability distribution value of the Nth selected value is less than or equal to the above preset threshold, the image processing system can directly The N+1 first preselected coefficients are used as the first coefficient, and the N+1 second preselected coefficient is used as the second coefficient.
  • the cumulative probability distribution value of the pixel values having the first coefficient and the second coefficient is greater than the foregoing preset threshold.
  • the image processing system is configured with two selected values, each of which is a different pixel value of the image data to be processed, and the two selected values are the selected value thr1 and the selected value thr2, and ,
  • the selected value thr1 is less than the selected value thr2; if the image processing system determines that the selected value thr1 is greater than the preset threshold xp_value, the image processing system can use a first preselected coefficient ⁇ 1 as the first coefficient ⁇ , and a The second preselection coefficient stret1 is used as the second coefficient stret; if the image processing system determines that the selected value thr1 is less than or equal to the preset threshold xp_value, the image processing system determines whether the selected value thr2 is greater than the preset threshold xp_value; if the image processing system If the selected value thr2 is determined to be greater than the preset threshold xp_value, the image processing system can use a first preselected coefficient ⁇ 2
  • the first preselection coefficient ⁇ 1 is smaller than the first preselection coefficient ⁇ 2, the first preselection coefficient ⁇ 2 is smaller than the first preselection coefficient ⁇ 3; the second preselection coefficient stret3 is smaller than the second preselection coefficient stret2, and the second preselection coefficient stret2 is smaller than the second preselection coefficient stret1.
  • the adaptive function is used to perform global brightness adjustment on the image data to be processed to obtain first image data; wherein the adaptive function is correlated with the brightness of the environmental image data.
  • the first coefficient in the adaptive function has a positive correlation with the brightness of the environmental image data, and the first coefficient is used to adjust the brightness of the environmental image data.
  • the adaptive function is a gamma correction function.
  • the image processing system has been pre-configured with an adaptive function, which is used to perform adaptive global brightness adjustment of the image; preferably, the adaptive function is a gamma correction function.
  • the image processing system can directly perform adaptive global brightness adjustment on the image data to be processed according to the adaptive function to obtain first image data; the first image data is the image data to be processed that has undergone adaptive global brightness adjustment.
  • the coefficients and parameters involved in the adaptive function are determined according to the brightness of the image data to be processed; because of the environmental image data collected by the visual sensor, The above-mentioned image data to be processed is formed, so it can be seen that the coefficients and parameters involved in the adaptive function are related to the brightness of the environmental image data.
  • adaptive global brightness adjustment is performed on the image data to be processed to obtain the first image data.
  • the first coefficient is positively correlated with the brightness of the environmental image data, that is, the higher the brightness of the environmental image data, the larger the first coefficient; in turn, the first coefficient may be positively correlated with the brightness of the environmental image data, To adjust the global brightness to be processed.
  • the adaptive function is a gamma correction function
  • the following formula can be used to determine that the first image data is among them, Is the image data to be processed, and ⁇ is the first coefficient.
  • the second coefficient used in the contrast adjustment is negatively correlated with the brightness of the environmental image data.
  • step S206 specifically includes the following process:
  • the second coefficient map the first value range of the first image data to the second value range, where the first value range is the value range of the pixel value of the first image data, and the second value The range is the value range between the second coefficient and the preset value.
  • the second image data is determined according to the pixel value, the first value range and the second value range of each pixel in the first image data.
  • the image processing system adjusts the image contrast of the first image data according to the above-mentioned second coefficient, so that the difference of the pixel values of the pixels in the first image data is more obvious, and then the second image data is obtained .
  • the pixel value range of the first image data constitutes a first value range; in order to adjust the contrast, when the image processing system performs the contrast stretching operation on the first image data, the image processing The system needs to first map the first value range of the first image data to the second value range.
  • the second value range is formed by the value between the second coefficient and the preset value; The value range of the pixel value of an image data is reduced to a smaller value range.
  • the image processing system generates a pixel value corresponding to each pixel in the first image data according to the pixel value, the first value range, and the second value range of each pixel in the first image data; Furthermore, the pixel value corresponding to each pixel in the first image data constitutes the second image data.
  • the second coefficient used is the same as the environment collected by the vision sensor.
  • the brightness of the image data is negatively correlated, that is, the higher the brightness of the environmental image data, the smaller the value of the second coefficient.
  • S207 Transmit the second image data to the processing device for processing.
  • the image processing system transmits the generated second image data to the processing device for processing.
  • the processing device can directly display the second image data, or the processing device can identify objects in the second image data.
  • the processing device may be another controller in the image processing system, or the processing device may be a movable platform.
  • the image processing system is a self-driving vehicle.
  • the self-driving vehicle can obtain the environmental image data in the driving environment of the self-driving vehicle through the visual sensor; then, in order to reduce the amount of calculation, the self-driving vehicle adopts The process of step S202 compresses the environmental image data to obtain the image data to be processed; then, the autonomous vehicle uses the determined first coefficient and uses the adaptive function to perform global brightness adjustment on the image data to be processed; then, the autonomous vehicle Using the determined second coefficient, perform contrast adjustment on the image that has undergone global brightness adjustment to obtain second image data; furthermore, the autonomous vehicle can perform processing processes such as display and recognition of the second image data.
  • the image processing system is an automatic flight device, you can also refer to the above process.
  • FIG. 7 is the first image diagram of the prior art provided by this application
  • FIG. 8 is the first image diagram of the second image data provided by this application.
  • the image processing system is an autonomous vehicle, and the autonomous vehicle is running on the road.
  • the self-driving vehicle uses the above process to obtain environmental image data, but the brightness and contrast of the image represented by the environmental image data are very poor, and the self-driving vehicle cannot perform the automatic driving process based on the acquired environmental image data; therefore,
  • the automatic driving vehicle adopts the solution provided in this embodiment, and after sequentially performing global brightness adjustment and contrast adjustment on the environmental image data, the second image data shown in FIG. 8 is obtained.
  • Figure 7 is an image obtained after adjusting the environmental image data using the Reinhard algorithm in the prior art.
  • the Reinhard algorithm is used to adjust an image with a single global color tone; comparing Figures 7 and 8, it can be seen that this The proposed solution can significantly improve the global brightness and contrast of environmental image data in a scene where an autonomous vehicle is driving on the road.
  • FIG. 9 is a second image diagram of the prior art provided by this application
  • FIG. 10 is a second image diagram of the second image data provided by this application.
  • the image processing system is an autonomous vehicle, and the autonomous vehicle is in a tunnel.
  • the autonomous vehicle uses the above process to obtain environmental image data, but the brightness and contrast of the image represented by the environmental image data are very poor.
  • the self-driving vehicle cannot perform automatic operation in the tunnel based on the acquired environmental image data.
  • Driving process thus, the automatic driving vehicle adopts the solution provided in this embodiment, and sequentially performs global brightness adjustment and contrast adjustment on the environmental image data to obtain the second image data shown in FIG. 10.
  • FIG. 9 is an image obtained after adjusting the environmental image data by using the Reinhard algorithm in the prior art; comparing Fig. 9 with Fig. 10, it can be seen that the scheme of this application is adopted in the scene of an autonomous vehicle driving in a tunnel , Can significantly improve the global brightness and contrast of environmental image data.
  • FIG. 11 is a third image diagram of the prior art provided by this application
  • FIG. 12 is a third image diagram of the second image data provided by this application.
  • the image processing system is an autonomous vehicle, and the autonomous vehicle runs at night
  • the self-driving vehicle uses the above process to obtain environmental image data
  • the pipeline at night is dark
  • the brightness and contrast of the image represented by the obtained environmental image data are very poor
  • the self-driving vehicle cannot obtain it according to According to the environmental image data
  • the automatic driving process is carried out at night; thus, the automatic driving vehicle adopts the solution provided in this embodiment, and after sequentially performing global brightness adjustment and contrast adjustment on the environmental image data, the second Image data.
  • FIG. 11 is an image obtained after adjusting the environmental image data by using the Reinhard algorithm in the prior art; comparing Fig. 11 and Fig. 12, it can be seen that the solution of the present application is used to drive the autonomous vehicle in a night environment At this time, the global brightness and contrast of the environmental image data can be significantly improved.
  • the image data to be processed is obtained by compressing the captured images acquired by the vision sensor mounted on the movable platform, which can reduce the amount of image processing data and accelerate the image processing speed; then, according to the first coefficient , The adaptive function is used to adjust the global brightness of the image data to be processed to obtain the first image data; then according to the second coefficient, the contrast adjustment of the first image data is performed to obtain the second image data; thus, the image data to be processed can be improved Global brightness and contrast can be used to obtain a clearer environment image; then, the second image data can be transmitted to processing equipment such as a mobile platform for online image processing.
  • the processing process is simple and clear, and the image data to be processed with a high dynamic range can be compressed quickly, with faster calculation speed and high real-time performance. ;
  • the adaptive global brightness adjustment can make the details of the image data to be processed be preserved as much as possible;
  • the contrast adjustment method can improve the contrast of the image after the brightness adjustment;
  • the adaptive global brightness adjustment and contrast adjustment The adjustment process is stable, and the image data to be processed can be processed stably without noise, halo, etc.
  • FIG. 13 is a schematic structural diagram of an image processing system provided by an embodiment of the application.
  • the image processing system 600 provided in this embodiment may include a processor 601, a memory 602, and a vision sensor 603.
  • the memory 602 is used to store program codes.
  • the visual sensor 603 is used to obtain image data to be processed, where the image data to be processed is carried on a movable platform, and the image data to be processed is environmental image data.
  • the processor 601 calls the program code.
  • the program code When the program code is executed, it is used to perform the following operations: perform adaptive global brightness adjustment on the image data to be processed to obtain the first image data; perform contrast adjustment on the first image data to obtain the first image data 2.
  • the processor 601 when the processor 601 performs adaptive global brightness adjustment on the image data to be processed to obtain the first image data, it is configured to: use an adaptive function to perform global brightness adjustment on the image data to be processed to obtain the first image data ; Among them, the adaptive function is related to the brightness of the environmental image data.
  • the first coefficient in the adaptive function is related to the brightness of the environmental image data, and the first coefficient is used to adjust the brightness of the environmental image data.
  • the second coefficient used for contrast adjustment is correlated with the brightness of the environmental image data.
  • the processor 601 before the processor 601 performs adaptive global brightness adjustment on the image data to be processed to obtain the first image data, it is further configured to: determine the cumulative histogram of the image data to be processed according to the pixel values of the image data to be processed Information, wherein the cumulative histogram information includes the cumulative probability distribution value of each pixel value of the image data to be processed; the first coefficient and the second coefficient are determined according to the cumulative histogram information.
  • the cumulative probability distribution value of the pixel values having the first coefficient and the second coefficient is greater than a preset threshold.
  • the processor 601 determines the first coefficient and the second coefficient according to the accumulated histogram information, it is used to: set the initial value of i to 1, and repeat the following steps until the first coefficient is determined And the second coefficient: determine whether the cumulative probability distribution value of the i-th selected value in the selected value set is greater than the preset threshold, where the selected value set includes N selected values, and each selected value is pending Processing the pixel value of image data, the i-th selected value is less than the i+1-th selected value, N is a positive integer greater than or equal to 1, i ⁇ [1, N], i is a positive integer; if it is determined to be greater than, then The i-th first preselection coefficient in the preset first preselection set will be determined as the first coefficient, and the i-th second preselection coefficient in the preset second preselection set will be determined as the second coefficient.
  • a preselection set includes N+1 first preselection coefficients, the i-th first preselection coefficient is smaller than the i+1th first preselection coefficient, the second preselection set includes N+1 second preselection coefficients, and the i-th The second preselection coefficient is greater than the i+1th second preselection coefficient; if it is determined that it is less than or equal to, it is determined that i is accumulated by 1.
  • the processor 601 is further configured to: when the cumulative probability distribution value of the N-1th selected value in the selected value set is less than or equal to the preset threshold, if it is determined that the value in the selected value set If the cumulative probability distribution value of the Nth selected value is less than or equal to the preset threshold, the N+1 first preselection coefficient in the first preselection set is determined as the first coefficient, and the preset second preselection set is determined The N+1 second preselected coefficient in the middle is the second coefficient.
  • the adaptive function is a gamma correction function.
  • the processor 601 when the processor 601 performs contrast adjustment on the first image data to obtain the second image data, it is used to: according to the second coefficient, map the first value range of the first image data to the second In terms of the value range, the first value range is the value range of the pixel value of the first image data, and the second value range is the value range between the second coefficient and the preset value; according to the first image The pixel value, the first value range and the second value range of each pixel in the data determine the second image data.
  • the visual sensor 603 when the visual sensor 603 acquires the image data to be processed, it is used to: acquire a photographed image, where the photographed image is environment image data with a high dynamic range acquired by the visual sensor 603.
  • the processor 601 is also configured to perform normalization processing on the captured image, and perform compression processing on the normalized captured image to obtain image data to be processed.
  • the image processing system 600 further includes: a transmitter 604; the transmitter 604 is configured to transmit the second image data to the processing device for processing.
  • the image processing system 600 of this embodiment can be used to implement the technical solutions of the method embodiments provided in FIGS. 5 to 6, and its implementation principles and technical effects are similar, and will not be repeated here.
  • FIG. 14 is a schematic structural diagram of a movable platform provided by an embodiment of this application.
  • the movable platform 700 provided in this embodiment may include a processor 701, a memory 702, and a vision sensor 703.
  • the memory 702 is used to store program codes.
  • the visual sensor 703 is used to obtain image data to be processed, and the image data to be processed is environmental image data.
  • the processor 701 calls the program code.
  • the program code When the program code is executed, it is used to perform the following operations: perform adaptive global brightness adjustment on the image data to be processed to obtain the first image data; perform contrast adjustment on the first image data to obtain the first image data Two image data; online image processing is performed on the second image data.
  • the processor 701 when the processor 701 performs adaptive global brightness adjustment on the image data to be processed to obtain the first image data, it is configured to: use an adaptive function to perform global brightness adjustment on the image data to be processed to obtain the first image data ; Among them, the adaptive function is related to the brightness of the environmental image data.
  • the first coefficient in the adaptive function is related to the brightness of the environmental image data, and the first coefficient is used to adjust the brightness of the environmental image data.
  • the second coefficient used for contrast adjustment is correlated with the brightness of the environmental image data.
  • the processor 701 before the processor 701 performs adaptive global brightness adjustment on the image data to be processed to obtain the first image data, it is further configured to: determine the cumulative histogram of the image data to be processed according to the pixel values of the image data to be processed Information, wherein the cumulative histogram information includes the cumulative probability distribution value of each pixel value of the image data to be processed; the first coefficient and the second coefficient are determined according to the cumulative histogram information.
  • the cumulative probability distribution value of the pixel values having the first coefficient and the second coefficient is greater than a preset threshold.
  • the processor 701 determines the first coefficient and the second coefficient according to the accumulated histogram information, it is used to: set the initial value of i to 1, and repeat the following steps until the first coefficient is determined And the second coefficient: determine whether the cumulative probability distribution value of the i-th selected value in the selected value set is greater than the preset threshold, where the selected value set includes N selected values, and each selected value is pending Processing the pixel value of image data, the i-th selected value is less than the i+1-th selected value, N is a positive integer greater than or equal to 1, i ⁇ [1, N], i is a positive integer; if it is determined to be greater than, then The i-th first preselection coefficient in the preset first preselection set will be determined as the first coefficient, and the i-th second preselection coefficient in the preset second preselection set will be determined as the second coefficient.
  • a preselection set includes N+1 first preselection coefficients, the i-th first preselection coefficient is smaller than the i+1th first preselection coefficient, the second preselection set includes N+1 second preselection coefficients, and the i-th The second preselection coefficient is greater than the i+1th second preselection coefficient; if it is determined that it is less than or equal to, it is determined that i is accumulated by 1.
  • the processor 701 is further configured to: when the cumulative probability distribution value of the N-1th selected value in the selected value set is less than or equal to the preset threshold, if it is determined that the value in the selected value set If the cumulative probability distribution value of the Nth selected value is less than or equal to the preset threshold, the N+1th first preselection coefficient in the first preselection set is determined as the first coefficient, and the preset second preselection set is determined The N+1 second preselected coefficient in the middle is the second coefficient.
  • the adaptive function is a gamma correction function.
  • the processor 701 when the processor 701 adjusts the contrast of the first image data to obtain the second image data, it is used to: according to the second coefficient, map the first value range of the first image data to the second In terms of the value range, the first value range is the value range of the pixel value of the first image data, and the second value range is the value range between the second coefficient and the preset value; according to the first image The pixel value, the first value range and the second value range of each pixel in the data determine the second image data.
  • the visual sensor 703 when the visual sensor 703 acquires the image data to be processed, it is used to: acquire a photographed image, where the photographed image is environment image data with a high dynamic range acquired by the visual sensor.
  • the processor 701 is further configured to perform normalization processing on the captured image, and perform compression processing on the normalized captured image to obtain image data to be processed.
  • the mobile platform 700 of this embodiment can be used to implement the technical solutions of the method embodiments provided in FIGS. 5 to 6, and the implementation principles and technical effects are similar, and will not be repeated here.
  • the embodiment of the present application also provides a computer storage medium.
  • the computer storage medium stores program instructions.
  • the program When the program is executed, it may include some or all of the steps of the image processing method in Figures 5 to 6 and the corresponding embodiments. Or, the program execution may include part or all of the steps of the image processing method as shown in FIGS. 5 to 6 and corresponding embodiments.
  • FIG. 15 is a schematic structural diagram of an image processing system provided by another embodiment of this application.
  • the image processing system 800 of this embodiment may include: an image processing system body 801 and an image processing device 802.
  • the image processing device 802 is installed on the main body 801 of the image processing system.
  • the image processing device 802 may be a device independent of the image processing system body 801.
  • the image processing device 802 can adopt the structure of the embodiment shown in FIG. 13, and correspondingly, it can implement the technical solutions of the embodiments of FIGS. 5 to 6 and the corresponding method.
  • the implementation principles and technical effects are similar, and will not be omitted here. Repeat.
  • FIG. 16 is a schematic structural diagram of a movable platform provided by another embodiment of this application.
  • the movable platform 900 of this embodiment may include a movable platform body 901 and an image processing device 902.
  • the image processing device 902 is installed on the movable platform body 901.
  • the image processing device 902 may be a device independent of the movable platform body 901.
  • the image processing device 902 can adopt the structure of the embodiment shown in FIG. 14, and correspondingly, it can execute the technical solutions of the embodiments of FIGS. 5 to 6 and the corresponding method embodiments.
  • the implementation principles and technical effects are similar and will not be repeated here. Repeat.
  • a person of ordinary skill in the art can understand that all or part of the steps in the above method embodiments can be implemented by a program instructing relevant hardware.
  • the foregoing program can be stored in a computer readable storage medium. When the program is executed, it is executed. Including the steps of the foregoing method embodiment; and the foregoing storage medium includes: read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disks or optical disks, etc., which can store program codes Medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)

Abstract

An image processing method and system, a movable platform, and a storage medium. The method comprises: acquiring image data to be processed, wherein the image data is environmental image data acquired by a vision sensor mounted on a movable platform; performing adaptive global brightness adjustment on the image data to acquire first image data; and performing contrast adjustment on the first image data to acquire second image data, wherein the second image data is for online image processing on the movable platform. The acquired image data is sequentially subjected to global brightness adjustment and contrast adjustment, and the processing process is simple and clear. The method quickly compresses image data having a high dynamic range, and has fast computational speeds and high performance in real-time, while allowing details of the image data to be preserved as much as possible, thereby improving the contrast of an image having been subjected to brightness adjustment.

Description

图像处理方法、系统、可移动平台和存储介质Image processing method, system, movable platform and storage medium 技术领域Technical field
本申请实施例涉及自动驾驶领域,尤其涉及一种图像处理方法、系统、可移动平台和存储介质。The embodiments of the present application relate to the field of automatic driving, and in particular, to an image processing method, system, movable platform, and storage medium.
背景技术Background technique
随着自动驾驶技术的研究和发展,自动驾驶技术和自动驾驶设备开始得到应用。自动驾驶设备,例如有自动驾驶车辆、无人机、等等。自动驾驶设备在行驶或飞行的过程中,需要采集当前环境的图像,进而对图像进行分析和处理,以完成自动驾驶、或者完成预定的任务。其中,采集到的图像是高比特图像,由于数据传输的限制、显示设备的硬件限制等原因,需要将高动态范围图像压缩为低动态范围图像;进而完成图像分析或者预定任务。With the research and development of autonomous driving technology, autonomous driving technology and autonomous driving equipment have begun to be applied. Autopilot equipment, such as autonomous vehicles, drones, etc. In the process of driving or flying, the automatic driving equipment needs to collect images of the current environment, and then analyze and process the images to complete automatic driving or complete predetermined tasks. Among them, the captured image is a high-bit image. Due to data transmission limitations and hardware limitations of the display device, it is necessary to compress the high dynamic range image into a low dynamic range image; thereby completing image analysis or predetermined tasks.
在通常的图像处理,例如相机拍照的后期处理中,可以对图像进行全局映射处理,即采用一个预设函数处理图像的像素值,得到处理后的图像。然而在采用全局映射处理方式处理图像的时候,由于是对所有像素点的像素值进行的统一处理,进而会损失掉图像的局部细节信息,得到图像的对比度和亮度都较差,例如图像的亮度偏暗或偏亮;从而得到的图像的质量较差。通常的图像处理还可以对图像进行局部映射处理,即根据不同区域的动态范围变化采用不同的映射曲线,可以提高映射结果的局部对比度,展现更多的细节,但会损失一定的全局成像效果。In normal image processing, for example, in the post-processing of taking a photo with a camera, the image can be subjected to global mapping processing, that is, a preset function is used to process the pixel value of the image to obtain the processed image. However, when the image is processed by the global mapping processing method, because the pixel values of all pixels are processed uniformly, the local detail information of the image will be lost, and the contrast and brightness of the obtained image are poor, such as the brightness of the image. Too dark or bright; the resulting image is of poor quality. Normal image processing can also perform local mapping processing on the image, that is, using different mapping curves according to changes in the dynamic range of different regions, which can improve the local contrast of the mapping result and show more details, but will lose a certain global imaging effect.
然而,在自动驾驶设备在行驶或飞行的过程中,由于场景复杂且经常变化很大,采集到的图像经常是高动态范围图像;并且由于自动驾驶设备在行驶或飞行的过程中,采集图像是用作后续的算法处理的,因此对采集图像的处理效果、数据量及处理实时性都有很高的要求,前述的通常的全局映射处理很难得到稳定的处理效果,局部映射处理计算复杂度高很难满足实时性要求,都难以满足自动驾驶设备上对图像处理的要求。However, in the process of driving or flying of the automatic driving equipment, because the scene is complex and often changes greatly, the collected images are often high dynamic range images; and because the automatic driving equipment is driving or flying, the collected images are It is used for subsequent algorithm processing, so it has high requirements on the processing effect, data volume and real-time processing of the captured image. The aforementioned general global mapping processing is difficult to obtain stable processing effects, and the local mapping processing is computationally complex. It is difficult to meet real-time requirements, and it is difficult to meet the requirements for image processing on automatic driving equipment.
发明内容Summary of the invention
本申请实施例提供一种图像处理方法、系统、可移动平台和存储介质,以保留图像的局部细节信息、得到的图像的对比度和亮度都较好,提高低动态范围图像的质量,并且利于实时性计算。The embodiments of the application provide an image processing method, system, removable platform, and storage medium to retain local detailed information of the image, and the contrast and brightness of the obtained image are better, improve the quality of low dynamic range images, and facilitate real-time性算。 Calculations.
第一方面,本申请实施例提供一种图像处理方法,包括:In the first aspect, an embodiment of the present application provides an image processing method, including:
获取待处理图像数据,其中,所述待处理图像数据为搭载于可移动平台的视觉传感器所获取的环境图像数据;Acquiring image data to be processed, where the image data to be processed is environmental image data acquired by a visual sensor mounted on a movable platform;
对所述待处理图像数据进行自适应的全局亮度调节,得到第一图像数据;Performing adaptive global brightness adjustment on the image data to be processed to obtain first image data;
对所述第一图像数据进行对比度调节,得到第二图像数据;Performing contrast adjustment on the first image data to obtain second image data;
其中,所述第二图像数据用于所述可移动平台的在线图像处理。Wherein, the second image data is used for online image processing of the movable platform.
第二方面,本申请实施例提供一种图像处理系统,包括:处理器、存储器和视觉传感器;In the second aspect, an embodiment of the present application provides an image processing system, including: a processor, a memory, and a vision sensor;
所述存储器用于存储程序代码;The memory is used to store program codes;
所述视觉传感器,用于获取待处理图像数据,其中,所述待处理图像数据为搭载于可移动平台上,且所述待处理图像数据为环境图像数据;The vision sensor is used to obtain image data to be processed, wherein the image data to be processed is carried on a movable platform, and the image data to be processed is environmental image data;
所述处理器,调用所述程序代码,当程序代码被执行时,用于执行以下操作:The processor calls the program code, and when the program code is executed, is used to perform the following operations:
对所述待处理图像数据进行自适应的全局亮度调节,得到第一图像数据;Performing adaptive global brightness adjustment on the image data to be processed to obtain first image data;
对所述第一图像数据进行对比度调节,得到第二图像数据;Performing contrast adjustment on the first image data to obtain second image data;
其中,所述第二图像数据用于所述可移动平台的在线图像处理。Wherein, the second image data is used for online image processing of the movable platform.
第三方面,本申请实施例提供一种可移动平台,包括:处理器、存储器和视觉传感器;In the third aspect, an embodiment of the present application provides a movable platform, including a processor, a memory, and a vision sensor;
所述存储器用于存储程序代码;The memory is used to store program codes;
所述视觉传感器,用于获取待处理图像数据,所述待处理图像数据为环境图像数据;The visual sensor is used to obtain image data to be processed, and the image data to be processed is environmental image data;
所述处理器,调用所述程序代码,当程序代码被执行时,用于执行以下操作:The processor calls the program code, and when the program code is executed, is used to perform the following operations:
对所述待处理图像数据进行自适应的全局亮度调节,得到第一图像数据;Performing adaptive global brightness adjustment on the image data to be processed to obtain first image data;
对所述第一图像数据进行对比度调节,得到第二图像数据;Performing contrast adjustment on the first image data to obtain second image data;
对所述第二图像数据,进行在线图像处理。Perform online image processing on the second image data.
第四方面,本申请实施例提供一种可读存储介质,所述可读存储介质上 存储有计算机程序;所述计算机程序在被执行时,实现如第一方面本申请实施例所述的图像处理方法。In a fourth aspect, an embodiment of the present application provides a readable storage medium with a computer program stored on the readable storage medium; when the computer program is executed, the image described in the embodiment of the present application in the first aspect is realized. Approach.
第五方面,本申请实施例提供一种程序产品,所述程序产品包括计算机程序,所述计算机程序存储在可读存储介质中,图像处理系统或可移动平台的至少一个处理器可以从所述可读存储介质读取所述计算机程序,所述至少一个处理器执行所述计算机程序使得图像处理系统或可移动平台实施如第一方面本申请实施例所述的图像处理方法。In a fifth aspect, an embodiment of the present application provides a program product, the program product includes a computer program, the computer program is stored in a readable storage medium, and at least one processor of an image processing system or a movable platform can download from the The readable storage medium reads the computer program, and the at least one processor executes the computer program to enable the image processing system or the mobile platform to implement the image processing method described in the embodiment of the present application in the first aspect.
本申请实施例提供的图像处理方法、系统、可移动平台和存储介质,通过获取可移动平台在移动过程中所处环境的环境图像数据,进而得到待处理图像数据;然后对环境图像数据依次进行全局亮度调节、对比度调节之后,得到低动态范围图像;由于所获取到的待处理图像数据为可移动平台的移动过程中所处的环境的环境图像数据,从而所生成的第二图像数据可以用于可移动平台进行在线图像处理。由于可以对所获取的待处理图像数据依次进行全局亮度调节、对比度调节,处理过程简单、清楚,可以快速的对高动态范围的待处理图像数据进行压缩,计算速度较快、实时性高;并且,自适应的全局亮度调节,可以使得待处理图像数据的细节尽可能的得到保留;对比度调节的方式,可以提高经过亮度调节后的图像的对比度;自适应的全局亮度调节和对比度调节的调节过程是稳定的,可以对待处理图像数据进行稳定的处理,不会出现噪声、光晕等。The image processing method, system, movable platform, and storage medium provided by the embodiments of the application obtain the image data to be processed by acquiring the environment image data of the environment in which the movable platform is in the process of moving; then, the environment image data is sequentially processed After global brightness adjustment and contrast adjustment, low dynamic range images are obtained; since the acquired image data to be processed is the environmental image data of the environment in which the movable platform is moving, the second image data generated can be used Online image processing on a mobile platform. Since the acquired image data to be processed can be sequentially adjusted for global brightness and contrast, the processing process is simple and clear, and the image data to be processed with high dynamic range can be compressed quickly, with fast calculation speed and high real-time performance; and , Adaptive global brightness adjustment, can make the details of the image data to be processed be preserved as much as possible; Contrast adjustment method can improve the contrast of the image after brightness adjustment; Adaptive global brightness adjustment and contrast adjustment adjustment process It is stable, and the image data to be processed can be processed stably without noise, halo, etc.
附图说明Description of the drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
图1为本申请提供的应用场景示意图一;Figure 1 is a schematic diagram 1 of the application scenario provided by this application;
图2为本申请提供的应用场景示意图二;Figure 2 is a second schematic diagram of the application scenario provided by this application;
图3为本申请提供的应用场景示意图三;Figure 3 is the third schematic diagram of the application scenario provided by this application;
图4为本申请提供的应用场景示意图四;Figure 4 is the fourth schematic diagram of the application scenario provided by this application;
图5为本申请一实施例提供的图像处理方法的流程图;FIG. 5 is a flowchart of an image processing method provided by an embodiment of the application;
图6为本申请另一实施例提供的图像处理方法的流程图;FIG. 6 is a flowchart of an image processing method provided by another embodiment of this application;
图7为本申请提供的现有技术的图像示意图一;FIG. 7 is a schematic diagram 1 of the prior art image provided by this application;
图8为本申请提供的第二图像数据的图像示意图一;FIG. 8 is the first image diagram of the second image data provided by this application;
图9为本申请提供的现有技术的图像示意图二;FIG. 9 is a second schematic diagram of an image of the prior art provided by this application;
图10为本申请提供的第二图像数据的图像示意图二;FIG. 10 is a second image diagram of the second image data provided by this application;
图11为本申请提供的现有技术的图像示意图三;FIG. 11 is a third image diagram of the prior art provided by this application;
图12为本申请提供的第二图像数据的图像示意图三;FIG. 12 is a third image diagram of the second image data provided by this application;
图13为本申请一实施例提供的图像处理系统的结构示意图;FIG. 13 is a schematic structural diagram of an image processing system provided by an embodiment of this application;
图14为本申请一实施例提供的可移动平台的结构示意图;FIG. 14 is a schematic structural diagram of a movable platform provided by an embodiment of this application;
图15为本申请另一实施例提供的图像处理系统的结构示意图;15 is a schematic structural diagram of an image processing system provided by another embodiment of this application;
图16为本申请另一实施例提供的可移动平台的结构示意图。FIG. 16 is a schematic structural diagram of a movable platform provided by another embodiment of this application.
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of this application.
需要说明的是,当组件被称为“固定于”另一个组件,它可以直接在另一个组件上或者也可以存在居中的组件。当一个组件被认为是“连接”另一个组件,它可以是直接连接到另一个组件或者可能同时存在居中组件。It should be noted that when a component is said to be "fixed to" another component, it can be directly on the other component or a central component may also exist. When a component is considered to be "connected" to another component, it can be directly connected to another component or there may be a centered component at the same time.
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中在本申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请。本文所使用的术语“及/或”包括一个或多个相关的所列项目的任意的和所有的组合。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field of this application. The terms used in the description of the application herein are only for the purpose of describing specific embodiments, and are not intended to limit the application. The term "and/or" as used herein includes any and all combinations of one or more related listed items.
下面结合附图,对本申请的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。Hereinafter, some embodiments of the present application will be described in detail with reference to the accompanying drawings. In the case of no conflict, the following embodiments and features in the embodiments can be combined with each other.
本申请的实施例提供了图像处理方法、系统、可移动平台和存储介质。图1为本申请提供的应用场景示意图一,图2为本申请提供的应用场景示意图二,图3为本申请提供的应用场景示意图三,如图1-图3所示,图像处理 方法可以应用到图像处理系统上,图像处理系统包括但不限于以下设备中的任意一种:网络设备1、终端设备2、车辆3。The embodiments of the present application provide an image processing method, system, removable platform, and storage medium. Figure 1 is a schematic diagram of the first application scenario provided by this application, Figure 2 is a schematic diagram of the second application scenario provided by this application, and Figure 3 is a schematic diagram three of the application scenario provided by this application, as shown in Figures 1 to 3, the image processing method can be applied As for the image processing system, the image processing system includes but is not limited to any one of the following devices: network device 1, terminal device 2, vehicle 3.
其中,网络设备1包括但不限于:传输点(Transmission Reception Point,简称TRP)、基站(如,gNB)、无线网络控制器(Radio Network Controller,简称RNC)、节点B(Node B,简称NB)、基站控制器(Base Station Controller,简称BSC)、BTS(Base Transceiver Station)、HeNB(Home Evolved NodeB),或HNB(Home Node B)、基带单元(Baseband Uit,简称BBU)等。Among them, the network device 1 includes but is not limited to: Transmission Reception Point (TRP), base station (eg, gNB), Radio Network Controller (RNC), Node B (Node B, NB) , Base Station Controller (Base Station Controller, referred to as BSC), BTS (Base Transceiver Station), HeNB (Home Evolved NodeB), or HNB (Home Node B), Baseband Unit (Baseband Uit, referred to as BBU), etc.
终端设备2包括但不限于车辆终端、车载终端、车辆设备、移动终端、公共终端等,其中,车载终端包括但不限于车载导航仪等,移动终端包括但不限于手机、可穿戴设备、平板电脑等。 Terminal equipment 2 includes but is not limited to vehicle terminals, vehicle terminals, vehicle equipment, mobile terminals, public terminals, etc., where vehicle terminals include, but are not limited to, vehicle navigators, etc., and mobile terminals include, but are not limited to, mobile phones, wearable devices, and tablets Wait.
车辆3包括但不限于普通车辆、自动驾驶车辆、无人驾驶车辆等等。The vehicle 3 includes but is not limited to ordinary vehicles, autonomous vehicles, unmanned vehicles, and so on.
图4为本申请提供的应用场景示意图四,如图4所示,图像处理方法可以应用到可移动平台上,可移动平台包括但不限于无人机4等等。Figure 4 is the fourth schematic diagram of the application scenario provided by this application. As shown in Figure 4, the image processing method can be applied to a movable platform, which includes but is not limited to UAV 4 and so on.
图像处理方法还可以应用到任意设备或者系统上,进而完成本申请提供的图像处理过程。The image processing method can also be applied to any device or system to complete the image processing process provided in this application.
应理解,上述对于设备的各组成部分的命名仅是出于标识的目的,并不应理解为对本申请的实施例的限制。It should be understood that the aforementioned naming of the components of the device is only for identification purposes, and should not be understood as a limitation to the embodiments of the present application.
在自动驾驶设备上,自动驾驶设备在行驶或飞行的过程中,需要采集当前环境的图像,进而对图像进行分析和处理,以完成自动驾驶、或者完成预定的任务。On automatic driving equipment, during driving or flying, the automatic driving equipment needs to collect images of the current environment, and then analyze and process the images to complete automatic driving or complete predetermined tasks.
由于高动态范围(High Dynamic Range)图像记录了图像的丰富的细节,从而高动态范围图像可以被应用到安防监控、设备成像、医学影像、自动驾驶、自动飞行等等技术领域中;其中,高动态范围图像,也可以称为高比特图像。在本申请所涉及的技术领域中,在获取到高动态范围图像之后,由于高动态范围图像的较大,造成数据传输较慢、图像显示较慢、存储空间的占用较多等等,需要将高动态范围图像压缩为低动态范围图像,然后完成图像分析或者预定任务。Since the High Dynamic Range image records the rich details of the image, the High Dynamic Range image can be applied to security monitoring, equipment imaging, medical imaging, automatic driving, automatic flight and other technical fields; among them, high Dynamic range images can also be called high-bit images. In the technical field involved in this application, after acquiring the high dynamic range image, due to the large high dynamic range image, the data transmission is slower, the image display is slower, and the storage space is occupied more. The high dynamic range image is compressed into a low dynamic range image, and then the image analysis or predetermined task is completed.
在将高动态范围图像压缩为低动态范围图像的过程中,通常可以采用全局映射处理方式,或者采用局部映射处理方式。In the process of compressing a high dynamic range image into a low dynamic range image, a global mapping processing method or a local mapping processing method can usually be used.
采用全局映射处理方式处理图像的时候,可以较好的呈现出图像的整体 效果,并且全局映射处理方式的计算效率较高;但是,采用全局映射处理方式处理图像的时候,由于是对所有像素点的像素值进行的统一处理,进而会损失掉图像的局部细节信息,得到图像的对比度和亮度都较差,例如图像的亮度偏暗或偏亮;从而得到的图像的质量较差,图像处理的效果较差。When the image is processed by the global mapping processing method, the overall effect of the image can be better presented, and the calculation efficiency of the global mapping processing method is higher; however, when the image is processed by the global mapping processing method, because it is for all pixels The unified processing of the pixel value of the image will lose the local detail information of the image, and the contrast and brightness of the image will be poor, such as the brightness of the image is dark or bright; the quality of the resulting image is poor, and the image processing The effect is poor.
采用局部映射处理方式处理图像的时候,由于局部映射处理方式可以根据不同区域的动态范围变化采用不同的映射曲线,从而可以提高图像的局部对比度,展现出图像的更多细节;但是采用局部映射处理方式处理图像的时候,损失一定的全局成像效果,并且容易在图像中产生光晕、噪声等等,并且,局部映射处理方式的计算复杂度较高。When the image is processed by the local mapping processing method, because the local mapping processing method can adopt different mapping curves according to the dynamic range of different regions, it can improve the local contrast of the image and show more details of the image; but the local mapping processing is adopted When processing the image in this way, a certain global imaging effect is lost, and it is easy to produce halo, noise, etc. in the image, and the calculation complexity of the local mapping processing method is relatively high.
但是,在自动驾驶设备在行驶或飞行的过程中,对采集的高动态范围图像的算法响应速度、图像处理效果等等都是具有很高要求的;全局映射处理方式很难得到稳定的处理效果,并且,无法针对高动态范围图像进行良好的压缩;局部映射处理方式的计算复杂度高很难满足实时性要求,都难以满足自动驾驶设备上对图像处理的要求。However, in the process of driving or flying, the automatic driving equipment has high requirements for the algorithm response speed and image processing effects of the collected high dynamic range images; the global mapping processing method is difficult to obtain stable processing effects Moreover, it is impossible to perform good compression for high dynamic range images; the high computational complexity of the local mapping processing method is difficult to meet the real-time requirements, and it is difficult to meet the requirements for image processing on automatic driving equipment.
本实施例提供的图像处理方法、系统、可移动平台和存储介质,可以解决上述问题。The image processing method, system, removable platform, and storage medium provided in this embodiment can solve the foregoing problems.
图5为本申请一实施例提供的图像处理方法的流程图,如图5所示,本实施例的方法可以包括:FIG. 5 is a flowchart of an image processing method provided by an embodiment of this application. As shown in FIG. 5, the method of this embodiment may include:
S101、获取待处理图像数据,其中,待处理图像数据为搭载于可移动平台的视觉传感器所获取的环境图像数据。S101. Acquire image data to be processed, where the image data to be processed is environmental image data acquired by a vision sensor mounted on a movable platform.
本实施例中,本实施例的执行主体可以是图像处理系统、或者是图像处理设备、或者是可移动平台。本实施例以执行主体为图像处理系统进行说明。In this embodiment, the execution subject of this embodiment may be an image processing system, or an image processing device, or a movable platform. This embodiment is described with the execution subject as the image processing system.
在可移动平台上设置有视觉传感器,其中,可移动平台可以是自动驾驶车辆、自动飞行设备等等。视觉传感器用于获取环境图像数据。A visual sensor is provided on the movable platform, where the movable platform may be an automatic driving vehicle, an automatic flying device, and so on. Vision sensors are used to obtain environmental image data.
从而,在可移动平台上的视觉传感器获取到环境图像数据的时候,图像处理系统可以获取到视觉传感器所获取到环境图像数据,进而,图像处理系统可以获取待处理图像数据。上述待处理图像数据,为高动态范围图像,即上述待处理图像数据,为高比特图像。Therefore, when the visual sensor on the movable platform obtains the environmental image data, the image processing system can obtain the environmental image data obtained by the visual sensor, and further, the image processing system can obtain the image data to be processed. The image data to be processed is a high dynamic range image, that is, the image data to be processed is a high-bit image.
举例来说,图像处理系统与可移动平台是两个不同的设备,在可移动平台上搭载有视觉传感器,图像处理系统与视觉传感器连接;随着可移动平台 的移动,视觉传感器可以实时的获取环境图像数据,进而获取到高动态范围图像;然后,图像处理系统可以实时的获取到视觉传感器所采集的环境图像数据。For example, the image processing system and the movable platform are two different devices. The movable platform is equipped with a vision sensor, and the image processing system is connected to the vision sensor; as the movable platform moves, the vision sensor can be acquired in real time Environmental image data, and then obtain high dynamic range images; then, the image processing system can obtain real-time environmental image data collected by the vision sensor.
再举例来说,图像处理系统与可移动平台是同一个设备,即,图像处理系统为一个可移动平台;在可移动平台上搭载有视觉传感器,可移动平台与视觉传感器连接;随着可移动平台的移动,视觉传感器可以实时的获取环境图像数据,进而获取到高动态范围图像,从而可移动平台可以实时的获取到视觉传感器所采集的环境图像数据。For another example, the image processing system and the movable platform are the same equipment, that is, the image processing system is a movable platform; the movable platform is equipped with a vision sensor, and the movable platform is connected to the vision sensor; With the movement of the platform, the visual sensor can obtain real-time environmental image data, and then obtain high dynamic range images, so that the movable platform can obtain real-time environmental image data collected by the visual sensor.
例如,图像处理系统为自动驾驶车辆,在自动驾驶车辆的行驶过程中,自动驾驶车辆可以通过视觉传感器获取到自动驾驶车辆行驶环境中的环境图像数据。For example, the image processing system is an autonomous driving vehicle. During the driving of the autonomous driving vehicle, the autonomous driving vehicle can obtain environmental image data in the driving environment of the autonomous driving vehicle through the visual sensor.
再例如,图像处理系统为自动飞行设备,在自动飞行设备的飞行过程中,自动飞行设备可以通过视觉传感器获取到自动飞行设备的飞行环境中的环境图像数据。For another example, the image processing system is an automatic flight device. During the flight of the automatic flight device, the automatic flight device can obtain the environmental image data of the flight environment of the automatic flight device through the visual sensor.
S102、对待处理图像数据进行自适应的全局亮度调节,得到第一图像数据。S102: Perform adaptive global brightness adjustment on the image data to be processed to obtain first image data.
本实施例中,图像处理系统在得到待处理图像数据之后,采用自适应处理方式对待处理图像数据进行全局亮度调节,进而生成第一图像数据。可选的,自适应处理方式为自适应函数,例如,自适应函数为伽马校正函数,或者,自适应函数为其他的现有技术中的校正函数。In this embodiment, after obtaining the image data to be processed, the image processing system adopts an adaptive processing method to perform global brightness adjustment on the image data to be processed, and then generates the first image data. Optionally, the adaptive processing method is an adaptive function, for example, the adaptive function is a gamma correction function, or the adaptive function is another correction function in the prior art.
S103、对第一图像数据进行对比度调节,得到第二图像数据;其中,第二图像数据用于可移动平台的在线图像处理。S103. Perform contrast adjustment on the first image data to obtain second image data, where the second image data is used for online image processing of the movable platform.
本实施例中,图像处理系统在对待处理图像数据进行了全局亮度调节之后,再对所得到第一图像数据进行对比度调节,进而生成第二图像数据。可选的,对比度调节的方式,可以为采用直方图均衡化、或者自适应直方图均衡化算法、插值加速算法等等;以上算法为现有技术中所提供的图像对比度调整的算法。In this embodiment, after the image processing system performs global brightness adjustment on the image data to be processed, the contrast adjustment is performed on the obtained first image data to generate the second image data. Optionally, the contrast adjustment method may be the use of histogram equalization, or an adaptive histogram equalization algorithm, an interpolation acceleration algorithm, etc.; the above algorithm is an image contrast adjustment algorithm provided in the prior art.
在本申请中,所获取到的待处理图像数据为可移动平台的移动过程中所处环境的环境图像数据,进而所生成的第二图像数据,是对环境图像数据依次进行了全局亮度调节、对比度调节之后所得到图像;可以将第二图像数据 用于进行可移动平台的在线图像处理过程,即,可移动平台可以对第二图像数据进行在线图像处理。例如,可移动平台可以直接显示第二图像数据,或者,可移动平台对第二图像数据中的对象进行识别。In this application, the acquired image data to be processed is the environmental image data of the environment in which the mobile platform is moving during the movement process, and the second image data generated is to sequentially adjust the global brightness of the environmental image data, The image obtained after the contrast adjustment; the second image data can be used for online image processing of the mobile platform, that is, the mobile platform can perform online image processing on the second image data. For example, the movable platform may directly display the second image data, or the movable platform may recognize objects in the second image data.
并且,上述第二图像数据是低动态范围图像。And, the above-mentioned second image data is a low dynamic range image.
举例来说,图像处理系统与可移动平台是两个不同的设备,根据步骤S101中的举例,图像处理系统可以实时的获取到视觉传感器所采集的环境图像数据;图像处理系统对环境图像数据依次进行了全局亮度调节、对比度调节之后,得到第二图像数据;图像处理系统可以将第二图像数据发送给可移动平台进行图像处理。For example, the image processing system and the movable platform are two different devices. According to the example in step S101, the image processing system can obtain the environmental image data collected by the visual sensor in real time; After the global brightness adjustment and contrast adjustment are performed, the second image data is obtained; the image processing system can send the second image data to the movable platform for image processing.
再举例来说,图像处理系统与可移动平台是同一个设备,根据步骤S101中的举例,可移动平台可以实时的获取到视觉传感器所采集的环境图像数据;可移动平台对环境图像数据依次进行了全局亮度调节、对比度调节之后,得到第二图像数据;然后,可移动平台直接对第二图像数据进行图像处理。For another example, the image processing system and the movable platform are the same equipment. According to the example in step S101, the movable platform can obtain the environmental image data collected by the visual sensor in real time; the movable platform performs sequential processing on the environmental image data After adjusting the global brightness and contrast, the second image data is obtained; then, the movable platform directly performs image processing on the second image data.
例如,图像处理系统为自动驾驶车辆,在自动驾驶车辆的行驶过程中,自动驾驶车辆可以通过视觉传感器获取到自动驾驶车辆行驶环境中的环境图像数据;由于自动驾驶车辆获取到的环境图像数据是高动态范围图像,高动态范围图像的图像大小是比较大的,自动驾驶车辆需要将高动态范围图像压缩为低动态范围图像,以便于快速的对图像进行处理或传输;然后自动驾驶车辆对环境图像数据依次进行了全局亮度调节、对比度调节之后,得到第二图像数据,进而得到低动态范围图像;然后,自动驾驶车辆对第二图像数据进行后续的图像分析、图像显示等等过程。For example, the image processing system is a self-driving vehicle. During the driving of the self-driving vehicle, the self-driving vehicle can obtain the environmental image data in the driving environment of the self-driving vehicle through the visual sensor; because the environmental image data obtained by the self-driving vehicle is High dynamic range images. The image size of high dynamic range images is relatively large. Autonomous vehicles need to compress the high dynamic range images into low dynamic range images in order to process or transmit the images quickly; then the autonomous vehicles will respond to the environment After the image data is adjusted for global brightness and contrast in sequence, the second image data is obtained, and then the low dynamic range image is obtained; then, the autonomous vehicle performs subsequent image analysis, image display, etc. processes on the second image data.
再例如,图像处理系统为自动飞行设备,在自动飞行设备的飞行过程中,自动飞行设备可以通过视觉传感器获取到自动飞行设备的飞行环境中的环境图像数据;由于自动飞行设备获取到的环境图像数据是高动态范围图像,高动态范围图像的图像大小是比较大的,自动飞行设备需要将高动态范围图像压缩为低动态范围图像,以便于快速的对图像进行处理或传输;然后自动飞行设备对环境图像数据依次进行了全局亮度调节、对比度调节之后,得到第二图像数据,进而得到低动态范围图像;然后,自动飞行设备对第二图像数据进行后续的图像分析、图像显示等等过程。For another example, the image processing system is an automatic flight device. During the flight of the automatic flight device, the automatic flight device can obtain the environmental image data of the flight environment of the automatic flight device through the vision sensor; due to the environmental image obtained by the automatic flight device The data is a high dynamic range image, and the image size of the high dynamic range image is relatively large. The automatic flight equipment needs to compress the high dynamic range image into a low dynamic range image in order to quickly process or transmit the image; then the automatic flight equipment After global brightness adjustment and contrast adjustment are sequentially performed on the environmental image data, the second image data is obtained, and then the low dynamic range image is obtained; then, the autopilot device performs subsequent image analysis and image display processes on the second image data.
本实施例,通过获取待处理图像数据,待处理图像数据为搭载于可移动 平台的视觉传感器所获取的环境图像数据;对待处理图像数据进行自适应的全局亮度调节,得到第一图像数据;对第一图像数据进行对比度调节,得到第二图像数据;第二图像数据用于可移动平台的在线图像处理。获取可移动平台在移动过程中所处环境的环境图像数据,进而得到待处理图像数据;然后对环境图像数据依次进行全局亮度调节、对比度调节之后,得到低动态范围图像;由于所获取到的待处理图像数据为可移动平台的移动过程中所处的环境的环境图像数据,从而所生成的第二图像数据可以用于可移动平台进行在线图像处理。由于可以对所获取的待处理图像数据依次进行全局亮度调节、对比度调节,处理过程简单、清楚,可以快速的对高动态范围的待处理图像数据进行压缩,计算速度较快、实时性高;并且,自适应的全局亮度调节,可以使得待处理图像数据的细节尽可能的得到保留;对比度调节的方式,可以提高经过亮度调节后的图像的对比度;自适应的全局亮度调节和对比度调节的调节过程是稳定的,可以对待处理图像数据进行稳定的处理,不会出现噪声、光晕等。In this embodiment, by acquiring image data to be processed, the image data to be processed is environmental image data acquired by a visual sensor mounted on a movable platform; adaptive global brightness adjustment is performed on the image data to be processed to obtain the first image data; The contrast of the first image data is adjusted to obtain the second image data; the second image data is used for online image processing of the movable platform. Obtain the environmental image data of the environment in which the mobile platform is in the process of moving, and then obtain the image data to be processed; then perform global brightness adjustment and contrast adjustment on the environmental image data in turn to obtain a low dynamic range image; due to the acquired waiting The processed image data is environmental image data of the environment in which the movable platform is in the process of moving, so that the generated second image data can be used for online image processing by the movable platform. Since the acquired image data to be processed can be sequentially adjusted for global brightness and contrast, the processing process is simple and clear, and the image data to be processed with high dynamic range can be compressed quickly, with fast calculation speed and high real-time performance; and , Adaptive global brightness adjustment, can make the details of the image data to be processed be preserved as much as possible; Contrast adjustment method can improve the contrast of the image after brightness adjustment; Adaptive global brightness adjustment and contrast adjustment adjustment process It is stable, and the image data to be processed can be processed stably without noise, halo, etc.
图6为本申请另一实施例提供的图像处理方法的流程图,如图6所示,本实施例的方法可以包括:FIG. 6 is a flowchart of an image processing method provided by another embodiment of this application. As shown in FIG. 6, the method in this embodiment may include:
S201、获取拍摄图像,其中,拍摄图像为搭载于可移动平台的视觉传感器所获取的高动态范围的环境图像数据。S201. Acquire a photographed image, where the photographed image is environment image data with a high dynamic range acquired by a vision sensor mounted on a movable platform.
本实施例中,本实施例的执行主体可以是图像处理系统、或者是图像处理设备、或者是可移动平台。本实施例以执行主体为图像处理系统进行说明。In this embodiment, the execution subject of this embodiment may be an image processing system, or an image processing device, or a movable platform. This embodiment is described with the execution subject as the image processing system.
在可移动平台上设置有视觉传感器,其中,可移动平台可以是自动驾驶车辆、自动飞行设备等等。视觉传感器用于获取环境图像数据。A visual sensor is provided on the movable platform, where the movable platform may be an automatic driving vehicle, an automatic flying device, and so on. Vision sensors are used to obtain environmental image data.
随着可移动平台的移动,可移动平台上的视觉传感器可以实时的获取周围环境的环境图像数据,其中,环境图像数据为高动态范围图像;然后,图像处理系统可以获取到视觉传感器所采集到的环境图像数据,即,图像处理系统获取到拍摄图像。With the movement of the movable platform, the visual sensor on the movable platform can obtain real-time environmental image data of the surrounding environment, where the environmental image data is a high dynamic range image; then, the image processing system can obtain the data collected by the visual sensor Environment image data, that is, the image processing system acquires the captured image.
其中,上述图像处理系统与上述可移动平台,可以是同一个设备,或者是不同设备。Wherein, the above-mentioned image processing system and the above-mentioned movable platform may be the same device or different devices.
举例来说,图像处理系统为自动驾驶车辆,在自动驾驶车辆上设置有视 觉传感器;在自动驾驶车辆的行驶过程中,视觉传感器可以实时的采集环境图像数据,即,采集到拍摄图像;进而,自动驾驶车辆获取到拍摄图像。For example, the image processing system is an autonomous driving vehicle, and the vision sensor is set on the autonomous driving vehicle; during the driving process of the autonomous driving vehicle, the vision sensor can collect environmental image data in real time, that is, the captured image; The self-driving vehicle acquires the captured image.
再举例来说,图像处理系统为自动飞行设备,在自动飞行设备上设置有视觉传感器;在自动飞行设备的飞行过程中,视觉传感器可以实时的采集环境图像数据,即,采集到拍摄图像;进而,自动飞行设备获取到拍摄图像。For another example, the image processing system is an automatic flight device, and a vision sensor is provided on the automatic flight device; during the flight of the automatic flight device, the vision sensor can collect environmental image data in real time, that is, collect captured images; , The automatic flight equipment acquires the captured image.
S202、对拍摄图像进行归一化处理,并对归一化后的拍摄图像进行压缩处理,得到待处理图像数据。S202: Perform normalization processing on the captured image, and perform compression processing on the normalized captured image to obtain image data to be processed.
本实施例中,为了加快对拍摄图像的图像处理过程,图像处理系统需要对拍摄图像进行压缩处理。In this embodiment, in order to speed up the image processing process of the captured image, the image processing system needs to compress the captured image.
在进行压缩处理之前,图像处理系统首先需要对拍摄图像进行归一化处理,得到归一化处理后的拍摄图像。具体的,若拍摄图像为灰度图像,图像处理系统需要对拍摄图像中的各像素点的像素值,归一化到一个预设范围之内,例如,预设范围为像素值[0,1]。若拍摄图像为彩色图像,且拍摄图像为RGB(Red Green Blue)图像,图像处理系统可以将RGB图像转换为YUV(Luminance Chrominance Chroma)图像;然后,图像处理系统将Y维度上的图像数据的数值,归一化到一个预设范围之内,并且,将U维度上的图像数据的数值,归一化到另一个预设范围之内,将V维度上的图像数据的数值,归一化到其他一个预设范围之内;或者,图像处理系统可以只对Y维度上的图像数据的数值进行归一化处理,图像处理系统可以将Y维度上的图像数据的数值,归一化到一个预设范围之内,然后后续的图像处理过程,图像处理系统只对将Y维度上的图像数据进行分析。Before performing compression processing, the image processing system first needs to normalize the captured image to obtain the normalized captured image. Specifically, if the captured image is a grayscale image, the image processing system needs to normalize the pixel value of each pixel in the captured image to a preset range, for example, the preset range is the pixel value [0, 1 ]. If the captured image is a color image, and the captured image is an RGB (Red Green Blue) image, the image processing system can convert the RGB image into a YUV (Luminance Chrominance Chroma) image; then, the image processing system converts the value of the image data in the Y dimension , Normalize to a preset range, and normalize the value of the image data in the U dimension to another preset range, and normalize the value of the image data in the V dimension to Within a preset range; or, the image processing system can only normalize the value of the image data in the Y dimension, and the image processing system can normalize the value of the image data in the Y dimension to a preset range. Set within the range, and then in the subsequent image processing process, the image processing system only analyzes the image data in the Y dimension.
然后,图像处理系统在得到归一化处理后的拍摄图像之后,就可以对归一化处理后的拍摄图像进行压缩处理了,进而得到待处理图像数据,待处理图像数据为低动态范围图像。Then, after the image processing system obtains the normalized captured image, it can compress the normalized captured image, and then obtain the image data to be processed, which is a low dynamic range image.
可选的,可以采用现有的压缩算法,将高动态范围的拍摄图像,压缩为低动态范围图像,即,得到待处理图像数据。Optionally, an existing compression algorithm can be used to compress the high dynamic range captured image into a low dynamic range image, that is, to obtain image data to be processed.
可选的,可以采用公式L out=(A*log(B+L in))/(log(C+D*L in))得到经过了压缩处理的待处理图像数据,其中,L in为归一化处理后的拍摄图像,L out为待处理图像数据,A、B、C、D均为预设的压缩参数。 Optionally, the formula L out =(A*log(B+L in ))/(log(C+D*L in )) can be used to obtain the compressed image data to be processed, where Lin is the return In the photographed image after unified processing, L out is the image data to be processed, and A, B, C and D are all preset compression parameters.
本申请中,对于上述压缩处理的方式,不做限定。经过上述压缩处理, 可以降低拍摄图像的数据量,提高后续的图像处理过程的处理速度。In this application, there is no limitation on the above-mentioned compression processing method. After the above-mentioned compression processing, the data volume of the captured image can be reduced, and the processing speed of the subsequent image processing process can be improved.
例如,图像处理系统为自动驾驶车辆,自动驾驶车辆在获取到拍摄图像之后,由于自动驾驶车辆处于行驶过程中,自动驾驶车辆中的控制设备还需要控制自动驾驶车辆的整个行驶过程,所以需要降低图像处理的复杂度,以避免图像处理影响到自动驾驶车辆中的控制设备的控制过程、响应时间;从而,自动驾驶车辆需要对拍摄图像进行压缩,然后,自动驾驶车辆可以执行上述压缩处理的过程。For example, the image processing system is a self-driving vehicle. After the self-driving vehicle acquires the captured image, since the self-driving vehicle is in the process of driving, the control device in the self-driving vehicle also needs to control the entire driving process of the self-driving vehicle, so the need to reduce The complexity of image processing is to prevent image processing from affecting the control process and response time of the control equipment in the autonomous vehicle; therefore, the autonomous vehicle needs to compress the captured image, and then the autonomous vehicle can perform the above compression process .
再例如,图像处理系统为自动飞行设备,自动飞行设备在获取到拍摄图像之后,由于自动飞行设备处于飞行过程中,自动飞行设备中的控制设备还需要控制自动飞行设备的整个飞行过程,所以需要降低图像处理的复杂度,以避免图像处理影响到自动飞行设备中的控制设备的控制过程、响应时间;从而,自动飞行设备需要对拍摄图像进行压缩,然后,自动飞行设备可以执行上述压缩处理的过程。For another example, the image processing system is an automatic flight device. After the automatic flight device acquires the captured image, since the automatic flight device is in flight, the control device in the automatic flight device also needs to control the entire flight process of the automatic flight device. Reduce the complexity of image processing to prevent image processing from affecting the control process and response time of the control device in the automatic flight equipment; thus, the automatic flight equipment needs to compress the captured image, and then the automatic flight equipment can perform the above compression processing process.
S203、根据待处理图像数据的像素值,确定待处理图像数据的累计直方图信息,其中,累计直方图信息中包括待处理图像数据的各个像素值的累计概率分布值。S203. Determine cumulative histogram information of the image data to be processed according to the pixel values of the image data to be processed, where the cumulative histogram information includes cumulative probability distribution values of the pixel values of the image data to be processed.
本实施例中,图像处理系统需要对经过了压缩处理后的上述待处理图像数据,依次进行自适应的全局亮度调节、对比度调节;在对待处理图像数据进行自适应的全局亮度调节之前,图像处理系统需要确定出自适应的全局亮度调节所需要的系数、对比度调节所需要的系数。In this embodiment, the image processing system needs to perform adaptive global brightness adjustment and contrast adjustment on the compressed image data to be processed in sequence; before performing adaptive global brightness adjustment on the image data to be processed, image processing The system needs to determine the coefficients required for adaptive global brightness adjustment and the coefficients required for contrast adjustment.
首先,图像处理系统需要统计出待处理图像数据的累计直方图信息。具体的,待处理图像数据中的各个像素点具有像素值,从而,待处理图像数据具有不同的像素值;针对每一个像素值,图像处理系统计算出在每一个像素值上的像素点的个数,然后,图像处理系统将每一个像素值上的像素点的个数,除以待处理图像数据的像素点总个数,得到每一个像素值的像素点概率;然后,图像处理系统依据像素值的大小,依次对每一个像素值的像素点概率进行累加,进而得到每一个像素值的累计概率分布值;各个像素值的累计概率分布值,构成了待处理图像数据的累计直方图信息。First, the image processing system needs to count the accumulated histogram information of the image data to be processed. Specifically, each pixel in the image data to be processed has a pixel value, so the image data to be processed has a different pixel value; for each pixel value, the image processing system calculates the number of pixels on each pixel value. Then, the image processing system divides the number of pixels on each pixel value by the total number of pixels in the image data to be processed to obtain the pixel probability of each pixel value; then, the image processing system depends on the pixel The value of each pixel value is accumulated in turn to obtain the cumulative probability distribution value of each pixel value; the cumulative probability distribution value of each pixel value constitutes the cumulative histogram information of the image data to be processed.
举例来说,待处理图像数据中具有P个像素点,每一个像素点的像素值的取值为k,k属于一个预设范围;例如,待处理图像数据为灰度图,则k∈[0,L], k、L为整数。具有像素值k的像素点的个数为n k,则像素值k的像素点概率为n k/P;像素值k的累计概率分布值为
Figure PCTCN2019098329-appb-000001
其中,j∈[0,k],j为整数。
For example, there are P pixels in the image data to be processed, and the pixel value of each pixel is k, which belongs to a preset range; for example, the image data to be processed is a grayscale image, then k∈[ 0,L], k and L are integers. If the number of pixels with pixel value k is n k , then the probability of pixel points with pixel value k is n k /P; the cumulative probability distribution value of pixel value k is
Figure PCTCN2019098329-appb-000001
Among them, j∈[0,k], j is an integer.
S204、根据累计直方图信息,确定第一系数和第二系数。S204: Determine the first coefficient and the second coefficient according to the accumulated histogram information.
可选的,具有第一系数和第二系数的像素值的累计概率分布值,大于预设阈值。Optionally, the cumulative probability distribution value of the pixel values having the first coefficient and the second coefficient is greater than a preset threshold.
可选的,步骤S204具体包括以下过程:Optionally, step S204 specifically includes the following process:
设定i的初始值为1,重复执行以下各步骤,直至确定出第一系数和第二系数。Set the initial value of i to 1, and repeat the following steps until the first coefficient and the second coefficient are determined.
判断选取值集合中第i个选取值的累计概率分布值,是否大于预设阈值,其中,选取值集合中包括N个选取值,各选取值均是待处理图像数据的像素值,第i个选取值小于第i+1个选取值,N为大于等于1的正整数,i∈[1,N],i为正整数。Determine whether the cumulative probability distribution value of the i-th selected value in the selected value set is greater than the preset threshold, where the selected value set includes N selected values, and each selected value is a pixel of the image data to be processed Value, the i-th selected value is less than the i+1-th selected value, N is a positive integer greater than or equal to 1, i∈[1, N], i is a positive integer.
若确定大于,则将确定预设的第一预选集合中的第i个第一预选系数,为第一系数,并确定预设的第二预选集合中第i个第二预选系数,为第二系数,其中,第一预选集合中包括N+1个第一预选系数,第i个第一预选系数小于第i+1个第一预选系数,第二预选集合中包括N+1个第二预选系数,第i个第二预选系数大于第i+1个第二预选系数。If it is determined to be greater than, the i-th first preselection coefficient in the preset first preselection set will be determined as the first coefficient, and the i-th second preselection coefficient in the preset second preselection set will be determined as the second Coefficients, where the first preselection set includes N+1 first preselection coefficients, the i-th first preselection coefficient is smaller than the i+1th first preselection coefficient, and the second preselection set includes N+1 second preselection coefficients Coefficient, the i-th second preselection coefficient is greater than the i+1th second preselection coefficient.
若确定小于等于,则确定i累加1。If it is determined that it is less than or equal to, it is determined that i is accumulated by 1.
可选的,步骤S204还包括以下过程:在选取值集合中的第N-1个选取值的累计概率分布值,小于等于预设阈值时,若确定选取值集合中的第N个选取值的累计概率分布值,小于等于预设阈值,则确定第一预选集合中的第N+1个第一预选系数,为第一系数,并确定预设的第二预选集合中第N+1个第二预选系数,为第二系数。Optionally, step S204 further includes the following process: when the cumulative probability distribution value of the N-1th selected value in the selected value set is less than or equal to the preset threshold, if it is determined that the Nth selected value set is If the cumulative probability distribution value of the selected value is less than or equal to the preset threshold, the N+1 first preselection coefficient in the first preselection set is determined as the first coefficient, and the Nth preselection coefficient in the preset second preselection set is determined +1 second preselection coefficient is the second coefficient.
本实施例中,图像处理系统可以根据累计直方图信息中的像素值的累计概率分布值,直接划分出用于进行全局亮度调节的第一系数、用于进行对比度调节的第二系数。In this embodiment, the image processing system can directly divide the first coefficient for global brightness adjustment and the second coefficient for contrast adjustment according to the cumulative probability distribution value of the pixel values in the cumulative histogram information.
具体的,图像处理系统从待处理图像数据的像素值中,选取了N个像素值,将这个N个像素值作为N个选取值,N个选取值构成了一个选取值集合;为了便于为根据待处理图像数据的像素值的取值大小,去确定出合适的第一 系数和第二系数,以对待处理图像数据进行核实的亮度、对比度调节,在选取值集合中,可以将N个选取值依据选取值的由小到大的次序,对N个选取值放置到选取值集合中;从而,在选取值集合中,第i个选取值小于第i+1个选取值。并且,由于N个像素值中的每一个像素值具有累计概率分布值,从而,N个选取值中的每一个选取值也具有对应的累计概率分布值;即,第i个像素值的累计概率分布值与第i个选取值的累计概率分布值,两者之间是相同的。Specifically, the image processing system selects N pixel values from the pixel values of the image data to be processed, and uses these N pixel values as N selection values, and the N selection values form a selection value set; It is convenient to determine the appropriate first coefficient and second coefficient according to the value of the pixel value of the image data to be processed, so as to adjust the brightness and contrast of the image data to be processed. In the selected value set, you can The N selected values are placed in the selected value set according to the order of the selected values from small to large; thus, in the selected value set, the i-th selected value is less than the i+th 1 selected value. Moreover, since each of the N pixel values has a cumulative probability distribution value, each of the N selected values also has a corresponding cumulative probability distribution value; that is, the value of the i-th pixel value The cumulative probability distribution value and the cumulative probability distribution value of the i-th selected value are the same between the two.
并且,图像处理系统配置了不同的N+1个第一预选系数、不同的N+1第二预选系数。将N+1个第一预选系数,构成一个第一预选集合,各第一预选系数作为第一系数的备选;并且,由于第一系数用于进行图像的全局亮度调节,从而,为了便于可以选择出合适的第一预选系数去作为第一系数,需要根据N+1个第一预选系数的由小到大的次序,将N+1个第一预选系数繁殖到第一预选集合中,即,第i个第一预选系数小于第i+1个第一预选系数。将N+1个第二预选系数,构成一个第二预选集合,各第二预选系数作为第二系数的备选;并且,由于第二系数用于进行图像的对比度调节,从而,为了便于可以选择出合适的第二预选系数去作为第二系数,需要根据N+1个第二预选系数的由大到小的次序,将N+1个第二预选系数繁殖到第二预选集合中,即,第i个第一预选系数大于第i+1个第二预选系数。In addition, the image processing system is configured with different N+1 first preselection coefficients and different N+1 second preselection coefficients. The N+1 first preselection coefficients are used to form a first preselection set, and each first preselection coefficient is used as a candidate for the first coefficient; and, since the first coefficient is used for global brightness adjustment of the image, it is convenient to To select a suitable first preselection coefficient as the first coefficient, it is necessary to multiply the N+1 first preselection coefficients into the first preselection set according to the descending order of the N+1 first preselection coefficients, namely , The i-th first pre-selection coefficient is smaller than the i+1-th first pre-selection coefficient. N+1 second preselection coefficients are used to form a second preselection set, and each second preselection coefficient is used as a candidate for the second coefficient; and, since the second coefficient is used to adjust the contrast of the image, it can be selected for convenience To obtain a suitable second preselection coefficient as the second coefficient, it is necessary to multiply the N+1 second preselection coefficients into the second preselection set according to the descending order of the N+1 second preselection coefficients, that is, The i-th first preselection coefficient is greater than the (i+1)th second preselection coefficient.
然后,图像处理系统依次对选取值进行分析,首先,图像处理系统判断第1个选取值的累计概率分布值,是否大于一个预设阈值;若图像处理系统确定第1个选取值的累计概率分布值大于一个预设阈值,则图像处理系统可以将第1个第一预选系数,作为用于进行全局亮度调节的第一系数,并且,将第1个第二预选系数,作为用于进行对比度调节的第二系数;若图像处理系统确定第1个选取值的累计概率分布值小于等于上述预设阈值,则图像处理系统需要对第2个选取值进行分析。然后,图像处理系统判断第2个选取值的累计概率分布值,是否大于上述预设阈值;若图像处理系统确定第2个选取值的累计概率分布值大于上述预设阈值,则图像处理系统可以将第2个第一预选系数,作为用于进行全局亮度调节的第一系数,并且,将第2个第二预选系数,作为用于进行对比度调节的第二系数;若图像处理系统确定第2个选取值的累计概率分布值小于等于上述预设阈值,则图像处理系统需要 对第3个选取值进行分析。以此类推,图像处理系统判断第i个选取值的累计概率分布值,是否大于上述预设阈值;若图像处理系统确定第i个选取值的累计概率分布值大于上述预设阈值,则图像处理系统可以将第i个第一预选系数,作为用于进行全局亮度调节的第一系数,并且,将第i个第二预选系数,作为用于进行对比度调节的第二系数;若图像处理系统确定第i个选取值的累计概率分布值小于等于上述预设阈值,则图像处理系统需要对第i个选取值进行分析。以此类推,直至可以确定出第一系数和第二系数。可选的,当图像处理系统根据上述过程,分析到第N个选取值的时候,确定第N个选取值的累计概率分布值小于等于上述预设阈值,则图像处理系统可以直接将第N+1个第一预选系数,作为第一系数,并且,将第N+1个第二预选系数,作为第二系数。Then, the image processing system analyzes the selected values in turn. First, the image processing system determines whether the cumulative probability distribution value of the first selected value is greater than a preset threshold; if the image processing system determines the value of the first selected value If the cumulative probability distribution value is greater than a preset threshold, the image processing system can use the first first preselected coefficient as the first coefficient for global brightness adjustment, and use the first second preselected coefficient as the The second coefficient for contrast adjustment; if the image processing system determines that the cumulative probability distribution value of the first selected value is less than or equal to the aforementioned preset threshold, the image processing system needs to analyze the second selected value. Then, the image processing system determines whether the cumulative probability distribution value of the second selected value is greater than the above preset threshold; if the image processing system determines that the cumulative probability distribution value of the second selected value is greater than the above preset threshold, the image processing The system can use the second first preselected coefficient as the first coefficient for global brightness adjustment, and the second second preselected coefficient as the second coefficient for contrast adjustment; if the image processing system determines If the cumulative probability distribution value of the second selected value is less than or equal to the above preset threshold, the image processing system needs to analyze the third selected value. By analogy, the image processing system determines whether the cumulative probability distribution value of the i-th selected value is greater than the aforementioned preset threshold; if the image processing system determines that the cumulative probability distribution value of the i-th selected value is greater than the aforementioned preset threshold, then The image processing system may use the i-th first preselected coefficient as the first coefficient for global brightness adjustment, and use the i-th second preselected coefficient as the second coefficient for contrast adjustment; if image processing The system determines that the cumulative probability distribution value of the i-th selected value is less than or equal to the aforementioned preset threshold, and the image processing system needs to analyze the i-th selected value. And so on, until the first coefficient and the second coefficient can be determined. Optionally, when the image processing system analyzes the Nth selected value according to the above process, and determines that the cumulative probability distribution value of the Nth selected value is less than or equal to the above preset threshold, the image processing system can directly The N+1 first preselected coefficients are used as the first coefficient, and the N+1 second preselected coefficient is used as the second coefficient.
根据上述过程,可知,具有第一系数和第二系数的像素值的累计概率分布值,是大于上述预设阈值的。According to the foregoing process, it can be known that the cumulative probability distribution value of the pixel values having the first coefficient and the second coefficient is greater than the foregoing preset threshold.
举例来说,图像处理系统配置了2个选取值,每一个选取值分别为待处理图像数据的不同的像素值,2个选取值分别为选取值thr1和选取值thr2,并且,选取值thr1小于选取值thr2;图像处理系统若确定选取值thr1,大于预设阈值xp_value,则图像处理系统可以将一个第一预选系数γ1,作为第一系数γ,并且,将一个第二预选系数stret1,作为第二系数stret;图像处理系统若确定选取值thr1,小于等于预设阈值xp_value,则图像处理系统判断选取值thr2,是否大于预设阈值xp_value;图像处理系统若确定选取值thr2,大于预设阈值xp_value,则图像处理系统可以将一个第一预选系数γ2,作为第一系数γ,并且,将一个第二预选系数stret2,作为第二系数stret;图像处理系统若确定选取值thr2,小于等于预设阈值xp_value,则图像处理系统可以将一个第一预选系数γ3,作为第一系数γ,并且,将一个第二预选系数stret3,作为第二系数stret。并且,第一预选系数γ1小于第一预选系数γ2,第一预选系数γ2小于第一预选系数γ3;第二预选系数stret3小于第二预选系数stret2,第二预选系数stret2小于第二预选系数stret1。For example, the image processing system is configured with two selected values, each of which is a different pixel value of the image data to be processed, and the two selected values are the selected value thr1 and the selected value thr2, and , The selected value thr1 is less than the selected value thr2; if the image processing system determines that the selected value thr1 is greater than the preset threshold xp_value, the image processing system can use a first preselected coefficient γ1 as the first coefficient γ, and a The second preselection coefficient stret1 is used as the second coefficient stret; if the image processing system determines that the selected value thr1 is less than or equal to the preset threshold xp_value, the image processing system determines whether the selected value thr2 is greater than the preset threshold xp_value; if the image processing system If the selected value thr2 is determined to be greater than the preset threshold xp_value, the image processing system can use a first preselected coefficient γ2 as the first coefficient γ, and a second preselected coefficient stret2 as the second coefficient stret; image processing system If it is determined that the selected value thr2 is less than or equal to the preset threshold xp_value, the image processing system may use a first preselected coefficient γ3 as the first coefficient γ, and a second preselected coefficient stret3 as the second coefficient stret. In addition, the first preselection coefficient γ1 is smaller than the first preselection coefficient γ2, the first preselection coefficient γ2 is smaller than the first preselection coefficient γ3; the second preselection coefficient stret3 is smaller than the second preselection coefficient stret2, and the second preselection coefficient stret2 is smaller than the second preselection coefficient stret1.
S205、采用自适应函数,对待处理图像数据进行全局亮度调节,得到第一图像数据;其中,自适应函数与环境图像数据的亮度之间相关。S205. The adaptive function is used to perform global brightness adjustment on the image data to be processed to obtain first image data; wherein the adaptive function is correlated with the brightness of the environmental image data.
可选的,自适应函数中的第一系数与环境图像数据的亮度之间正相关, 第一系数用于对环境图像数据进行亮度调节。Optionally, the first coefficient in the adaptive function has a positive correlation with the brightness of the environmental image data, and the first coefficient is used to adjust the brightness of the environmental image data.
可选的,自适应函数为伽马校正函数。Optionally, the adaptive function is a gamma correction function.
本实施例中,图像处理系统已经被预先配置了一个自适应函数,该自适应函数用于进行图像的自适应的全局亮度调节;优选的,自适应函数为伽马校正函数。In this embodiment, the image processing system has been pre-configured with an adaptive function, which is used to perform adaptive global brightness adjustment of the image; preferably, the adaptive function is a gamma correction function.
然后,图像处理系统就可以直接根据自适应函数,对待处理图像数据进行自适应的全局亮度调节,得到第一图像数据;第一图像数据为经过了自适应的全局亮度调节的待处理图像数据。Then, the image processing system can directly perform adaptive global brightness adjustment on the image data to be processed according to the adaptive function to obtain first image data; the first image data is the image data to be processed that has undergone adaptive global brightness adjustment.
并且,为了良好的提高待处理图像数据的全局亮度,自适应函数中的所涉及的系数和参数,是与根据待处理图像数据的亮度而确定的;由于视觉传感器所采集到的环境图像数据,构成了上述待处理图像数据,从而可知,自适应函数涉及的系数和参数,是与环境图像数据的亮度之间相关的。Moreover, in order to improve the global brightness of the image data to be processed, the coefficients and parameters involved in the adaptive function are determined according to the brightness of the image data to be processed; because of the environmental image data collected by the visual sensor, The above-mentioned image data to be processed is formed, so it can be seen that the coefficients and parameters involved in the adaptive function are related to the brightness of the environmental image data.
优选的,根据上述步骤S205中所确定出第一系数,对待处理图像数据进行自适应的全局亮度调节,得到第一图像数据。并且,第一系数与环境图像数据的亮度之间正相关,即,环境图像数据的亮度越高,第一系数越大;进而可以根据与环境图像数据的亮度之间正相关的第一系数,去调节待处理的全局亮度。Preferably, according to the first coefficient determined in step S205, adaptive global brightness adjustment is performed on the image data to be processed to obtain the first image data. In addition, the first coefficient is positively correlated with the brightness of the environmental image data, that is, the higher the brightness of the environmental image data, the larger the first coefficient; in turn, the first coefficient may be positively correlated with the brightness of the environmental image data, To adjust the global brightness to be processed.
举例来说,在自适应函数为伽马校正函数的时候,可以采用如下公式确定出第一图像数据为
Figure PCTCN2019098329-appb-000002
其中,
Figure PCTCN2019098329-appb-000003
为待处理图像数据,γ为第一系数。
For example, when the adaptive function is a gamma correction function, the following formula can be used to determine that the first image data is
Figure PCTCN2019098329-appb-000002
among them,
Figure PCTCN2019098329-appb-000003
Is the image data to be processed, and γ is the first coefficient.
S206、对第一图像数据进行对比度调节,得到第二图像数据;其中,第二图像数据用于可移动平台的在线图像处理。S206. Perform contrast adjustment on the first image data to obtain second image data, where the second image data is used for online image processing of the movable platform.
可选的,对比度调节所采用的第二系数与环境图像数据的亮度之间负相关。Optionally, the second coefficient used in the contrast adjustment is negatively correlated with the brightness of the environmental image data.
可选的,步骤S206具体包括以下过程:Optionally, step S206 specifically includes the following process:
根据第二系数,将第一图像数据的第一取值范围,映射到第二取值范围上,其中,第一取值范围为第一图像数据的像素值的取值范围,第二取值范围为第二系数与预设取值之间的取值范围。According to the second coefficient, map the first value range of the first image data to the second value range, where the first value range is the value range of the pixel value of the first image data, and the second value The range is the value range between the second coefficient and the preset value.
根据第一图像数据中的每一个像素点的像素值、第一取值范围和第二取值范围,确定第二图像数据。The second image data is determined according to the pixel value, the first value range and the second value range of each pixel in the first image data.
本实施例中,图像处理系统依据上述第二系数,对第一图像数据进行图像的对比度调节,使得第一图像数据中的像素点的像素值的差异化更加明显,然后,得到第二图像数据。In this embodiment, the image processing system adjusts the image contrast of the first image data according to the above-mentioned second coefficient, so that the difference of the pixel values of the pixels in the first image data is more obvious, and then the second image data is obtained .
具体的,第一图像数据的像素值的取值范围,构成了一个第一取值范围;为了进行对比度的调节,图像处理系统在对第一图像数据进行对比度的拉伸操作的时候,图像处理系统需要先将第一图像数据的第一取值范围,映射到第二取值范围上,上述第二取值范围由第二系数与预设取值之间的取值所构成;从而将第一图像数据的像素值的取值范围,缩小到一个更小的取值范围之内。Specifically, the pixel value range of the first image data constitutes a first value range; in order to adjust the contrast, when the image processing system performs the contrast stretching operation on the first image data, the image processing The system needs to first map the first value range of the first image data to the second value range. The second value range is formed by the value between the second coefficient and the preset value; The value range of the pixel value of an image data is reduced to a smaller value range.
然后,图像处理系统依据第一图像数据中的每一个像素点的像素值、第一取值范围和第二取值范围,生成与第一图像数据中的每一个像素点所对应的像素值;进而,与第一图像数据中的每一个像素点所对应的像素值,构成了第二图像数据。Then, the image processing system generates a pixel value corresponding to each pixel in the first image data according to the pixel value, the first value range, and the second value range of each pixel in the first image data; Furthermore, the pixel value corresponding to each pixel in the first image data constitutes the second image data.
可选的,第二图像数据中的每一个像素点的像素值为y=((x-a)*(d-c)/(b-a))+c;其中,第一取值范围为[a,b],第二取值范围为[c,d],a为第一图像数据的最小像素值,b为第一图像数据的最大像素值,c为第二系数,d为预设取值。Optionally, the pixel value of each pixel in the second image data is y=((xa)*(dc)/(ba))+c; wherein, the first value range is [a,b], The second value range is [c, d], a is the minimum pixel value of the first image data, b is the maximum pixel value of the first image data, c is the second coefficient, and d is the preset value.
并且,在上述过程中,为了使得所生成的第二图像数据中的像素点的像素值的差异化更加明显,在进行对比度调节的时候,所采用的第二系数是与视觉传感器所采集的环境图像数据的亮度之间负相关,即,环境图像数据的亮度越高,第二系数的取值越小。Moreover, in the above process, in order to make the difference of the pixel values of the pixels in the generated second image data more obvious, when the contrast is adjusted, the second coefficient used is the same as the environment collected by the vision sensor. The brightness of the image data is negatively correlated, that is, the higher the brightness of the environmental image data, the smaller the value of the second coefficient.
S207、将第二图像数据,传输给处理设备进行处理。S207: Transmit the second image data to the processing device for processing.
本实施例中,图像处理系统将生成的第二图像数据,传输给处理设备进行处理,例如,处理设备可以直接显示第二图像数据,或者,处理设备对第二图像数据中的对象进行识别。In this embodiment, the image processing system transmits the generated second image data to the processing device for processing. For example, the processing device can directly display the second image data, or the processing device can identify objects in the second image data.
其中,处理设备可以是图像处理系统中的其他控制器,或者,处理设备可以是可移动平台。The processing device may be another controller in the image processing system, or the processing device may be a movable platform.
例如,图像处理系统为自动驾驶车辆,在自动驾驶车辆的行驶过程中,自动驾驶车辆可以通过视觉传感器获取到自动驾驶车辆行驶环境中的环境图像数据;然后,为了减少计算量,自动驾驶车辆采用步骤S202的过程对环境 图像数据进行压缩处理,得到待处理图像数据;然后,自动驾驶车辆采用所确定出的第一系数,采用自适应函数对待处理图像数据进行全局亮度调节;然后,自动驾驶车辆采用所确定出的第二系数,对经过了全局亮度调节的图像,进行对比度调节,得到第二图像数据;进而,自动驾驶车辆可以对第二图像数据进行显示、识别等处理过程。图像处理系统为自动飞行设备的时候,也可以参见如上过程。For example, the image processing system is a self-driving vehicle. During the driving of the self-driving vehicle, the self-driving vehicle can obtain the environmental image data in the driving environment of the self-driving vehicle through the visual sensor; then, in order to reduce the amount of calculation, the self-driving vehicle adopts The process of step S202 compresses the environmental image data to obtain the image data to be processed; then, the autonomous vehicle uses the determined first coefficient and uses the adaptive function to perform global brightness adjustment on the image data to be processed; then, the autonomous vehicle Using the determined second coefficient, perform contrast adjustment on the image that has undergone global brightness adjustment to obtain second image data; furthermore, the autonomous vehicle can perform processing processes such as display and recognition of the second image data. When the image processing system is an automatic flight device, you can also refer to the above process.
举例来说,图7为本申请提供的现有技术的图像示意图一,图8为本申请提供的第二图像数据的图像示意图一,图像处理系统为自动驾驶车辆,自动驾驶车辆在路面上行驶的时候,自动驾驶车辆采用上述过程,获取到环境图像数据,但是环境图像数据所表征的图像的亮度和对比度都很差,自动驾驶车辆无法依据获取到的环境图像数据进行自动驾驶过程;从而,自动驾驶车辆采用本实施例所提供的方案,对环境图像数据依次进行了全局亮度调节、对比度调节之后,得到图8所示的第二图像数据。图7为采用现有技术中的Reinhard算法,对环境图像数据进行调节之后得到的图像,Reinhard算法用于对全局颜色基调单一的图像进行调节;将图7和图8进行对比,可知,采用本申请的方案,在自动驾驶车辆在路面上行驶的场景中,可以明显的提高环境图像数据的全局亮度和对比度。For example, FIG. 7 is the first image diagram of the prior art provided by this application, and FIG. 8 is the first image diagram of the second image data provided by this application. The image processing system is an autonomous vehicle, and the autonomous vehicle is running on the road. At the time, the self-driving vehicle uses the above process to obtain environmental image data, but the brightness and contrast of the image represented by the environmental image data are very poor, and the self-driving vehicle cannot perform the automatic driving process based on the acquired environmental image data; therefore, The automatic driving vehicle adopts the solution provided in this embodiment, and after sequentially performing global brightness adjustment and contrast adjustment on the environmental image data, the second image data shown in FIG. 8 is obtained. Figure 7 is an image obtained after adjusting the environmental image data using the Reinhard algorithm in the prior art. The Reinhard algorithm is used to adjust an image with a single global color tone; comparing Figures 7 and 8, it can be seen that this The proposed solution can significantly improve the global brightness and contrast of environmental image data in a scene where an autonomous vehicle is driving on the road.
再举例来说,图9为本申请提供的现有技术的图像示意图二,图10为本申请提供的第二图像数据的图像示意图二,图像处理系统为自动驾驶车辆,自动驾驶车辆在隧道中行驶的时候,自动驾驶车辆采用上述过程,获取到环境图像数据,但是环境图像数据所表征的图像的亮度和对比度都很差,自动驾驶车辆无法依据获取到的环境图像数据,在隧道中进行自动驾驶过程;从而,自动驾驶车辆采用本实施例所提供的方案,对环境图像数据依次进行了全局亮度调节、对比度调节之后,得到图10所示的第二图像数据。图9为采用现有技术中的Reinhard算法,对环境图像数据进行调节之后得到的图像;将图9和图10进行对比,可知,采用本申请的方案,在自动驾驶车辆在隧道上行驶的场景中,可以明显的提高环境图像数据的全局亮度和对比度。For another example, FIG. 9 is a second image diagram of the prior art provided by this application, and FIG. 10 is a second image diagram of the second image data provided by this application. The image processing system is an autonomous vehicle, and the autonomous vehicle is in a tunnel. When driving, the autonomous vehicle uses the above process to obtain environmental image data, but the brightness and contrast of the image represented by the environmental image data are very poor. The self-driving vehicle cannot perform automatic operation in the tunnel based on the acquired environmental image data. Driving process; thus, the automatic driving vehicle adopts the solution provided in this embodiment, and sequentially performs global brightness adjustment and contrast adjustment on the environmental image data to obtain the second image data shown in FIG. 10. Fig. 9 is an image obtained after adjusting the environmental image data by using the Reinhard algorithm in the prior art; comparing Fig. 9 with Fig. 10, it can be seen that the scheme of this application is adopted in the scene of an autonomous vehicle driving in a tunnel , Can significantly improve the global brightness and contrast of environmental image data.
又举例来说,图11为本申请提供的现有技术的图像示意图三,图12为本申请提供的第二图像数据的图像示意图三,图像处理系统为自动驾驶车辆,自动驾驶车辆在夜晚行驶的时候,自动驾驶车辆采用上述过程,获取到环境 图像数据,由于夜晚的管线较暗,从而所获取到的环境图像数据所表征的图像的亮度和对比度都很差,自动驾驶车辆无法依据获取到的环境图像数据,在夜晚中进行自动驾驶过程;从而,自动驾驶车辆采用本实施例所提供的方案,对环境图像数据依次进行了全局亮度调节、对比度调节之后,得到图12所示的第二图像数据。图11为采用现有技术中的Reinhard算法,对环境图像数据进行调节之后得到的图像;将图11和图12进行对比,可知,采用本申请的方案,在自动驾驶车辆在夜晚环境中行驶的时候,可以明显的提高环境图像数据的全局亮度和对比度。For another example, FIG. 11 is a third image diagram of the prior art provided by this application, and FIG. 12 is a third image diagram of the second image data provided by this application. The image processing system is an autonomous vehicle, and the autonomous vehicle runs at night When the self-driving vehicle uses the above process to obtain environmental image data, because the pipeline at night is dark, the brightness and contrast of the image represented by the obtained environmental image data are very poor, and the self-driving vehicle cannot obtain it according to According to the environmental image data, the automatic driving process is carried out at night; thus, the automatic driving vehicle adopts the solution provided in this embodiment, and after sequentially performing global brightness adjustment and contrast adjustment on the environmental image data, the second Image data. Fig. 11 is an image obtained after adjusting the environmental image data by using the Reinhard algorithm in the prior art; comparing Fig. 11 and Fig. 12, it can be seen that the solution of the present application is used to drive the autonomous vehicle in a night environment At this time, the global brightness and contrast of the environmental image data can be significantly improved.
本实施例,通过对搭载于可移动平台的视觉传感器所获取的拍摄图像,进行压缩处理,得到待处理图像数据,可以减小图像处理的数据量,加快图像处理速度;然后,根据第一系数,采用自适应函数对待处理图像数据进行全局亮度调节,得到第一图像数据;再根据第二系数,对第一图像数据进行对比度调节,得到第二图像数据;从而,可以提升待处理图像数据的全局亮度和对比度,得到更为清楚的环境图像;然后,就可以将第二图像数据,传输给可移动平台等处理设备进行在线图像处理。从而,由于可以对所获取的待处理图像数据依次进行全局亮度调节、对比度调节,处理过程简单、清楚,可以快速的对高动态范围的待处理图像数据进行压缩,计算速度较快、实时性高;并且,自适应的全局亮度调节,可以使得待处理图像数据的细节尽可能的得到保留;对比度调节的方式,可以提高经过亮度调节后的图像的对比度;自适应的全局亮度调节和对比度调节的调节过程是稳定的,可以对待处理图像数据进行稳定的处理,不会出现噪声、光晕等。In this embodiment, the image data to be processed is obtained by compressing the captured images acquired by the vision sensor mounted on the movable platform, which can reduce the amount of image processing data and accelerate the image processing speed; then, according to the first coefficient , The adaptive function is used to adjust the global brightness of the image data to be processed to obtain the first image data; then according to the second coefficient, the contrast adjustment of the first image data is performed to obtain the second image data; thus, the image data to be processed can be improved Global brightness and contrast can be used to obtain a clearer environment image; then, the second image data can be transmitted to processing equipment such as a mobile platform for online image processing. Therefore, because the acquired image data to be processed can be sequentially adjusted for global brightness and contrast, the processing process is simple and clear, and the image data to be processed with a high dynamic range can be compressed quickly, with faster calculation speed and high real-time performance. ; And, the adaptive global brightness adjustment can make the details of the image data to be processed be preserved as much as possible; the contrast adjustment method can improve the contrast of the image after the brightness adjustment; the adaptive global brightness adjustment and contrast adjustment The adjustment process is stable, and the image data to be processed can be processed stably without noise, halo, etc.
图13为本申请一实施例提供的图像处理系统的结构示意图,图13所示,本实施例提供的图像处理系统600可以包括:处理器601、存储器602和视觉传感器603。FIG. 13 is a schematic structural diagram of an image processing system provided by an embodiment of the application. As shown in FIG. 13, the image processing system 600 provided in this embodiment may include a processor 601, a memory 602, and a vision sensor 603.
其中,存储器602用于存储程序代码。Among them, the memory 602 is used to store program codes.
视觉传感器603,用于获取待处理图像数据,其中,待处理图像数据为搭载于可移动平台上,且待处理图像数据为环境图像数据。The visual sensor 603 is used to obtain image data to be processed, where the image data to be processed is carried on a movable platform, and the image data to be processed is environmental image data.
处理器601,调用程序代码,当程序代码被执行时,用于执行以下操作:对待处理图像数据进行自适应的全局亮度调节,得到第一图像数据;对 第一图像数据进行对比度调节,得到第二图像数据;其中,第二图像数据用于可移动平台的在线图像处理。The processor 601 calls the program code. When the program code is executed, it is used to perform the following operations: perform adaptive global brightness adjustment on the image data to be processed to obtain the first image data; perform contrast adjustment on the first image data to obtain the first image data 2. Image data; where the second image data is used for online image processing of the mobile platform.
在一些实施例中,处理器601在对待处理图像数据进行自适应全局亮度调节,得到第一图像数据时,用于:采用自适应函数,对待处理图像数据进行全局亮度调节,得到第一图像数据;其中,自适应函数与环境图像数据的亮度之间相关。In some embodiments, when the processor 601 performs adaptive global brightness adjustment on the image data to be processed to obtain the first image data, it is configured to: use an adaptive function to perform global brightness adjustment on the image data to be processed to obtain the first image data ; Among them, the adaptive function is related to the brightness of the environmental image data.
在一些实施例中,自适应函数中的第一系数与环境图像数据的亮度之间相关,第一系数用于对环境图像数据进行亮度调节。In some embodiments, the first coefficient in the adaptive function is related to the brightness of the environmental image data, and the first coefficient is used to adjust the brightness of the environmental image data.
在一些实施例中,对比度调节所采用的第二系数与环境图像数据的亮度之间相关。In some embodiments, the second coefficient used for contrast adjustment is correlated with the brightness of the environmental image data.
在一些实施例中,处理器601在对待处理图像数据进行自适应全局亮度调节,得到第一图像数据之前,还用于:根据待处理图像数据的像素值,确定待处理图像数据的累计直方图信息,其中,累计直方图信息中包括待处理图像数据的各个像素值的累计概率分布值;根据累计直方图信息,确定第一系数和第二系数。In some embodiments, before the processor 601 performs adaptive global brightness adjustment on the image data to be processed to obtain the first image data, it is further configured to: determine the cumulative histogram of the image data to be processed according to the pixel values of the image data to be processed Information, wherein the cumulative histogram information includes the cumulative probability distribution value of each pixel value of the image data to be processed; the first coefficient and the second coefficient are determined according to the cumulative histogram information.
在一些实施例中,具有第一系数和第二系数的像素值的累计概率分布值,大于预设阈值。In some embodiments, the cumulative probability distribution value of the pixel values having the first coefficient and the second coefficient is greater than a preset threshold.
在一些实施例中,处理器601在根据累计直方图信息,确定第一系数和第二系数时,用于:设定i的初始值为1,重复执行以下各步骤,直至确定出第一系数和第二系数:判断选取值集合中第i个选取值的累计概率分布值,是否大于预设阈值,其中,选取值集合中包括N个选取值,各选取值均是待处理图像数据的像素值,第i个选取值小于第i+1个选取值,N为大于等于1的正整数,i∈[1,N],i为正整数;若确定大于,则将确定预设的第一预选集合中的第i个第一预选系数,为第一系数,并确定预设的第二预选集合中第i个第二预选系数,为第二系数,其中,第一预选集合中包括N+1个第一预选系数,第i个第一预选系数小于第i+1个第一预选系数,第二预选集合中包括N+1个第二预选系数,第i个第二预选系数大于第i+1个第二预选系数;若确定小于等于,则确定i累加1。In some embodiments, when the processor 601 determines the first coefficient and the second coefficient according to the accumulated histogram information, it is used to: set the initial value of i to 1, and repeat the following steps until the first coefficient is determined And the second coefficient: determine whether the cumulative probability distribution value of the i-th selected value in the selected value set is greater than the preset threshold, where the selected value set includes N selected values, and each selected value is pending Processing the pixel value of image data, the i-th selected value is less than the i+1-th selected value, N is a positive integer greater than or equal to 1, i∈[1, N], i is a positive integer; if it is determined to be greater than, then The i-th first preselection coefficient in the preset first preselection set will be determined as the first coefficient, and the i-th second preselection coefficient in the preset second preselection set will be determined as the second coefficient. A preselection set includes N+1 first preselection coefficients, the i-th first preselection coefficient is smaller than the i+1th first preselection coefficient, the second preselection set includes N+1 second preselection coefficients, and the i-th The second preselection coefficient is greater than the i+1th second preselection coefficient; if it is determined that it is less than or equal to, it is determined that i is accumulated by 1.
在一些实施例中,处理器601,还用于:在选取值集合中的第N-1个选取值的累计概率分布值,小于等于预设阈值时,若确定选取值集合中的第N 个选取值的累计概率分布值,小于等于预设阈值,则确定第一预选集合中的第N+1个第一预选系数,为第一系数,并确定预设的第二预选集合中第N+1个第二预选系数,为第二系数。In some embodiments, the processor 601 is further configured to: when the cumulative probability distribution value of the N-1th selected value in the selected value set is less than or equal to the preset threshold, if it is determined that the value in the selected value set If the cumulative probability distribution value of the Nth selected value is less than or equal to the preset threshold, the N+1 first preselection coefficient in the first preselection set is determined as the first coefficient, and the preset second preselection set is determined The N+1 second preselected coefficient in the middle is the second coefficient.
在一些实施例中,自适应函数为伽马校正函数。In some embodiments, the adaptive function is a gamma correction function.
在一些实施例中,处理器601在对第一图像数据进行对比度调节,得到第二图像数据时,用于:根据第二系数,将第一图像数据的第一取值范围,映射到第二取值范围上,其中,第一取值范围为第一图像数据的像素值的取值范围,第二取值范围为第二系数与预设取值之间的取值范围;根据第一图像数据中的每一个像素点的像素值、第一取值范围和第二取值范围,确定第二图像数据。In some embodiments, when the processor 601 performs contrast adjustment on the first image data to obtain the second image data, it is used to: according to the second coefficient, map the first value range of the first image data to the second In terms of the value range, the first value range is the value range of the pixel value of the first image data, and the second value range is the value range between the second coefficient and the preset value; according to the first image The pixel value, the first value range and the second value range of each pixel in the data determine the second image data.
在一些实施例中,视觉传感器603在获取待处理图像数据时,用于:获取拍摄图像,其中,拍摄图像为视觉传感器603所获取的高动态范围的环境图像数据。In some embodiments, when the visual sensor 603 acquires the image data to be processed, it is used to: acquire a photographed image, where the photographed image is environment image data with a high dynamic range acquired by the visual sensor 603.
处理器601,还用于对拍摄图像进行归一化处理,并对归一化后的拍摄图像进行压缩处理,得到待处理图像数据。The processor 601 is also configured to perform normalization processing on the captured image, and perform compression processing on the normalized captured image to obtain image data to be processed.
在一些实施例中,图像处理系统600,还包括:发送器604;发送器604,用于将第二图像数据,传输给处理设备进行处理。In some embodiments, the image processing system 600 further includes: a transmitter 604; the transmitter 604 is configured to transmit the second image data to the processing device for processing.
本实施例的图像处理系统600,可以用于执行图5-图6所提供的方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The image processing system 600 of this embodiment can be used to implement the technical solutions of the method embodiments provided in FIGS. 5 to 6, and its implementation principles and technical effects are similar, and will not be repeated here.
图14为本申请一实施例提供的可移动平台的结构示意图,图14所示,本实施例提供的可移动平台700可以包括:处理器701、存储器702和视觉传感器703。FIG. 14 is a schematic structural diagram of a movable platform provided by an embodiment of this application. As shown in FIG. 14, the movable platform 700 provided in this embodiment may include a processor 701, a memory 702, and a vision sensor 703.
其中,存储器702用于存储程序代码。Among them, the memory 702 is used to store program codes.
视觉传感器703,用于获取待处理图像数据,待处理图像数据为环境图像数据。The visual sensor 703 is used to obtain image data to be processed, and the image data to be processed is environmental image data.
处理器701,调用程序代码,当程序代码被执行时,用于执行以下操作:对待处理图像数据进行自适应的全局亮度调节,得到第一图像数据;对第一图像数据进行对比度调节,得到第二图像数据;对第二图像数据,进行在线图像处理。The processor 701 calls the program code. When the program code is executed, it is used to perform the following operations: perform adaptive global brightness adjustment on the image data to be processed to obtain the first image data; perform contrast adjustment on the first image data to obtain the first image data Two image data; online image processing is performed on the second image data.
在一些实施例中,处理器701在对待处理图像数据进行自适应全局亮度调节,得到第一图像数据时,用于:采用自适应函数,对待处理图像数据进行全局亮度调节,得到第一图像数据;其中,自适应函数与环境图像数据的亮度之间相关。In some embodiments, when the processor 701 performs adaptive global brightness adjustment on the image data to be processed to obtain the first image data, it is configured to: use an adaptive function to perform global brightness adjustment on the image data to be processed to obtain the first image data ; Among them, the adaptive function is related to the brightness of the environmental image data.
在一些实施例中,自适应函数中的第一系数与环境图像数据的亮度之间相关,第一系数用于对环境图像数据进行亮度调节。In some embodiments, the first coefficient in the adaptive function is related to the brightness of the environmental image data, and the first coefficient is used to adjust the brightness of the environmental image data.
在一些实施例中,对比度调节所采用的第二系数与环境图像数据的亮度之间相关。In some embodiments, the second coefficient used for contrast adjustment is correlated with the brightness of the environmental image data.
在一些实施例中,处理器701在对待处理图像数据进行自适应全局亮度调节,得到第一图像数据之前,还用于:根据待处理图像数据的像素值,确定待处理图像数据的累计直方图信息,其中,累计直方图信息中包括待处理图像数据的各个像素值的累计概率分布值;根据累计直方图信息,确定第一系数和第二系数。In some embodiments, before the processor 701 performs adaptive global brightness adjustment on the image data to be processed to obtain the first image data, it is further configured to: determine the cumulative histogram of the image data to be processed according to the pixel values of the image data to be processed Information, wherein the cumulative histogram information includes the cumulative probability distribution value of each pixel value of the image data to be processed; the first coefficient and the second coefficient are determined according to the cumulative histogram information.
在一些实施例中,具有第一系数和第二系数的像素值的累计概率分布值,大于预设阈值。In some embodiments, the cumulative probability distribution value of the pixel values having the first coefficient and the second coefficient is greater than a preset threshold.
在一些实施例中,处理器701在根据累计直方图信息,确定第一系数和第二系数时,用于:设定i的初始值为1,重复执行以下各步骤,直至确定出第一系数和第二系数:判断选取值集合中第i个选取值的累计概率分布值,是否大于预设阈值,其中,选取值集合中包括N个选取值,各选取值均是待处理图像数据的像素值,第i个选取值小于第i+1个选取值,N为大于等于1的正整数,i∈[1,N],i为正整数;若确定大于,则将确定预设的第一预选集合中的第i个第一预选系数,为第一系数,并确定预设的第二预选集合中第i个第二预选系数,为第二系数,其中,第一预选集合中包括N+1个第一预选系数,第i个第一预选系数小于第i+1个第一预选系数,第二预选集合中包括N+1个第二预选系数,第i个第二预选系数大于第i+1个第二预选系数;若确定小于等于,则确定i累加1。In some embodiments, when the processor 701 determines the first coefficient and the second coefficient according to the accumulated histogram information, it is used to: set the initial value of i to 1, and repeat the following steps until the first coefficient is determined And the second coefficient: determine whether the cumulative probability distribution value of the i-th selected value in the selected value set is greater than the preset threshold, where the selected value set includes N selected values, and each selected value is pending Processing the pixel value of image data, the i-th selected value is less than the i+1-th selected value, N is a positive integer greater than or equal to 1, i∈[1, N], i is a positive integer; if it is determined to be greater than, then The i-th first preselection coefficient in the preset first preselection set will be determined as the first coefficient, and the i-th second preselection coefficient in the preset second preselection set will be determined as the second coefficient. A preselection set includes N+1 first preselection coefficients, the i-th first preselection coefficient is smaller than the i+1th first preselection coefficient, the second preselection set includes N+1 second preselection coefficients, and the i-th The second preselection coefficient is greater than the i+1th second preselection coefficient; if it is determined that it is less than or equal to, it is determined that i is accumulated by 1.
在一些实施例中,处理器701,还用于:在选取值集合中的第N-1个选取值的累计概率分布值,小于等于预设阈值时,若确定选取值集合中的第N个选取值的累计概率分布值,小于等于预设阈值,则确定第一预选集合中的第N+1个第一预选系数,为第一系数,并确定预设的第二预选集合中第N+1 个第二预选系数,为第二系数。In some embodiments, the processor 701 is further configured to: when the cumulative probability distribution value of the N-1th selected value in the selected value set is less than or equal to the preset threshold, if it is determined that the value in the selected value set If the cumulative probability distribution value of the Nth selected value is less than or equal to the preset threshold, the N+1th first preselection coefficient in the first preselection set is determined as the first coefficient, and the preset second preselection set is determined The N+1 second preselected coefficient in the middle is the second coefficient.
在一些实施例中,自适应函数为伽马校正函数。In some embodiments, the adaptive function is a gamma correction function.
在一些实施例中,处理器701在对第一图像数据进行对比度调节,得到第二图像数据时,用于:根据第二系数,将第一图像数据的第一取值范围,映射到第二取值范围上,其中,第一取值范围为第一图像数据的像素值的取值范围,第二取值范围为第二系数与预设取值之间的取值范围;根据第一图像数据中的每一个像素点的像素值、第一取值范围和第二取值范围,确定第二图像数据。In some embodiments, when the processor 701 adjusts the contrast of the first image data to obtain the second image data, it is used to: according to the second coefficient, map the first value range of the first image data to the second In terms of the value range, the first value range is the value range of the pixel value of the first image data, and the second value range is the value range between the second coefficient and the preset value; according to the first image The pixel value, the first value range and the second value range of each pixel in the data determine the second image data.
在一些实施例中,视觉传感器703在获取待处理图像数据时,用于:获取拍摄图像,其中,拍摄图像为视觉传感器所获取的高动态范围的环境图像数据。In some embodiments, when the visual sensor 703 acquires the image data to be processed, it is used to: acquire a photographed image, where the photographed image is environment image data with a high dynamic range acquired by the visual sensor.
处理器701,还用于对拍摄图像进行归一化处理,并对归一化后的拍摄图像进行压缩处理,得到待处理图像数据。The processor 701 is further configured to perform normalization processing on the captured image, and perform compression processing on the normalized captured image to obtain image data to be processed.
本实施例的可移动平台700,可以用于执行图5-图6所提供的方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The mobile platform 700 of this embodiment can be used to implement the technical solutions of the method embodiments provided in FIGS. 5 to 6, and the implementation principles and technical effects are similar, and will not be repeated here.
本申请实施例中还提供了一种计算机存储介质,该计算机存储介质中存储有程序指令,程序执行时可包括如图5-图6及其对应实施例中的图像处理方法的部分或全部步骤,或者,程序执行时可包括如图5-图6及其对应实施例中的图像处理方法的部分或全部步骤。The embodiment of the present application also provides a computer storage medium. The computer storage medium stores program instructions. When the program is executed, it may include some or all of the steps of the image processing method in Figures 5 to 6 and the corresponding embodiments. Or, the program execution may include part or all of the steps of the image processing method as shown in FIGS. 5 to 6 and corresponding embodiments.
图15为本申请另一实施例提供的图像处理系统的结构示意图,如图15所示,本实施例的图像处理系统800可以包括:图像处理系统本体801以及图像处理装置802。FIG. 15 is a schematic structural diagram of an image processing system provided by another embodiment of this application. As shown in FIG. 15, the image processing system 800 of this embodiment may include: an image processing system body 801 and an image processing device 802.
其中,图像处理装置802安装于图像处理系统本体801上。图像处理装置802可以是独立于图像处理系统本体801的装置。The image processing device 802 is installed on the main body 801 of the image processing system. The image processing device 802 may be a device independent of the image processing system body 801.
其中,图像处理装置802可以采用图13所示实施例的结构,其对应地,可以执行图5-图6及其对应方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。Wherein, the image processing device 802 can adopt the structure of the embodiment shown in FIG. 13, and correspondingly, it can implement the technical solutions of the embodiments of FIGS. 5 to 6 and the corresponding method. The implementation principles and technical effects are similar, and will not be omitted here. Repeat.
图16为本申请另一实施例提供的可移动平台的结构示意图,如图16所示,本实施例的可移动平台900可以包括:可移动平台本体901以及图像处理装置902。FIG. 16 is a schematic structural diagram of a movable platform provided by another embodiment of this application. As shown in FIG. 16, the movable platform 900 of this embodiment may include a movable platform body 901 and an image processing device 902.
其中,图像处理装置902安装于可移动平台本体901上。图像处理装置902可以是独立于可移动平台本体901的装置。Among them, the image processing device 902 is installed on the movable platform body 901. The image processing device 902 may be a device independent of the movable platform body 901.
其中,图像处理装置902可以采用图14所示实施例的结构,其对应地,可以执行图5-图6及其对应方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。Wherein, the image processing device 902 can adopt the structure of the embodiment shown in FIG. 14, and correspondingly, it can execute the technical solutions of the embodiments of FIGS. 5 to 6 and the corresponding method embodiments. The implementation principles and technical effects are similar and will not be repeated here. Repeat.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:只读内存(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。A person of ordinary skill in the art can understand that all or part of the steps in the above method embodiments can be implemented by a program instructing relevant hardware. The foregoing program can be stored in a computer readable storage medium. When the program is executed, it is executed. Including the steps of the foregoing method embodiment; and the foregoing storage medium includes: read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disks or optical disks, etc., which can store program codes Medium.
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the application, not to limit them; although the application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand: It is still possible to modify the technical solutions described in the foregoing embodiments, or equivalently replace some or all of the technical features; these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the embodiments of the application range.

Claims (36)

  1. 一种图像处理方法,其特征在于,包括:An image processing method, characterized by comprising:
    获取待处理图像数据,其中,所述待处理图像数据为搭载于可移动平台的视觉传感器所获取的环境图像数据;Acquiring image data to be processed, where the image data to be processed is environmental image data acquired by a visual sensor mounted on a movable platform;
    对所述待处理图像数据进行自适应的全局亮度调节,得到第一图像数据;Performing adaptive global brightness adjustment on the image data to be processed to obtain first image data;
    对所述第一图像数据进行对比度调节,得到第二图像数据;Performing contrast adjustment on the first image data to obtain second image data;
    其中,所述第二图像数据用于所述可移动平台的在线图像处理。Wherein, the second image data is used for online image processing of the movable platform.
  2. 根据权利要求1所述的方法,其特征在于,对所述待处理图像数据进行自适应全局亮度调节,得到第一图像数据,包括:The method according to claim 1, wherein performing adaptive global brightness adjustment on the image data to be processed to obtain the first image data comprises:
    采用自适应函数,对所述待处理图像数据进行全局亮度调节,得到第一图像数据;其中,所述自适应函数与所述环境图像数据的亮度之间相关。An adaptive function is used to perform global brightness adjustment on the image data to be processed to obtain first image data; wherein the adaptive function is correlated with the brightness of the environmental image data.
  3. 根据权利要求2所述的方法,其特征在于,所述自适应函数中的第一系数与所述环境图像数据的亮度之间正相关,所述第一系数用于对所述环境图像数据进行亮度调节。The method according to claim 2, wherein the first coefficient in the adaptive function is positively correlated with the brightness of the environmental image data, and the first coefficient is used to perform the Dimming.
  4. 根据权利要求3所述的方法,其特征在于,所述对比度调节所采用的第二系数与所述环境图像数据的亮度之间负相关。The method according to claim 3, wherein the second coefficient used in the contrast adjustment is negatively correlated with the brightness of the environmental image data.
  5. 根据权利要求4所述的方法,其特征在于,在对所述待处理图像数据进行自适应全局亮度调节,得到第一图像数据之前,还包括:The method according to claim 4, wherein before performing adaptive global brightness adjustment on the image data to be processed to obtain the first image data, the method further comprises:
    根据所述待处理图像数据的像素值,确定所述待处理图像数据的累计直方图信息,其中,所述累计直方图信息中包括所述待处理图像数据的各个像素值的累计概率分布值;Determine the cumulative histogram information of the to-be-processed image data according to the pixel value of the to-be-processed image data, wherein the cumulative histogram information includes the cumulative probability distribution value of each pixel value of the to-be-processed image data;
    根据所述累计直方图信息,确定所述第一系数和所述第二系数。According to the cumulative histogram information, the first coefficient and the second coefficient are determined.
  6. 根据权利要求5所述的方法,其特征在于,具有第一系数和第二系数的像素值的累计概率分布值,大于预设阈值。The method according to claim 5, wherein the cumulative probability distribution value of the pixel values having the first coefficient and the second coefficient is greater than a preset threshold.
  7. 根据权利要求5或6所述的方法,其特征在于,根据所述累计直方图信息,确定所述第一系数和所述第二系数,包括:The method according to claim 5 or 6, wherein determining the first coefficient and the second coefficient according to the cumulative histogram information includes:
    设定i的初始值为1,重复执行以下各步骤,直至确定出所述第一系数和所述第二系数:Set the initial value of i to 1, and repeat the following steps until the first coefficient and the second coefficient are determined:
    判断选取值集合中第i个选取值的累计概率分布值,是否大于预设阈值,其中,所述选取值集合中包括N个选取值,各所述选取值均是所述待处理图 像数据的像素值,第i个选取值小于第i+1个选取值,N为大于等于1的正整数,i∈[1,N],i为正整数;Determine whether the cumulative probability distribution value of the i-th selected value in the selected value set is greater than a preset threshold, wherein the selected value set includes N selected values, and each of the selected values is the The pixel value of the image data to be processed, the i-th selected value is less than the i+1-th selected value, N is a positive integer greater than or equal to 1, i∈[1, N], i is a positive integer;
    若确定大于,则将确定预设的第一预选集合中的第i个第一预选系数,为所述第一系数,并确定预设的第二预选集合中第i个第二预选系数,为所述第二系数,其中,所述第一预选集合中包括N+1个第一预选系数,第i个第一预选系数小于第i+1个第一预选系数,所述第二预选集合中包括N+1个第二预选系数,第i个第二预选系数大于第i+1个第二预选系数;If it is determined to be greater than, the i-th first preselection coefficient in the preset first preselection set will be determined as the first coefficient, and the i-th second preselection coefficient in the preset second preselection set will be determined as The second coefficient, wherein, the first preselected set includes N+1 first preselected coefficients, the i-th first preselected coefficient is smaller than the i+1th first preselected coefficient, and the second preselected set Including N+1 second pre-selection coefficients, the i-th second pre-selection coefficient is greater than the i+1-th second pre-selection coefficient;
    若确定小于等于,则确定i累加1。If it is determined that it is less than or equal to, it is determined that i is accumulated by 1.
  8. 根据权利要求7所述的方法,其特征在于,所述方法,还包括:The method according to claim 7, characterized in that, the method further comprises:
    在所述选取值集合中的第N-1个选取值的累计概率分布值,小于等于所述预设阈值时,若确定所述选取值集合中的第N个选取值的累计概率分布值,小于等于所述预设阈值,则确定所述第一预选集合中的第N+1个第一预选系数,为所述第一系数,并确定预设的第二预选集合中第N+1个第二预选系数,为所述第二系数。When the cumulative probability distribution value of the N-1th selected value in the selected value set is less than or equal to the preset threshold, if the cumulative probability distribution of the Nth selected value in the selected value set is determined If the probability distribution value is less than or equal to the preset threshold, it is determined that the N+1th first preselection coefficient in the first preselection set is the first coefficient, and the first preselection coefficient in the preset second preselection set is determined N+1 second preselection coefficients are the second coefficients.
  9. 根据权利要求2-8任一项所述的方法,其特征在于,所述自适应函数为伽马校正函数。The method according to any one of claims 2-8, wherein the adaptive function is a gamma correction function.
  10. 根据权利要求3-8任一项所述的方法,其特征在于,对所述第一图像数据进行对比度调节,得到第二图像数据,包括:The method according to any one of claims 3-8, wherein the adjusting the contrast of the first image data to obtain the second image data comprises:
    根据第二系数,将所述第一图像数据的第一取值范围,映射到第二取值范围上,其中,所述第一取值范围为第一图像数据的像素值的取值范围,所述第二取值范围为所述第二系数与预设取值之间的取值范围;According to the second coefficient, map the first value range of the first image data to the second value range, wherein the first value range is the value range of the pixel value of the first image data, The second value range is a value range between the second coefficient and a preset value;
    根据所述第一图像数据中的每一个像素点的像素值、所述第一取值范围和所述第二取值范围,确定所述第二图像数据。The second image data is determined according to the pixel value of each pixel in the first image data, the first value range and the second value range.
  11. 根据权利要求1-10任一项所述的方法,其特征在于,所述获取待处理图像数据,包括:The method according to any one of claims 1-10, wherein said acquiring image data to be processed comprises:
    获取拍摄图像,其中,所述拍摄图像为所述视觉传感器所获取的高动态范围的环境图像数据;Acquiring a photographed image, where the photographed image is environment image data with a high dynamic range acquired by the vision sensor;
    对所述拍摄图像进行归一化处理,并对归一化后的拍摄图像进行压缩处理,得到所述待处理图像数据。Perform normalization processing on the captured image, and perform compression processing on the normalized captured image to obtain the image data to be processed.
  12. 根据权利要求1-11任一项所述的方法,其特征在于,在对所述第一 图像数据进行对比度调节,得到第二图像数据之后,还包括:The method according to any one of claims 1-11, wherein after performing contrast adjustment on the first image data to obtain the second image data, the method further comprises:
    将所述第二图像数据,传输给处理设备进行处理。The second image data is transmitted to the processing device for processing.
  13. 一种图像处理系统,其特征在于,包括:处理器、存储器和视觉传感器;An image processing system, which is characterized by comprising: a processor, a memory and a vision sensor;
    所述存储器用于存储程序代码;The memory is used to store program codes;
    所述视觉传感器,用于获取待处理图像数据,其中,所述待处理图像数据为搭载于可移动平台上,且所述待处理图像数据为环境图像数据;The vision sensor is used to obtain image data to be processed, wherein the image data to be processed is carried on a movable platform, and the image data to be processed is environmental image data;
    所述处理器,调用所述程序代码,当程序代码被执行时,用于执行以下操作:The processor calls the program code, and when the program code is executed, is used to perform the following operations:
    对所述待处理图像数据进行自适应的全局亮度调节,得到第一图像数据;Performing adaptive global brightness adjustment on the image data to be processed to obtain first image data;
    对所述第一图像数据进行对比度调节,得到第二图像数据;Performing contrast adjustment on the first image data to obtain second image data;
    其中,所述第二图像数据用于所述可移动平台的在线图像处理。Wherein, the second image data is used for online image processing of the movable platform.
  14. 根据权利要求13所述的图像处理系统,其特征在于,所述处理器在对所述待处理图像数据进行自适应全局亮度调节,得到第一图像数据时,用于:The image processing system according to claim 13, wherein the processor is configured to: when performing adaptive global brightness adjustment on the image data to be processed to obtain the first image data:
    采用自适应函数,对所述待处理图像数据进行全局亮度调节,得到第一图像数据;其中,所述自适应函数与所述环境图像数据的亮度之间相关。An adaptive function is used to perform global brightness adjustment on the image data to be processed to obtain first image data; wherein the adaptive function is correlated with the brightness of the environmental image data.
  15. 根据权利要求14所述的图像处理系统,其特征在于,所述自适应函数中的第一系数与所述环境图像数据的亮度之间相关,所述第一系数用于对所述环境图像数据进行亮度调节。The image processing system according to claim 14, wherein the first coefficient in the adaptive function is correlated with the brightness of the environmental image data, and the first coefficient is used to compare the environmental image data Perform brightness adjustment.
  16. 根据权利要求15所述的图像处理系统,其特征在于,所述对比度调节所采用的第二系数与所述环境图像数据的亮度之间相关。15. The image processing system according to claim 15, wherein the second coefficient used in the contrast adjustment is correlated with the brightness of the environmental image data.
  17. 根据权利要求16所述的图像处理系统,其特征在于,所述处理器在对所述待处理图像数据进行自适应全局亮度调节,得到第一图像数据之前,还用于:The image processing system according to claim 16, wherein the processor is further configured to: before performing adaptive global brightness adjustment on the image data to be processed to obtain the first image data:
    根据所述待处理图像数据的像素值,确定所述待处理图像数据的累计直方图信息,其中,所述累计直方图信息中包括所述待处理图像数据的各个像素值的累计概率分布值;Determine the cumulative histogram information of the to-be-processed image data according to the pixel value of the to-be-processed image data, wherein the cumulative histogram information includes the cumulative probability distribution value of each pixel value of the to-be-processed image data;
    根据所述累计直方图信息,确定所述第一系数和所述第二系数。According to the cumulative histogram information, the first coefficient and the second coefficient are determined.
  18. 根据权利要求17所述的图像处理系统,其特征在于,具有第一系数 和第二系数的像素值的累计概率分布值,大于预设阈值。The image processing system according to claim 17, wherein the cumulative probability distribution value of the pixel values having the first coefficient and the second coefficient is greater than a preset threshold.
  19. 根据权利要求17或18所述的图像处理系统,其特征在于,所述处理器在根据所述累计直方图信息,确定所述第一系数和所述第二系数时,用于:The image processing system according to claim 17 or 18, wherein the processor is configured to: when determining the first coefficient and the second coefficient according to the accumulated histogram information:
    设定i的初始值为1,重复执行以下各步骤,直至确定出所述第一系数和所述第二系数:Set the initial value of i to 1, and repeat the following steps until the first coefficient and the second coefficient are determined:
    判断选取值集合中第i个选取值的累计概率分布值,是否大于预设阈值,其中,所述选取值集合中包括N个选取值,各所述选取值均是所述待处理图像数据的像素值,第i个选取值小于第i+1个选取值,N为大于等于1的正整数,i∈[1,N],i为正整数;Determine whether the cumulative probability distribution value of the i-th selected value in the selected value set is greater than a preset threshold, wherein the selected value set includes N selected values, and each of the selected values is the The pixel value of the image data to be processed, the i-th selected value is less than the i+1-th selected value, N is a positive integer greater than or equal to 1, i∈[1, N], i is a positive integer;
    若确定大于,则将确定预设的第一预选集合中的第i个第一预选系数,为所述第一系数,并确定预设的第二预选集合中第i个第二预选系数,为所述第二系数,其中,所述第一预选集合中包括N+1个第一预选系数,第i个第一预选系数小于第i+1个第一预选系数,所述第二预选集合中包括N+1个第二预选系数,第i个第二预选系数大于第i+1个第二预选系数;If it is determined to be greater than, the i-th first preselection coefficient in the preset first preselection set will be determined as the first coefficient, and the i-th second preselection coefficient in the preset second preselection set will be determined as The second coefficient, wherein the first preselected set includes N+1 first preselected coefficients, the i-th first preselected coefficient is smaller than the i+1th first preselected coefficient, and the second preselected set Including N+1 second preselection coefficients, the i-th second preselection coefficient is greater than the i+1th second preselection coefficient;
    若确定小于等于,则确定i累加1。If it is determined that it is less than or equal to, it is determined that i is accumulated by 1.
  20. 根据权利要求19所述的图像处理系统,其特征在于,所述处理器,还用于:The image processing system according to claim 19, wherein the processor is further configured to:
    在所述选取值集合中的第N-1个选取值的累计概率分布值,小于等于所述预设阈值时,若确定所述选取值集合中的第N个选取值的累计概率分布值,小于等于所述预设阈值,则确定所述第一预选集合中的第N+1个第一预选系数,为所述第一系数,并确定预设的第二预选集合中第N+1个第二预选系数,为所述第二系数。When the cumulative probability distribution value of the N-1th selected value in the selected value set is less than or equal to the preset threshold, if it is determined that the cumulative value of the Nth selected value in the selected value set is If the probability distribution value is less than or equal to the preset threshold, it is determined that the N+1th first preselection coefficient in the first preselection set is the first coefficient, and the first preselection coefficient in the preset second preselection set is determined N+1 second preselection coefficients are the second coefficients.
  21. 根据权利要求14-20任一项所述的图像处理系统,其特征在于,所述自适应函数为伽马校正函数。The image processing system according to any one of claims 14-20, wherein the adaptive function is a gamma correction function.
  22. 根据权利要求15-20任一项所述的图像处理系统,其特征在于,所述处理器在对所述第一图像数据进行对比度调节,得到第二图像数据时,用于:The image processing system according to any one of claims 15-20, wherein the processor is configured to: when performing contrast adjustment on the first image data to obtain the second image data:
    根据第二系数,将所述第一图像数据的第一取值范围,映射到第二取值范围上,其中,所述第一取值范围为第一图像数据的像素值的取值范围,所 述第二取值范围为所述第二系数与预设取值之间的取值范围;According to the second coefficient, map the first value range of the first image data to the second value range, wherein the first value range is the value range of the pixel value of the first image data, The second value range is a value range between the second coefficient and a preset value;
    根据所述第一图像数据中的每一个像素点的像素值、所述第一取值范围和所述第二取值范围,确定所述第二图像数据。The second image data is determined according to the pixel value of each pixel in the first image data, the first value range and the second value range.
  23. 根据权利要求13-22任一项所述的图像处理系统,其特征在于,所述视觉传感器在获取待处理图像数据时,用于:获取拍摄图像,其中,所述拍摄图像为所述视觉传感器所获取的高动态范围的环境图像数据;The image processing system according to any one of claims 13-22, wherein the visual sensor is used to obtain a photographed image when acquiring image data to be processed, wherein the photographed image is the vision sensor The acquired high dynamic range environmental image data;
    所述处理器,还用于对所述拍摄图像进行归一化处理,并对归一化后的拍摄图像进行压缩处理,得到所述待处理图像数据。The processor is further configured to perform normalization processing on the captured image, and perform compression processing on the normalized captured image to obtain the image data to be processed.
  24. 根据权利要求13-23任一项所述的图像处理系统,其特征在于,所述图像处理系统,还包括:发送器;The image processing system according to any one of claims 13-23, wherein the image processing system further comprises: a transmitter;
    所述发送器,用于将所述第二图像数据,传输给处理设备进行处理。The transmitter is used to transmit the second image data to a processing device for processing.
  25. 一种可移动平台,其特征在于,包括:处理器、存储器和视觉传感器;A movable platform, which is characterized by comprising: a processor, a memory and a vision sensor;
    所述存储器用于存储程序代码;The memory is used to store program codes;
    所述视觉传感器,用于获取待处理图像数据,所述待处理图像数据为环境图像数据;The visual sensor is used to obtain image data to be processed, and the image data to be processed is environmental image data;
    所述处理器,调用所述程序代码,当程序代码被执行时,用于执行以下操作:The processor calls the program code, and when the program code is executed, is used to perform the following operations:
    对所述待处理图像数据进行自适应的全局亮度调节,得到第一图像数据;Performing adaptive global brightness adjustment on the image data to be processed to obtain first image data;
    对所述第一图像数据进行对比度调节,得到第二图像数据;Performing contrast adjustment on the first image data to obtain second image data;
    对所述第二图像数据,进行在线图像处理。Perform online image processing on the second image data.
  26. 根据权利要求25所述的可移动平台,其特征在于,所述处理器在对所述待处理图像数据进行自适应全局亮度调节,得到第一图像数据时,用于:The mobile platform according to claim 25, wherein the processor is configured to: when performing adaptive global brightness adjustment on the image data to be processed to obtain the first image data:
    采用自适应函数,对所述待处理图像数据进行全局亮度调节,得到第一图像数据;其中,所述自适应函数与所述环境图像数据的亮度之间相关。An adaptive function is used to perform global brightness adjustment on the image data to be processed to obtain first image data; wherein the adaptive function is correlated with the brightness of the environmental image data.
  27. 根据权利要求26所述的可移动平台,其特征在于,所述自适应函数中的第一系数与所述环境图像数据的亮度之间相关,所述第一系数用于对所述环境图像数据进行亮度调节。The mobile platform of claim 26, wherein the first coefficient in the adaptive function is correlated with the brightness of the environmental image data, and the first coefficient is used to compare the environmental image data Perform brightness adjustment.
  28. 根据权利要求27所述的可移动平台,其特征在于,所述对比度调节 所采用的第二系数与所述环境图像数据的亮度之间相关。The movable platform of claim 27, wherein the second coefficient used in the contrast adjustment is correlated with the brightness of the environmental image data.
  29. 根据权利要求28所述的可移动平台,其特征在于,所述处理器在对所述待处理图像数据进行自适应全局亮度调节,得到第一图像数据之前,还用于:The mobile platform according to claim 28, wherein the processor is further configured to: before performing adaptive global brightness adjustment on the image data to be processed to obtain the first image data:
    根据所述待处理图像数据的像素值,确定所述待处理图像数据的累计直方图信息,其中,所述累计直方图信息中包括所述待处理图像数据的各个像素值的累计概率分布值;Determine the cumulative histogram information of the to-be-processed image data according to the pixel value of the to-be-processed image data, wherein the cumulative histogram information includes the cumulative probability distribution value of each pixel value of the to-be-processed image data;
    根据所述累计直方图信息,确定所述第一系数和所述第二系数。According to the cumulative histogram information, the first coefficient and the second coefficient are determined.
  30. 根据权利要求29所述的可移动平台,其特征在于,具有第一系数和第二系数的像素值的累计概率分布值,大于预设阈值。The mobile platform of claim 29, wherein the cumulative probability distribution value of the pixel values having the first coefficient and the second coefficient is greater than a preset threshold.
  31. 根据权利要求29或30所述的可移动平台,其特征在于,所述处理器在根据所述累计直方图信息,确定所述第一系数和所述第二系数时,用于:The movable platform according to claim 29 or 30, wherein the processor is configured to: when determining the first coefficient and the second coefficient according to the cumulative histogram information:
    设定i的初始值为1,重复执行以下各步骤,直至确定出所述第一系数和所述第二系数:Set the initial value of i to 1, and repeat the following steps until the first coefficient and the second coefficient are determined:
    判断选取值集合中第i个选取值的累计概率分布值,是否大于预设阈值,其中,所述选取值集合中包括N个选取值,各所述选取值均是所述待处理图像数据的像素值,第i个选取值小于第i+1个选取值,N为大于等于1的正整数,i∈[1,N],i为正整数;Determine whether the cumulative probability distribution value of the i-th selected value in the selected value set is greater than a preset threshold, wherein the selected value set includes N selected values, and each of the selected values is the The pixel value of the image data to be processed, the i-th selected value is less than the i+1-th selected value, N is a positive integer greater than or equal to 1, i∈[1, N], i is a positive integer;
    若确定大于,则将确定预设的第一预选集合中的第i个第一预选系数,为所述第一系数,并确定预设的第二预选集合中第i个第二预选系数,为所述第二系数,其中,所述第一预选集合中包括N+1个第一预选系数,第i个第一预选系数小于第i+1个第一预选系数,所述第二预选集合中包括N+1个第二预选系数,第i个第二预选系数大于第i+1个第二预选系数;If it is determined to be greater than, the i-th first preselection coefficient in the preset first preselection set will be determined as the first coefficient, and the i-th second preselection coefficient in the preset second preselection set will be determined as The second coefficient, wherein the first preselected set includes N+1 first preselected coefficients, the i-th first preselected coefficient is smaller than the i+1th first preselected coefficient, and the second preselected set Including N+1 second preselection coefficients, the i-th second preselection coefficient is greater than the i+1th second preselection coefficient;
    若确定小于等于,则确定i累加1。If it is determined that it is less than or equal to, it is determined that i is accumulated by 1.
  32. 根据权利要求31所述的可移动平台,其特征在于,所述处理器,还用于:The movable platform according to claim 31, wherein the processor is further configured to:
    在所述选取值集合中的第N-1个选取值的累计概率分布值,小于等于所述预设阈值时,若确定所述选取值集合中的第N个选取值的累计概率分布值,小于等于所述预设阈值,则确定所述第一预选集合中的第N+1个第一预选系数,为所述第一系数,并确定预设的第二预选集合中第N+1个第二预选系数, 为所述第二系数。When the cumulative probability distribution value of the N-1th selected value in the selected value set is less than or equal to the preset threshold, if it is determined that the cumulative value of the Nth selected value in the selected value set is If the probability distribution value is less than or equal to the preset threshold, it is determined that the N+1th first preselection coefficient in the first preselection set is the first coefficient, and the first preselection coefficient in the preset second preselection set is determined N+1 second preselection coefficients are the second coefficients.
  33. 根据权利要求26-32任一项所述的可移动平台,其特征在于,所述自适应函数为伽马校正函数。The movable platform according to any one of claims 26-32, wherein the adaptive function is a gamma correction function.
  34. 根据权利要求27-32任一项所述的可移动平台,其特征在于,所述处理器在对所述第一图像数据进行对比度调节,得到第二图像数据时,用于:The movable platform according to any one of claims 27-32, wherein the processor is configured to: when performing contrast adjustment on the first image data to obtain the second image data:
    根据第二系数,将所述第一图像数据的第一取值范围,映射到第二取值范围上,其中,所述第一取值范围为第一图像数据的像素值的取值范围,所述第二取值范围为所述第二系数与预设取值之间的取值范围;According to the second coefficient, map the first value range of the first image data to the second value range, wherein the first value range is the value range of the pixel value of the first image data, The second value range is a value range between the second coefficient and a preset value;
    根据所述第一图像数据中的每一个像素点的像素值、所述第一取值范围和所述第二取值范围,确定所述第二图像数据。The second image data is determined according to the pixel value of each pixel in the first image data, the first value range and the second value range.
  35. 根据权利要求25-34任一项所述的可移动平台,其特征在于,所述视觉传感器在获取待处理图像数据时,用于:获取拍摄图像,其中,所述拍摄图像为所述视觉传感器所获取的高动态范围的环境图像数据;The movable platform according to any one of claims 25-34, wherein the visual sensor is used to obtain a photographed image when acquiring image data to be processed, wherein the photographed image is the vision sensor The acquired high dynamic range environmental image data;
    所述处理器,还用于对所述拍摄图像进行归一化处理,并对归一化后的拍摄图像进行压缩处理,得到所述待处理图像数据。The processor is further configured to perform normalization processing on the captured image, and perform compression processing on the normalized captured image to obtain the image data to be processed.
  36. 一种计算机可读存储介质,其特征在于,其上存储有计算机程序,所述计算机程序被处理器执行以实现如权利要求1-12任一项所述的方法。A computer-readable storage medium, characterized in that a computer program is stored thereon, and the computer program is executed by a processor to implement the method according to any one of claims 1-12.
PCT/CN2019/098329 2019-07-30 2019-07-30 Image processing method and system, movable platform, and storage medium WO2021016846A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2019/098329 WO2021016846A1 (en) 2019-07-30 2019-07-30 Image processing method and system, movable platform, and storage medium
CN201980034340.7A CN112166598B (en) 2019-07-30 2019-07-30 Image processing method, system, movable platform and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/098329 WO2021016846A1 (en) 2019-07-30 2019-07-30 Image processing method and system, movable platform, and storage medium

Publications (1)

Publication Number Publication Date
WO2021016846A1 true WO2021016846A1 (en) 2021-02-04

Family

ID=73860469

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/098329 WO2021016846A1 (en) 2019-07-30 2019-07-30 Image processing method and system, movable platform, and storage medium

Country Status (2)

Country Link
CN (1) CN112166598B (en)
WO (1) WO2021016846A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112967208A (en) * 2021-04-23 2021-06-15 北京恒安嘉新安全技术有限公司 Image processing method and device, electronic equipment and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113345382B (en) * 2021-05-28 2023-03-10 惠州视维新技术有限公司 Method, system and storage medium for processing screen display image

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100177203A1 (en) * 2009-01-15 2010-07-15 Aptina Imaging Corporation Apparatus and method for local contrast enhanced tone mapping
CN101951523A (en) * 2010-09-21 2011-01-19 北京工业大学 Adaptive colour image processing method and system
CN104484864A (en) * 2014-12-31 2015-04-01 苏州科达科技股份有限公司 Method and system for acquiring image gamma curve and enhancing image contrast
CN105046663A (en) * 2015-07-10 2015-11-11 西南科技大学 Human visual perception simulation-based self-adaptive low-illumination image enhancement method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100177203A1 (en) * 2009-01-15 2010-07-15 Aptina Imaging Corporation Apparatus and method for local contrast enhanced tone mapping
CN101951523A (en) * 2010-09-21 2011-01-19 北京工业大学 Adaptive colour image processing method and system
CN104484864A (en) * 2014-12-31 2015-04-01 苏州科达科技股份有限公司 Method and system for acquiring image gamma curve and enhancing image contrast
CN105046663A (en) * 2015-07-10 2015-11-11 西南科技大学 Human visual perception simulation-based self-adaptive low-illumination image enhancement method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112967208A (en) * 2021-04-23 2021-06-15 北京恒安嘉新安全技术有限公司 Image processing method and device, electronic equipment and storage medium
CN112967208B (en) * 2021-04-23 2024-05-14 北京恒安嘉新安全技术有限公司 Image processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112166598B (en) 2022-03-11
CN112166598A (en) 2021-01-01

Similar Documents

Publication Publication Date Title
US10033918B2 (en) Method and system for image processing to detect salient objects in image
JP4234195B2 (en) Image segmentation method and image segmentation system
WO2020125631A1 (en) Video compression method and apparatus, and computer-readable storage medium
CN113034358B (en) Super-resolution image processing method and related device
US9813635B2 (en) Method and apparatus for auto exposure value detection for high dynamic range imaging
US10565742B1 (en) Image processing method and apparatus
US10242288B2 (en) Method and system for video processing
US11917158B2 (en) Static video recognition
US11508046B2 (en) Object aware local tone mapping
US10121093B2 (en) System and method for background subtraction in video content
JP2004310475A (en) Image processor, cellular phone for performing image processing, and image processing program
WO2021016846A1 (en) Image processing method and system, movable platform, and storage medium
CN110570370B (en) Image information processing method and device, storage medium and electronic equipment
CN114998122A (en) Low-illumination image enhancement method
WO2022193132A1 (en) Image detection method and apparatus, and electronic device
CN111797694B (en) License plate detection method and device
CN112950515A (en) Image processing method and device, computer readable storage medium and electronic device
US20230342977A1 (en) Method for Determining Chromaticity Information and Related Electronic Device
CN114390266B (en) Image white balance processing method, device and computer readable storage medium
WO2017101570A1 (en) Photo processing method and processing system
WO2021217445A1 (en) Image processing method, device and system, and storage medium
US20170295317A1 (en) Adaptive output correction for digital image capture processing
CN110647898B (en) Image processing method, image processing device, electronic equipment and computer storage medium
WO2016164098A1 (en) System and method to refine image data
WO2023240651A1 (en) Image processing method and apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19940008

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19940008

Country of ref document: EP

Kind code of ref document: A1