WO2024051824A1 - 图像处理方法、图像处理电路、电子设备和可读存储介质 - Google Patents

图像处理方法、图像处理电路、电子设备和可读存储介质 Download PDF

Info

Publication number
WO2024051824A1
WO2024051824A1 PCT/CN2023/117742 CN2023117742W WO2024051824A1 WO 2024051824 A1 WO2024051824 A1 WO 2024051824A1 CN 2023117742 W CN2023117742 W CN 2023117742W WO 2024051824 A1 WO2024051824 A1 WO 2024051824A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
direct rendering
rendering manager
data
manager
Prior art date
Application number
PCT/CN2023/117742
Other languages
English (en)
French (fr)
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 维沃移动通信有限公司
Publication of WO2024051824A1 publication Critical patent/WO2024051824A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/14Picture signal circuitry for video frequency region

Definitions

  • the present disclosure relates to the field of data processing technology, and specifically relates to an image processing method, an image processing circuit, an electronic device and a readable storage medium.
  • This application provides an image processing method, an image processing circuit, an electronic device and a readable storage medium, which can reduce the time delay of the image processing process.
  • embodiments of the present application provide an image processing method, including:
  • the first image data is transmitted to the image enhancement chip through a first data transmission path, wherein the first data transmission path is provided by the
  • the camera abstract module (camera HAL), Direct Rendering Manager (DRM), display hardware (Display Hardware, Display HW) and the image enhancement chip are connected in sequence;
  • the first image data is subjected to image enhancement processing based on the image enhancement chip to obtain second image data.
  • an image processing circuit including: a main control chip and an image enhancement chip.
  • the main control chip includes a camera abstraction module (camera HAL), a direct rendering manager (DRM), and display hardware.
  • the camera abstract module (camera HAL) is connected to the image enhancement chip through a first data transmission path, the first data transmission path consists of the camera abstract module (camera HAL), the direct rendering manager (DRM), display hardware (Display HW) and the image enhancement chip are connected in sequence to form;
  • the main control chip is used to receive the first image data collected by the image sensor
  • the camera abstraction module (camera HAL) is used to transmit the first image data to the image enhancement chip through the first data transmission path;
  • the image enhancement chip is used to perform image enhancement processing on the first image data to obtain second image data.
  • embodiments of the present application provide an electronic device, including a processor and a memory.
  • the memory stores programs or instructions that can be run on the processor.
  • the program or instructions are executed by the processor, Implement the steps of the image processing method as described in the first aspect.
  • embodiments of the present application provide a readable storage medium, characterized in that the readable storage medium stores programs or instructions, and when the programs or instructions are executed by a processor, the implementation is as described in the first aspect. The steps of the image processing method.
  • inventions of the present application provide a chip.
  • the chip includes a processor and a communication interface.
  • the communication interface is coupled to the processor.
  • the processor is used to run programs or instructions to implement the first aspect. The steps of the image processing method.
  • embodiments of the present application provide a computer program product, the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the steps of the image processing method as described in the first aspect.
  • the image data can be shortened
  • the transmission path therefore, can save time in the image data transmission process, thereby reducing the delay in the image processing process.
  • Figure 1 is a schematic flowchart of an image processing method provided by an embodiment of the present application.
  • Figure 2 is a schematic structural diagram of an image processing circuit provided by an embodiment of the present application.
  • Figure 3 is a schematic diagram of the connection between the first data transmission path and the second data transmission path in the embodiment of the present application;
  • Figure 4 is a schematic flow chart of direct rendering manager initialization in the embodiment of the present application.
  • Figure 5 is a schematic diagram of data transmission in the first data transmission path in the embodiment of the present application.
  • Figure 6 is a schematic flow chart of the first data transmission path release process in the embodiment of the present application.
  • Figure 7 is a schematic diagram of image rendering performed by the direct rendering manager in the embodiment of the present application.
  • Figure 8 is a schematic structural diagram of another electronic device provided by an embodiment of the present application.
  • Figure 9 is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application.
  • first, second, etc. in the description and claims of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in orders other than those illustrated or described herein, and "first”,
  • the objects distinguished by “second” and so on are usually of the same type, and the number of objects is not limited.
  • the first object can be one or multiple.
  • “and/or” in the description and claims indicates at least one of the connected objects, and the character “/" generally indicates that the related objects are in an "or” relationship.
  • Figure 1 is a schematic flowchart of an image processing method provided by an embodiment of the present disclosure.
  • the image processing method includes the following steps:
  • Step S101 Receive the first image data collected by the image sensor based on the main control chip
  • Step S102 Transmit the first image data to the image enhancement chip through the first data transmission path based on the camera abstraction module (Camera Hardware Abstraction Layer, camera HAL) in the main control chip, wherein the first data transmission
  • the channel is formed by connecting the camera abstract module (camera HAL), the direct rendering manager (Direct Rendering Manager, DRM), the display hardware (Display Hardware, Display HW) and the image enhancement chip in sequence;
  • Step S103 Perform image enhancement processing on the first image data based on the image enhancement chip to obtain second image data.
  • the above image processing method can be applied to various electronic devices with shooting functions and can also be applied to various monitoring systems. For example, it can be applied to access control monitoring systems.
  • the above-mentioned main control chip can be a system on chip (SOC), and the above-mentioned image sensor can be a camera sensor (Camera Sensor) of a camera in an electronic device.
  • the above-mentioned main control chip may include an image processing module, wherein the image processing module may be an image processor (Image Signal Processor, ISP) integrated in the main control chip.
  • the above-mentioned image enhancement chip may be an external image enhancement chip independent of the main control chip.
  • the quality of the first image data captured by the image sensor is usually poor. If the first image data is only processed by the image processing module of the main control chip, the image quality of the obtained image data may still be poor. . At this time, the first image data can be further processed based on the image enhancement chip to improve the image quality output by the camera.
  • the main control chip receives the first image data collected by the image sensor
  • the first image data can be transmitted to the image enhancement chip through the first data transmission path
  • the image enhancement chip can The first image data is subjected to brightness enhancement, color enhancement, contrast enhancement, noise reduction and other processing to improve the quality of the image output by the camera of the electronic device.
  • the image enhancement chip can transmit the second image data back to the main control chip, and the main control chip can further process the image data through the image processing module.
  • the second image data is processed to obtain target image data, and the target image data is sent for display or video recording.
  • the image processing circuit includes a main control chip and an image enhancement chip.
  • the main control chip includes an image processing module (not shown in the figure), a camera driver module (Camera Driver), a camera abstract module (camera HAL), a camera Service module (Camera Service), camera framework (Camera Framework), application module (Application, APP), display framework module (Surface Flinger), hardware design unit (Hardware composer, HWC), direct rendering manager (DRM), display hardware (Display Hardware, Display HW).
  • the image sensor may be connected to the camera driver module (Camera Driver) through the image processing module.
  • the output end of the image enhancement chip can be connected to the input end of the image processing module, so that the image processed by the image enhancement chip can be transmitted back to the main control chip for further processing.
  • the camera abstract module (camera HAL), the direct rendering manager (DRM), the display hardware (Display Hardware, Display HW) and the image enhancement chip are connected in sequence.
  • the formation can be connected in sequence to form a first data transmission path, so that when the first image data needs to be transmitted to the image enhancement chip for image enhancement processing, the first image data can be transmitted through the first data transmission path.
  • the data transmission path for transmitting the first image data in related technologies is: camera abstract module (camera HAL) ⁇ camera service module (Camera Service) ⁇ camera framework (Camera Framework) ⁇ application module (APP) ⁇ display framework module (Surface Flinger) ) ⁇ Hardware Design Unit (HWC) ⁇ Direct Rendering Manager (DRM) ⁇ Display Hardware (Display HW) ⁇ Image Enhancement Chip.
  • the image enhancement chip can transmit the second image data to the display through the second data transmission path.
  • the second data transmission path is: image enhancement chip ⁇ image processing module (not shown in the figure) ⁇ camera abstract module (camera HAL) ⁇ camera service module (Camera Service) ⁇ camera frame (Camera Framework) ⁇ Application Module (APP) ⁇ Display Framework Module (Surface Flinger) ⁇ Hardware Design Unit (HWC) ⁇ Direct Rendering Manager (DRM) ⁇ Display Hardware (Display HW) ⁇ Display.
  • image enhancement chip ⁇ image processing module (not shown in the figure) ⁇ camera abstract module (camera HAL) ⁇ camera service module (Camera Service) ⁇ camera frame (Camera Framework) ⁇ Application Module (APP) ⁇ Display Framework Module (Surface Flinger) ⁇ Hardware Design Unit (HWC) ⁇ Direct Rendering Manager (DRM) ⁇ Display Hardware (Display HW) ⁇ Display.
  • the image data transmission can be shortened path, therefore, it can save time in the image data transmission process, thereby reducing the delay in the image processing process.
  • the first data transmission path further includes a direct rendering manager wrapper (DRMWrapper), wherein the data sending software interface of the image sensor and the data sending software interface of the direct rendering manager (DRM) They are respectively encapsulated in the wrapper (DRMWrapper) of the direct rendering manager.
  • the camera abstract module (camera HAL) communicates with the direct rendering manager through the wrapper (DRMWrapper) of the direct rendering manager. (DRM) connection.
  • the interaction code between the hardware design unit (HWC) and the direct rendering manager (DRM) can be parsed, and then the camera abstract module (camera HAL) can be specially integrated with the direct rendering manager (DRM).
  • DRM direct rendering manager
  • the data sending software interface of the image sensor and the data sending software interface of the direct rendering manager (DRM) are respectively encapsulated in the wrapper (DRMWrapper) of the direct rendering manager, so that: Data transmission between the camera abstract module (camera HAL) and the direct rendering manager (DRM) can be implemented to form the first data transmission path.
  • the method of transmitting the first image data to the image enhancement chip through the first data transmission path based on the camera abstraction module (camera HAL) in the main control chip includes:
  • a wrapper (DRMWrapper) based on the direct rendering manager converts the data format of the first image data into the format matching the direct rendering manager (DRM) to obtain first intermediate data;
  • the step of performing image enhancement processing on the first image data based on the image enhancement chip to obtain the second image data includes:
  • the first intermediate data is subjected to image enhancement processing based on the image enhancement chip to obtain the second image data.
  • the data format of the first image data is converted into the format matching the direct rendering manager (DRM) through a wrapper (DRMWrapper) based on the direct rendering manager.
  • DRM direct rendering manager
  • the direct rendering manager (DRM) can further process the first intermediate data and transmit the processed data to the image enhancement chip for image enhancement processing.
  • the first image data includes a first image and a shooting timestamp of the first image
  • the camera abstraction module (camera HAL) in the main control chip transmits all the data through the first data transmission path.
  • the first image data is transmitted to the image enhancement chip, including:
  • the first image data is transmitted to the direct rendering manager (DRM)
  • the first image and the shooting timestamp are synthesized based on the direct rendering manager (DRM) to obtain the The second intermediate data;
  • the step of performing image enhancement processing on the first image data based on the image enhancement chip to obtain the second image data includes:
  • the second intermediate data is subjected to image enhancement processing based on the image enhancement chip to obtain the second image data.
  • the subsequent main control chip by synthesizing the first image and the shooting time stamp of the first image, in this way, receives the second image obtained by processing the first image data by the image enhancement chip. After the data is received, it can be determined whether there is an abnormality such as frame loss during the processing of the first image data by the image enhancement chip by checking whether the shooting timestamps in the first image data and the second image data match.
  • the main control chip can continuously transmit multiple different first image data to the image enhancement chip through the first data transmission path, and the image enhancement chip completes processing of the multiple first image data.
  • a plurality of second image data can be obtained.
  • the main control chip can respectively obtain the shooting timestamp data of the plurality of first image data, and then determine whether each shooting timestamp in the shooting timestamp data has a corresponding shooting time stamp.
  • the second image data if present, indicates that there is no frame loss abnormality during the image enhancement process of the image enhancement chip.
  • the frame loss exception can be marked. In this way, frames can be inserted at the lost frame position to avoid display abnormalities caused by frame loss.
  • the first image and the shooting timestamp of the first image are synthesized based on the Direct Rendering Manager (DRM).
  • DRM Direct Rendering Manager
  • the image data output by the subsequent image enhancement chip can carry the shooting timestamp of the image, as follows: This facilitates subsequent detection of possible anomalies during image processing based on the shooting timestamp in the image.
  • the first image data includes a first image and a shooting timestamp of the first image, which is based on the camera abstraction module (camera HAL) in the main control chip.
  • Transmitting the first image data to the image enhancement chip through the first data transmission path includes:
  • a wrapper (DRMWrapper) based on the direct rendering manager converts the data format of the first image data into the format matching the direct rendering manager (DRM) to obtain first intermediate data;
  • the first image in the first intermediate data and the shooting timestamp are synthesized to obtain the second intermediate data;
  • the step of performing image enhancement processing on the first image data based on the image enhancement chip to obtain the second image data includes:
  • the second intermediate data is subjected to image enhancement processing based on the image enhancement chip to obtain the second image data.
  • the wrapper (DRMWrapper) based on the direct rendering manager passes the first intermediate data to the direct rendering manager (DRM), including:
  • a wrapper (DRMWrapper) based on the direct rendering manager converts the image sensor's target cache single
  • the identification information of the element is transmitted to the direct rendering manager (DRM), wherein the first intermediate data is stored in the target cache unit;
  • the direct rendering manager obtains the first intermediate data from the target cache unit based on the identification information.
  • the first image data collected by the above-mentioned image sensor can be cached through the target cache unit.
  • the wrapper (DRMWrapper) of the direct rendering manager and the direct rendering manager (DRM) Data can be read and written to the target cache unit respectively.
  • the wrapper (DRMWrapper) of the direct rendering manager performs format conversion on the first image data to obtain the first intermediate data
  • the first intermediate data may be cached in the target cache unit.
  • the camera abstraction module (camera HAL) can pass the identification information to the direct rendering manager (DRM) through the wrapper (DRMWrapper) of the direct rendering manager.
  • the direct rendering manager After acquiring the first intermediate data, DRM) may send a data acquisition completion identification to the camera abstraction module (camera HAL) through the wrapper (DRMWrapper) of the direct rendering manager.
  • the identification information may include address information of the target cache unit, so that the direct rendering manager (DRM) can read and write data in the target cache unit based on the storage address indicated by the identification information.
  • DRM direct rendering manager
  • the direct rendering manager when receiving the identification information of the target cache unit, can locate the storage location of the first intermediate data according to the identification information, and then can obtain the storage location of the first intermediate data from the target cache unit.
  • the first intermediate data is obtained, thereby realizing the data transmission process between the direct rendering manager wrapper (DRMWrapper) and the direct rendering manager (DRM).
  • the method also includes:
  • the acquire_fence identifier of the target cache unit is set to deny the direct rendering manager (DRM) access to the target cache unit.
  • the acquire fence (acquir_fence) identifier is triggered to allow the direct rendering manager (DRM) to access the target cache unit;
  • a release fence (release_fence) identifier of the target cache unit is set to deny the image sensor access to the target cache unit;
  • the release_fence identifier is triggered to allow the image sensor to access the target cache unit.
  • the target cache unit being accessed by the image sensor may refer to a process in which the image sensor reads and writes image data from the target cache unit.
  • the direct rendering manager (DRM) accessing the target cache unit may refer to a process in which the direct rendering manager (DRM) reads and writes image data from the target cache unit.
  • the image sensor can use the fence mechanism to notify the direct rendering manager (DRM) that the cache data (buffer) in the target cache unit has been used.
  • DRM direct rendering manager
  • the direct rendering manager can also use the The fence mechanism is used to notify the image sensor that the cache data (buffer) in the target cache unit has been used up. In this way, it is helpful to improve the management effect of cached data in the target cache unit.
  • the method also includes:
  • the camera abstraction module (camera HAL) establishes the wrapper (DRMWrapper) of the direct rendering manager and the direct rendering manager.
  • the connection between rendering managers (DRM), the first data transmission path is connected;
  • the camera abstraction module releases the wrapper (DRMWrapper) of the direct rendering manager and The connection between the direct rendering manager (DRM) and the first data transmission path is disconnected.
  • the current shooting scene may be determined as a dark environment shooting scene.
  • the first data transmission path can be controlled to be turned on based on the camera abstraction module (camera HAL).
  • the main control chip can first transmit the first image data to the image enhancement chip through the first data transmission path for image enhancement processing, and then the main control chip enhances the image.
  • the image data processed by the chip is further processed. In this way, by using the main control chip and the image enhancement chip to process the image data taken in a dark environment, it is beneficial to improve the quality of pictures taken in a dark environment.
  • the current shooting scene when the ambient brightness of the current shooting scene is not lower than the preset brightness threshold, the current shooting scene can be determined as a normal shooting scene.
  • the image quality of the first image data collected by the image sensor is usually relatively low. Good, therefore, the first image data can be processed only by the main control chip.
  • the direct rendering manager wrapper (DRMWrapper) and the direct rendering manager (DRM) can be released based on the camera abstraction module (camera HAL). to release the resources in the direct rendering manager (DRM) occupied by the direct rendering manager wrapper (DRMWrapper), and at the same time, it can also reduce the power consumption of the electronic device.
  • FIG. 6 illustrates how the camera abstraction module (camera HAL) releases the connection between the direct rendering manager wrapper (DRMWrapper) and the direct rendering manager (DRM) in an embodiment of the present disclosure.
  • the camera abstract module (camera HAL) sends a release connection command (DisableDRM) to the direct rendering manager (DRM) through the direct rendering manager wrapper (DRMWrapper), the direct rendering manager (DRM)
  • a release connection command (DisableDRM)
  • the direct rendering manager (DRMWrapper) After receiving the release connection command, release the seal with the direct rendering manager.
  • the resources occupied by the wrapper (DRMWrapper) of the direct rendering manager are released.
  • a release completion message (DisableDone) is sent to the camera abstract module (camera HAL) through the wrapper (DRMWrapper) of the direct rendering manager.
  • the camera abstraction module establishes a connection between the direct rendering manager wrapper (DRMWrapper) and the direct rendering manager (DRM), including:
  • target configuration information based on the camera abstract module (camera HAL), where the target configuration information is the configuration information of the direct rendering manager (DRM);
  • DRM direct rendering manager
  • DRM direct rendering manager
  • the target configuration information may include configuration information such as frame rate and resolution required for initialization of the direct rendering manager (DRM).
  • DRM direct rendering manager
  • the maximum resolution supported by the direct rendering manager (DRM) in the related technology is: photo preview resolution: 1080x2400, video recording resolution: 1080x1920. Therefore, in order to reduce the workload of display debugging resolution of the Direct Rendering Manager (DRM), the resolution of the Direct Rendering Manager (DRM) is configured according to the maximum, and the target configuration information includes the following configuration information: Photo preview resolution: 1080x2400, Video resolution is 1080x1920.
  • Figure 7 shows a schematic diagram of image rendering by the direct rendering manager (DRM), in which a 1080x1080 image is rendered in the upper left corner of a 1080x2400 canvas.
  • the process of initializing the direct rendering manager (DRM) is: the camera abstract module (camera HAL) transmits the target configuration information to the direct rendering management through the wrapper (DRMWrapper) of the direct rendering manager.
  • the direct rendering manager (DRM) initializes based on the target configuration information. After the initialization is completed, the direct rendering manager (DRM) passes the wrapper (DRMWrapper) of the direct rendering manager to all The camera abstract module (camera HAL) feeds back the initialization completion signal. After the feedback initialization of the camera abstract module (camera HAL) is completed, the connection between the direct rendering manager wrapper (DRMWrapper) and the direct rendering manager (DRM) is established. Therefore, when receiving the initialization completion signal, the camera abstract module (camera HAL) can further transmit data to the direct rendering manager (DRM).
  • the direct rendering manager includes a first direct rendering management unit and a second direct rendering management unit
  • the camera abstraction module is connected to the first direct rendering management unit
  • the The second direct rendering management unit is used to connect with the hardware design unit (HWC).
  • the first image data needs to be transmitted to the image enhancement chip through the first data transmission path.
  • Image enhancement processing on the other hand, it is also necessary to transmit the second image data processed by the image enhancement chip to the display screen for display through a second data transmission path, where the second data transmission path is: image enhancement chip ⁇ Image Processing Module (not shown in the figure) ⁇ camera abstract module (camera HAL) ⁇ camera service module (Camera Service) ⁇ camera framework (Camera Framework) ⁇ application module (APP) ⁇ display framework module (Surface Flinger) ⁇ hardware design unit ( HWC) ⁇ Direct Rendering Manager (DRM) ⁇ Display Hardware (Display HW) ⁇ Display.
  • HWC hardware design unit
  • DRM Direct Rendering Manager
  • the image enhancement processing completes the processing of the first image data and obtains the second image data, in addition to sending the second image data for display, you may also The second image data is saved to generate video recording data including the second image data.
  • the first direct rendering management unit and the second direct rendering management unit may be two relatively independent rendering units obtained after dividing the rendering resources in the direct rendering manager (DRM).
  • the first direct rendering management unit may be used to process the image data transmitted from the first data transmission path
  • the second direct rendering management unit may be used to process the image data transmitted from the second data transmission path. image data is processed.
  • the direct rendering manager (DRM)
  • DRM direct rendering manager
  • FIG. 2 is a schematic structural diagram of an image processing circuit provided by an embodiment of the present disclosure.
  • the image processing circuit includes:
  • the main control chip includes a camera abstract module (camera HAL), a direct rendering manager (DRM), and a display hardware (Display HW).
  • the camera abstract module (camera HAL) passes the first data
  • the transmission path is connected to the image enhancement chip.
  • the first data transmission path is connected in sequence by the camera abstract module (camera HAL), direct rendering manager (DRM), display hardware (Display HW) and the image enhancement chip. form;
  • the main control chip is used to receive the first image data collected by the image sensor
  • the camera abstraction module (camera HAL) is used to transmit the first image data to the image enhancement chip through the first data transmission path;
  • the image enhancement chip is used to perform image enhancement processing on the first image data to obtain second image data.
  • the first data transmission path further includes a direct rendering manager wrapper (DRMWrapper), wherein the data sending software interface of the image sensor and the data sending software interface of the direct rendering manager (DRM) They are respectively encapsulated in the wrapper (DRMWrapper) of the direct rendering manager, and the camera abstract module (camera HAL) is connected to the direct rendering manager (DRM) through the wrapper (DRMWrapper) of the direct rendering manager.
  • DRMWrapper direct rendering manager wrapper
  • DRM direct rendering manager wrapper
  • the direct rendering manager wrapper (DRMWrapper) is used to convert the data format of the first image data into the format matching the direct rendering manager (DRM) to obtain the first intermediate data;
  • the wrapper (DRMWrapper) of the direct rendering manager is used to pass the first intermediate data to the direct rendering manager (DRM);
  • the direct rendering manager (DRM) is used to transmit the first intermediate data to the image enhancement chip through the display hardware (Display HW);
  • the image enhancement chip is used to perform image enhancement processing on the first intermediate data to obtain the second image data.
  • the first image data includes a first image and a shooting timestamp of the first image
  • the direct rendering manager (DRM) is used to synthesize the first image and the shooting timestamp.
  • the image enhancement chip is used to perform image enhancement processing on the second intermediate data to obtain the second image data.
  • the wrapper (DRMWrapper) of the direct rendering manager is used to transmit the identification information of the target cache unit of the image sensor to the direct rendering manager (DRM), wherein the first intermediate data Stored in the target cache unit;
  • the direct rendering manager is configured to obtain the first intermediate data from the target cache unit based on the identification information.
  • an acquire fence (acquir_fence) identifier of the target cache unit is set to deny the direct rendering manager (DRM) access to all data.
  • DRM direct rendering manager
  • the acquire fence (acquir_fence) identifier is triggered to allow the direct rendering manager (DRM) to access the target cache unit;
  • a release fence (release_fence) identifier of the target cache unit is set to deny the image sensor access to the target cache unit;
  • the release_fence identifier is triggered to allow the image sensor to access the target cache unit.
  • the camera abstraction module (camera HAL) is used to establish a connection between the direct rendering manager wrapper (DRMWrapper) and the direct rendering manager (DRM) to conduct the first data transmission path;
  • the camera abstract module (camera HAL) is also used to release the connection between the direct rendering manager wrapper (DRMWrapper) and the direct rendering manager (DRM) to disconnect the first data transmission path .
  • the camera abstract module (camera HAL) is used to obtain target configuration information, where the target configuration information is the configuration information of the direct rendering manager (DRM);
  • DRM direct rendering manager
  • the camera abstraction module (camera HAL) is configured to transmit the target configuration information to the direct rendering manager (DRM) through the first data transmission path;
  • DRM direct rendering manager
  • the direct rendering manager includes a first direct rendering management unit and a second direct rendering management unit
  • the camera abstraction module is connected to the first direct rendering management unit
  • the The second direct rendering management unit is used to connect with the hardware design unit (HWC).
  • the image data transmission can be shortened path, therefore, it can save time in the image data transmission process, thereby reducing the delay in the image processing process.
  • this embodiment of the present application also provides another electronic device 800, including a processor 801, a memory 802, a program stored on the memory 802 and executable on the processor 801, or
  • the program or instruction is executed by the processor 801, it implements each process of the above image processing method embodiment and can achieve the same technical effect. To avoid duplication, it will not be described again here.
  • the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
  • FIG. 9 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.
  • the electronic device 900 includes but is not limited to: radio frequency unit 901, network module 902, audio output unit 903, input unit 904, sensor 905, display unit 906, user input unit 907, interface unit 908, memory 909, processor 910, etc. part.
  • the processor 910 is configured to receive the first image data collected by the image sensor based on the main control chip;
  • the processor 910 is configured to transmit the first image data to the image enhancement chip through a first data transmission path based on the camera abstraction module (camera HAL) in the main control chip, wherein the first data transmission path It is formed by the sequential connection of the camera abstract module (camera HAL), direct rendering manager (DRM), display hardware (Display HW) and the image enhancement chip;
  • the camera abstraction module camera abstraction module
  • DRM direct rendering manager
  • Display HW display hardware
  • the processor 910 is configured to perform image enhancement processing on the first image data based on the image enhancement chip to obtain second image data.
  • the processor 910 is configured to convert the data format of the first image data into the data format matching the direct rendering manager (DRM) based on the direct rendering manager wrapper (DRMWrapper). Format, get the first intermediate data;
  • DRM direct rendering manager
  • DRMWrapper direct rendering manager wrapper
  • the processor 910 is configured to pass the first intermediate data to the direct rendering manager (DRM) based on the direct rendering manager wrapper (DRMWrapper);
  • the processor 910 is configured to transmit the first intermediate data to the image enhancement chip through the display hardware (Display HW) based on the direct rendering manager (DRM);
  • the processor 910 is configured to perform image enhancement processing on the first intermediate data based on the image enhancement chip to obtain the second image data.
  • the processor 910 is configured to perform synthesis processing on the first image and the shooting timestamp based on the direct rendering manager (DRM) to obtain the second intermediate data;
  • DRM direct rendering manager
  • the processor 910 is configured to perform image enhancement processing on the second intermediate data based on the image enhancement chip to obtain the second image data.
  • the processor 910 is configured to transmit the identification information of the target cache unit of the image sensor to the direct rendering manager (DRM) based on the direct rendering manager wrapper (DRMWrapper), wherein, The first intermediate data is stored in the target cache unit;
  • the processor 910 is configured to obtain the first intermediate data from the target cache unit based on the identification information.
  • the processor 910 is configured to establish the direct rendering based on the camera abstraction module (camera HAL) when the brightness parameter in the first image data indicates that the ambient brightness is lower than a preset brightness threshold.
  • the processor 910 is configured to release the direct rendering management based on the camera abstraction module (camera HAL) when the brightness parameter in the first image data indicates that the ambient brightness is not lower than the preset brightness threshold.
  • the first data transmission path is disconnected from the connection between the device's wrapper (DRMWrapper) and the direct rendering manager (DRM).
  • the processor 910 is configured to obtain target configuration information based on the camera abstract module (camera HAL), where the target configuration information is the configuration information of the direct rendering manager (DRM);
  • the processor 910 is configured to transmit the target configuration information to the direct rendering manager (DRM) through the first data transmission path based on the camera abstract module (camera HAL);
  • the processor 910 is configured to establish a wrapper (DRMWrapper) of the direct rendering manager and the direct rendering manager (DRM) when the direct rendering manager (DRM) completes initialization based on the target configuration information. DRM). ,
  • the electronic device 900 may also include a power supply (such as a battery) that supplies power to various components.
  • the power supply may be logically connected to the processor 910 through a power management system, thereby managing charging, discharging, and function through the power management system. Consumption management and other functions.
  • the structure of the electronic device shown in Figure 9 does not constitute a limitation on the electronic device.
  • the electronic device may include more or less components than shown in the figure, or combine certain components, or arrange different components, which will not be described again here. .
  • the input unit 904 may include a graphics processing unit (GPU) 9041 and a microphone 9042.
  • the graphics processor 9041 is responsible for the image capture device (GPU) in the video capture mode or the image capture mode. Process the image data of still pictures or videos obtained by cameras (such as cameras).
  • the display unit 906 may include a display panel 9061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like.
  • the user input unit 907 includes a touch panel 9071 and other input devices 9072. Touch panel 9071, also known as touch screen.
  • the touch panel 9071 may include two parts: a touch detection device and a touch controller.
  • Other input devices 9072 may include but are not limited to physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be described again here.
  • Memory 909 may be used to store software programs as well as various data, including but not limited to application programs and operating systems.
  • the processor 910 can integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communications. It can be understood that the above modem processor may not be integrated into the processor 910.
  • Embodiments of the present application also provide a readable storage medium.
  • Programs or instructions are stored on the readable storage medium.
  • the program or instructions are executed by a processor, each process of the above image processing method embodiment is implemented and the same can be achieved. The technical effects will not be repeated here to avoid repetition.
  • the processor is the processor in the electronic device described in the above embodiment.
  • the readable storage media includes computer-readable storage media, such as computer read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disks or optical disks, etc.
  • An embodiment of the present application further provides a chip.
  • the chip includes a processor and a communication interface.
  • the communication interface is coupled to the processor.
  • the processor is used to run programs or instructions to implement the above image processing method embodiments. Each process can achieve the same technical effect. To avoid duplication, it will not be described again here.
  • chips mentioned in the embodiments of this application may also be called system-on-chip, system-on-a-chip, system-on-a-chip or system-on-chip, etc.
  • the methods of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better. implementation.
  • the technical solution of the present application can be embodied in the form of a software product in essence or that contributes to the existing technology.
  • the computer software product is stored in a storage medium (such as ROM/RAM, disk, CD), including several instructions to cause a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in various embodiments of this application.
  • the contrast and brightness of the first image data can be detected based on the camera hardware abstraction module (Camera Hardware Abstraction Layer, Camera HAL) of the main control chip, and the judgment of the first image data can be preset in the main control chip.
  • the relevant threshold judgment conditions of contrast and brightness can be set in advance. After the Camera HAL detects the contrast and brightness of the first image data, the The detected values of contrast and brightness are compared with the threshold judgment condition. If the threshold judgment condition is met, it is determined that the first image data is in the preset scene; accordingly, if the threshold judgment condition is not met, the first image data is determined to be in the preset scene. In this case, it is determined that the first image data is in a scene other than the preset scene.
  • the first image data is in the preset scene, that is, when the shooting environment is poor, brightness enhancement, color enhancement, contrast enhancement, etc. can be performed on the first image data based on the image enhancement chip. Processing to improve the quality of images output by the camera of the electronic device.

Landscapes

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

Abstract

本申请公开了一种图像处理方法、图像处理电路、电子设备和可读存储介质,涉及数据处理技术领域。所述图像处理方法,包括:基于主控芯片接收图像传感器所采集的第一图像数据;基于所述主控芯片中的相机抽象模块通过第一数据传输通路将所述第一图像数据传输至图像增强芯片,其中,所述第一数据传输通路由所述相机抽象模块、直接渲染管理器、显示硬件和所述图像增强芯片依次连接形成;基于所述图像增强芯片对所述第一图像数据进行图像增强处理,得到第二图像数据。

Description

图像处理方法、图像处理电路、电子设备和可读存储介质
相关申请的交叉引用
本申请主张在2022年9月9日在中国提交的中国专利申请No.202211103547.5的优先权,其全部内容通过引用包含于此。
技术领域
本公开涉及数据处理技术领域,具体涉及一种图像处理方法、图像处理电路、电子设备和可读存储介质。
背景技术
随着图像处理技术的发展,人们对电子设备所显示的图像的要求越来越高。为确保电子设备能够输出满足用户需要的高质量图像,现有技术中通常在电子设备内设置各种用于对图像进行处理的芯片。然而,现有的图像处理方法在对图像进行处理的过程中通常需要耗费相对较长的时间,因此,现有的图像处理方法存在处理耗时相对较长的问题。
发明内容
本申请提供了一种图图像处理方法、图像处理电路、电子设备和可读存储介质,可以降低图像处理过程的时延。
第一方面,本申请实施例提供了一种图像处理方法,包括:
基于主控芯片接收图像传感器所采集的第一图像数据;
基于所述主控芯片中的相机抽象模块(camera Hardware Abstraction Layer,camera HAL)通过第一数据传输通路将所述第一图像数据传输至图像增强芯片,其中,所述第一数据传输通路由所述相机抽象模块(camera HAL)、直接渲染管理器(Direct Rendering Manager,DRM)、显示硬件(Display Hardware,Display HW)和所述图像增强芯片依次连接形成;
基于所述图像增强芯片对所述第一图像数据进行图像增强处理,得到第二图像数据。
第二方面,本申请实施例提供了一种图像处理电路,包括:主控芯片和图像增强芯片,所述主控芯片包括相机抽象模块(camera HAL)、直接渲染管理器(DRM)、显示硬件(Display HW),所述相机抽象模块(camera HAL)通过第一数据传输通路与所述图像增强芯片连接,所述第一数据传输通路由所述相机抽象模块(camera HAL)、直接渲染管理器(DRM)、显示硬件(Display HW)和所述图像增强芯片依次连接形成;
所述主控芯片用于接收图像传感器所采集的第一图像数据;
所述相机抽象模块(camera HAL)用于通过所述第一数据传输通路将所述第一图像数据传输至图像增强芯片;
所述图像增强芯片用于对所述第一图像数据进行图像增强处理,得到第二图像数据。
第三方面,本申请实施例提供了一种电子设备,包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的图像处理方法的步骤。
第四方面,本申请实施例提供了一种可读存储介质,其特征在于,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的图像处理方法的步骤。
第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的图像处理方法的步骤。
第六方面,本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如第一方面所述的图像处理方法的步骤。
本公开实施例中,通过基于第一数据传输通路将第一图像数据从相机抽象模块(camera HAL)传递至图像增强芯片,相对于相关技术中的图像数据传输方式而言,由于可以缩短图像数据传输的路径,因此,可以节省图像数据传输过程中的耗时,进而可以降低图像处理过程的时延。
附图说明
图1是本申请实施例提供的图像处理方法的流程示意图;
图2是本申请实施例提供的图像处理电路的结构示意图;
图3是本申请实施例中第一数据传输通路与第二数据传输通路的连接示意图;
图4是本申请实施例中直接渲染管理器初始化的流程示意图;
图5是本申请实施例中第一数据传输通路中数据的传输示意图;
图6是本申请实施例中第一数据传输通路释放过程的流程示意图;
图7是本申请实施例中直接渲染管理器进行图像渲染的示意图;
图8是本申请实施例提供的另一种电子设备的结构示意图;
图9是本申请实施例提供的电子设备的硬件结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、 “第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的图像处理方法、图像处理电路、电子设备和可读存储介质进行详细地说明。
请参见图1,图1为本公开实施例提供的一种图像处理方法的流程示意图,所述图像处理方法包括以下步骤:
步骤S101、基于主控芯片接收图像传感器所采集的第一图像数据;
步骤S102、基于所述主控芯片中的相机抽象模块(Camera Hardware Abstraction Layer,camera HAL)通过第一数据传输通路将所述第一图像数据传输至图像增强芯片,其中,所述第一数据传输通路由所述相机抽象模块(camera HAL)、直接渲染管理器(Direct Rendering Manager,DRM)、显示硬件(Display Hardware,Display HW)和所述图像增强芯片依次连接形成;
步骤S103、基于所述图像增强芯片对所述第一图像数据进行图像增强处理,得到第二图像数据。
其中,上述图像处理方法可以应用于各种具有拍摄功能的电子设备,也可以应用于各种监控系统,例如,可以应用于门禁监控系统。
上述主控芯片可以采用系统级芯片(System on Chip,SOC),上述图像传感器可以是电子设备中相机的摄像机传感器(Camera Sensor)。上述主控芯片可以包括图像处理模块,其中,所述图像处理模块可以是集成于所述主控芯片中的图像处理器(Image Signal Processor,ISP)。上述图像增强芯片可以是独立于所述主控芯片之外的外挂图像增强芯片。
在某些拍摄环境较差的场景下,例如,亮度较暗的场景,或者,场景中对比度较高的场景,由于拍摄环境较差,因此,拍摄第一图像数据的过程中可能存在大量影响拍摄的干扰因素,这样,图像传感器拍摄得到的第一图像数据的质量通常较差,仅通过主控芯片的图像处理模块对第一图像数据进行处理,所得到的图像数据的图像质量可能仍较差。此时,可以进一步基于所述图像增强芯片进一步对第一图像数据进行处理以提高相机输出的图像质量。
基于此,本公开实施例中,在主控芯片接收图像传感器所采集的第一图像数据之后,可以先将所述第一图像数据通过第一数据传输通路传输至图像增强芯片,图像增强芯片可以对第一图像数据进行亮度增强、色彩增强、对比度增强、降噪等处理,以提高所述电子设备的相机输出的图像的质量。可以理解的是,在图像增强芯片对第一图像数据进行处理得到第二图像数据之后,所述图像增强芯片可以将第二图像数据回传至主控芯片,主控芯片可以通过图像处理模块进一步对第二图像数据进行处理,得到目标图像数据,并对目标图像数据进行送显或录像处理。
请参见图2,为本公开一个实施例提供的一种图像处理电路,可以基于该图像处理电 路实现上述图像处理方法。其中,所述图像处理电路包括主控芯片和图像增强芯片,所述主控芯片包括图像处理模块(图中未示出)、相机驱动模块(Camera Driver)、相机抽象模块(camera HAL)、相机服务模块(Camera Service)、相机框架(Camera Framework)、应用模块(Application,APP)、显示框架模块(Surface Flinger)、硬件设计单元(Hardware composer,HWC)、直接渲染管理器(DRM)、显示硬件(Display Hardware,Display HW)。其中,所述图像传感器可以通过所述图像处理模块与所述相机驱动模块(Camera Driver)连接。所述图像增强芯片的输出端可以与所述图像处理模块的输入端连接,以便于将所述图像增强芯片处理后的图像回传至主控芯片进一步进行处理。
请参见图2,通过使camera HAL与DRM之间连接,这样,相机抽象模块(camera HAL)、直接渲染管理器(DRM)、显示硬件(Display Hardware,Display HW)和所述图像增强芯片依次连接形成可以依次连接形成第一数据传输通路,这样,在需要将所述第一图像数据传输至图像增强芯片进行图像增强处理时,可以通过该第一数据传输通路对第一图像数据进行传输。
而相关技术中传输第一图像数据的数据传输通路为:相机抽象模块(camera HAL)→相机服务模块(Camera Service)→相机框架(Camera Framework)→应用模块(APP)→显示框架模块(Surface Flinger)→硬件设计单元(HWC)→直接渲染管理器(DRM)→显示硬件(Display HW)→图像增强芯片。
可见,本公开实施例中,通过利用第一数据传输通路对第一图像数据传输,相对于相关技术而言,由于可以取消传输通路中的“相机服务模块(Camera Service)→相机框架(Camera Framework)→APP→显示框架模块(Surface Flinger)→硬件设计单元(HWC)”传输环节,因此,可以有效的缩短图像数据传输的路径。
此外,在基于所述图像增强芯片对所述第一图像数据进行图像增强处理,得到第二图像数据之后,所述图像增强芯片可以通过第二数据传输通路将所述第二图像数据传输至显示屏进行显示,其中,所述第二数据传输通路为:图像增强芯片→图像处理模块(图中未示出)→相机抽象模块(camera HAL)→相机服务模块(Camera Service)→相机框架(Camera Framework)→应用模块(APP)→显示框架模块(Surface Flinger)→硬件设计单元(HWC)→直接渲染管理器(DRM)→显示硬件(Display HW)→显示屏。
该实施方式中,通过基于第一数据传输通路将第一图像数据从相机抽象模块(camera HAL)传递至图像增强芯片,相对于相关技术中的图像数据传输方式而言,由于可以缩短图像数据传输的路径,因此,可以节省图像数据传输过程中的耗时,进而可以降低图像处理过程的时延。
可选地,所述第一数据传输通路还包括直接渲染管理器的封装器(DRMWrapper),其中,所述图像传感器的数据发送软件接口和所述直接渲染管理器(DRM)的数据发送软件接口分别封装于所述直接渲染管理器的封装器(DRMWrapper),所述相机抽象模块(camera HAL)通过所述直接渲染管理器的封装器(DRMWrapper)与所述直接渲染管理 器(DRM)连接。
其中,可以通过解析硬件设计单元(HWC)与直接渲染管理器(DRM)之间的交互代码,然后,在相机抽象模块(camera HAL)特制化集成出能够与所述直接渲染管理器(DRM)进行代码交互的一层软件接口层,其中,所述软件接口层即可作为上述直接渲染管理器的封装器(DRMWrapper)。
该实施方式中,通过将所述图像传感器的数据发送软件接口和所述直接渲染管理器(DRM)的数据发送软件接口分别封装于所述直接渲染管理器的封装器(DRMWrapper),这样,即可实现所述相机抽象模块(camera HAL)与所述直接渲染管理器(DRM)之间的数据传输,以形成所述第一数据传输通路。
可选地,所述基于所述主控芯片中的相机抽象模块(camera HAL)通过第一数据传输通路将所述第一图像数据传输至图像增强芯片,包括:
基于所述直接渲染管理器的封装器(DRMWrapper)将所述第一图像数据的数据格式转换为所述与所述直接渲染管理器(DRM)匹配的格式,得到第一中间数据;
基于所述直接渲染管理器的封装器(DRMWrapper)将所述第一中间数据传递至所述直接渲染管理器(DRM);
基于所述直接渲染管理器(DRM)通过所述显示硬件(Display HW)将所述第一中间数据传输至所述图像增强芯片;
所述基于所述图像增强芯片对所述第一图像数据进行图像增强处理,得到第二图像数据,包括:
基于所述图像增强芯片对所述第一中间数据进行图像增强处理,得到所述第二图像数据。
该实施方式中,通过基于所述直接渲染管理器的封装器(DRMWrapper)将所述第一图像数据的数据格式转换为所述与所述直接渲染管理器(DRM)匹配的格式,如此,有利于直接渲染管理器(DRM)接收到第一中间数据之后,可以进一步对第一中间数据进行处理,并将处理之后的数据传输至图像增强芯片进行图像增强处理。
可选地,所述第一图像数据包括第一图像和所述第一图像的拍摄时间戳,所述基于所述主控芯片中的相机抽象模块(camera HAL)通过第一数据传输通路将所述第一图像数据传输至图像增强芯片,包括:
在所述第一图像数据传输至所述直接渲染管理器(DRM)的情况下,基于所述直接渲染管理器(DRM)对所述第一图像和所述拍摄时间戳进行合成处理,得到所述第二中间数据;
所述基于所述图像增强芯片对所述第一图像数据进行图像增强处理,得到第二图像数据,包括:
基于所述图像增强芯片对所述第二中间数据进行图像增强处理,得到所述第二图像数据。
在本公开一个实施例中,通过使所述第一图像与第一图像的拍摄时间戳进行合成,这样,后续主控芯片在接收到图像增强芯片对第一图像数据进行处理得到的第二图像数据之后,可以通过校验第一图像数据与第二图像数据中的拍摄时间戳是否匹配,以确定图像增强芯片在对第一图像数据进行处理的过程中是否存在丢帧等异常。
例如,在本公开一个实施例中,所述主控芯片可以通过第一数据传输通路持续向图像增强芯片传输多个不同的第一图像数据,图像增强芯片在完成对该多个第一图像数据的图像增强处理之后,可以得到多个第二图像数据。主控芯片在接收到多个第二图像数据之后,可以分别获取多个第一图像数据的拍摄时间戳数据,然后,判断该拍摄时间戳数据中的每个拍摄时间戳是否存在与之对应的第二图像数据,若存在,则说明书图像增强芯片在进行图像增强过程中不存在丢帧的异常。若有至少一个拍摄时间戳不存在与之对应的第二图像数据,则说明图像增强芯片进行图像增强过程中,存在丢帧异常,此时,可以对该丢帧异常进行标记。这样,后续可以在丢帧位置进行插帧,以避免因丢帧导致显示异常的问题。
该实施方式中,通过基于直接渲染管理器(DRM)对第一图像和第一图像的拍摄时间戳进行合成,如此,后续图像增强芯片中输出的图像数据中可以携带图像的拍摄时间戳,有利于后续基于具有图像中的拍摄时间戳对图像处理过程中可能出现的异常进行检测。
可选地,在本公开一个实施例中,所述第一图像数据包括第一图像和所述第一图像的拍摄时间戳,所述基于所述主控芯片中的相机抽象模块(camera HAL)通过第一数据传输通路将所述第一图像数据传输至图像增强芯片,包括:
基于所述直接渲染管理器的封装器(DRMWrapper)将所述第一图像数据的数据格式转换为所述与所述直接渲染管理器(DRM)匹配的格式,得到第一中间数据;
基于所述直接渲染管理器的封装器(DRMWrapper)将所述第一中间数据传递至所述直接渲染管理器(DRM);
基于所述直接渲染管理器(DRM)对所述第一中间数据中的第一图像和所述拍摄时间戳进行合成处理,得到所述第二中间数据;
基于所述直接渲染管理器(DRM)通过所述显示硬件(Display HW)将所述第二中间数据传输至所述图像增强芯片;
所述基于所述图像增强芯片对所述第一图像数据进行图像增强处理,得到第二图像数据,包括:
基于所述图像增强芯片对所述第二中间数据进行图像增强处理,得到所述第二图像数据。
该实施方式的具体实现过程与上述实施例类似,且能够实现相同的有益效果,为避免重复,在此不再予以赘述。
可选地,所述基于所述直接渲染管理器的封装器(DRMWrapper)将所述第一中间数据传递至所述直接渲染管理器(DRM),包括:
基于所述直接渲染管理器的封装器(DRMWrapper)将所述图像传感器的目标缓存单 元的标识信息传输至所述直接渲染管理器(DRM),其中,所述第一中间数据存储于所述目标缓存单元;
所述直接渲染管理器(DRM)基于所述标识信息从所述目标缓存单元中获取所述第一中间数据。
可以理解的是,上述图像传感器所采集到的第一图像数据可以通过所述目标缓存单元进行缓存,同时,所述直接渲染管理器的封装器(DRMWrapper)和所述直接渲染管理器(DRM)可以分别对所述目标缓存单元进行数据读写。在所述直接渲染管理器的封装器(DRMWrapper)对第一图像数据进行格式转换得到第一中间数据之后,可以将第一中间数据缓存于所述目标缓存单元。请参见图2,所述相机抽象模块(camera HAL)可以通过所述直接渲染管理器的封装器(DRMWrapper)将所述标识信息传递至所述直接渲染管理器(DRM),直接渲染管理器(DRM)在获取到所述第一中间数据之后,可以通过所述直接渲染管理器的封装器(DRMWrapper)向所述相机抽象模块(camera HAL)发送数据获取完成标识。
其中,所述标识信息可以包括所述目标缓存单元的地址信息,如此,所述直接渲染管理器(DRM)可以基于所述标识信息所指示的存储地址在所述目标缓存单元中进行数据读写。
该实施方式中,直接渲染管理器(DRM)在接收到所述目标缓存单元的标识信息时,可以根据所述标识信息定位所述第一中间数据的存放位置,进而可以从所述目标缓存单元中获取所述第一中间数据,从而实现直接渲染管理器的封装器(DRMWrapper)与直接渲染管理器(DRM)之间的数据传输过程。
可选地,所述方法还包括:
在所述目标缓存单元被所述图像传感器访问的情况下,所述目标缓存单元的获取围栏(acquir_fence)标识符被置起,以拒绝所述直接渲染管理器(DRM)访问所述目标缓存单元;
在所述图像传感器结束对所述目标缓存单元的访问的情况下,所述获取围栏(acquir_fence)标识符被触发,以允许所述直接渲染管理器(DRM)访问所述目标缓存单元;
在所述直接渲染管理器(DRM)访问所述目标缓存单元的情况下,所述目标缓存单元的释放围栏(release_fence)标识符被置起,以拒绝所述图像传感器访问所述目标缓存单元;
在所述直接渲染管理器(DRM)结束对所述目标缓存单元的访问的情况下,所述释放围栏(release_fence)标识符被触发,以允许所述图像传感器访问所述目标缓存单元。
其中,所述目标缓存单元被所述图像传感器访问可以是指:所述图像传感器从所述目标缓存单元读写图像数据的过程。所述直接渲染管理器(DRM)访问所述目标缓存单元可以是指:所述直接渲染管理器(DRM)从所述目标缓存单元读写图像数据的过程。
该实施方式中,通过对目标缓存单元的围栏(acquir_fence)标识符进行置起或触发,或者,对目标缓存单元的释放围栏(release_fence)标识进行置起或触发,从而可以确保在同一时间只能有一个硬件模块对目标缓存单元中的数据进行读写,进而避免在其中一个硬件模块读取目标缓存单元中的数据的过程中,因另一个模块写入新的数据,而导致读取数据的硬件模块当前读取的数据被覆盖的问题。如此,图像传感器可以采用fence机制来通知直接渲染管理器(DRM)对所述目标缓存单元中的缓存数据(buffer)使用完毕,相应地,所述直接渲染管理器(DRM)也可以采用所述fence机制来通知图像传感器对所述目标缓存单元中的缓存数据(buffer)使用完毕。如此,有利于提高对目标缓存单元中缓存数据的管理效果。
可选地,所述方法还包括:
在所述第一图像数据中的亮度参数指示环境亮度低于预设亮度阈值的情况下,所述相机抽象模块(camera HAL)建立所述直接渲染管理器的封装器(DRMWrapper)与所述直接渲染管理器(DRM)之间的连接,所述第一数据传输通路导通;
在所述第一图像数据中的亮度参数指示环境亮度不低于所述预设亮度阈值的情况下,所述相机抽象模块(camera HAL)释放所述直接渲染管理器的封装器(DRMWrapper)与所述直接渲染管理器(DRM)之间的连接,所述第一数据传输通路断开。
具体地,在当前拍摄场景的环境亮度低于预设亮度阈值时,可以将当前拍摄场景确定为暗环境拍摄场景。在此场景下,由于所述图像传感器所采集的第一图像数据的图像质量较差,因此,可以基于所述相机抽象模块(camera HAL)控制所述第一数据传输通路导通,此时,主控芯片在接收到图像传感器所采集的第一图像数据之后,可以先通过第一数据传输通路将第一图像数据传输至图像增强芯片进行图像增强处理,然后,再由主控芯片对图像增强芯片处理后的图像数据进一步进行处理。如此,通过分别利用主控芯片和图像增强芯片对暗环境下拍摄的图像数据进行处理,有利于提高暗环境拍摄的图片的质量。
相应地,在当前拍摄场景的环境亮度不低于预设亮度阈值时,可以将当前拍摄场景确定为正常拍摄场景,此时,由于所述图像传感器所采集的第一图像数据的图像质量通常较好,因此,可以仅由主控芯片对第一图像数据进行处理。由于在该场景下无需采用图像增强芯片进行增强,因此,可以基于所述相机抽象模块(camera HAL)释放所述直接渲染管理器的封装器(DRMWrapper)与所述直接渲染管理器(DRM)之间的连接,以释放所述直接渲染管理器的封装器(DRMWrapper)所占用的直接渲染管理器(DRM)中的资源,同时,还可以减少电子设备的功耗。
请参见图6,为本公开一个实施例中,所述相机抽象模块(camera HAL)释放所述直接渲染管理器的封装器(DRMWrapper)与所述直接渲染管理器(DRM)之间的连接的流程示意图,所述相机抽象模块(camera HAL)通过所述直接渲染管理器的封装器(DRMWrapper)向所述直接渲染管理器(DRM)发送释放连接命令(DisableDRM),直接渲染管理器(DRM)在接收到所述释放连接命令后,释放与所述直接渲染管理器的封 装器(DRMWrapper)的连接,同时,释放所述直接渲染管理器的封装器(DRMWrapper)所占用的资源。然后,通过所述直接渲染管理器的封装器(DRMWrapper)向所述相机抽象模块(camera HAL)发送释放完成消息(DisableDone)。
可选地,所述相机抽象模块(camera HAL)建立所述直接渲染管理器的封装器(DRMWrapper)与所述直接渲染管理器(DRM)之间的连接,包括:
基于所述相机抽象模块(camera HAL)获取目标配置信息,其中,所述目标配置信息为所述直接渲染管理器(DRM)的配置信息;
基于所述相机抽象模块(camera HAL)通过所述第一数据传输通路将所述目标配置信息传输至所述直接渲染管理器(DRM);
在所述直接渲染管理器(DRM)基于所述目标配置信息完成初始化的情况下,所述直接渲染管理器的封装器(DRMWrapper)与所述直接渲染管理器(DRM)之间连接建立。
其中,所述目标配置信息可以包括所述直接渲染管理器(DRM)初始化所需的帧率和分辨率等配置信息。其中,由于直接渲染管理器(DRM)支持的分辨率有限,例如,相关技术中的直接渲染管理器(DRM)所能够支持的最大分辨率为:拍照预览分辨率:1080x2400,录像分辨率1080x1920。因此,为了减小直接渲染管理器(DRM)显示调试分辨率工作量,直接渲染管理器(DRM)的分辨率按最大配置,所述目标配置信息包括如下配置信息:拍照预览分辨率:1080x2400,录像分辨率1080x1920。如图7所示为所述直接渲染管理器(DRM)进行图像渲染的示意图,其中,1080x1080的图像渲染在1080x2400的画布左上角。
请参见图4,所述直接渲染管理器(DRM)初始化的流程为:相机抽象模块(camera HAL)通过直接渲染管理器的封装器(DRMWrapper)将所述目标配置信息传输至所述直接渲染管理器(DRM),直接渲染管理器(DRM)基于所述目标配置信息进行初始化,在初始化完成之后,所述直接渲染管理器(DRM)通过所述直接渲染管理器的封装器(DRMWrapper)向所述相机抽象模块(camera HAL)反馈初始化完成信号。由于所述相机抽象模块(camera HAL)反馈初始化完成之后,所述直接渲染管理器的封装器(DRMWrapper)与所述直接渲染管理器(DRM)之间连接建立。因此,所述相机抽象模块(camera HAL)在接收到所述初始化完成信号时,可以进一步向所述直接渲染管理器(DRM)传输数据。
可选地,所述直接渲染管理器(DRM)包括第一直接渲染管理单元和第二直接渲染管理单元,所述相机抽象模块(camera HAL)与所述第一直接渲染管理单元连接,所述第二直接渲染管理单元用于与硬件设计单元(HWC)连接。
请参见图2和图3,在本公开一个实施例中,在所述图像处理电路对图像进行处理的过程中,一方面需要通过第一数据传输通路将第一图像数据传输至图像增强芯片进行图像增强处理;另一方面,还需要通过第二数据传输通路将将图像增强芯片处理后的第二图像数据传输至显示屏进行显示,其中,所述第二数据传输通路为:图像增强芯片→图像处理 模块(图中未示出)→相机抽象模块(camera HAL)→相机服务模块(Camera Service)→相机框架(Camera Framework)→应用模块(APP)→显示框架模块(Surface Flinger)→硬件设计单元(HWC)→直接渲染管理器(DRM)→显示硬件(Display HW)→显示屏。
此外,在本公开实施例中,在所述图像增强处理完成对所述的第一图像数据的处理,得到第二图像数据之后,除了对所述第二图像数据进行送显之外,还可以对所述第二图像数据进行保存,以生成包括所述第二图像数据的录像数据。
其中,上述第一直接渲染管理单元和第二直接渲染管理单元可以是对所述直接渲染管理器(DRM)中的渲染资源进行划分之后,得到的两个相对独立的渲染单元。其中,所述第一直接渲染管理单元可以用于对所述第一数据传输通路传入的图像数据进行处理,所述第二直接渲染管理单元可以用于对所述第二数据传输通路传入的图像数据进行处理。
该实施方式中,由于所述第一数据传输通路与第二数据传输通路均需要占用所述直接渲染管理器(DRM)中的资源,为避免两条通路出现资源冲突,通过将所述直接渲染管理器(DRM)中的资源划分为两个直接渲染管理单元,并通过不同的直接渲染管理单元对不同的通路传入的图像数据进行处理,从而避免出现资源冲突的问题。
请参见图2,为本公开实施例提供的一种图像处理电路的结构示意图,所述图像处理电路,包括:
主控芯片和图像增强芯片,所述主控芯片包括相机抽象模块(camera HAL)、直接渲染管理器(DRM)、显示硬件(Display HW),所述相机抽象模块(camera HAL)通过第一数据传输通路与所述图像增强芯片连接,所述第一数据传输通路由所述相机抽象模块(camera HAL)、直接渲染管理器(DRM)、显示硬件(Display HW)和所述图像增强芯片依次连接形成;
所述主控芯片用于接收图像传感器所采集的第一图像数据;
所述相机抽象模块(camera HAL)用于通过所述第一数据传输通路将所述第一图像数据传输至图像增强芯片;
所述图像增强芯片用于对所述第一图像数据进行图像增强处理,得到第二图像数据。
可选地,所述第一数据传输通路还包括直接渲染管理器的封装器(DRMWrapper),其中,所述图像传感器的数据发送软件接口和所述直接渲染管理器(DRM)的数据发送软件接口分别封装于所述直接渲染管理器的封装器(DRMWrapper),所述相机抽象模块(camera HAL)通过所述直接渲染管理器的封装器(DRMWrapper)与所述直接渲染管理器(DRM)连接。
可选地,所述直接渲染管理器的封装器(DRMWrapper)用于将所述第一图像数据的数据格式转换为所述与所述直接渲染管理器(DRM)匹配的格式,得到第一中间数据;
所述直接渲染管理器的封装器(DRMWrapper)用于将所述第一中间数据传递至所述直接渲染管理器(DRM);
所述直接渲染管理器(DRM)用于通过所述显示硬件(Display HW)将所述第一中间数据传输至所述图像增强芯片;
所述图像增强芯片用于对所述第一中间数据进行图像增强处理,得到所述第二图像数据。
可选地,所述第一图像数据包括第一图像和所述第一图像的拍摄时间戳,所述直接渲染管理器(DRM)用于对所述第一图像和所述拍摄时间戳进行合成处理,得到所述第二中间数据;
所述图像增强芯片用于对所述第二中间数据进行图像增强处理,得到所述第二图像数据。
可选地,所述直接渲染管理器的封装器(DRMWrapper)用于将所述图像传感器的目标缓存单元的标识信息传输至所述直接渲染管理器(DRM),其中,所述第一中间数据存储于所述目标缓存单元;
所述直接渲染管理器(DRM)用于基于所述标识信息从所述目标缓存单元中获取所述第一中间数据。
可选地,在所述目标缓存单元被所述图像传感器访问的情况下,所述目标缓存单元的获取围栏(acquir_fence)标识符被置起,以拒绝所述直接渲染管理器(DRM)访问所述目标缓存单元;
在所述图像传感器结束对所述目标缓存单元的访问的情况下,所述获取围栏(acquir_fence)标识符被触发,以允许所述直接渲染管理器(DRM)访问所述目标缓存单元;
在所述直接渲染管理器(DRM)访问所述目标缓存单元的情况下,所述目标缓存单元的释放围栏(release_fence)标识符被置起,以拒绝所述图像传感器访问所述目标缓存单元;
在所述直接渲染管理器(DRM)结束对所述目标缓存单元的访问的情况下,所述释放围栏(release_fence)标识符被触发,以允许所述图像传感器访问所述目标缓存单元。
可选地,所述相机抽象模块(camera HAL)用于建立所述直接渲染管理器的封装器(DRMWrapper)与所述直接渲染管理器(DRM)之间的连接,以导通所述第一数据传输通路;
所述相机抽象模块(camera HAL)还用于释放所述直接渲染管理器的封装器(DRMWrapper)与所述直接渲染管理器(DRM)之间的连接,以断开所述第一数据传输通路。
可选地,所述相机抽象模块(camera HAL)用于获取目标配置信息,其中,所述目标配置信息为所述直接渲染管理器(DRM)的配置信息;
所述相机抽象模块(camera HAL)用于通过所述第一数据传输通路将所述目标配置信息传输至所述直接渲染管理器(DRM);
在所述直接渲染管理器(DRM)基于所述目标配置信息完成初始化的情况下,所述直接渲染管理器的封装器(DRMWrapper)与所述直接渲染管理器(DRM)之间连接建立。
可选地,所述直接渲染管理器(DRM)包括第一直接渲染管理单元和第二直接渲染管理单元,所述相机抽象模块(camera HAL)与所述第一直接渲染管理单元连接,所述第二直接渲染管理单元用于与硬件设计单元(HWC)连接。
可以理解的是,本公开实施例提供的图像处理电路能够实现上述实施例所述的图像处理方法的各个过程,且具有相同的有益效果,为避免重复,在此不再予以赘述。
该实施方式中,通过基于第一数据传输通路将第一图像数据从相机抽象模块(camera HAL)传递至图像增强芯片,相对于相关技术中的图像数据传输方式而言,由于可以缩短图像数据传输的路径,因此,可以节省图像数据传输过程中的耗时,进而可以降低图像处理过程的时延。
可选地,如图8所示,本申请实施例还提供了另一种电子设备800,包括处理器801,存储器802,存储在存储器802上并可在所述处理器801上运行的程序或指令,该程序或指令被处理器801执行时实现上述图像处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
需要说明的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。
图9为实现本申请实施例的一种电子设备的硬件结构示意图。
该电子设备900包括但不限于:射频单元901、网络模块902、音频输出单元903、输入单元904、传感器905、显示单元906、用户输入单元907、接口单元908、存储器909、以及处理器910等部件。
其中,所述处理器910用于基于主控芯片接收图像传感器所采集的第一图像数据;
所述处理器910用于基于所述主控芯片中的相机抽象模块(camera HAL)通过第一数据传输通路将所述第一图像数据传输至图像增强芯片,其中,所述第一数据传输通路由所述相机抽象模块(camera HAL)、直接渲染管理器(DRM)、显示硬件(Display HW)和所述图像增强芯片依次连接形成;
所述处理器910用于基于所述图像增强芯片对所述第一图像数据进行图像增强处理,得到第二图像数据。
可选地,所述处理器910用于基于所述直接渲染管理器的封装器(DRMWrapper)将所述第一图像数据的数据格式转换为所述与所述直接渲染管理器(DRM)匹配的格式,得到第一中间数据;
所述处理器910用于基于所述直接渲染管理器的封装器(DRMWrapper)将所述第一中间数据传递至所述直接渲染管理器(DRM);
所述处理器910用于基于所述直接渲染管理器(DRM)通过所述显示硬件(Display HW)将所述第一中间数据传输至所述图像增强芯片;
所述处理器910用于基于所述图像增强芯片对所述第一中间数据进行图像增强处理,得到所述第二图像数据。
可选地,所述处理器910用于基于所述直接渲染管理器(DRM)对所述第一图像和所述拍摄时间戳进行合成处理,得到所述第二中间数据;
所述处理器910用于基于所述图像增强芯片对所述第二中间数据进行图像增强处理,得到所述第二图像数据。
可选地,所述处理器910用于基于所述直接渲染管理器的封装器(DRMWrapper)将所述图像传感器的目标缓存单元的标识信息传输至所述直接渲染管理器(DRM),其中,所述第一中间数据存储于所述目标缓存单元;
所述处理器910用于基于所述标识信息从所述目标缓存单元中获取所述第一中间数据。
可选地,所述处理器910用于在所述第一图像数据中的亮度参数指示环境亮度低于预设亮度阈值的情况下,基于所述相机抽象模块(camera HAL)建立所述直接渲染管理器的封装器(DRMWrapper)与所述直接渲染管理器(DRM)之间的连接,所述第一数据传输通路导通;
所述处理器910用于在所述第一图像数据中的亮度参数指示环境亮度不低于所述预设亮度阈值的情况下,基于所述相机抽象模块(camera HAL)释放所述直接渲染管理器的封装器(DRMWrapper)与所述直接渲染管理器(DRM)之间的连接,所述第一数据传输通路断开。
可选地,所述处理器910用于基于所述相机抽象模块(camera HAL)获取目标配置信息,其中,所述目标配置信息为所述直接渲染管理器(DRM)的配置信息;
所述处理器910用于基于所述相机抽象模块(camera HAL)通过所述第一数据传输通路将所述目标配置信息传输至所述直接渲染管理器(DRM);
所述处理器910用于在所述直接渲染管理器(DRM)基于所述目标配置信息完成初始化的情况下,建立所述直接渲染管理器的封装器(DRMWrapper)与所述直接渲染管理器(DRM)之间连接。、
本领域技术人员可以理解,电子设备900还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器910逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图9中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。
应理解的是,本申请实施例中,输入单元904可以包括图形处理器(Graphics Processing Unit,GPU)9041和麦克风9042,图形处理器9041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元906可包括显示面板9061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板9061。 用户输入单元907包括触控面板9071以及其他输入设备9072。触控面板9071,也称为触摸屏。触控面板9071可包括触摸检测装置和触摸控制器两个部分。其他输入设备9072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。存储器909可用于存储软件程序以及各种数据,包括但不限于应用程序和操作系统。处理器910可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器910中。
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述图像处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述图像处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在 本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。
具体地,可以基于所述主控芯片的相机硬件抽象模块(Camera Hardware Abstraction Layer,Camera HAL)对所述第一图像数据进行对比度和亮度进行检测,并可以预先在主控芯片中设置判断第一图像数据的拍摄场景是否为预设场景的判断逻辑,例如,可以预先设置对比度和亮度的相关阈值判断条件,在所述Camera HAL检测到所述第一图像数据的对比度和亮度之后,将所述对比度和亮度的检测值与所述阈值判断条件进行对比,在满足阈值判断条件的情况下,确定所述第一图像数据处于所述预设场景;相应地,在不满足所述阈值判断条件的情况下,确定所述第一图像数据处于所述预设场景之外的其他场景。
在所述第一图像数据处于所述预设场景的情况下,即拍摄环境较差的情况下,可以基于所述图像增强芯片对所述第一图像数据进行亮度增强、色彩增强、对比度增强等处理,以提高所述电子设备的相机输出的图像的质量。

Claims (21)

  1. 一种图像处理方法,包括:
    基于主控芯片接收图像传感器所采集的第一图像数据;
    基于所述主控芯片中的相机抽象模块通过第一数据传输通路将所述第一图像数据传输至图像增强芯片,其中,所述第一数据传输通路由所述相机抽象模块、直接渲染管理器、显示硬件和所述图像增强芯片依次连接形成;
    基于所述图像增强芯片对所述第一图像数据进行图像增强处理,得到第二图像数据。
  2. 根据权利要求1所述的方法,其中,所述第一数据传输通路还包括直接渲染管理器的封装器,所述图像传感器的数据发送软件接口和所述直接渲染管理器的数据发送软件接口分别封装于所述直接渲染管理器的封装器,所述相机抽象模块通过所述直接渲染管理器的封装器与所述直接渲染管理器连接。
  3. 根据权利要求2所述的方法,其中,所述基于所述主控芯片中的相机抽象模块通过第一数据传输通路将所述第一图像数据传输至图像增强芯片,包括:
    基于所述直接渲染管理器的封装器将所述第一图像数据的数据格式转换为所述与所述直接渲染管理器匹配的格式,得到第一中间数据;
    基于所述直接渲染管理器的封装器将所述第一中间数据传递至所述直接渲染管理器;
    基于所述直接渲染管理器通过所述显示硬件将所述第一中间数据传输至所述图像增强芯片;
    所述基于所述图像增强芯片对所述第一图像数据进行图像增强处理,得到第二图像数据,包括:
    基于所述图像增强芯片对所述第一中间数据进行图像增强处理,得到所述第二图像数据。
  4. 根据权利要求1所述的方法,其中,所述第一图像数据包括第一图像和所述第一图像的拍摄时间戳,所述基于所述主控芯片中的相机抽象模块通过第一数据传输通路将所述第一图像数据传输至图像增强芯片,包括:
    在所述第一图像数据传输至所述直接渲染管理器的情况下,基于所述直接渲染管理器对所述第一图像和所述拍摄时间戳进行合成处理,得到第二中间数据;
    所述基于所述图像增强芯片对所述第一图像数据进行图像增强处理,得到第二图像数据,包括:
    基于所述图像增强芯片对所述第二中间数据进行图像增强处理,得到所述第二图像数据。
  5. 根据权利要求3所述的方法,其中,所述基于所述直接渲染管理器的封装器将所述第一中间数据传递至所述直接渲染管理器,包括:
    基于所述直接渲染管理器的封装器将所述图像传感器的目标缓存单元的标识信息传 输至所述直接渲染管理器,其中,所述第一中间数据存储于所述目标缓存单元;
    所述直接渲染管理器基于所述标识信息从所述目标缓存单元中获取所述第一中间数据。
  6. 根据权利要求5所述的方法,其中,所述方法还包括:
    在所述目标缓存单元被所述图像传感器访问的情况下,所述目标缓存单元的获取围栏标识符被置起,以拒绝所述直接渲染管理器访问所述目标缓存单元;
    在所述图像传感器结束对所述目标缓存单元的访问的情况下,所述获取围栏标识符被触发,以允许所述直接渲染管理器访问所述目标缓存单元;
    在所述直接渲染管理器访问所述目标缓存单元的情况下,所述目标缓存单元的释放围栏标识符被置起,以拒绝所述图像传感器访问所述目标缓存单元;
    在所述直接渲染管理器结束对所述目标缓存单元的访问的情况下,所述释放围栏标识符被触发,以允许所述图像传感器访问所述目标缓存单元。
  7. 根据权利要求2所述的方法,其中,所述方法还包括:
    在所述第一图像数据中的亮度参数指示环境亮度低于预设亮度阈值的情况下,所述相机抽象模块建立所述直接渲染管理器的封装器与所述直接渲染管理器之间的连接,所述第一数据传输通路导通;
    在所述第一图像数据中的亮度参数指示环境亮度不低于所述预设亮度阈值的情况下,所述相机抽象模块释放所述直接渲染管理器的封装器与所述直接渲染管理器之间的连接,所述第一数据传输通路断开。
  8. 根据权利要求7所述的方法,其中,所述相机抽象模块建立所述直接渲染管理器的封装器与所述直接渲染管理器之间的连接,包括:
    基于所述相机抽象模块获取目标配置信息,其中,所述目标配置信息为所述直接渲染管理器的配置信息;
    基于所述相机抽象模块通过所述第一数据传输通路将所述目标配置信息传输至所述直接渲染管理器;
    在所述直接渲染管理器基于所述目标配置信息完成初始化的情况下,所述直接渲染管理器的封装器与所述直接渲染管理器之间连接建立。
  9. 根据权利要求1所述的方法,其中,所述直接渲染管理器包括第一直接渲染管理单元和第二直接渲染管理单元,所述相机抽象模块与所述第一直接渲染管理单元连接,所述第二直接渲染管理单元用于与硬件设计单元连接。
  10. 一种图像处理电路,包括:主控芯片和图像增强芯片,所述主控芯片包括相机抽象模块、直接渲染管理器、显示硬件,所述相机抽象模块通过第一数据传输通路与所述图像增强芯片连接,所述第一数据传输通路由所述相机抽象模块、所述直接渲染管理器、所述显示硬件和所述图像增强芯片依次连接形成;
    所述主控芯片用于接收图像传感器所采集的第一图像数据;
    所述相机抽象模块用于通过所述第一数据传输通路将所述第一图像数据传输至图像增强芯片;
    所述图像增强芯片用于对所述第一图像数据进行图像增强处理,得到第二图像数据。
  11. 根据权利要求10所述的图像处理电路,其中,所述第一数据传输通路还包括直接渲染管理器的封装器,其中,所述图像传感器的数据发送软件接口和所述直接渲染管理器的数据发送软件接口分别封装于所述直接渲染管理器的封装器,所述相机抽象模块通过所述直接渲染管理器的封装器与所述直接渲染管理器连接。
  12. 根据权利要求11所述的图像处理电路,其中,所述直接渲染管理器的封装器用于将所述第一图像数据的数据格式转换为所述与所述直接渲染管理器匹配的格式,得到第一中间数据;
    所述直接渲染管理器的封装器用于将所述第一中间数据传递至所述直接渲染管理器;
    所述直接渲染管理器用于通过所述显示硬件将所述第一中间数据传输至所述图像增强芯片;
    所述图像增强芯片用于对所述第一中间数据进行图像增强处理,得到所述第二图像数据。
  13. 根据权利要求10所述的图像处理电路,其中,所述第一图像数据包括第一图像和所述第一图像的拍摄时间戳,所述直接渲染管理器用于对所述第一图像和所述拍摄时间戳进行合成处理,得到第二中间数据;
    所述图像增强芯片用于对所述第二中间数据进行图像增强处理,得到所述第二图像数据。
  14. 根据权利要求12所述的图像处理电路,其中,所述直接渲染管理器的封装器用于将所述图像传感器的目标缓存单元的标识信息传输至所述直接渲染管理器,其中,所述第一中间数据存储于所述目标缓存单元;
    所述直接渲染管理器用于基于所述标识信息从所述目标缓存单元中获取所述第一中间数据。
  15. 根据权利要求14所述的图像处理电路,其中,在所述目标缓存单元被所述图像传感器访问的情况下,所述目标缓存单元的获取围栏标识符被置起,以拒绝所述直接渲染管理器访问所述目标缓存单元;
    在所述图像传感器结束对所述目标缓存单元的访问的情况下,所述获取围栏标识符被触发,以允许所述直接渲染管理器访问所述目标缓存单元;
    在所述直接渲染管理器访问所述目标缓存单元的情况下,所述目标缓存单元的释放围栏标识符被置起,以拒绝所述图像传感器访问所述目标缓存单元;
    在所述直接渲染管理器结束对所述目标缓存单元的访问的情况下,所述释放围栏标识符被触发,以允许所述图像传感器访问所述目标缓存单元。
  16. 根据权利要求11所述的图像处理电路,其中,所述相机抽象模块用于建立所述直 接渲染管理器的封装器与所述直接渲染管理器之间的连接,以导通所述第一数据传输通路;
    所述相机抽象模块还用于释放所述直接渲染管理器的封装器与所述直接渲染管理器之间的连接,以断开所述第一数据传输通路。
  17. 根据权利要求16所述的图像处理电路,其中,所述相机抽象模块用于获取目标配置信息,其中,所述目标配置信息为所述直接渲染管理器的配置信息;
    所述相机抽象模块用于通过所述第一数据传输通路将所述目标配置信息传输至所述直接渲染管理器;
    在所述直接渲染管理器基于所述目标配置信息完成初始化的情况下,所述直接渲染管理器的封装器与所述直接渲染管理器之间连接建立。
  18. 根据权利要求10所述的图像处理电路,其中,所述直接渲染管理器包括第一直接渲染管理单元和第二直接渲染管理单元,所述相机抽象模块与所述第一直接渲染管理单元连接,所述第二直接渲染管理单元用于与硬件设计单元连接。
  19. 一种图像处理装置,所述图像处理装置被配置成用于执行如权利要求1至9中任一项所述图像处理方法。
  20. 一种电子设备,包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1至9中任一项所述的图像处理方法的步骤。
  21. 一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1至9中任一项所述的图像处理方法的步骤。
PCT/CN2023/117742 2022-09-09 2023-09-08 图像处理方法、图像处理电路、电子设备和可读存储介质 WO2024051824A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211103547.5A CN115665342B (zh) 2022-09-09 2022-09-09 图像处理方法、图像处理电路、电子设备和可读存储介质
CN202211103547.5 2022-09-09

Publications (1)

Publication Number Publication Date
WO2024051824A1 true WO2024051824A1 (zh) 2024-03-14

Family

ID=84984381

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/117742 WO2024051824A1 (zh) 2022-09-09 2023-09-08 图像处理方法、图像处理电路、电子设备和可读存储介质

Country Status (2)

Country Link
CN (1) CN115665342B (zh)
WO (1) WO2024051824A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115665342B (zh) * 2022-09-09 2024-03-05 维沃移动通信有限公司 图像处理方法、图像处理电路、电子设备和可读存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112399087A (zh) * 2020-12-07 2021-02-23 Oppo(重庆)智能科技有限公司 图像处理方法、装置、拍摄装置、电子设备和存储介质
CN113542757A (zh) * 2021-07-20 2021-10-22 Oppo广东移动通信有限公司 云应用的图像传输方法、装置、服务器及存储介质
US20210374454A1 (en) * 2020-05-27 2021-12-02 Polarr, Inc. Distributable descriptive recipe for intelligent image and video processing systems
CN114268707A (zh) * 2021-12-28 2022-04-01 维沃移动通信有限公司 图像处理方法、装置和电子设备
CN115665342A (zh) * 2022-09-09 2023-01-31 维沃移动通信有限公司 图像处理方法、图像处理电路、电子设备和可读存储介质
CN116419049A (zh) * 2021-12-28 2023-07-11 维沃移动通信有限公司 图像处理方法、图像处理系统、装置和电子设备

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE112016006734T5 (de) * 2015-04-26 2019-01-03 Intel Corporation Integriertes Android- und Windows-Gerät
CN113064727B (zh) * 2021-04-16 2022-08-26 上海众链科技有限公司 应用于Android系统的图像显示调度方法、终端及存储介质
CN114972607B (zh) * 2022-07-29 2022-10-21 烟台芯瞳半导体科技有限公司 加速图像显示的数据传输方法、装置及介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210374454A1 (en) * 2020-05-27 2021-12-02 Polarr, Inc. Distributable descriptive recipe for intelligent image and video processing systems
CN112399087A (zh) * 2020-12-07 2021-02-23 Oppo(重庆)智能科技有限公司 图像处理方法、装置、拍摄装置、电子设备和存储介质
CN113542757A (zh) * 2021-07-20 2021-10-22 Oppo广东移动通信有限公司 云应用的图像传输方法、装置、服务器及存储介质
CN114268707A (zh) * 2021-12-28 2022-04-01 维沃移动通信有限公司 图像处理方法、装置和电子设备
CN116419049A (zh) * 2021-12-28 2023-07-11 维沃移动通信有限公司 图像处理方法、图像处理系统、装置和电子设备
CN115665342A (zh) * 2022-09-09 2023-01-31 维沃移动通信有限公司 图像处理方法、图像处理电路、电子设备和可读存储介质

Also Published As

Publication number Publication date
CN115665342B (zh) 2024-03-05
CN115665342A (zh) 2023-01-31

Similar Documents

Publication Publication Date Title
WO2019001347A1 (zh) 移动设备的投屏方法、存储介质、终端及投屏系统
WO2021093583A1 (zh) 视频流处理方法、装置、终端设备及计算机可读存储介质
WO2021175054A1 (zh) 图像数据处理方法及相关装置
WO2024051824A1 (zh) 图像处理方法、图像处理电路、电子设备和可读存储介质
US20180302510A1 (en) Method for performing cooperative function automatically and device using the same
US7626637B2 (en) Method and apparatus for capturing full-screen frames
US20070206002A1 (en) Display data extraction methods, devices and computer systems utilizing the same
CN112770059B (zh) 拍照方法、装置及电子设备
CN111629239A (zh) 投屏处理方法、装置、设备及计算机可读存储介质
WO2023125657A1 (zh) 图像处理方法、装置和电子设备
CN112764817A (zh) 设备功能唤醒方法及装置
WO2023030519A1 (zh) 投屏处理方法及相关设备
WO2023005678A1 (zh) 图像信号处理器、图像信号处理装置及方法、芯片、终端设备
WO2022111717A1 (zh) 图像处理方法、装置及电子设备
CN116419049A (zh) 图像处理方法、图像处理系统、装置和电子设备
WO2023125659A1 (zh) 图像处理电路及数据传输方法
WO2024051674A1 (zh) 图像处理电路和电子设备
CN113938587A (zh) 基于双摄像头的摄录方法及电子设备
WO2023125316A1 (zh) 视频处理方法、装置、电子设备及介质
WO2023125273A1 (zh) 电子设备的图像显示方法、图像处理电路和电子设备
CN107317687B (zh) 远程控制方法、设备及系统
CN115714839A (zh) 图像处理电路、装置、方法、芯片及电子设备
CN113556500B (zh) 一种视频叠加方法、装置及系统
WO2022022405A1 (zh) 屏幕显示的方法、装置、电子设备、计算机存储介质
CN102868877A (zh) 实时影像通讯系统以及方法

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: 23862518

Country of ref document: EP

Kind code of ref document: A1