WO2025067390A1 - 图像处理方法、装置、电子设备及介质 - Google Patents
图像处理方法、装置、电子设备及介质 Download PDFInfo
- Publication number
- WO2025067390A1 WO2025067390A1 PCT/CN2024/121626 CN2024121626W WO2025067390A1 WO 2025067390 A1 WO2025067390 A1 WO 2025067390A1 CN 2024121626 W CN2024121626 W CN 2024121626W WO 2025067390 A1 WO2025067390 A1 WO 2025067390A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- information
- depth
- processing
- field information
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/50—Image enhancement or restoration using two or more images, e.g. averaging or subtraction
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20212—Image combination
- G06T2207/20221—Image fusion; Image merging
Definitions
- the present application belongs to the field of communication technology, and specifically relates to an image processing method, device, electronic equipment and medium.
- the purpose of the embodiments of the present application is to provide an image processing method, device, electronic device and medium, which can solve the problems of complex operation and low intelligence of existing image virtual processing.
- an embodiment of the present application provides an image processing method, comprising:
- the first image is blurred according to the depth of field information and the region segmentation information to obtain a second image.
- an image processing device including:
- An acquisition module used to acquire depth of field information and region segmentation information of the first image
- the first processing module is used to perform blurring processing on the first image according to the depth of field information and the region segmentation information to obtain a second image.
- an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
- an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
- an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
- an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
- the first image to be processed by obtaining its depth of field information and region segmentation information, further blurring processing is performed to achieve a convenient and intelligent image processing process.
- FIG1 is a schematic diagram of the image processing method according to an embodiment of the present application.
- FIG2 is a schematic diagram of an image processing method according to an embodiment of the present application applied to Example 1;
- FIG3 is a schematic diagram of the steps in the image processing method of Example 1;
- FIG4 is a schematic diagram of an image processing method according to an embodiment of the present application applied to Example 2;
- FIG5 is a schematic diagram of the steps in the image processing method of Example 2.
- FIG6 is a schematic diagram of an image processing method according to an embodiment of the present application applied to Example 3;
- FIG7 is a schematic diagram of the steps in the image processing method of Example 3.
- FIG8 is a schematic diagram of the structure of an image processing device according to an embodiment of the present application.
- FIG9 is a schematic diagram of the structure of an electronic device according to an embodiment of the present application.
- FIG. 10 is a schematic structural diagram of an electronic device according to another embodiment of the present application.
- first, second, etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the targets distinguished by “first”, “second”, etc. are generally of one type, and the number of targets is not limited.
- the first target can be one or more.
- “and/or” in the specification and claims represents at least one of the connected objects, and the character “/" generally indicates that the objects associated before and after are in an "or” relationship.
- an image processing method includes:
- Step 101 Obtain depth of field information and region segmentation information of a first image.
- the first image is the original image selected by the user for image processing.
- the depth of field information and region segmentation information of the first image are obtained in preparation for blurring processing.
- Step 102 blur the first image according to the depth of field information and the region segmentation information to obtain a second image.
- the electronic device that applies the image processing method of the embodiment of the present application can further perform blurring processing on the first image to be processed by obtaining its depth of field information and region segmentation information, thereby realizing a convenient and intelligent image processing process.
- the first image is YUV image data output by the image sensor.
- the image sensor RGB Sensor
- the process is turned on (streamOn), it can be normally exposed.
- Output the raw image file (Raw) data including support for various sensor types: StaggerHDR sensor/DCG sensor, etc.
- the image signal processing (ISP) module of the sensor itself or the ISP module of the Soc is applied to convert the Raw data into YUV data.
- the corresponding effect parameters need to be adapted to achieve a specific effect display.
- the first image is output by one image sensor or multiple image sensors.
- acquiring depth of field information and region segmentation information of the first image includes:
- the depth of field information and the area segmentation information are obtained through a main control chip or an image processing chip.
- the main control chip is also called system chip (System on chip, Soc), such as Soc embedded neural network processor (Neural Processing Unit, NPU).
- Soc System on chip
- NPU Soc embedded neural network processor
- the main control chip obtains the depth of field information and the region segmentation information through its own image processor, such as the ISP module of a certain series of chips.
- the image processing chip is also called an external image processor, which is connected to the main control chip of the electronic device as a separate chip.
- the functions supported by the image processing chip are pre-set, so the image processing chip can complete the acquisition of depth of field information and region segmentation information by setting the functions supported by the image processing chip.
- blurring the first image according to the depth of field information and the region segmentation information to obtain the second image includes:
- the second image is obtained by blurring the first image through the image processing chip.
- the image processing chip will perform blurring processing on the first image. For example, by setting the image processing chip to support blurring function, there is no need to use a main control chip, thereby reducing power consumption of the device.
- the main control chip obtains the depth of field information and region segmentation information of the first image
- the depth of field information and region segmentation information are passed to the image processing chip, and the image processing chip completes the blurring processing of the first image; or, after the image processing chip obtains the depth of field information and region segmentation information of the first image, it directly performs the blurring processing of the first image.
- acquiring depth information of the first image includes:
- the first image is a single-frame image, based on different objects in the first image, estimating the depth information; or,
- the depth of field information is calculated based on the distance from associated pixels in the two images to an image sensor; wherein the two images are acquired by different image sensors.
- the acquisition of depth of field information will be based on different objects in the image.
- the main control chip or the image processing chip will set a depth of field calculation component to obtain the depth of field information of the input first image.
- the depth of field calculation component can be a pre-trained monocular depth of field estimation network model.
- the first image is input into the monocular depth of field estimation network model for feature extraction, and the depth of field estimation result of the first image, that is, the depth of field information, is output.
- Two associated images are images output by two different image sensors at the same orientation.
- the acquisition of depth information will calculate the depth information based on the distance from the associated pixel points in the two images to the image sensor.
- the depth of field is further determined by calculating the parallax using a binocular depth calculation algorithm, which will not be described in detail here.
- obtaining region segmentation information of the first image includes:
- the main area and the background area of the first image are segmented based on the edge information to obtain the area segmentation information.
- the edge information of different objects can be obtained by identifying different objects in the first image, and the subject area and the background area are segmented according to the type (subject or background) of each object to obtain region segmentation information, also known as segmentation map information.
- region segmentation information includes the subject area position information and the background area position information; or, the region segmentation information includes the position information of different objects and the type of each object.
- the main control chip or the image processing chip is provided with a subject/background segmentation map calculation component, which segments the subject area and the background area according to the edge information of different objects in the image, and finally outputs the region segmentation information as a labeling information, marking which pixels (pixels) are the subject area and which pixels are the background area.
- the depth of field information and the region segmentation information are The first image is subjected to blurring processing to obtain a second image, including:
- the area to be blurred is blurred to obtain the second image.
- the image processing chip can automatically determine the region to be blurred in the first image, thereby performing blurring processing on the region to be blurred to obtain the second image.
- the image processing chip may pre-configure a strategy for determining the area to be blurred. For example, if the area to be blurred satisfies: the depth of field is greater than a first threshold and belongs to the background area, the background may be blurred.
- the method before determining edge information of different objects in the first image, the method further includes:
- the images collected by the multiple image sensors are acquired, the images collected by the multiple image sensors are fused to obtain the first image.
- the method further comprises:
- the preset processing strategy is the image processing scheme expected by the user. Based on the region segmentation information and the preset processing strategy, different color and/or filter processing can also be performed on the subject area and the background area, such as rendering different light spot shapes on the background area, rendering different colors on the subject area, applying a cold color filter to the subject area, etc.
- the main control chip or the image processing chip performs different color and/or filter processing on the main body area and the background area in the first image.
- Example 1 As shown in FIG2 and FIG3, the image processing method includes:
- Step 301 a single image sensor is powered on and outputs a first image, i.e., YUV image data;
- Step 302 The image data (first image) is sent to a depth calculation component to calculate depth information;
- the depth calculation component After generating a single frame of YUV image data, it is sent to the depth calculation component of the main control chip.
- the depth calculation component determines the depth information of different pixels according to different objects in the image. Finally, the depth information of different objects in the entire picture is calibrated;
- Step 303 The image data (first image) is sent to the subject/background segmentation map calculation component to calculate the segmentation map information;
- the main control chip After generating a single frame of YUV image data, it is sent to the main control chip's subject/background segmentation map calculation component, which segments the subject area and the background area according to the edge information of different objects in the image, and finally outputs a label information to mark which pixels are the subject area and which pixels are the background area.
- Step 304 input the image data (first image) + depth of field information + segmentation map information to the image processing chip, and the image processing chip performs blur processing;
- the first image, depth of field information and segmentation map information output by the image sensor are sent to the image processing chip for processing in the hardware module to blur the background and render different light spot shapes. Different colors are rendered for the subject to achieve better and more elegant video effects;
- Step 305 The processed data is sent to the preview display component for display
- the processed data is sent to the preview display component through the system channel. Users can see the rendering effect of the current scene in real time. Users can adjust the different levels and forms of blur and light spots according to the UI interface. Users can create different recording effects by themselves;
- Step 306 Send the data to the video encoding component, which encodes and saves the data;
- the video encoding component compresses the processed data through encoding to save the video information in a smaller ROM space, saving ROM space for users to store more video and file information, and saves the compressed data into files in the sdcard;
- Step 307 End.
- Example 2 As shown in FIG4 and FIG5, the image processing method includes:
- Step 501 two or more image sensors are powered on to output a plurality of first images, i.e., a plurality of frames of YUV image data;
- Two or more YUV image data are output to the next component.
- Step 502 multiple frames of YUV image data are sent to a depth calculation component to calculate depth information
- the image data is sent to the depth calculation component of the main control chip.
- the depth calculation component can calculate the distance from each point of the object in the image to the image sensor from two frames of images (two different image sensors in the same position). It can accurately calculate the depth information of the current object in the entire picture, and finally calibrate the depth information of different objects in the entire picture;
- the fused YUV image data provides users with a clearer and more reasonable picture, and also provides a data source for subsequent steps, that is, the first image input to the subject/background segmentation map calculation component is a fused image of multiple frames of images from multiple image sensors.
- Step 505 input the image data (the fused first image) + the depth of field information + the segmentation map information to the image processing chip, and the image processing chip performs blur processing;
- the fused first image, depth of field information and segmentation map information are sent to the image processing chip for processing in the hardware module to blur the background and render different light spot shapes. Different colors are rendered for the subject to achieve a better and more elegant video effect.
- Step 506 The processed data is sent to the preview display component for display
- the processed data is sent to the preview display component through the system channel. Users can see the The rendering effect of the current scene. Users can adjust the blur and different levels and shapes of light spots according to the UI interface. Users can create different recording effects by themselves;
- Step 507 Send the data to the video encoding component, which encodes and saves the data;
- the video encoding component compresses the processed data through encoding to save the video information in a smaller ROM space, saving ROM space for users to store more video and file information, and saves the compressed data into files in the sdcard;
- Step 508 End.
- Example 3 As shown in FIG6 and FIG7 , the image processing method includes:
- Step 701 a single image sensor is powered on and outputs a first image, namely, YUV image data;
- Step 702 The image data (first image) is sent to the image processing chip for hardware image processing;
- Example 1 the depth of field calculation solution is hardened into the image processing chip for hardware processing, and finally the depth of field information of different objects in the entire picture is calibrated; in Example 2, the region segmentation information acquisition solution is hardened into the image processing chip for hardware processing, and the subject area and the background area are segmented, and finally a marking information is output to mark which pixels are the subject area and which pixels are the background area.
- the image processing chip After generating a single frame of YUV image data, it is sent to the image processing chip, which performs hardware processing. After obtaining the depth of field information and area segmentation information, it combines the first image output by the image sensor to blur the background and render different light spot shapes. Different colors are rendered for the subject to achieve a better and more elegant video effect.
- Step 703 The processed data is sent to the preview display component for display;
- the processed data is sent to the preview display component through the system channel. Users can see the rendering effect of the current scene in real time. Users can adjust the different levels and forms of blur and light spots according to the UI interface. Users can create different recording effects by themselves;
- Step 704 Send the data to the video encoding component, which encodes and saves the data;
- the video encoding component compresses the processed data through encoding to save the video information in a smaller ROM space, saving ROM space for users to store more videos and documents.
- File information compress data and save it into files in sdcard;
- Step 705 End.
- the image processing method provided in the embodiment of the present application can be executed by an image processing device.
- an image processing device executing the image processing method is taken as an example to illustrate the image processing device provided in the embodiment of the present application.
- an image processing device 800 includes:
- An acquisition module 810 is used to acquire depth of field information and region segmentation information of a first image
- the first processing module 820 is used to perform blurring processing on the first image according to the depth of field information and the region segmentation information to obtain a second image.
- the acquisition module is further used for:
- the depth of field information and the area segmentation information are obtained through a main control chip or an image processing chip.
- the first processing module is further used for:
- the second image is obtained by blurring the first image through the image processing chip.
- the first processing module includes:
- a first processing unit configured to determine a region to be blurred of the first image based on the depth of field information and the region segmentation information;
- the second processing unit is used to perform blurring processing on the area to be blurred to obtain the second image.
- the acquisition module is further used for:
- the first image is a single-frame image
- estimating the depth of field information based on different objects in the first image or,
- the depth of field information is calculated based on the distance from associated pixels in the two images to an image sensor; wherein the two images are acquired by different image sensors.
- the acquisition module is further used for:
- the main area and the background area of the first image are segmented based on the edge information to obtain the area segmentation information.
- the device further comprises:
- the second processing module is used to perform different color and/or filter processing on the main area and the background area in the first image based on the area segmentation information and a preset processing strategy.
- the device further comprises:
- the third processing module is used to fuse the images acquired by multiple image sensors to obtain the first image.
- the device further performs blurring processing on a first image to be processed by acquiring its depth of field information and region segmentation information, thereby realizing a convenient and intelligent image processing process.
- the image processing device in the embodiment of the present application can be an electronic device or a component in the electronic device, such as an integrated circuit or a chip.
- the electronic device can be a terminal or other devices other than a terminal.
- the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR)/virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc.
- It can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., and the embodiment of the present application is not specifically limited.
- Network Attached Storage NAS
- PC personal computer
- TV television
- teller machine a self-service machine
- the image processing device in the embodiment of the present application may be a device having an operating system.
- the operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
- the image processing device provided in the embodiment of the present application can implement each process implemented by the method embodiments of Figures 1 to 7. To avoid repetition, they will not be described here.
- the present application embodiment further provides an electronic device 900, including a processing
- the processor 901 and the memory 902 store programs or instructions that can be run on the processor 901.
- the program or instruction is executed by the processor 901
- the various steps of the above-mentioned image processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
- the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
- FIG. 10 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.
- the electronic device 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010 and other components.
- the electronic device 1000 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1010 through a power management system, so that the power management system can manage charging, discharging, and power consumption management.
- a power source such as a battery
- the electronic device structure shown in FIG10 does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown, or combine certain components, or arrange components differently, which will not be described in detail here.
- the processor 1010 is used to obtain depth information and region segmentation information of the first image
- the first image is blurred according to the depth of field information and the region segmentation information to obtain a second image.
- the first image to be processed by acquiring its depth of field information and region segmentation information, further blurring processing is performed to achieve a convenient and intelligent image processing process.
- processor 1010 is further configured to:
- the depth of field information and the area segmentation information are obtained through a main control chip or an image processing chip.
- processor 1010 is further configured to:
- the second image is obtained by blurring the first image through the image processing chip.
- processor 1010 is further configured to:
- the first image is a single-frame image, based on different objects in the first image, estimating the depth information; or,
- the depth of field information is calculated based on the distance from associated pixels in the two images to an image sensor; wherein the two images are acquired by different image sensors.
- processor 1010 is further configured to:
- the main area and the background area of the first image are segmented based on the edge information to obtain the area segmentation information.
- processor 1010 is further configured to:
- the area to be blurred is blurred to obtain the second image.
- processor 1010 is further configured to:
- processor 1010 is further configured to:
- the images collected by the multiple image sensors are acquired, the images collected by the multiple image sensors are fused to obtain the first image.
- the input unit 1004 may include a graphics processor (GPU) 10041 and a microphone 10042, and the graphics processor 10041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode.
- the display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc.
- the user input unit 1007 includes a touch panel 10071 and at least one of the other input devices 10072.
- the touch panel 10071 is also called a touch screen.
- the touch panel 10071 may include two parts: a touch detection device and a touch controller.
- Other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (such as audio and video), and touch keys. volume control buttons, switch buttons, etc.), trackball, mouse, joystick, etc., will not be elaborated here.
- the memory 1009 can be used to store software programs and various data.
- the memory 1009 can mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area can store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc.
- the memory 1009 can include a volatile memory or a non-volatile memory, or the memory 1009 can include both volatile and non-volatile memories.
- the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory.
- the volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM).
- the memory 1009 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
- the processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1010.
- An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored.
- a program or instruction is stored.
- the program or instruction is executed by a processor, each process of the above-mentioned image processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
- the processor is the processor in the electronic device described in the above embodiment.
- the readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), or a computer program product. Access memory (RAM), disk or CD, etc.
- An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned image processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
- the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
- An embodiment of the present application provides a computer program product, which is stored in a storage medium.
- the program product is executed by at least one processor to implement the various processes of the above-mentioned image processing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
- the technical solution of the present application can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, disk, CD), and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, or network) to perform a computer program. network devices, etc.) to execute the methods described in the various embodiments of the present application.
- a storage medium such as ROM/RAM, disk, CD
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Processing (AREA)
Abstract
本申请公开了一种图像处理方法、装置、电子设备及介质,属于通信技术领域。本申请的方法,包括:获取第一图像的景深信息和区域分割信息;根据所述景深信息和所述区域分割信息对所述第一图像进行虚化处理,得到第二图像。
Description
相关申请的交叉引用
本申请主张在2023年09月27日在中国提交的中国专利申请No.202311267427.3的优先权,其全部内容通过引用包含于此。
本申请属于通信技术领域,具体涉及一种图像处理方法、装置、电子设备及介质。
随着移动电子设备的快速发展,用户对图像的处理要求也越来越高。其中,通过图像虚化处理,能够更为有效地突出用户所要表达的图像内容。
但是,现有图像虚化处理,需要借助软件人为选择待虚化区域,操作复杂,智能化程度低。
发明内容
本申请实施例的目的是提供一种图像处理方法、装置、电子设备及介质,能够解决现有图像虚拟处理操作复杂,智能化程度低的问题。
第一方面,本申请实施例提供了一种图像处理方法,包括:
获取第一图像的景深信息和区域分割信息;
根据所述景深信息和所述区域分割信息对所述第一图像进行虚化处理,得到第二图像。
第二方面,本申请实施例提供了一种图像处理装置,包括:
获取模块,用于获取第一图像的景深信息和区域分割信息;
第一处理模块,用于根据所述景深信息和所述区域分割信息对所述第一图像进行虚化处理,得到第二图像。
第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤。
第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤。
第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法。
第六方面,本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如第一方面所述的方法。
在本申请实施例中,针对待处理的第一图像,通过获取其景深信息和区域分割信息,进一步进行虚化处理,实现便捷、智能地图像处理过程。
图1是本申请实施例的图像处理方法流程示意图;
图2是本申请实施例的图像处理方法应用于示例一的示意图;
图3是示例一的图像处理方法中的步骤流程示意图;
图4是本申请实施例的图像处理方法应用于示例二的示意图;
图5是示例二的图像处理方法中的步骤流程示意图;
图6是本申请实施例的图像处理方法应用于示例三的示意图;
图7是示例三的图像处理方法中的步骤流程示意图;
图8是本申请实施例的图像处理装置的结构示意图;
图9是本申请实施例的电子设备的结构示意图;
图10是本申请另一实施例的电子设备的结构示意图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员获得的所有其他实施例,都属于本申请保护的范围。
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的目标通常为一类,并不限定目标的个数,例如第一目标可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的图像处理方法进行详细地说明。
如图1所示,本申请实施例的一种图像处理方法,包括:
步骤101,获取第一图像的景深信息和区域分割信息。
其中,第一图像是用户所选的图像处理的原图像。本步骤中,获取该第一图像的景深信息和区域分割信息为虚化处理做准备。
步骤102,根据所述景深信息和所述区域分割信息对所述第一图像进行虚化处理,得到第二图像。
如此,按照步骤101和步骤102,应用本申请实施例的图像处理方法的电子设备,能够针对待处理的第一图像,通过获取其景深信息和区域分割信息,进一步进行虚化处理,实现便捷、智能地图像处理过程。
可选地,在一些实施例中,第一图像是图像传感器输出的YUV图像数据。图像传感器(RGB Sensor)上电及流程开启(streamOn)之后,可以正常曝光
输出原始图像文件(Raw)数据(其中包含各种sensor类型的支持:StaggerHDR sensor/DCG sensor等)。输入输出后,应用sensor本身的图像信号处理(Image Signal Processing,ISP)模块或者Soc的ISP模块,将Raw数据转换为YUV数据。其中需要适配相应的效果参数以达到特定的效果显示。
其中,第一图像是一个图像传感器或多个图像传感器输出的。
可选地,在一些实施例中,获取第一图像的景深信息和区域分割信息,包括:
通过主控芯片或者图像处理芯片,获取所述景深信息和所述区域分割信息。
其中,主控芯片又称为系统芯片(System on chip,Soc),如Soc嵌入式神经网络处理器(Neural Processing Unit,NPU)。具体的,主控芯片通过自带的图像处理器,如某系列芯片的ISP模块,获取所述景深信息和所述区域分割信息。图像处理芯片又称为外挂图像处理器,作为单独的一个芯片外接到电子设备的主控芯片上。图像处理芯片支持的功能是预先设置的,故,可以通过设置图像处理芯片支持的功能,由图像处理芯片完成景深信息和区域分割信息的获取。
可选地,在一些实施例中,根据所述景深信息和所述区域分割信息对所述第一图像进行虚化处理,得到第二图像,包括:
通过所述图像处理芯片对所述第一图像进行虚化处理得到所述第二图像。
即,会由图像处理芯片执行对第一图像的虚化处理,如通过设置图像处理芯片支持虚化功能,无需使用主控芯片,降低设备功耗。
例如,主控芯片获取第一图像的景深信息和区域分割信息之后,将景深信息和区域分割信息传递给图像处理芯片,由图像处理芯片完成第一图像的虚化处理;或者,图像处理芯片获取第一图像的景深信息和区域分割信息之后,直接进行第一图像的虚化处理。
可选地,在一些实施例中,获取第一图像的景深信息,包括:
在所述第一图像为单帧图像的情况下,基于所述第一图像中的不同对象,
估计所述景深信息;或者,
在所述第一图像包括关联的两个图像的情况下,基于所述两个图像中关联像素点到图像传感器的距离,计算所述景深信息;其中,所述两个图像是由不同图像传感器采集的。
也就是说,对于单帧图像,景深信息的获取会基于图像中的不同对象来进行。如,主控芯片或者图像处理芯片会设置景深计算组件来获取输入的第一图像的景深信息,景深计算组件可以是预先训练好的单目景深估计网络模型,第一图像输入到单目景深估计网络模型中进行特征提取,输出第一图像的景深估计结果,即景深信息。
关联的两个图像(两帧图像),即同一个方位的两个不同图像传感器输出的图像。对于关联的两个图像,景深信息的获取会基于这两个图像中关联像素点到图像传感器的距离来计算景深信息。如利用双目深度计算算法,通过计算视差进一步确定景深,在此不再赘述。
可选地,在一些实施例中,获取第一图像的区域分割信息,包括:
确定所述第一图像中不同对象的边缘信息;
基于所述边缘信息将所述第一图像的主体区域和背景区域进行分割,得到所述区域分割信息。
即,可以通过识别第一图像中不同对象获得不同对象的边缘信息,而由各个对象所属类型(主体或背景),将主体区域和背景区域进行分割,得到区域分割信息,也称为分割图信息。例如,区域分割信息包括主体区域位置信息和背景区域位置信息;或者,区域分割信息包括不同对象的位置信息和各对象所属类型。例如,主控芯片或者图像处理芯片设置有主体/背景分割图计算组件,根据图像中不同对象的边缘信息,将主体区域和背景区域进行分割,最终输出区域分割信息为一张标记信息,标记哪些像素点(pixel)是主体区域,哪些pixel是背景区域。
可选地,在一些实施例中,根据所述景深信息和所述区域分割信息对所述
第一图像进行虚化处理,得到第二图像,包括:
基于所述景深信息和所述区域分割信息,确定所述第一图像的待虚化区域;
对所述待虚化区域进行虚化处理,得到所述第二图像。
这样,在获取到景深信息和区域分割信息后,图像处理芯片能够自动确定出第一图像的待虚化区域,从而对待虚化区域进行虚化处理,得到所述第二图像。
其中,图像处理芯片可以预先配置待虚化区域的确定策略,如待虚化区域满足:景深大于第一阈值,且属于背景区域,可对背景进行虚化。
可选地,在一些实施例中,所述确定所述第一图像中不同对象的边缘信息之前,还包括:
在获取到多个图像传感器采集的图像的情况下,对所述多个图像传感器采集的图像进行融合,得到所述第一图像。
这样,对于虚化处理的目标即第一图像,若图像传感器为多个,考虑到不同图像传感器取景的FOV有略微的偏差,会融合不同图像传感器的多帧YUV数据,提供给用户更清晰合理的画面,也为后续的步骤提供数据源。
可选地,在一些实施例中,所述方法还包括:
基于所述区域分割信息和预设处理策略,对所述第一图像中的主体区域和背景区域进行不同的色彩和/或滤镜处理。
这里,预设处理策略是用户期望的图像处理方案,基于区域分割信息和预设处理策略,还可以对主体区域和背景区域进行不同的色彩和/或滤镜处理,如,对背景区域进行不同光斑形态的渲染、对主体区域进行不同的色彩渲染、对主体区域进行冷色滤镜等。
具体的,主控芯片或者图像处理芯片对第一图像中的主体区域和背景区域进行不同的色彩和/或滤镜处理。
下面,结合具体示例说明本申请实施例的应用:
示例一、如图2、图3所示,图像处理方法包括:
步骤301:单个图像传感器上电,输出第一图像,即YUV图像数据;
步骤302:图像数据(第一图像)发送给景深计算组件,计算景深信息;
生成单帧YUV图像数据后,发送给主控芯片的景深计算组件,景深计算组件根据图像中不同对象,判定当前不同pixel的景深信息。最终标定不同对象在整个画面中的景深信息;
步骤303:图像数据(第一图像)发送给主体/背景分割图计算组件,计算分割图信息;
生成单帧YUV图像数据后,发送给主控芯片的主体/背景分割图计算组件,根据图像中不同对象的边缘信息,将主体区域和背景区域进行分割,最终输出一张标记信息,标记哪些像素pixel是主体区域,哪些pixel是背景区域。
步骤304:将图像数据(第一图像)+景深信息+分割图信息输入给图像处理芯片,图像处理芯片进行虚化处理;
将图像传感器输出的第一图像、景深信息和分割图信息,送给图像处理芯片,在硬件模块中进行处理,对背景进行虚化以及不同的光斑形态的渲染。对主体进行不同的色彩渲染,以达成更好的更优雅的视频效果;
步骤305:处理完成的数据发送给预览显示组件进行显示;
处理完成的数据,通过系统通路发送给预览显示组件。用户可以实时看到当前场景的渲染效果。其中用户可以根据UI界面调节虚化以及光斑的不同等级和形态。用户可以自行创作出形态各异的录制效果;
步骤306:并将数据送给视频编码组件,视频编码组件进行编码和保存;
视频编码组件将处理后的数据通过编码进行数据压缩,以达到将视频信息以较小的ROM空间进行保存,为用户节省ROM空间以存放更多的视频和文件信息,压缩数据保存成文件保存在sdcard中;
步骤307:结束。
示例二、如图4、图5所示,图像处理方法包括:
步骤501:两个及以上个图像传感器上电,输出多个第一图像,即多帧YUV图像数据;
两个或者多个YUV图像数据输出给下一个组件。
步骤502:多帧YUV图像数据发送给景深计算组件,计算景深信息;
生成YUV数据后,图像数据发送给主控芯片的景深计算组件,景深计算组件根据双摄原理,由两帧图像(同一个方位的两个不同图像传感器)可以计算出图中对象的每个点到图像传感器的距离。可以精确计算出当前对象在真个画面的景深信息,最终标定不同物体在整个画面中的景深信息;
步骤503:将多帧信息进行融合成一帧图像(YUV图像数据),即融合的第一图像;
融合多帧YUV图像数据,因为不同图像传感器取景的FOV有略微的偏差,通过融合算法,融合YUV图像数据提供给用户更清晰合理的画面,也为后续的步骤提供数据源,即,输入主体/背景分割图计算组件的第一图像是多个图像传感器的多帧图像的融合图像。
步骤504:将图像数据(融合的第一图像)发送给主体/背景分割图计算组件,计算分割图信息;
生成融合的YUV图像数据后,发送给主控芯片的主体/背景计算组件,根据图像中不同对象的边缘信息,将主体区域和背景区域进行分割,最终输出一张标记信息,标记哪些像素pixel是主体区域,哪些pixel是背景区域。
步骤505:将图像数据(融合的第一图像)+景深信息+分割图信息输入给图像处理芯片,图像处理芯片进行虚化处理;
将融合的第一图像、景深信息和分割图信息,送给图像处理芯片,在硬件模块中进行处理,对背景进行虚化以及不同的光斑形态的渲染。对主体进行不同的色彩渲染,以达成更好的更优雅的视频效果;
步骤506:处理完成的数据发送给预览显示组件进行显示;
处理完成的数据,通过系统通路发送给预览显示组件。用户可以实时看到
当前场景的渲染效果。其中用户可以根据UI界面调节虚化以及光斑的不同等级和形态。用户可以自行创作出形态各异的录制效果;
步骤507:并将数据送给视频编码组件,视频编码组件进行编码和保存;
视频编码组件将处理后的数据通过编码进行数据压缩,以达到将视频信息以较小的ROM空间进行保存,为用户节省ROM空间以存放更多的视频和文件信息,压缩数据保存成文件保存在sdcard中;
步骤508:结束。
示例三、如图6、图7所示,图像处理方法包括:
步骤701:单个图像传感器上电,输出第一图像,即YUV图像数据;
步骤702:图像数据(第一图像)发送给图像处理芯片,进行硬件的图像处理;
示例一中,景深计算方案硬化到图像处理芯片内进行硬件处理,最终标定不同对象在整个画面中的景深信息;示例二中,区域分割信息获取方案硬化到图像处理芯片内进行硬件处理,将主体区域和背景区域进行分割,最终输出一张标记信息,标记哪些像素pixel是主体区域,哪些pixel是背景区域。
生成单帧YUV图像数据后,发送给图像处理芯片,图像处理芯片进行硬件处理,在得到景深信息和区域分割信息后,结合图像传感器输出的第一图像,对背景进行虚化以及不同的光斑形态的渲染。对主体进行不同的色彩渲染,以达成更好的更优雅的视频效果;
步骤703:处理完成的数据发送给预览显示组件进行显示;
处理完成的数据,通过系统通路发送给预览显示组件。用户可以实时看到当前场景的渲染效果。其中用户可以根据UI界面调节虚化以及光斑的不同等级和形态。用户可以自行创作出形态各异的录制效果;
步骤704:并将数据送给视频编码组件,视频编码组件进行编码和保存;
视频编码组件将处理后的数据通过编码进行数据压缩,以达到将视频信息以较小的ROM空间进行保存,为用户节省ROM空间以存放更多的视频和文
件信息,压缩数据保存成文件保存在sdcard中;
步骤705:结束。
本申请实施例提供的图像处理方法,执行主体可以为图像处理装置。本申请实施例中以图像处理装置执行图像处理方法为例,说明本申请实施例提供的图像处理装置。
如图8所示,本申请实施例的一种图像处理装置800,包括:
获取模块810,用于获取第一图像的景深信息和区域分割信息;
第一处理模块820,用于根据所述景深信息和所述区域分割信息对所述第一图像进行虚化处理,得到第二图像。
可选地,所述获取模块还用于:
通过主控芯片或者图像处理芯片,获取所述景深信息和所述区域分割信息。
可选地,所述第一处理模块还用于:
通过所述图像处理芯片对所述第一图像进行虚化处理得到所述第二图像。
可选地,所述第一处理模块包括:
第一处理单元,用于基于所述景深信息和所述区域分割信息,确定所述第一图像的待虚化区域;
第二处理单元,用于对所述待虚化区域进行虚化处理,得到所述第二图像。
可选地,所述获取模块还用于:
在所述第一图像为单帧图像的情况下,基于所述第一图像中的不同对象,估计所述景深信息;或者,
在所述第一图像包括关联的两个图像的情况下,基于所述两个图像中关联像素点到图像传感器的距离,计算所述景深信息;其中,所述两个图像是由不同图像传感器采集的。
可选地,所述获取模块还用于:
确定所述第一图像中不同对象的边缘信息;
基于所述边缘信息将所述第一图像的主体区域和背景区域进行分割,得到所述区域分割信息。
可选地,所述装置还包括:
第二处理模块,用于基于所述区域分割信息和预设处理策略,对所述第一图像中的主体区域和背景区域进行不同的色彩和/或滤镜处理。
可选地,所述装置还包括:
第三处理模块,用于在获取到多个图像传感器采集的图像的情况下,对所述多个图像传感器采集的图像进行融合,得到所述第一图像。
该装置针对待处理的第一图像,通过获取其景深信息和区域分割信息,进一步进行虚化处理,实现便捷、智能地图像处理过程。
本申请实施例中的图像处理装置可以是电子设备,也可以是电子设备中的部件,例如集成电路或芯片。该电子设备可以是终端,也可以为除终端之外的其他设备。示例性的,电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、移动上网装置(Mobile Internet Device,MID)、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、机器人、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,还可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。
本申请实施例中的图像处理装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。
本申请实施例提供的图像处理装置能够实现图1至图7的方法实施例实现的各个过程,为避免重复,这里不再赘述。
可选地,如图9所示,本申请实施例还提供一种电子设备900,包括处理
器901和存储器902,存储器902上存储有可在所述处理器901上运行的程序或指令,该程序或指令被处理器901执行时实现上述图像处理方法实施例的各个步骤,且能达到相同的技术效果,为避免重复,这里不再赘述。
需要说明的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。
图10为实现本申请实施例的一种电子设备的硬件结构示意图。
该电子设备1000包括但不限于:射频单元1001、网络模块1002、音频输出单元1003、输入单元1004、传感器1005、显示单元1006、用户输入单元1007、接口单元1008、存储器1009、以及处理器1010等部件。
本领域技术人员可以理解,电子设备1000还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器1010逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图10中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。
其中,处理器1010,用于获取第一图像的景深信息和区域分割信息;
根据所述景深信息和所述区域分割信息对所述第一图像进行虚化处理,得到第二图像。
针对待处理的第一图像,通过获取其景深信息和区域分割信息,进一步进行虚化处理,实现便捷、智能地图像处理过程。
可选地,处理器1010,还用于:
通过主控芯片或者图像处理芯片,获取所述景深信息和所述区域分割信息。
可选地,处理器1010,还用于:
通过所述图像处理芯片对所述第一图像进行虚化处理得到所述第二图像。
可选地,处理器1010,还用于:
在所述第一图像为单帧图像的情况下,基于所述第一图像中的不同对象,
估计所述景深信息;或者,
在所述第一图像包括关联的两个图像的情况下,基于所述两个图像中关联像素点到图像传感器的距离,计算所述景深信息;其中,所述两个图像是由不同图像传感器采集的。
可选地,处理器1010,还用于:
确定所述第一图像中不同对象的边缘信息;
基于所述边缘信息将所述第一图像的主体区域和背景区域进行分割,得到所述区域分割信息。
可选地,处理器1010,还用于:
基于所述景深信息和所述区域分割信息,确定所述第一图像的待虚化区域;
对所述待虚化区域进行虚化处理,得到所述第二图像。
可选地,处理器1010,还用于:
基于所述区域分割信息和预设处理策略,对所述第一图像中的主体区域和背景区域进行不同的色彩和/或滤镜处理。
可选地,处理器1010,还用于:
在获取到多个图像传感器采集的图像的情况下,对所述多个图像传感器采集的图像进行融合,得到所述第一图像。
应理解的是,本申请实施例中,输入单元1004可以包括图形处理器(Graphics Processing Unit,GPU)10041和麦克风10042,图形处理器10041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元1006可包括显示面板10061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板10061。用户输入单元1007包括触控面板10071以及其他输入设备10072中的至少一种。触控面板10071,也称为触摸屏。触控面板10071可包括触摸检测装置和触摸控制器两个部分。其他输入设备10072可以包括但不限于物理键盘、功能键(比如音
量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。
存储器1009可用于存储软件程序以及各种数据。存储器1009可主要包括存储程序或指令的第一存储区和存储数据的第二存储区,其中,第一存储区可存储操作系统、至少一个功能所需的应用程序或指令(比如声音播放功能、图像播放功能等)等。此外,存储器1009可以包括易失性存储器或非易失性存储器,或者,存储器1009可以包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请实施例中的存储器1009包括但不限于这些和任意其它适合类型的存储器。
处理器1010可包括一个或多个处理单元;可选地,处理器1010集成应用处理器和调制解调处理器,其中,应用处理器主要处理涉及操作系统、用户界面和应用程序等的操作,调制解调处理器主要处理无线通信信号,如基带处理器。可以理解的是,上述调制解调处理器也可以不集成到处理器1010中。
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述图像处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(ROM)、随机存
取存储器(RAM)、磁碟或者光盘等。
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述图像处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。
本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如上述图像处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,或者网
络设备等)执行本申请各个实施例所述的方法。
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。
Claims (21)
- 一种图像处理方法,包括:获取第一图像的景深信息和区域分割信息;根据所述景深信息和所述区域分割信息对所述第一图像进行虚化处理,得到第二图像。
- 根据权利要求1所述的方法,其中,获取第一图像的景深信息和区域分割信息,包括:通过主控芯片或者图像处理芯片,获取所述景深信息和所述区域分割信息。
- 根据权利要求2所述的方法,其中,根据所述景深信息和所述区域分割信息对所述第一图像进行虚化处理,得到第二图像,包括:通过所述图像处理芯片对所述第一图像进行虚化处理得到所述第二图像。
- 根据权利要求1或2所述的方法,其中,获取第一图像的景深信息,包括:在所述第一图像为单帧图像的情况下,基于所述第一图像中的不同对象,估计所述景深信息;或者,在所述第一图像包括关联的两个图像的情况下,基于所述两个图像中关联像素点到图像传感器的距离,计算所述景深信息;其中,所述两个图像是由不同图像传感器采集的。
- 根据权利要求1或2所述的方法,其中,获取第一图像的区域分割信息,包括:确定所述第一图像中不同对象的边缘信息;基于所述边缘信息将所述第一图像的主体区域和背景区域进行分割,得到所述区域分割信息。
- 根据权利要求5所述的方法,所述确定所述第一图像中不同对象的边缘信息之前,还包括:在获取到多个图像传感器采集的图像的情况下,对所述多个图像传感器采 集的图像进行融合,得到所述第一图像。
- 根据权利要求1或3所述的方法,其中,根据所述景深信息和所述区域分割信息对所述第一图像进行虚化处理,得到第二图像,包括:基于所述景深信息和所述区域分割信息,确定所述第一图像的待虚化区域;对所述待虚化区域进行虚化处理,得到所述第二图像。
- 根据权利要求1所述的方法,还包括:基于所述区域分割信息和预设处理策略,对所述第一图像中的主体区域和背景区域进行不同的色彩和/或滤镜处理。
- 一种图像处理装置,包括:获取模块,用于获取第一图像的景深信息和区域分割信息;第一处理模块,用于根据所述景深信息和所述区域分割信息对所述第一图像进行虚化处理,得到第二图像。
- 根据权利要求9所述的装置,其中,所述获取模块还用于:通过主控芯片或者图像处理芯片,获取所述景深信息和所述区域分割信息。
- 根据权利要求10所述的装置,其中,所述第一处理模块还用于:通过所述图像处理芯片对所述第一图像进行虚化处理得到所述第二图像。
- 根据权利要求9或11所述的装置,其中,所述第一处理模块包括:第一处理单元,用于基于所述景深信息和所述区域分割信息,确定所述第一图像的待虚化区域;第二处理单元,用于对所述待虚化区域进行虚化处理,得到所述第二图像。
- 根据权利要求9或10所述的装置,其中,所述获取模块还用于:在所述第一图像为单帧图像的情况下,基于所述第一图像中的不同对象,估计所述景深信息;或者,在所述第一图像包括关联的两个图像的情况下,基于所述两个图像中关联像素点到图像传感器的距离,计算所述景深信息;其中,所述两个图像是由不 同图像传感器采集的。
- 根据权利要求9或10所述的装置,其中,所述获取模块还用于:确定所述第一图像中不同对象的边缘信息;基于所述边缘信息将所述第一图像的主体区域和背景区域进行分割,得到所述区域分割信息。
- 根据权利要求9所述的装置,所述装置还包括:第二处理模块,用于基于所述区域分割信息和预设处理策略,对所述第一图像中的主体区域和背景区域进行不同的色彩和/或滤镜处理。
- 根据权利要求14所述的装置,所述装置还包括:第三处理模块,用于在获取到多个图像传感器采集的图像的情况下,对所述多个图像传感器采集的图像进行融合,得到所述第一图像。
- 一种电子设备,包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1-8任一项所述的图像处理方法的步骤。
- 一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1-8任一项所述的图像处理方法的步骤。
- 一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如权利要求1-8任一项所述的数据处理方法的步骤。
- 一种计算机程序产品,所述程序产品被存储在存储介质中,所述程序产品被至少一个处理器执行以实现如权利要求1-8任一项所述的数据处理方法的步骤。
- 一种图像处理装置/设备,其特征在于,所述装置/设备用于执行如权利要求1-8任一项所述的数据处理方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311267427.3A CN117274097A (zh) | 2023-09-27 | 2023-09-27 | 图像处理方法、装置、电子设备及介质 |
| CN202311267427.3 | 2023-09-27 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2025067390A1 true WO2025067390A1 (zh) | 2025-04-03 |
Family
ID=89221184
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2024/121626 Pending WO2025067390A1 (zh) | 2023-09-27 | 2024-09-27 | 图像处理方法、装置、电子设备及介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN117274097A (zh) |
| WO (1) | WO2025067390A1 (zh) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117274097A (zh) * | 2023-09-27 | 2023-12-22 | 维沃移动通信有限公司 | 图像处理方法、装置、电子设备及介质 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108053438A (zh) * | 2017-11-30 | 2018-05-18 | 广东欧珀移动通信有限公司 | 景深获取方法、装置及设备 |
| CN109191469A (zh) * | 2018-08-17 | 2019-01-11 | 广东工业大学 | 一种图像自动定焦方法、装置、设备及可读存储介质 |
| CN112085002A (zh) * | 2020-09-23 | 2020-12-15 | 苏州臻迪智能科技有限公司 | 人像分割方法、装置、存储介质及电子设备 |
| CN113313646A (zh) * | 2021-05-27 | 2021-08-27 | Oppo广东移动通信有限公司 | 图像处理方法及装置、电子设备、计算机可读存储介质 |
| CN117274097A (zh) * | 2023-09-27 | 2023-12-22 | 维沃移动通信有限公司 | 图像处理方法、装置、电子设备及介质 |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107977940B (zh) * | 2017-11-30 | 2020-03-17 | Oppo广东移动通信有限公司 | 背景虚化处理方法、装置及设备 |
| CN112614057B (zh) * | 2019-09-18 | 2025-08-15 | 华为技术有限公司 | 一种图像虚化处理方法及电子设备 |
| CN114119347B (zh) * | 2020-08-26 | 2025-09-09 | 武汉Tcl集团工业研究院有限公司 | 一种图像虚化方法及装置 |
| CN114862686A (zh) * | 2021-02-03 | 2022-08-05 | 深圳市万普拉斯科技有限公司 | 图像处理方法、装置及电子设备 |
| CN113014806B (zh) * | 2021-02-07 | 2022-09-13 | 维沃移动通信有限公司 | 虚化图像拍摄方法及装置 |
-
2023
- 2023-09-27 CN CN202311267427.3A patent/CN117274097A/zh active Pending
-
2024
- 2024-09-27 WO PCT/CN2024/121626 patent/WO2025067390A1/zh active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108053438A (zh) * | 2017-11-30 | 2018-05-18 | 广东欧珀移动通信有限公司 | 景深获取方法、装置及设备 |
| CN109191469A (zh) * | 2018-08-17 | 2019-01-11 | 广东工业大学 | 一种图像自动定焦方法、装置、设备及可读存储介质 |
| CN112085002A (zh) * | 2020-09-23 | 2020-12-15 | 苏州臻迪智能科技有限公司 | 人像分割方法、装置、存储介质及电子设备 |
| CN113313646A (zh) * | 2021-05-27 | 2021-08-27 | Oppo广东移动通信有限公司 | 图像处理方法及装置、电子设备、计算机可读存储介质 |
| CN117274097A (zh) * | 2023-09-27 | 2023-12-22 | 维沃移动通信有限公司 | 图像处理方法、装置、电子设备及介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN117274097A (zh) | 2023-12-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112954210B (zh) | 拍照方法、装置、电子设备及介质 | |
| WO2019134516A1 (zh) | 全景图像生成方法、装置、存储介质及电子设备 | |
| CN111612873A (zh) | Gif图片生成方法、装置及电子设备 | |
| CN117479000B (zh) | 录像方法和相关装置 | |
| CN112437232A (zh) | 拍摄方法、装置、电子设备及可读存储介质 | |
| CN111722775A (zh) | 图像处理方法、装置、设备及可读存储介质 | |
| WO2023134583A1 (zh) | 视频录制方法、装置及电子设备 | |
| CN113852757B (zh) | 视频处理方法、装置、设备和存储介质 | |
| WO2025067390A1 (zh) | 图像处理方法、装置、电子设备及介质 | |
| CN111669495B (zh) | 拍照方法、拍照装置和电子设备 | |
| WO2024131821A1 (zh) | 拍照方法、装置及电子设备 | |
| CN114222069B (zh) | 拍摄方法、拍摄装置及电子设备 | |
| CN115472140A (zh) | 显示方法、显示装置、电子设备和可读存储介质 | |
| CN114745504A (zh) | 拍摄方法和电子设备 | |
| WO2025119132A1 (zh) | 拍照方法、装置及电子设备 | |
| CN114143455B (zh) | 拍摄方法、装置及电子设备 | |
| CN114286002B (zh) | 图像处理电路、方法、装置、电子设备及芯片 | |
| CN117395462A (zh) | 媒体内容的生成方法、装置、电子设备和可读存储介质 | |
| CN117278842A (zh) | 拍摄控制方法、装置、电子设备和可读存储介质 | |
| WO2023093669A1 (zh) | 视频拍摄方法、装置、电子设备及存储介质 | |
| CN114500852A (zh) | 拍摄方法、拍摄装置、电子设备和可读存储介质 | |
| CN113473012A (zh) | 虚化处理方法、装置和电子设备 | |
| CN114390205A (zh) | 拍摄方法、装置和电子设备 | |
| CN113873319A (zh) | 视频处理方法、装置、电子设备及存储介质 | |
| CN115278378B (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: 24870928 Country of ref document: EP Kind code of ref document: A1 |