WO2021189704A1 - 图像处理方法及装置、电子设备和存储介质 - Google Patents

图像处理方法及装置、电子设备和存储介质 Download PDF

Info

Publication number
WO2021189704A1
WO2021189704A1 PCT/CN2020/100236 CN2020100236W WO2021189704A1 WO 2021189704 A1 WO2021189704 A1 WO 2021189704A1 CN 2020100236 W CN2020100236 W CN 2020100236W WO 2021189704 A1 WO2021189704 A1 WO 2021189704A1
Authority
WO
WIPO (PCT)
Prior art keywords
target time
blurred image
image
target
clear image
Prior art date
Application number
PCT/CN2020/100236
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 北京市商汤科技开发有限公司
Priority to SG11202110306WA priority Critical patent/SG11202110306WA/en
Priority to US17/489,636 priority patent/US20220020124A1/en
Publication of WO2021189704A1 publication Critical patent/WO2021189704A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/30Noise filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/60Extraction of image or video features relating to illumination properties, e.g. using a reflectance or lighting model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20172Image enhancement details
    • G06T2207/20201Motion blur correction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection

Definitions

  • the present disclosure relates to the field of computer technology, and in particular to an image processing method and device, electronic equipment, and storage medium.
  • Image deblurring is an important research direction of computer vision and computational photography. It is an indispensable step for image quality enhancement and image restoration. This technology is widely used in photography, entertainment, video surveillance and other scenarios.
  • the present disclosure proposes a technical solution for an image processing method and device, electronic equipment, and storage medium.
  • an image processing method including: acquiring a blurred image exposed within an exposure time, and event data sampled within the exposure time, wherein the event data is used to reflect The brightness changes of the pixels in the blurred image; determine the global event feature within the exposure time according to the event data; determine the blur based on the blurred image, the event data, and the global event feature The image corresponds to a clear image.
  • the determining a clear image corresponding to the blurred image according to the blurred image, the event data, and the global event feature includes: according to the blurred image, the event data And the global event feature to determine the clear image corresponding to the blurred image at the Tth target time.
  • the determining the clear image corresponding to the blurred image at the Tth target time according to the blurred image, the event data, and the global event feature includes: based on a motion blur physical model , According to the blurred image and the event data, determine the initial clear image corresponding to the blurred image at the T-th target time; according to the initial clear image corresponding to the blurred image at the T-th target time and the The global event feature determines the clear image corresponding to the blurred image at the T-th time.
  • the method further includes: determining a clear image sequence corresponding to the blurred image according to a clear image corresponding to the blurred image at the T-th target time.
  • the clear image corresponding to the i+1th target time according to the blurred image, the local event between the ith target time and the i+1th target time Data, and local event features corresponding to the i-th target time includes: according to the blurred image corresponding to the i+1-th target time Clear image, and local event data between the i-th target time and the i+1-th target time, determine the initial clear image corresponding to the blurred image at the i-th target time; The local event data between time and the i+1th target time is filtered to determine the boundary feature map corresponding to the i-th target time; the initial clear image corresponding to the i-th target time according to the blurred image , And the boundary feature map and the local event feature corresponding to the i-th target time to determine the clear image corresponding to the blurred image at the i-th target time.
  • Event data, determining the initial clear image corresponding to the blurred image at the i-th target time includes: based on a motion blur physical model, according to the clear image corresponding to the blurred image at the i+1-th target time, and The local event data between the i-th target time and the (i+1)th target time determines the initial clear image corresponding to the blurred image at the i-th target time.
  • the clear image corresponding to the i+1-th target time according to the blurred image, and the part between the i-th target time and the i+1-th target time Event data, determining the initial clear image corresponding to the blurred image at the i-th target time includes: determining the first clear image according to the local event data between the i-th target time and the (i+1)th target time The forward optical flow from the i+1 target time to the i-th target time; according to the clear image corresponding to the blurred image at the i+1-th target time and the forward optical flow, it is determined that the blurred image is at The initial clear image corresponding to the i-th target moment.
  • an image processing device including: a first determining module, configured to obtain a blurred image obtained by exposure within an exposure time, and event data obtained by sampling within the exposure time, wherein, The event data is used to reflect the brightness changes of the pixels in the blurred image; the second determination module is used to determine the global event characteristics within the exposure time according to the event data; the third determination module is used to According to the blurred image, the event data, and the global event feature, a clear image corresponding to the blurred image is determined.
  • the exposure time includes a plurality of target moments;
  • the second determining module includes: a first determining sub-module configured to determine whether the target moment is the i-th target moment or the i+1-th target moment.
  • the third determining module includes: a third determining sub-module configured to determine that the blurred image is in the first T the clear image corresponding to the target moment.
  • the third determining submodule includes: a first determining unit, configured to determine that the blurred image is located at the location based on the motion blur physical model and according to the blurred image and the event data. The initial clear image corresponding to the T-th target time; a second determining unit, configured to determine that the blurred image is in the The clear image corresponding to the Tth moment.
  • the third determining module further includes: a fourth determining sub-module, configured to determine, according to the clear image corresponding to the blurred image at the T-th target time, the image corresponding to the blurred image Clear image sequence.
  • the fourth determining unit is configured to obtain the clear image sequence according to the clear image corresponding to the blurred image at the first to T target moments.
  • the third determining unit includes: a first determining subunit, configured to determine, according to the clear image corresponding to the blurred image at the i+1th target moment, and the ith The local event data between the target time and the i+1th target time determines the initial clear image corresponding to the blurred image at the i-th target time; the second determining subunit is used for determining the i-th target The local event data between time and the i+1th target time is filtered to determine the boundary feature map corresponding to the i-th target time; the third determining subunit is used to determine whether the blurred image is in the first The initial clear image corresponding to the i-th target moment, and the boundary feature map and the local event feature corresponding to the i-th target moment are determined to determine the clear image corresponding to the blurred image at the i-th target moment.
  • the first determining subunit is specifically configured to: based on a motion blur physical model, according to a clear image corresponding to the blurred image at the i+1th target moment, and the ith
  • the local event data between the target time and the (i+1)th target time determines the initial clear image corresponding to the blurred image at the (i)th target time.
  • the first determining subunit is specifically configured to: determine the (i+1)th target time according to local event data between the i-th target time and the i+1th target time. The forward optical flow from the target time to the i-th target time; according to the clear image corresponding to the blurred image at the i+1th target time and the forward optical flow, it is determined that the blurred image is in the first i The initial clear image corresponding to the target moment.
  • an electronic device including: a processor; a memory for storing executable instructions of the processor; wherein the processor is configured to call the instructions stored in the memory to execute the foregoing method.
  • a computer-readable storage medium having computer program instructions stored thereon, and the computer program instructions implement the above-mentioned method when executed by a processor.
  • a computer program including computer readable code, and when the computer code is executed in an electronic device, a processor in the electronic device executes for realizing the above method.
  • the global event feature used to reflect the scene motion information within the exposure time can be determined, so that the blurred image is deblurred based on the event data and the global event feature After processing, a clear image with higher image quality corresponding to the blurred image can be obtained, thereby effectively improving the image deblurring quality.
  • Fig. 1 shows a flowchart of an image processing method according to an embodiment of the present disclosure
  • Fig. 2 shows a schematic diagram of an image deblurring neural network according to an embodiment of the present disclosure
  • Fig. 3 shows a block diagram of an image processing device according to an embodiment of the present disclosure
  • FIG. 4 shows a block diagram of an electronic device according to an embodiment of the present disclosure
  • Fig. 5 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
  • the image processing method of the embodiment of the present disclosure can be used to perform image deblurring processing operations on the blurred image obtained in the above-mentioned application scenario.
  • Fig. 1 shows a flowchart of an image processing method according to an embodiment of the present disclosure.
  • the image processing method shown in Figure 1 can be executed by a terminal device or other processing device, where the terminal device can be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, or a personal digital device.
  • UE user equipment
  • PDA Personal Digital Assistant
  • handheld devices computing devices
  • computing devices in-vehicle devices, wearable devices, etc.
  • Other processing equipment can be servers or cloud servers.
  • the image processing method may be implemented by a processor invoking computer-readable instructions stored in the memory. As shown in Figure 1, the method may include:
  • step S11 a blurred image obtained within the exposure time and event data sampled during the exposure time are acquired, where the event data is used to reflect the brightness changes of pixels in the blurred image.
  • step S12 according to the event data, the global event characteristics within the exposure time are determined.
  • step S13 a clear image corresponding to the blurred image is determined according to the blurred image, event data, and global event characteristics.
  • Blurred images can be acquired by an image acquisition device (for example, a camera) within the exposure time, and have low definition, with blurred images and small dynamic range.
  • the exposure time refers to the image acquisition device's acquisition of blur
  • a time period of the image for example, an exposure time of 90 ms refers to a time period of 0-90 ms.
  • the event data can be obtained by sampling the event acquisition device (for example, Event-Based Camera) within the exposure time, where the event data can reflect the pixels in the blurred image The brightness changes during the exposure time, and then the event data is used to deblur the blurred image.
  • the format of the event data can be p x, y, t , where (x, y) represents the position of the pixel where the brightness change exceeds the brightness threshold, and t represents the moment when the brightness change of the pixel (x, y) exceeds the brightness threshold .
  • the value of p x, y, t is used to represent the brightness change of the pixel point (x, y) at time t, for example, when the brightness of the pixel point (x, y) increases beyond the brightness threshold at time t, p
  • the values of x, y, t are positive numbers (for example, +1); when the brightness of the pixel point (x, y) decreases by more than the brightness threshold at time t, the values of p x, y, t are negative numbers (for example, , -1); When the brightness change of the pixel point (x, y) at time t does not reach the brightness threshold, the value of p x, y, t is 0.
  • the specific value of the brightness threshold can be determined according to the actual situation, which is not specifically limited in the present disclosure.
  • the exposure time includes multiple target moments; according to the event data, the global event feature within the exposure time is determined, including: according to the local event between the i-th target moment and the i+1th target moment Data, determine the local event characteristics corresponding to the i-th target moment; determine the global event characteristics according to the local event characteristics corresponding to multiple target moments.
  • the event data sampled during the exposure time can be divided into multiple groups of equal time intervals, so that multiple sets of event data can be used to obtain the scene reflecting the exposure time Global event characteristics and local event characteristics of motion information.
  • multiple target moments are determined within the exposure time, and the corresponding event data between adjacent target moments is a set, and then according to the multiple sets of event data, the corresponding multiple target moments used to reflect the scene motion information can be obtained.
  • Local event features and local event features corresponding to multiple target moments are used to obtain global event features that reflect scene motion information.
  • the exposure time of the blurred image is 90ms
  • the event collection device samples the event data during the exposure time, and determines four target moments within the exposure time: the first target moment (0ms), the second target moment (30ms), and the third target moment.
  • Target time (60ms) and fourth target time (90ms) the event data can be divided into 3 groups: local event data between the first target time and the second target time (0-30ms), and the second target time Partial event data between the third target time (30-60ms) and the third target time (60-90ms).
  • the local event characteristics corresponding to the first target time can be determined; according to the time between the second target time and the third target time (30 ⁇ 60ms)
  • the event data can determine the local event characteristics corresponding to the second target moment; according to the event data between the third target moment and the fourth target moment (60-90ms), the local event characteristics corresponding to the third target moment can be determined;
  • the local event feature corresponding to the target moment, the local event feature corresponding to the second target moment, and the local event feature corresponding to the third target moment can determine the global event feature within the exposure time (0-90ms).
  • the number of target moments within the exposure time can be determined according to the actual situation, which is not specifically limited in the present disclosure.
  • the event data sampled during the exposure time of the blurred image can be used to determine the global event characteristics within the exposure time and the corresponding multiple target moments by using the reading sub-network in the image deblurring neural network The characteristics of local events.
  • Fig. 2 shows a schematic diagram of an image deblurring neural network according to an embodiment of the present disclosure.
  • the reading sub-network can be composed of a series of convolutional networks and convolutional long and short-term memory networks.
  • Figure 2 includes four target moments. After inputting the event data sampled during the exposure time of the blurred image into the reading sub-network in Figure 2, it is divided into local event data between multiple adjacent target moments at equal time intervals.
  • the encoder composed of convolutional network extracts the features of the local event data between adjacent target moments, and obtains the local event features corresponding to multiple target moments, and then uses the long and short-term memory network to analyze the local event features corresponding to multiple target moments. Perform temporal feature extraction to obtain global event features within the exposure time.
  • the reading sub-network may also have other network composition forms, which are not specifically limited in the present disclosure.
  • determining the clear image corresponding to the blurred image according to the blurred image, event data, and global event characteristics includes: determining the corresponding corresponding to the blurred image at the T-th target time based on the blurred image, event data, and global event characteristics Clear image.
  • determining the clear image corresponding to the blurred image at the Tth target time includes: based on the motion blur physical model, according to the blurred image and the event Data, determine the initial clear image corresponding to the blurred image at the T-th target time; determine the clear image corresponding to the blurred image at the T-th time according to the initial clear image and global event characteristics corresponding to the blurred image at the T-th target time.
  • the global event feature used to reflect the scene motion information within the exposure time can be determined, so that the blurred image is deblurred based on the event data and the global event feature After processing, a clear image with higher image quality corresponding to the blurred image can be obtained, thereby effectively improving the image deblurring quality.
  • the motion blur physical model is used to preliminarily determine the initial clear image I T 'corresponding to the blurred image at the T-th target time through the following formula (1):
  • T is the number of target moments
  • I i is the clear image corresponding to the blurred image at the i-th target moment
  • is the brightness threshold of the event collection device, when the pixel (x, y) triggers the event ⁇ x at time t
  • is the brightness threshold of the event collection device
  • the initialization sub-network in the image deblurring neural network can be used to determine the clear image corresponding to the blurred image at the T-th time.
  • the initial clear image I 4 'corresponding to the fuzzy image I and the blurred image obtained by the above formula (1) at the fourth target moment is input into the encoder of the initialization sub-network for encoding, and the first clear image is obtained.
  • the feature map corresponding to the four target moments I 4 ", and then the feature map corresponding to the fourth target moment is cascaded with the global event feature output by the read network, and the cascaded feature is decoded by the decoder of the initialized sub-network to obtain
  • the blurred image corresponds to a clear image (I 4 ) at the fourth target moment.
  • the method further includes: determining the clear image sequence corresponding to the blurred image according to the clear image corresponding to the blurred image at the T-th target time
  • the clear image corresponding to the blurred image at the i+1th target time including: the clear image corresponding to the blurred image at the i+1-th target time, and the local event between the i-th target time and the i+1-th target time Data, determine the initial clear image corresponding to the blurred image at the i-th target time; filter the local event data between the i-th target time and the i+1-th target time, and determine the boundary feature map corresponding to the i-th target time; according to The initial clear image corresponding to the blurred image at the i-th target time, as well as the boundary feature map and local event feature corresponding to the i-th target time, determine the clear image corresponding to the blurred image at the i-th target time.
  • the process of acquiring blurred images is the same as that of the image acquisition device.
  • the event acquisition device collects event data within the exposure time of the blurred image, there is also relative movement between the event acquisition device and the object being photographed, which results in the difference in the data collected by the event acquisition device.
  • Filtering the local event data between the i-th target time and the i+1-th target time can be implemented to align the local event data between the i-th target time and the i+1-th target time, and then obtain a clearer boundary feature map corresponding to the i-th target time.
  • the initial clear image corresponding to the blurred image at the i-th target time, as well as the boundary feature map and local event feature corresponding to the i-th target time can obtain the clear image corresponding to the blurred image with a clearer edge at the i-th target time.
  • the clear image corresponding to the blurred image at the i+1th target time and the local event data between the i-th target time and the i+1th target time it is determined that the blurred image is at the i-th target time.
  • the initial clear image corresponding to the time including: based on the motion blur physical model, the clear image corresponding to the blurred image at the i+1th target time, and the local event data between the ith target time and the i+1th target time, determine The initial clear image corresponding to the blurred image at the i-th target moment.
  • the motion blur physical model is used to pass the following
  • the formula (2) determines the initial clear image I i 'corresponding to the blurred image at the T-th target time:
  • the second the determination method based on optical flow
  • the initial clear image corresponding to the i-th target time includes: determining the forward optical flow from the (i+1)th target time to the i-th target time according to the local event data between the i-th target time and the (i+1)th target time; According to the target clear image and the forward optical flow corresponding to the i+1-th target time, the initial clear image corresponding to the blurred image at the i-th target time is determined.
  • the local event data between the i-th target time and the i+1-th target time determine the spatial position change of the same pixel point between the i-th target time and the i+1-th target time, so as to obtain the i+1-th target time
  • the forward optical flow to the i-th target time and then the motion compensation processing is performed on the clear image corresponding to the blurred image at the i+1-th target time according to the forward optical flow from the i+1-th target time to the i-th target time,
  • the initial clear image corresponding to the blurred image at the i-th target moment is obtained.
  • the processing sub-network in the image deblurring neural network may be used to determine the clear image sequence corresponding to the blurred image.
  • the clear image (I 4 ) corresponding to the fourth target moment is processed based on the motion blur model (ie formula (2)) to obtain the initial clear image corresponding to the third target moment, using motion compensation
  • the forward optical flow between the fourth target moment and the third target moment obtained by the module (MC, Motion Compensation) is the initial clear image obtained by processing the clear image (I 4) corresponding to the fourth target moment, and the use of directional events
  • the filtering module (DEF, Direction Event Filtering) performs filtering processing on the local event data between the third target moment and the fourth target moment, and the coding in at least one input processing sub-network in the boundary feature map corresponding to the third target moment is obtained
  • the device performs encoding to obtain the feature map corresponding to the third target time, and then the
  • the method of determining the clear image (I 2 ) corresponding to the blurred image at the second target moment and the clear image (I 1 ) corresponding to the blurred image at the first target moment is the same as determining the clear image (I 1) corresponding to the blurred image at the third target moment. 3 ) It is similar and will not be repeated here.
  • the global event feature and the local event feature used to reflect the scene motion information within the exposure time can be determined, and then based on the event data and the global event feature And local event features can be recovered from a single blurred image to obtain a clear image sequence with higher image quality corresponding to the blurred image within the exposure time, thereby effectively improving the image deblurring quality in dynamic scenes.
  • the image processing method of the embodiment of the present disclosure can be applied to the camera system of a mobile terminal device. The method can not only remove the image blur caused by camera shake or scene movement, obtain a clear image sequence during shooting, and realize dynamic scene recording. Allows users to get a better photo experience.
  • the image processing method of the embodiment of the present disclosure can be applied to the vision system of an aircraft, robot, or autonomous driving. Not only can it solve the image blur caused by fast motion, the resulting clear image sequence can also help other vision systems to perform better. Performance, such as SLAM systems.
  • the present disclosure also provides image processing devices, electronic equipment, computer-readable storage media, and programs, all of which can be used to implement any image processing method provided in the present disclosure.
  • image processing devices electronic equipment, computer-readable storage media, and programs, all of which can be used to implement any image processing method provided in the present disclosure.
  • Fig. 3 shows a block diagram of an image processing apparatus according to an embodiment of the present disclosure. As shown in Fig. 3, the device 30 includes:
  • the first determining module 31 is configured to obtain the blurred image obtained by exposure within the exposure time and the event data obtained by sampling during the exposure time, where the event data is used to reflect the brightness changes of pixels in the blurred image;
  • the second determining module 32 is configured to determine the global event characteristics within the exposure time according to the event data
  • the third determining module 33 is configured to determine a clear image corresponding to the blurred image according to the blurred image, event data, and global event characteristics.
  • the exposure time includes multiple target moments
  • the second determining module 32 includes:
  • the second determining sub-module is used to determine the global event characteristics according to the local event characteristics corresponding to multiple target moments.
  • the third determining module 33 includes:
  • the third determining sub-module is used to determine the clear image corresponding to the blurred image at the T-th target time according to the blurred image, event data and global event characteristics.
  • the third determining submodule includes:
  • the first determining unit is configured to determine the initial clear image corresponding to the blurred image at the T-th target time based on the blurred image and event data based on the motion blur physical model;
  • the second determining unit is configured to determine the clear image corresponding to the blurred image at the T-th time according to the initial clear image and the global event feature corresponding to the blurred image at the T-th target time.
  • the third determining module 33 further includes:
  • the fourth determining sub-module is used to determine the clear image sequence corresponding to the blurred image according to the clear image corresponding to the blurred image at the T-th target time.
  • the fourth determining submodule includes:
  • the fourth determining unit is used to obtain a clear image sequence according to the clear image corresponding to the blurred image at the first to T target moments.
  • the third determining unit includes:
  • the first determining subunit is used to determine the blurred image at the i-th target time according to the clear image corresponding to the blurred image at the i+1-th target time and the local event data between the i-th target time and the i+1-th target time The corresponding initial clear image;
  • the second determining subunit is used to filter the local event data between the i-th target time and the (i+1)th target time, and determine the boundary feature map corresponding to the i-th target time;
  • the third determining subunit is used to determine the clear image corresponding to the blurred image at the i-th target time according to the initial clear image corresponding to the blurred image at the i-th target time, and the boundary feature map and local event feature corresponding to the i-th target time.
  • the first determining subunit is specifically used for:
  • the first determining subunit is specifically used for:
  • the local event data between the i-th target time and the (i+1)th target time determine the forward optical flow from the i+1-th target time to the i-th target time;
  • the initial clear image corresponding to the blurred image at the i-th target time is determined.
  • the functions or modules contained in the device provided in the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments.
  • the functions or modules contained in the device provided in the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments.
  • the embodiments of the present disclosure also provide a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above-mentioned method when executed by a processor.
  • the computer-readable storage medium may be a non-volatile computer-readable storage medium.
  • An embodiment of the present disclosure also proposes an electronic device, including: a processor; a memory for storing executable instructions of the processor; wherein the processor is configured to call the instructions stored in the memory to execute the above method.
  • the embodiments of the present disclosure also provide a computer program product, including computer-readable code.
  • the processor in the device executes the image processing method for implementing the image processing method provided by any of the above embodiments. instruction.
  • the embodiments of the present disclosure also provide another computer program product for storing computer-readable instructions, which when executed, cause the computer to perform the operations of the image processing method provided by any of the foregoing embodiments.
  • the electronic device can be provided as a terminal, server or other form of device.
  • Fig. 4 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
  • the electronic device 800 may be a mobile phone, a computer, a digital broadcasting terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and other terminals.
  • the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, and a sensor component 814 , And communication component 816.
  • the processing component 802 generally controls the overall operations of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations.
  • the processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the foregoing method.
  • the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components.
  • the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
  • the memory 804 is configured to store one or more types of data to support operations in the electronic device 800. Examples of these data include instructions for any application or method to operate on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc.
  • the memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable and Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic Disk or Optical Disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read-only memory
  • EPROM erasable and Programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Magnetic Disk Magnetic Disk or Optical Disk.
  • the power supply component 806 provides power for one or more components of the electronic device 800.
  • the power supply component 806 may include a power management system, one or more power supplies, and other components associated with the generation, management, and distribution of power for the electronic device 800.
  • the multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user.
  • the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user.
  • the touch panel includes one or more touch sensors to sense touch, sliding, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure related to the touch or slide operation.
  • the multimedia component 808 includes a front camera and/or a rear camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data.
  • One or more front cameras and rear cameras can be a fixed optical lens system or have focal length and optical zoom capabilities.
  • the audio component 810 is configured to output and/or input audio signals.
  • the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal.
  • the received audio signal may be further stored in the memory 804 or transmitted via the communication component 816.
  • the audio component 810 further includes a speaker for outputting audio signals.
  • the I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module.
  • the above-mentioned peripheral interface module may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: home button, volume button, start button, and lock button.
  • the sensor component 814 includes one or more sensors for providing the electronic device 800 with one or more aspects of state evaluation.
  • the sensor component 814 can detect the on/off status of the electronic device 800 and the relative positioning of the components.
  • the component is the display and the keypad of the electronic device 800.
  • the sensor component 814 can also detect the electronic device 800 or the electronic device 800.
  • the position of the component changes, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration/deceleration of the electronic device 800, and the temperature change of the electronic device 800.
  • the sensor component 814 may include a proximity sensor configured to detect the presence of nearby objects when there is no physical contact.
  • the sensor component 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
  • the sensor component 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
  • the communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices.
  • the electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 2G, or 3G, or a combination thereof.
  • the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel.
  • the communication component 816 further includes a near field communication (NFC) module to facilitate short-range communication.
  • the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field-available A programmable gate array (FPGA), controller, microcontroller, microprocessor, or other electronic components are implemented to implement the above methods.
  • ASIC application-specific integrated circuits
  • DSP digital signal processors
  • DSPD digital signal processing devices
  • PLD programmable logic devices
  • FPGA field-available A programmable gate array
  • controller microcontroller, microprocessor, or other electronic components are implemented to implement the above methods.
  • a non-volatile computer-readable storage medium such as the memory 804 including computer program instructions, which can be executed by the processor 820 of the electronic device 800 to complete the foregoing method.
  • Fig. 5 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
  • the electronic device 1900 may be provided as a server.
  • the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932, for storing instructions executable by the processing component 1922, such as application programs.
  • the application program stored in the memory 1932 may include one or more modules corresponding to a set of instructions.
  • the processing component 1922 is configured to execute instructions to perform the above-described methods.
  • the electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to the network, and an input output (I/O) interface 1958 .
  • the electronic device 1900 can operate based on an operating system stored in the memory 1932, such as Windows Server TM , Mac OS X TM , Unix TM , Linux TM , FreeBSD TM or the like.
  • a non-volatile computer-readable storage medium is also provided, such as the memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to complete the foregoing method.
  • the present disclosure may be a system, method and/or computer program product.
  • the computer program product may include a computer-readable storage medium loaded with computer-readable program instructions for enabling a processor to implement one or more aspects of the present disclosure.
  • the computer-readable storage medium may be a tangible device that can hold and store instructions used by the instruction execution device.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Non-exhaustive list of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) Or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding device, such as a printer with instructions stored thereon
  • RAM random access memory
  • ROM read-only memory
  • EPROM erasable programmable read-only memory
  • flash memory flash memory
  • SRAM static random access memory
  • CD-ROM compact disk read-only memory
  • DVD digital versatile disk
  • memory stick floppy disk
  • mechanical encoding device such as a printer with instructions stored thereon
  • the computer-readable storage medium used here is not interpreted as the instantaneous signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (for example, light pulses through fiber optic cables), or through wires Transmission of electrical signals.
  • the computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to one or more computing/processing devices, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and/or a wireless network .
  • the network may include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • the network adapter card or network interface in at least one computing/processing device receives computer-readable program instructions from the network, and forwards the computer-readable program instructions for computer-readable storage in one or more computing/processing devices Storage medium.
  • the computer program instructions used to perform the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or in one or more programming languages.
  • Source code or object code written in any combination, the programming language includes object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as "C" language or similar programming languages.
  • Computer-readable program instructions can be executed entirely on the user's computer, partly on the user's computer, executed as a stand-alone software package, partly on the user's computer and partly executed on a remote computer, or entirely on the remote computer or server implement.
  • the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to access the Internet). connect).
  • LAN local area network
  • WAN wide area network
  • an electronic circuit such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), can be customized by using the status information of the computer-readable program instructions.
  • the computer-readable program instructions are executed to implement one or more aspects of the present disclosure.
  • These computer-readable program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine that makes these instructions when executed by the processor of the computer or other programmable data processing device , A device that implements the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams is produced. It is also possible to store these computer-readable program instructions in a computer-readable storage medium. These instructions make computers, programmable data processing apparatuses, and/or other devices work in a specific manner. Thus, the computer-readable medium storing the instructions includes An article of manufacture, which includes instructions for implementing one or more aspects of the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams.
  • At least one block in the flowchart or block diagram may represent a module, program segment, or part of an instruction, and the module, program segment, or part of an instruction includes one or more functions for realizing the specified logic function.
  • Executable instructions may also occur in a different order from the order marked in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, or they can sometimes be executed in the reverse order, depending on the functions involved.
  • one or more blocks in the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts can be used as dedicated hardware-based systems that perform specified functions or actions. It can be implemented, or can be implemented by a combination of dedicated hardware and computer instructions.
  • the computer program product can be specifically implemented by hardware, software, or a combination thereof.
  • the computer program product is specifically embodied as a computer storage medium.
  • the computer program product is specifically embodied as a software product, such as a software development kit (SDK), etc. Wait.
  • SDK software development kit

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Quality & Reliability (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Image Processing (AREA)
  • Studio Devices (AREA)
  • Apparatus For Radiation Diagnosis (AREA)

Abstract

本公开涉及一种图像处理方法及装置、电子设备和存储介质,所述方法包括:获取在曝光时间内曝光得到的模糊图像,以及在所述曝光时间内采样得到的事件数据,其中,所述事件数据用于反映所述模糊图像中的像素点的亮度变化;根据所述事件数据,确定所述曝光时间内的全局事件特征;根据所述模糊图像、所述事件数据和所述全局事件特征,确定所述模糊图像对应的清晰图像。

Description

图像处理方法及装置、电子设备和存储介质
本申请要求在2020年3月27日提交中国专利局、申请号为202010232152.X、申请名称为“图像处理方法及装置、电子设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本公开涉及计算机技术领域,尤其涉及一种图像处理方法及装置、电子设备和存储介质。
背景技术
在图像采集过程中,图像采集设备与被拍摄物体之间往往存在相对运动,因而造成了图像的运动模糊。图像去模糊是计算机视觉以及计算摄影学的重要研究方向,是图像画质增强,图像修复不可或缺的重要步骤。该技术广泛应用在摄影,娱乐,视频监控等多种场景。
发明内容
本公开提出了一种图像处理方法及装置、电子设备和存储介质的技术方案。
根据本公开的一方面,提供了一种图像处理方法,包括:获取在曝光时间内曝光得到的模糊图像,以及在所述曝光时间内采样得到的事件数据,其中,所述事件数据用于反映所述模糊图像中的像素点的亮度变化;根据所述事件数据,确定所述曝光时间内的全局事件特征;根据所述模糊图像、所述事件数据和所述全局事件特征,确定所述模糊图像对应的清晰图像。
在一种可能的实现方式中,所述曝光时间内包括多个目标时刻;所述根据所述事件数据,确定所述曝光时间内的全局事件特征,包括:根据第i目标时刻和第i+1目标时刻之间的局部事件数据,确定所述第i目标时刻对应的局部事件特征,其中,i=1,2,...,T-1;根据所述多个目标时刻对应的局部事件特征,确定所述全局事件特征。
在一种可能的实现方式中,所述根据所述模糊图像、所述事件数据和所述全局事件特征,确定所述模糊图像对应的清晰图像,包括:根据所述模糊图像、所述事件数据和所述全局事件特征,确定所述模糊图像在第T目标时刻对应的清晰图像。
在一种可能的实现方式中,所述根据所述模糊图像、所述事件数据和所述全局事件特征,确定所述模糊图像在第T目标时刻对应的清晰图像,包括:基于运动模糊物理模型,根据所述模糊图像和所述事件数据,确定所述模糊图像在所述第T目标时刻对应的初始清晰图像;根据所述模糊图像在所述第T目标时刻对应的初始清晰图像和所述全局事件特征,确定所述模糊图像在所述第T时刻对应的清晰图像。
在一种可能的实现方式中,所述方法还包括:根据所述模糊图像在所述第T目标时刻对应的清晰图像,确定所述模糊图像对应的清晰图像序列。
在一种可能的实现方式中,所述根据所述模糊图像在所述第T目标时刻对应的清晰图像,确定所述模糊图像对应的清晰图像序列,包括:根据所述模糊图像在所述第i+1目标时刻对应的清晰图像、所述第i目标时刻和所述第i+1目标时刻之间的局部事件数据,以及所述第i目标时刻对应的局部事件特征,确定所述模糊图像在所述第i目标时刻对应的清晰图像,其中,i=1,2,...,T-1;根据所述 模糊图像在第1至T目标时刻对应的清晰图像,得到所述清晰图像序列。
在一种可能的实现方式中,所述根据所述模糊图像在所述第i+1目标时刻对应的清晰图像、所述第i目标时刻和所述第i+1目标时刻之间的局部事件数据,以及所述第i目标时刻对应的局部事件特征,确定所述模糊图像在所述第i目标时刻对应的清晰图像,包括:根据所述模糊图像在所述第i+1目标时刻对应的清晰图像,以及所述第i目标时刻和所述第i+1目标时刻之间的局部事件数据,确定所述模糊图像在所述第i目标时刻对应的初始清晰图像;对所述第i目标时刻和所述第i+1目标时刻之间的局部事件数据进行滤波处理,确定所述第i目标时刻对应的边界特征图;根据所述模糊图像在所述第i目标时刻对应的初始清晰图像,以及所述第i目标时刻对应的边界特征图和局部事件特征,确定所述模糊图像在所述第i目标时刻对应的清晰图像。
在一种可能的实现方式中,所述根据所述模糊图像在所述第i+1目标时刻对应的清晰图像,以及所述第i目标时刻和所述第i+1目标时刻之间的局部事件数据,确定所述模糊图像在所述第i目标时刻对应的初始清晰图像,包括:基于运动模糊物理模型,根据所述模糊图像在所述第i+1目标时刻对应的清晰图像,以及所述第i目标时刻和所述第i+1目标时刻之间的局部事件数据,确定所述模糊图像在所述第i目标时刻对应的初始清晰图像。
在一种可能的实现方式中,所述根据所述模糊图像在所述第i+1目标时刻对应的清晰图像,以及所述第i目标时刻和所述第i+1目标时刻之间的局部事件数据,确定所述模糊图像在所述第i目标时刻对应的初始清晰图像,包括:根据所述第i目标时刻和所述第i+1目标时刻之间的局部事件数据,确定所述第i+1目标时刻到所述第i目标时刻的前向光流;根据所述模糊图像在所述第i+1目标时刻对应的清晰图像和所述前向光流,确定所述模糊图像在所述第i目标时刻对应的初始清晰图像。
根据本公开的一方面,提供了一种图像处理装置,包括:第一确定模块,用于获取在曝光时间内曝光得到的模糊图像,以及在所述曝光时间内采样得到的事件数据,其中,所述事件数据用于反映所述模糊图像中的像素点的亮度变化;第二确定模块,用于根据所述事件数据,确定所述曝光时间内的全局事件特征;第三确定模块,用于根据所述模糊图像、所述事件数据和所述全局事件特征,确定所述模糊图像对应的清晰图像。
在一种可能的实现方式中,所述曝光时间内包括多个目标时刻;所述第二确定模块,包括:第一确定子模块,用于根据第i目标时刻和第i+1目标时刻之间的局部事件数据,确定所述第i目标时刻对应的局部事件特征,其中,i=1,2,...,T-1;第二确定子模块,用于根据所述多个目标时刻对应的局部事件特征,确定所述全局事件特征。
在一种可能的实现方式中,所述第三确定模块,包括:第三确定子模块,用于根据所述模糊图像、所述事件数据和所述全局事件特征,确定所述模糊图像在第T目标时刻对应的清晰图像。
在一种可能的实现方式中,所述第三确定子模块,包括:第一确定单元,用于基于运动模糊物理模型,根据所述模糊图像和所述事件数据,确定所述模糊图像在所述第T目标时刻对应的初始清晰图像;第二确定单元,用于根据所述模糊图像在所述第T目标时刻对应的初始清晰图像和所述全局事件特征,确定所述模糊图像在所述第T时刻对应的清晰图像。
在一种可能的实现方式中,所述第三确定模块还包括:第四确定子模块,用于根据所述模糊图像在所述第T目标时刻对应的清晰图像,确定所述模糊图像对应的清晰图像序列。
在一种可能的实现方式中,所述第四确定子模块,包括:第三确定单元,用于根据所述模糊图像 在所述第i+1目标时刻对应的清晰图像、所述第i目标时刻和所述第i+1目标时刻之间的局部事件数据,以及所述第i目标时刻对应的局部事件特征,确定所述模糊图像在所述第i目标时刻对应的清晰图像,其中,i=1,2,...,T-1;第四确定单元,用于根据所述模糊图像在第1至T目标时刻对应的清晰图像,得到所述清晰图像序列。
在一种可能的实现方式中,所述第三确定单元,包括:第一确定子单元,用于根据所述模糊图像在所述第i+1目标时刻对应的清晰图像,以及所述第i目标时刻和所述第i+1目标时刻之间的局部事件数据,确定所述模糊图像在所述第i目标时刻对应的初始清晰图像;第二确定子单元,用于对所述第i目标时刻和所述第i+1目标时刻之间的局部事件数据进行滤波处理,确定所述第i目标时刻对应的边界特征图;第三确定子单元,用于根据所述模糊图像在所述第i目标时刻对应的初始清晰图像,以及所述第i目标时刻对应的边界特征图和局部事件特征,确定所述模糊图像在所述第i目标时刻对应的清晰图像。
在一种可能的实现方式中,所述第一确定子单元具体用于:基于运动模糊物理模型,根据所述模糊图像在所述第i+1目标时刻对应的清晰图像,以及所述第i目标时刻和所述第i+1目标时刻之间的局部事件数据,确定所述模糊图像在所述第i目标时刻对应的初始清晰图像。
在一种可能的实现方式中,所述第一确定子单元具体用于:根据所述第i目标时刻和所述第i+1目标时刻之间的局部事件数据,确定所述第i+1目标时刻到所述第i目标时刻的前向光流;根据所述模糊图像在所述第i+1目标时刻对应的清晰图像和所述前向光流,确定所述模糊图像在所述第i目标时刻对应的初始清晰图像。
根据本公开的一方面,提供了一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。
根据本公开的一方面,提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。
根据本公开的一方面,提供了一种计算机程序,包括计算机可读代码,当所述计算机代码在电子设备中运行时,所述电子设备中的处理器执行用于实现上述方法。
在本公开实施例中,根据模糊图像的曝光时间内采样得到的事件数据,可以确定用于反映曝光时间内场景运动信息的全局事件特征,使得基于事件数据和全局事件特征对模糊图像进行去模糊处理后,可以得到模糊图像对应的图像质量较高的清晰图像,从而有效提高图像去模糊质量。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。
图1示出根据本公开实施例的图像处理方法的流程图;
图2示出根据本公开实施例的图像去模糊神经网络的示意图;
图3示出根据本公开实施例的图像处理装置的框图;
图4示出本公开实施例的一种电子设备的框图;
图5示出本公开实施例的一种电子设备的框图。
具体实施方式
以下将参考附图详细说明本公开的一个或多个示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的一个或多个方面,但是除非特别指出,不必按比例绘制附图。
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。
本文中术语“和/或”是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。
另外,为了更好地说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。
在图像采集过程中,图像采集设备与被拍摄物体之间往往存在相对运动,因而造成了图像的运动模糊。例如,拍摄过程中相机抖动或者场景移动产生的图像模糊,飞行器、机器人或自动驾驶的视觉系统等由于自身快速运动产生的图像模糊等。本公开实施例的图像处理方法可以用于对上述应用场景下得到的模糊图像进行图像去模糊处理操作。
图1示出根据本公开实施例的图像处理方法的流程图。如图1所示的图像处理方法可以由终端设备或其它处理设备执行,其中,终端设备可以为用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字处理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等。其它处理设备可为服务器或云端服务器等。在一些可能的实现方式中,该图像处理方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。如图1所示,该方法可以包括:
在步骤S11中,获取在曝光时间内得到的模糊图像,以及在曝光时间内采样得到的事件数据,其中,事件数据用于反映模糊图像中的像素点的亮度变化。
在步骤S12中,根据事件数据,确定曝光时间内的全局事件特征。
在步骤S13中,根据模糊图像、事件数据和全局事件特征,确定模糊图像对应的清晰图像。
模糊图像可以是图像采集设备(例如,摄像头)在曝光时间内采集得到的,具有较低的清晰度,存在图像模糊、动态范围较小等情况,其中,曝光时间指的是图像采集设备采集模糊图像的一个时间段,例如,曝光时间为90ms指的是0-90ms的一个时间段。图像采集设备在曝光时间内采集模糊图像时,可通过事件采集设备(例如,事件相机,Event-Based Camera)在曝光时间内进行采样得到事件数据,其中,事件数据可以反映模糊图像中的像素点在曝光时间内的亮度变化,进而利用该事件数据对模糊图像进行去模糊处理。
其中,事件数据的格式可以为p x,y,t,其中,(x,y)表示亮度变化超过亮度阈值的像素点的位置, t表示像素点(x,y)亮度变化超过亮度阈值的时刻。通过p x,y,t的取值来表示像素点当像素点(x,y)在t时刻的亮度变化,例如,当像素点(x,y)在t时刻亮度增加超过亮度阈值时,p x,y,t的取值为正数(例如,+1);当像素点(x,y)在t时刻亮度减小超过亮度阈值时,p x,y,t的取值为负数(例如,-1);当像素点(x,y)在t时刻亮度的亮度变化未达到亮度阈值时,p x,y,t的取值为0。亮度阈值的具体取值可以根据实际情况确定,本公开对此不做具体限定。
在一种可能的实现方式中,曝光时间内包括多个目标时刻;根据事件数据,确定曝光时间内的全局事件特征,包括:根据第i目标时刻和第i+1目标时刻之间的局部事件数据,确定第i目标时刻对应的局部事件特征;根据多个目标时刻对应的局部事件特征,确定全局事件特征。
通过在模糊图像的曝光时间内确定多个目标时刻,可以将在曝光时间内采样得到的事件数据划分为等时间间隔的多组,使得可以利用多组事件数据得到用于反映曝光时间内的场景运动信息的全局事件特征和局部事件特征。在一示例中,在曝光时间内确定多个目标时刻,相邻目标时刻之间对应的事件数据为一组,进而根据多组事件数据可以得到用于反映场景运动信息的多个目标时刻对应的局部事件特征,以及根据多个目标时刻对应的局部事件特征,得到用于反映场景运动信息的全局事件特征。
例如,模糊图像的曝光时间为90ms,事件采集设备在曝光时间内采样得到事件数据,在曝光时间内确定四个目标时刻:第一目标时刻(0ms)、第二目标时刻(30ms)、第三目标时刻(60ms)和第四目标时刻(90ms),则可以实现将事件数据划分为3组:第一目标时刻和第二目标时刻之间(0~30ms)的局部事件数据、第二目标时刻和第三目标时刻之间(30~60ms)的局部事件数据,以及第三目标时刻和第四目标时刻之间(60~90ms)的局部事件数据。根据第一目标时刻和第二目标时刻之间(0~30ms)的局部事件数据可以确定第一目标时刻对应的局部事件特征;根据第二目标时刻和第三目标时刻之间(30~60ms)的事件数据可以确定第二目标时刻对应的局部事件特征;根据第三目标时刻和第四目标时刻之间(60~90ms)的事件数据可以确定第三目标时刻对应的局部事件特征;根据第一目标时刻对应的局部事件特征、第二目标时刻对应的局部事件特征,以及第三目标时刻对应的局部事件特征,可以确定曝光时间内(0~90ms)的全局事件特征。曝光时间内目标时刻的个数可以根据实际情况确定,本公开对此不做具体限定。
在一种可能的实时方式中,可以根据模糊图像的曝光时间内采样得到的事件数据,利用图像去模糊神经网络中的读取子网络,确定曝光时间内的全局事件特征和多个目标时刻对应的局部事件特征。图2示出根据本公开实施例的图像去模糊神经网络的示意图。读取子网络可以由一系列卷积网络和卷积长短时记忆网络组成。图2中包括四个目标时刻,将模糊图像的曝光时间内采样得到的事件数据输入图2中的读取子网络后,等时间间隔分为多个相邻目标时刻之间的局部事件数据,由卷积网络构成的编码器对相邻目标时刻之间的局部事件数据进行特征提取,得到多个目标时刻对应的局部事件特征,再通过长短时记忆网络对多个目标时刻对应的局部事件特征进行时序特征提取,得到曝光时间内的全局事件特征。读取子网络除了可以由一系列卷积网络和卷积长短时记忆网络组成,还可以有其它网络构成形式,本公开对此不做具体限定。
在一种可能的实现方式中,根据模糊图像、事件数据和全局事件特征,确定模糊图像对应的清晰图像,包括:根据模糊图像、事件数据和全局事件特征,确定模糊图像在第T目标时刻对应的清晰图 像。
在一种可能的实现方式中,根据模糊图像、曝光时间内的事件数据和全局事件特征,确定模糊图像在第T目标时刻对应的清晰图像,包括:基于运动模糊物理模型,根据模糊图像和事件数据,确定模糊图像在第T目标时刻对应的初始清晰图像;根据模糊图像在第T目标时刻对应的初始清晰图像和全局事件特征,确定模糊图像在第T时刻对应的清晰图像。
在本公开实施例中,根据模糊图像的曝光时间内采样得到的事件数据,可以确定用于反映曝光时间内场景运动信息的全局事件特征,使得基于事件数据和全局事件特征对模糊图像进行去模糊处理后,可以得到模糊图像对应的图像质量较高的清晰图像,从而有效提高图像去模糊质量。
假设模糊图像经过图像去模糊后可以得到曝光时间内的第1至T目标时刻对应的T帧清晰图像,则根据运动模糊物理模型,模糊图像为T帧清晰图像的图像平均值。因此,基于模糊图像I和模糊图像I曝时间内的事件数据,利用运动模糊物理模型,通过下述公式(一)初步确定模糊图像在第T目标时刻对应的初始清晰图像I T':
Figure PCTCN2020100236-appb-000001
其中,T为目标时刻的个数,I i为模糊图像在第i目标时刻对应的清晰图像,τ为事件采集设备的亮度阈值,当像素点(x,y)在t时刻触发了事件ε x,y,t时,δ(ε x,y,t)=1,未触发事件ε x,y,t时,δ(ε x,y,t)=0。进而根据模糊图像在第T目标时刻对应的初始清晰图像和全局事件特征,确定模糊图像在第T时刻对应的清晰图像。
在一种可能的实现方式中,可以根据模糊图像、事件数据和全局事件特征,利用图像去模糊神经网络中的初始化子网络,确定模糊图像在第T时刻对应的清晰图像。仍以上述图2为例,将模糊图像I和模糊图像经过上述公式(一)得到的模糊图像在第四目标时刻对应的初始清晰图像I 4'输入初始化子网络的编码器进行编码,得到第四目标时刻对应的特征图I 4”,进而将第四目标时刻对应的特征图和读取网络输出的全局事件特征进行级联,将级联后特征经过初始化子网络的解码器进行解码,得到模糊图像在第四目标时刻对应的清晰图像(I 4)。
在一种可能的实现方式中,该方法还包括:根据模糊图像在第T目标时刻对应的清晰图像,确定模糊图像对应的清晰图像序列
在一种可能的实现方式中,根据模糊图像在第T目标时刻对应的清晰图像,确定模糊图像对应的清晰图像序列,包括:根据模糊图像在第i+1目标时刻对应的清晰图像、第i目标时刻和第i+1目标时刻之间的局部事件数据,以及第i目标时刻对应的局部事件特征,确定模糊图像在第i目标时刻对 应的清晰图像,其中,i=1,2,...,T-1;根据模糊图像在第1至T目标时刻对应的清晰图像,得到清晰图像序列。
在一种可能的实现方式中,根据模糊图像在第i+1目标时刻对应的清晰图像、第i目标时刻和第i+1目标时刻之间的局部事件数据,以及第i目标时刻对应的局部事件特征,确定模糊图像在第i目标时刻对应的清晰图像,包括:根据模糊图像在第i+1目标时刻对应的清晰图像,以及第i目标时刻和第i+1目标时刻之间的局部事件数据,确定模糊图像在第i目标时刻对应的初始清晰图像;对第i目标时刻和第i+1目标时刻之间的局部事件数据进行滤波处理,确定第i目标时刻对应的边界特征图;根据模糊图像在第i目标时刻对应的初始清晰图像,以及第i目标时刻对应的边界特征图和局部事件特征,确定模糊图像在第i目标时刻对应的清晰图像。
与图像采集设备采集模糊图像的过程相同,事件采集设备对模糊图像的曝光时间内的事件数据进行采集时,事件采集设备与被拍摄物体之间同样存在相对运动,导致事件采集设备采集到的不同时刻的事件数据之间存在对不齐的现象。因此,针对相邻目标时刻之间的局部事件数据进行滤波对齐,例如,第i目标时刻和第i+1目标时刻之间的局部事件数据,通过对第i目标时刻和第i+1目标时刻之间的局部事件数据进行滤波处理,可以实现将第i目标时刻和第i+1目标时刻之间的局部事件数据进行对齐,进而得到第i目标时刻对应的更加清晰的边界特征图,从而根据模糊图像在第i目标时刻对应的初始清晰图像,以及第i目标时刻对应的边界特征图和局部事件特征,可以得到边缘更加清晰的模糊图像在第i目标时刻对应的清晰图像。
确定模糊图像在第i目标时刻对应的初始清晰图像的方式至少包括下述两种:
第一种:基于运动模糊物理模型的确定方式
在一种可能的实现方式中,根据模糊图像在第i+1目标时刻对应的清晰图像,以及第i目标时刻和第i+1目标时刻之间的局部事件数据,确定模糊图像在第i目标时刻对应的初始清晰图像,包括:基于运动模糊物理模型,根据模糊图像在第i+1目标时刻对应的清晰图像,以及第i目标时刻和第i+1目标时刻之间的局部事件数据,确定模糊图像在第i目标时刻对应的初始清晰图像。
在一示例中,基于模糊图像在第i+1目标时刻对应的清晰图像I i+1和第i目标时刻和第i+1目标时刻之间的局部事件数据,利用运动模糊物理模型,通过下述公式(二)确定模糊图像在第T目标时刻对应的初始清晰图像I i':
Figure PCTCN2020100236-appb-000002
第二种:基于光流的确定方式
在一种可能的实现方式中,根据模糊图像在第i+1目标时刻对应的清晰图像,以及第i目标时刻和所述第i+1目标时刻之间的局部事件数据,确定模糊图像在第i目标时刻对应的初始清晰图像,包括:根据第i目标时刻和第i+1目标时刻之间的局部事件数据,确定第i+1目标时刻到所述第i目标时刻的前向光流;根据第i+1目标时刻对应的目标清晰图像和前向光流,确模糊图像在第i目标时刻对应的初始清晰图像。
根据第i目标时刻和第i+1目标时刻之间的局部事件数据,确定相同像素点在第i目标时刻和第i+1目标时刻之间的空间位置变化,从而得到第i+1目标时刻到所述第i目标时刻的前向光流,进而根据第i+1目标时刻到第i目标时刻的前向光流对模糊图像在第i+1目标时刻对应的清晰图像进行运动补偿处理,从而得到模糊图像在第i目标时刻对应的初始清晰图像。
在一种可能的实现方式中,可以根据模糊图像在第T目标时刻对应的清晰图像,利用图像去模糊神经网络中的处理子网络,确定模糊图像对应的清晰图像序列。仍以上述图2为例,将基于运动模糊模型(即公式(二))对第四目标时刻对应的清晰图像(I 4)进行处理得到的第三目标时刻对应的初始清晰图像、利用运动补偿模块(MC,Motion Compensation)得到的第四目标时刻到第三目标时刻之间的前向光流对第四目标时刻对应的清晰图像(I 4)进行处理得到的初始清晰图像,以及利用定向事件滤波模块(DEF,Direction Event Filtering)对第三目标时刻和第四目标时刻之间的局部事件数据进行滤波处理得到的第三目标时刻对应的边界特征图中的至少一个输入处理子网络中的编码器进行编码,得到第三目标时刻对应的特征图,进而第三目标时刻对应的特征图和读取网络输出的第三目标时刻对应的局部事件特征进行级联,将级联后的特征输入处理子网络的解码器进行解码,得到模糊图像在第三目标时刻对应的清晰图像(I 3)。确定模糊图像在第二目标时刻对应的清晰图像(I 2)和模糊图像在第一目标时刻对应的清晰图像(I 1)的方式,与确定模糊图像在第三目标时刻对应的清晰图像(I 3)相类似,这里不再赘述。
在本公开实施例中,根据单张模糊图像的曝光时间内采样得到的事件数据,可以确定用于反映曝光时间内场景运动信息的全局事件特征和局部事件特征,进而基于事件数据、全局事件特征和局部事件特征,可以从单张模糊图像中恢复得到曝光时间内模糊图像对应的图像质量较高的清晰图像序列,从而有效提高动态场景下图像去模糊质量。例如,本公开实施例的图像处理方法可以应用于移动终端设备的摄像系统,利用该方法不仅可以去除由相机抖动或者场景移动产生的图像模糊,得到拍摄时的清晰图像序列,实现动态场景记录,使得用户得到更好的拍照体验。例如,本公开实施例的图像处理方法可以应用在飞行器、机器人或自动驾驶的视觉系统上,不仅可以解决由快速运动产生的图像模糊,得到的清晰图像序列还有助于其他视觉系统发挥更好的性能,如SLAM系统等。
可以理解,本公开提及的上述一个或多个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开不再赘述。本领域技术人员可以理解,在具体实施方式的上述方法中,多个步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。
此外,本公开还提供了图像处理装置、电子设备、计算机可读存储介质、程序,上述均可用来实现本公开提供的任一种图像处理方法,相应技术方案和描述和参见方法部分的相应记载,不再赘述。
图3示出根据本公开实施例的图像处理装置的框图。如图3所示,装置30包括:
第一确定模块31,用于获取在曝光时间内曝光得到的模糊图像,以及在曝光时间内采样得到的事件数据,其中,事件数据用于反映模糊图像中的像素点的亮度变化;
第二确定模块32,用于根据事件数据,确定曝光时间内的全局事件特征;
第三确定模块33,用于根据模糊图像、事件数据和全局事件特征,确定模糊图像对应的清晰图像。
在一种可能的实现方式中,曝光时间内包括多个目标时刻;
第二确定模块32,包括:
第一确定子模块,用于根据第i目标时刻和第i+1目标时刻之间的局部事件数据,确定第i目标时刻对应的局部事件特征,其中,i=1,2,...,T-1;
第二确定子模块,用于根据多个目标时刻对应的局部事件特征,确定全局事件特征。
在一种可能的实现方式中,第三确定模块33,包括:
第三确定子模块,用于根据模糊图像、事件数据和全局事件特征,确定模糊图像在第T目标时刻对应的清晰图像。
在一种可能的实现方式中,第三确定子模块,包括:
第一确定单元,用于基于运动模糊物理模型,根据模糊图像和事件数据,确定模糊图像在第T目标时刻对应的初始清晰图像;
第二确定单元,用于根据模糊图像在第T目标时刻对应的初始清晰图像和全局事件特征,确定模糊图像在第T时刻对应的清晰图像。
在一种可能的实现方式中,第三确定模块33还包括:
第四确定子模块,用于根据模糊图像在第T目标时刻对应的清晰图像,确定模糊图像对应的清晰图像序列。
在一种可能的实现方式中,第四确定子模块,包括:
第三确定单元,用于根据模糊图像在第i+1目标时刻对应的清晰图像、第i目标时刻和第i+1目标时刻之间的局部事件数据,以及第i目标时刻对应的局部事件特征,确定模糊图像在第i目标时刻对应的清晰图像,其中,i=1,2,...,T-1;
第四确定单元,用于根据模糊图像在第1至T目标时刻对应的清晰图像,得到清晰图像序列。
在一种可能的实现方式中,第三确定单元,包括:
第一确定子单元,用于根据模糊图像在第i+1目标时刻对应的清晰图像,以及第i目标时刻和第i+1目标时刻之间的局部事件数据,确定模糊图像在第i目标时刻对应的初始清晰图像;
第二确定子单元,用于对第i目标时刻和第i+1目标时刻之间的局部事件数据进行滤波处理,确定第i目标时刻对应的边界特征图;
第三确定子单元,用于根据模糊图像在第i目标时刻对应的初始清晰图像,以及第i目标时刻对应的边界特征图和局部事件特征,确定模糊图像在第i目标时刻对应的清晰图像。
在一种可能的实现方式中,第一确定子单元具体用于:
基于运动模糊物理模型,根据模糊图像在第i+1目标时刻对应的清晰图像,以及第i目标时刻和第i+1目标时刻之间的局部事件数据,确定模糊图像在第i目标时刻对应的初始清晰图像。
在一种可能的实现方式中,第一确定子单元具体用于:
根据第i目标时刻和第i+1目标时刻之间的局部事件数据,确定第i+1目标时刻到第i目标时刻的前向光流;
根据模糊图像在第i+1目标时刻对应的清晰图像和前向光流,确定模糊图像在第i目标时刻对应 的初始清晰图像。
在一些实施例中,本公开实施例提供的装置具有的功能或包含的模块可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述。
本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是非易失性计算机可读存储介质。
本公开实施例还提出一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。
本公开实施例还提供了一种计算机程序产品,包括计算机可读代码,当计算机可读代码在设备上运行时,设备中的处理器执行用于实现如上任一实施例提供的图像处理方法的指令。
本公开实施例还提供了另一种计算机程序产品,用于存储计算机可读指令,指令被执行时使得计算机执行上述任一实施例提供的图像处理方法的操作。
电子设备可以被提供为终端、服务器或其它形态的设备。
图4示出根据本公开实施例的一种电子设备的框图。如图4所示,电子设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等终端。
参照图4,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。
处理组件802通常控制电子设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。
存储器804被配置为存储一种或多种类型的数据以支持在电子设备800的操作。这些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件806为电子设备800的一种或多种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。
多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当电子设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。一个或多个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件814包括一个或多个传感器,用于为电子设备800提供一个或多个方面的状态评估。例如,传感器组件814可以检测到电子设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器804,上述计算机程序指令可由电子设备800的处理器820执行以完成上述方法。
图5示出根据本公开实施例的一种电子设备的框图。如图5所示,电子设备1900可以被提供为一服务器。参照图5,电子设备1900包括处理组件1922,其进一步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。
电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理,一个有线或无线网络接口1950被配置为将电子设备1900连接到网络,和一个输入输出(I/O)接口1958。电子设备1900可以操作基于存储在存储器1932的操作系统,例如Windows Server TM,Mac OS X TM,Unix TM,Linux TM,FreeBSD TM或类似。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由电子设备1900的处理组件1922执行以完成上述方法。
本公开可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质, 其上载有用于使处理器实现本公开的一个或多个方面的计算机可读程序指令。
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到一个或多个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。至少一个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在一个或多个计算/处理设备中的计算机可读存储介质中。
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的一个或多个方面。
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的一个或多个方面。应当理解,流程图和/或框图的一个或多个方框以及流程图和/或框图中一个或多个方框的组合,都可以由计算机可读程序指令实现。
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的一个或多个方面的指令。
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从 而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的至少一个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的一个或多个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
该计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一个可选实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。
以上已经描述了本公开的一个或多个实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的一个或多个实施例。在不偏离所说明的至少一个实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在解释实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的一个或多个实施例。

Claims (21)

  1. 一种图像处理方法,包括:
    获取在曝光时间内曝光得到的模糊图像,以及在所述曝光时间内采样得到的事件数据,其中,所述事件数据用于反映所述模糊图像中的像素点的亮度变化;
    根据所述事件数据,确定所述曝光时间内的全局事件特征;
    根据所述模糊图像、所述事件数据和所述全局事件特征,确定所述模糊图像对应的清晰图像。
  2. 根据权利要求1所述的方法,所述曝光时间内包括多个目标时刻;
    所述根据所述事件数据,确定所述曝光时间内的全局事件特征,包括:
    根据第i目标时刻和第i+1目标时刻之间的局部事件数据,确定所述第i目标时刻对应的局部事件特征,其中,i=1,2,...,T-1;
    根据所述多个目标时刻对应的局部事件特征,确定所述全局事件特征。
  3. 根据权利要求2所述的方法,所述根据所述模糊图像、所述事件数据和所述全局事件特征,确定所述模糊图像对应的清晰图像,包括:
    根据所述模糊图像、所述事件数据和所述全局事件特征,确定所述模糊图像在第T目标时刻对应的清晰图像。
  4. 根据权利要求3所述的方法,所述根据所述模糊图像、所述事件数据和所述全局事件特征,确定所述模糊图像在第T目标时刻对应的清晰图像,包括:
    基于运动模糊物理模型,根据所述模糊图像和所述事件数据,确定所述模糊图像在所述第T目标时刻对应的初始清晰图像;
    根据所述模糊图像在所述第T目标时刻对应的初始清晰图像和所述全局事件特征,确定所述模糊图像在所述第T时刻对应的清晰图像。
  5. 根据权利要求3或4所述的方法,所述方法还包括:
    根据所述模糊图像在所述第T目标时刻对应的清晰图像,确定所述模糊图像对应的清晰图像序列。
  6. 根据权利要求5所述的方法,所述根据所述模糊图像在所述第T目标时刻对应的清晰图像,确定所述模糊图像对应的清晰图像序列,包括:
    根据所述模糊图像在所述第i+1目标时刻对应的清晰图像、所述第i目标时刻和所述第i+1目标时刻之间的局部事件数据,以及所述第i目标时刻对应的局部事件特征,确定所述模糊图像在所述第i目标时刻对应的清晰图像,其中,i=1,2,...,T-1;
    根据所述模糊图像在第1至T目标时刻对应的清晰图像,得到所述清晰图像序列。
  7. 根据权利要求6所述的方法,所述根据所述模糊图像在所述第i+1目标时刻对应的清晰图像、所述第i目标时刻和所述第i+1目标时刻之间的局部事件数据,以及所述第i目标时刻对应的局部事件特征,确定所述模糊图像在所述第i目标时刻对应的清晰图像,包括:
    根据所述模糊图像在所述第i+1目标时刻对应的清晰图像,以及所述第i目标时刻和所述第i+1目标时刻之间的局部事件数据,确定所述模糊图像在所述第i目标时刻对应的初始清晰图像;
    对所述第i目标时刻和所述第i+1目标时刻之间的局部事件数据进行滤波处理,确定所述第i目标时刻对应的边界特征图;
    根据所述模糊图像在所述第i目标时刻对应的初始清晰图像,以及所述第i目标时刻对应的边界特征图和局部事件特征,确定所述模糊图像在所述第i目标时刻对应的清晰图像。
  8. 根据权利要求7所述的方法,所述根据所述模糊图像在所述第i+1目标时刻对应的清晰图像,以及所述第i目标时刻和所述第i+1目标时刻之间的局部事件数据,确定所述模糊图像在所述第i目标时刻对应的初始清晰图像,包括:
    基于运动模糊物理模型,根据所述模糊图像在所述第i+1目标时刻对应的清晰图像,以及所述第i目标时刻和所述第i+1目标时刻之间的局部事件数据,确定所述模糊图像在所述第i目标时刻对应的初始清晰图像。
  9. 根据权利要求7所述的方法,所述根据所述模糊图像在所述第i+1目标时刻对应的清晰图像,以及所述第i目标时刻和所述第i+1目标时刻之间的局部事件数据,确定所述模糊图像在所述第i目标时刻对应的初始清晰图像,包括:
    根据所述第i目标时刻和所述第i+1目标时刻之间的局部事件数据,确定所述第i+1目标时刻到所述第i目标时刻的前向光流;
    根据所述模糊图像在所述第i+1目标时刻对应的清晰图像和所述前向光流,确定所述模糊图像在 所述第i目标时刻对应的初始清晰图像。
  10. 一种图像处理装置,包括:
    第一确定模块,用于获取在曝光时间内曝光得到的模糊图像,以及在所述曝光时间内采样得到的事件数据,其中,所述事件数据用于反映所述模糊图像中的像素点的亮度变化;
    第二确定模块,用于根据所述事件数据,确定所述曝光时间内的全局事件特征;
    第三确定模块,用于根据所述模糊图像、所述事件数据和所述全局事件特征,确定所述模糊图像对应的清晰图像。
  11. 根据权利要求10所述的装置,所述曝光时间内包括多个目标时刻;
    所述第二确定模块,包括:
    第一确定子模块,用于根据第i目标时刻和第i+1目标时刻之间的局部事件数据,确定所述第i目标时刻对应的局部事件特征,其中,i=1,2,...,T-1;
    第二确定子模块,用于根据所述多个目标时刻对应的局部事件特征,确定所述全局事件特征。
  12. 根据权利要求11所述的装置,所述第三确定模块,包括:
    第三确定子模块,用于根据所述模糊图像、所述事件数据和所述全局事件特征,确定所述模糊图像在第T目标时刻对应的清晰图像。
  13. 根据权利要求12所述的装置,所述第三确定子模块,包括:
    第一确定单元,用于基于运动模糊物理模型,根据所述模糊图像和所述事件数据,确定所述模糊图像在所述第T目标时刻对应的初始清晰图像;
    第二确定单元,用于根据所述模糊图像在所述第T目标时刻对应的初始清晰图像和所述全局事件特征,确定所述模糊图像在所述第T时刻对应的清晰图像。
  14. 根据权利要求12或13所述的装置,所述第三确定模块还包括:
    第四确定子模块,用于根据所述模糊图像在所述第T目标时刻对应的清晰图像,确定所述模糊图像对应的清晰图像序列。
  15. 根据权利要求14所述的装置,所述第四确定子模块,包括:
    第三确定单元,用于根据所述模糊图像在所述第i+1目标时刻对应的清晰图像、所述第i目标时 刻和所述第i+1目标时刻之间的局部事件数据,以及所述第i目标时刻对应的局部事件特征,确定所述模糊图像在所述第目标时刻对应的清晰图像,其中,i=1,2,...,T-1;
    第四确定单元,用于根据所述模糊图像在第1至T目标时刻对应的清晰图像,得到所述清晰图像序列。
  16. 根据权利要求15所述的装置,所述第三确定单元,包括:
    第一确定子单元,用于根据所述模糊图像在所述第i+1目标时刻对应的清晰图像,以及所述第i目标时刻和所述第i+1目标时刻之间的局部事件数据,确定所述模糊图像在所述第i目标时刻对应的初始清晰图像;
    第二确定子单元,用于对所述第i目标时刻和所述第i+1目标时刻之间的局部事件数据进行滤波处理,确定所述第i目标时刻对应的边界特征图;
    第三确定子单元,用于根据所述模糊图像在所述第i目标时刻对应的初始清晰图像,以及所述第i目标时刻对应的边界特征图和局部事件特征,确定所述模糊图像在所述第i目标时刻对应的清晰图像。
  17. 根据权利要求16所述的装置,所述第一确定子单元具体用于:
    基于运动模糊物理模型,根据所述模糊图像在所述第i+1目标时刻对应的清晰图像,以及所述第i目标时刻和所述第i+1目标时刻之间的局部事件数据,确定所述模糊图像在所述第i目标时刻对应的初始清晰图像。
  18. 根据权利要求16所述的装置,所述第一确定子单元具体用于:
    根据所述第i目标时刻和所述第i+1目标时刻之间的局部事件数据,确定所述第i+1目标时刻到所述第i目标时刻的前向光流;
    根据所述模糊图像在所述第i+1目标时刻对应的清晰图像和所述前向光流,确定所述模糊图像在所述第i目标时刻对应的初始清晰图像。
  19. 一种电子设备,包括:
    处理器;
    用于存储处理器可执行指令的存储器;
    其中,所述处理器被配置为调用所述存储器存储的指令,以执行权利要求1至9中任意一项所述的 方法。
  20. 一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现权利要求1至9中任意一项所述的方法。
  21. 一种计算机程序,包括计算机可读代码,当所述计算机代码在电子设备中运行时,所述电子设备中的处理器执行用于实现权利要求1至9中任一项所述图像处理方法。
PCT/CN2020/100236 2020-03-27 2020-07-03 图像处理方法及装置、电子设备和存储介质 WO2021189704A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
SG11202110306WA SG11202110306WA (en) 2020-03-27 2020-07-03 Image processing method and apparatus, electronic device, and storage medium
US17/489,636 US20220020124A1 (en) 2020-03-27 2021-09-29 Image processing method, image processing device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010232152.XA CN111445414B (zh) 2020-03-27 2020-03-27 图像处理方法及装置、电子设备和存储介质
CN202010232152.X 2020-03-27

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/489,636 Continuation US20220020124A1 (en) 2020-03-27 2021-09-29 Image processing method, image processing device, and storage medium

Publications (1)

Publication Number Publication Date
WO2021189704A1 true WO2021189704A1 (zh) 2021-09-30

Family

ID=71651348

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/100236 WO2021189704A1 (zh) 2020-03-27 2020-07-03 图像处理方法及装置、电子设备和存储介质

Country Status (5)

Country Link
US (1) US20220020124A1 (zh)
CN (1) CN111445414B (zh)
SG (1) SG11202110306WA (zh)
TW (1) TWI769523B (zh)
WO (1) WO2021189704A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112131991B (zh) * 2020-09-15 2024-01-23 厦门大学 一种基于事件相机的数据关联方法
CN113177890B (zh) * 2021-04-27 2023-04-18 深圳市慧鲤科技有限公司 图像处理方法及装置、电子设备和存储介质
CN113537071B (zh) * 2021-07-19 2023-08-11 深圳龙岗智能视听研究院 一种基于事件相机的静态和动态目标检测方法及设备
CN114841870A (zh) * 2022-03-31 2022-08-02 华为技术有限公司 图像处理方法、相关装置和系统
CN117880645A (zh) * 2022-10-10 2024-04-12 华为技术有限公司 一种图像处理的方法、装置、电子设备及存储介质
CN115734088A (zh) * 2022-10-28 2023-03-03 深圳锐视智芯科技有限公司 一种图像果冻效应消除方法及相关装置
CN116012675B (zh) * 2023-02-14 2023-08-11 荣耀终端有限公司 一种模型训练方法、图像处理方法及电子设备

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102509281A (zh) * 2011-11-24 2012-06-20 浙江大学 基于透明度的双图像去平面运动模糊方法
CN102663718A (zh) * 2012-03-19 2012-09-12 清华大学 一种全局不一致图像去模糊的方法及系统
CN106791273A (zh) * 2016-12-07 2017-05-31 重庆大学 一种结合帧间信息的视频盲复原方法
US9749532B1 (en) * 2014-08-12 2017-08-29 Amazon Technologies, Inc. Pixel readout of a charge coupled device having a variable aperture
CN108074222A (zh) * 2017-12-25 2018-05-25 清华大学 基于混合相机系统的高速运动物体去模糊方法及装置
CN108764078A (zh) * 2018-05-15 2018-11-06 上海芯仑光电科技有限公司 一种事件数据流的处理方法及计算设备
CN109922372A (zh) * 2019-02-26 2019-06-21 深圳市商汤科技有限公司 视频数据处理方法及装置、电子设备和存储介质

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100553295C (zh) * 2006-07-07 2009-10-21 奥林巴斯映像株式会社 照相机、照相机的图像处理方法
US9743024B2 (en) * 2015-07-01 2017-08-22 Massachusetts Institute Of Technology Method and apparatus for on-chip per-pixel pseudo-random time coded exposure
CN107610059B (zh) * 2017-08-28 2020-10-16 维沃移动通信有限公司 一种图像处理方法及移动终端

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102509281A (zh) * 2011-11-24 2012-06-20 浙江大学 基于透明度的双图像去平面运动模糊方法
CN102663718A (zh) * 2012-03-19 2012-09-12 清华大学 一种全局不一致图像去模糊的方法及系统
US9749532B1 (en) * 2014-08-12 2017-08-29 Amazon Technologies, Inc. Pixel readout of a charge coupled device having a variable aperture
CN106791273A (zh) * 2016-12-07 2017-05-31 重庆大学 一种结合帧间信息的视频盲复原方法
CN108074222A (zh) * 2017-12-25 2018-05-25 清华大学 基于混合相机系统的高速运动物体去模糊方法及装置
CN108764078A (zh) * 2018-05-15 2018-11-06 上海芯仑光电科技有限公司 一种事件数据流的处理方法及计算设备
CN109922372A (zh) * 2019-02-26 2019-06-21 深圳市商汤科技有限公司 视频数据处理方法及装置、电子设备和存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
PAN LIYUAN; SCHEERLINCK CEDRIC; YU XIN; HARTLEY RICHARD; LIU MIAOMIAO; DAI YUCHAO: "Bringing a Blurry Frame Alive at High Frame-Rate With an Event Camera", 2019 IEEE/CVF CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION (CVPR), IEEE, 15 June 2019 (2019-06-15), pages 6813 - 6822, XP033686421, DOI: 10.1109/CVPR.2019.00698 *

Also Published As

Publication number Publication date
TW202137767A (zh) 2021-10-01
CN111445414A (zh) 2020-07-24
SG11202110306WA (en) 2021-10-28
US20220020124A1 (en) 2022-01-20
CN111445414B (zh) 2023-04-14
TWI769523B (zh) 2022-07-01

Similar Documents

Publication Publication Date Title
WO2021189704A1 (zh) 图像处理方法及装置、电子设备和存储介质
WO2021196401A1 (zh) 图像重建方法及装置、电子设备和存储介质
US20210089799A1 (en) Pedestrian Recognition Method and Apparatus and Storage Medium
TWI706379B (zh) 圖像處理方法及裝置、電子設備和儲存介質
CN109766954B (zh) 一种目标对象处理方法、装置、电子设备及存储介质
TWI767596B (zh) 場景深度和相機運動預測方法、電子設備和電腦可讀儲存介質
TWI773945B (zh) 錨點確定方法、電子設備和儲存介質
WO2020155711A1 (zh) 图像生成方法及装置、电子设备和存储介质
WO2021174687A1 (zh) 去除图像中的反光的方法及装置、电子设备和存储介质
CN110798630B (zh) 图像处理方法及装置、电子设备和存储介质
WO2021169136A1 (zh) 图像处理方法及装置、电子设备和存储介质
KR20210090238A (ko) 비디오 처리 방법 및 장치, 전자 기기, 및 기억 매체
WO2021169132A1 (zh) 图像处理方法及装置、电子设备和存储介质
WO2022227394A1 (zh) 图像处理方法、装置、设备、存储介质及程序
WO2022021932A1 (zh) 降噪方法及装置、电子设备、存储介质和计算机程序产品
CN111523346B (zh) 图像识别方法及装置、电子设备和存储介质
CN112085097A (zh) 图像处理方法及装置、电子设备和存储介质
CN111680646A (zh) 动作检测方法及装置、电子设备和存储介质
WO2022141969A1 (zh) 图像分割方法及装置、电子设备、存储介质和程序
KR20210054522A (ko) 얼굴 인식 방법 및 장치, 전자 기기 및 저장 매체
CN110121115B (zh) 精彩视频片段的确定方法及装置
CN113506324B (zh) 图像处理方法及装置、电子设备和存储介质
CN113506325B (zh) 图像处理方法及装置、电子设备和存储介质
CN113506321A (zh) 图像处理方法及装置、电子设备和存储介质
CN112330721A (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: 20927016

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20927016

Country of ref document: EP

Kind code of ref document: A1