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

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

Info

Publication number
WO2020034769A1
WO2020034769A1 PCT/CN2019/093035 CN2019093035W WO2020034769A1 WO 2020034769 A1 WO2020034769 A1 WO 2020034769A1 CN 2019093035 W CN2019093035 W CN 2019093035W WO 2020034769 A1 WO2020034769 A1 WO 2020034769A1
Authority
WO
WIPO (PCT)
Prior art keywords
exposure
image
long
images
position change
Prior art date
Application number
PCT/CN2019/093035
Other languages
English (en)
French (fr)
Inventor
孙剑波
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2020034769A1 publication Critical patent/WO2020034769A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/95Computational photography systems, e.g. light-field imaging systems
    • H04N23/951Computational photography systems, e.g. light-field imaging systems by using two or more images to influence resolution, frame rate or aspect ratio
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • H04N23/681Motion detection
    • H04N23/6811Motion detection based on the image signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • H04N23/682Vibration or motion blur correction

Definitions

  • the embodiments of the present application relate to the field of image processing technologies, for example, to an image processing method and device, a storage medium, and an electronic device.
  • long-exposure shooting has attracted users' attention because of its advantages such as traffic at night and light painting effects.
  • Long-exposure shooting can make the dark scenes clearer.
  • long-exposure shooting can be used to shoot panoramic images, especially night scenes.
  • the shooting equipment commonly used by users is generally an electronic device such as a mobile phone or watch, it is often necessary for the user to hold an image by hand or based on a handheld stand. Therefore, in the process of shooting a long-exposure image, there is generally an image quality problem caused by user shake , Such as the image is not clear, there are situations such as blur.
  • the embodiments of the present application provide an image processing method, an apparatus, a storage medium, and an electronic device, so as to optimize the image quality of a long-exposure image.
  • an embodiment of the present application provides an image processing method, including:
  • At least one long exposure image captured by the first camera on the subject and at least two short exposure images captured by the second camera on the subject within the exposure time of each long exposure image are obtained, where each long exposure image And the at least two short exposure images acquired during its exposure time are a group of exposure images;
  • an image processing apparatus including:
  • the image acquisition module is configured to acquire at least one long exposure image taken by the first camera on the subject and at least two short exposure images taken by the second camera on the subject within the exposure time of each long exposure image, wherein , Each long exposure image and the at least two short exposure images acquired during its exposure time are a group of exposure images;
  • a position change parameter determining module configured to determine a position change parameter corresponding to a long exposure image based on a position of the photographic subject in at least two short exposure images in each group of exposure images;
  • the image processing module is configured to process the at least one long exposure image according to a position change parameter of each long exposure image to generate a processed image.
  • an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored.
  • the program is executed by a processor, the image processing method according to the embodiment of the present application is implemented.
  • an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor.
  • the processor executes the computer program, the processor is implemented as in the present application.
  • the image processing method according to the embodiment.
  • the image processing method provided in the embodiment of the present application obtains at least one long exposure image taken by the first camera on the subject, and at least two photographed by the second camera on the subject within the exposure time of each long exposure image.
  • a short-exposure image wherein each long-exposure image and the at least two short-exposure images acquired during its exposure time are a group of exposure images; based on at least two short-exposures of the subject within each group of exposure images
  • the position in the image determines a position change parameter corresponding to the long exposure image; and processing the at least one long exposure image according to the position change parameter of each long exposure image to generate a processed image.
  • the two cameras are used to simultaneously acquire the long-exposure image and at least two short-exposure images corresponding to each long-exposure image, thereby avoiding the influence of the process of acquiring the short-exposure image on the long-exposure image, and maintaining the long-exposure image On the basis of logic, the shooting quality of long exposure images is improved.
  • FIG. 1 is a schematic flowchart of an image processing method according to an embodiment of the present application
  • FIG. 2 is a schematic diagram of exposure times of two cameras during shooting according to an embodiment of the present application
  • FIG. 3 is a schematic flowchart of another image processing method according to an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of another image processing method according to an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of another image processing method according to an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of another electronic device according to an embodiment of the present application.
  • FIG. 1 is a schematic flowchart of an image processing method according to an embodiment of the present application.
  • the method may be executed by an image processing apparatus, where the apparatus may be implemented by software and / or hardware, and may generally be integrated in an electronic device. As shown in FIG. 1, the method includes steps 101, 102 and 103.
  • step 101 at least one long exposure image captured by the first camera on the subject and at least two short exposure images captured by the second camera on the subject within the exposure time of each long exposure image are obtained.
  • each long exposure image and the at least two short exposure images acquired during its exposure time are a group of exposure images.
  • the electronic device in the embodiment of the present application may include a smart device with a shooting function, such as a mobile phone and a tablet computer.
  • long-exposure photography is a kind of photography technology that opens the shutter for a long time.
  • Long-exposure images are images acquired based on long-exposure photography technology based on longer exposure times. Accordingly, short-exposure images are obtained by cameras based on shorter exposure times.
  • the exposure time of the long-exposure image may be 250 milliseconds
  • the exposure time of the short-exposure image may be between 1/15 second and 1/60 second, such as 30 ms.
  • Long-exposure photography is often used for night shooting, light trail shooting, or water shadow shooting. It can take darker scenes more clearly, and it can also shoot dreamlike pictures, such as night scenes of waterfalls and city highways.
  • a long exposure image and a short exposure image are obtained simultaneously by a device having at least two cameras, for example, the device may have a dual camera.
  • the first camera takes at least one long exposure image of the subject
  • the second camera takes at least two short exposure images of the subject within the exposure time of each long exposure image.
  • the first camera and the second camera are disposed on the same side of the device, and the distance between the two cameras is small, and the same subject can be photographed.
  • the first camera and the second camera may be started at the same time.
  • FIG. 2 is a schematic diagram of exposure times of two cameras provided in the embodiment of the present application during shooting. In Figure 2, the first camera and the second camera are started at the same time.
  • the first camera acquires a long-exposure image through a long exposure in the time period of 0-t3.
  • the second camera can be in two time periods of 0-t1 and t2-t3. Perform a short exposure to obtain two short-exposure images. It should be noted that FIG. 2 is only an example.
  • the number of short-exposure images acquired by the second camera may be more than two, and the number of short-exposure images may be determined according to the number set by the user.
  • the startup time of the second camera may be the same as the startup time of the first camera, or the startup time of the second camera may be later than the startup time of the first camera, and the exposure end time of the last short exposure image may be the same as that of the long exposure.
  • the exposure end time of the image is the same, or the exposure end time of the last short exposure image is earlier than the exposure end time of the long exposure image.
  • the second camera acquires at least two short-exposure images that satisfy the following conditions: the sum of the short-exposure time and the exposure interval is less than or equal to the corresponding long-exposure time.
  • each long exposure image corresponds to at least two short exposure images.
  • each long-exposure image and at least two short-exposure images acquired during its exposure time are a set of exposure images, so that the long-exposure image and the short-exposure image acquired within the same time period form a corresponding relationship so that Subsequent processing is performed on the long exposure image based on the short exposure image in the same group of exposure images.
  • the long exposure image and the short exposure image are acquired by the two cameras simultaneously, which avoids the situation that a camera can only capture the long exposure image or the short exposure image at the same time, resulting in a waste of time.
  • the two cameras do not interfere with each other, that is, The acquisition of short-exposure images does not affect the acquisition of long-exposure images.
  • the acquisition time and number of acquisitions of long-exposure images can be determined according to user needs. There is no need to consider setting the acquisition time of short-exposure images in the long-exposure image acquisition interval.
  • at least two long-exposure images are acquired continuously, and at least two short-exposure images are acquired within the exposure time of each long-exposure image.
  • the end time of the exposure time of the previous long exposure image is used as the start time of the exposure time of the next long exposure image, that is, multiple long exposure images can be continuously obtained without interval, and at the same time, in each During the acquisition of the long-exposure image, at least two short-exposure images are acquired. It should be noted that the image captured by a single camera is not fixed to a long-exposure image or a short-exposure image, and may be interchanged with another camera.
  • the sum of the exposure interval and the short exposure time of the at least two short exposure images is equal to the corresponding long exposure time.
  • the exposure start time of acquiring the first short exposure image is the same as the exposure start time of the long exposure image
  • the exposure end time of the last short exposure image is the same as the exposure end time of the long exposure image
  • the sum of the exposure interval and the short exposure time of at least two short exposure images can be equal to the long exposure time.
  • the acquisition time span of the at least two short exposure images is the same as that of the long exposure image.
  • the at least two short exposure images mentioned above The position change parameters of the long exposure image during the entire exposure time can be accurately determined, and when the span time of at least two short exposure images is shorter than that of the long exposure image, there is a problem of inaccurate determination of the position change parameters caused by missing partial exposure time.
  • Obtaining at least two short-exposure images within the exposure time of each long-exposure image includes: obtaining at least two short-exposure images at the same time interval within the exposure time of each long-exposure image.
  • the time interval between short-exposure images can be determined by uniformly dividing the long-exposure time according to the number of short-exposure images. For example, the long-exposure time is 250ms and the short-exposure time is 30ms. If the number of short-exposure images is 2, The time interval is 190ms. If the number of short-exposure images is 3, there are two time intervals, which are 80ms, and so on.
  • At least two short-exposure images are acquired through the same time interval, so that the short-exposure images are uniformly distributed over the long exposure time, to avoid inaccuracies caused by any time interval being too long, and the position change parameter of each time interval can be accurately determined.
  • a position change parameter corresponding to the long-exposure image is determined based on the position of the photographic subject in at least two short-exposure images within each group of exposure images.
  • the position change parameter of the long-exposure image is used to indicate a change in the position of the subject in at least two short-exposure images, that is, the position of the photographic device during the exposure time when the subject is fixed.
  • the spatial position change in time can be formed due to the shake of the photographing device.
  • the photographing device is a handheld device such as a mobile phone
  • determining a position change parameter of the photographic subject in each long-exposure image based on a position of the photographic subject in at least two short-exposure images within each group of exposure images includes: determining the photographing Position information of the subject in at least two short-exposure images in each group of exposure images; according to the photographing sequence of at least two short-exposure images in each group of exposure images, determining the change parameter of the position information of the subject in adjacent short-exposure images Determining a position change parameter of the photographic subject in each long exposure image according to a change parameter of the photographic subject position information in the adjacent short exposure images.
  • the position change parameter includes a horizontal change parameter and a vertical change parameter.
  • the subject or the same part of the subject is determined, and the position information of the same part of the subject or the subject in the at least two short-exposure images is determined in the image.
  • the position information may be, for example, a coordinate position, and a position change parameter corresponding to the long exposure image is determined according to the position information difference.
  • the horizontal coordinate difference of the same object may be determined as a horizontal change parameter
  • the vertical coordinate difference of the same object may be determined as vertical. Change parameters.
  • the sub-position change parameters between two adjacent short-exposure images may be determined in sequence, and the position change of the long-exposure image may be determined according to the sub-position change parameters of adjacent short-exposure images.
  • the parameter may be, for example, determining the sum of the absolute values of the sub-position change parameters of adjacent short-exposure images as the position change parameters of the long-exposure image.
  • Multiple sub-position change parameters can determine the movement trajectory change caused by user shake, which is helpful for more accurate correction of long exposure images.
  • step 103 the at least one long exposure image is processed according to the position change parameter of each long exposure image to generate a processed image.
  • the position change parameter of each long-exposure image can represent the image instruction of the long-exposure image.
  • the position change parameter can be used to determine the clarity of the long exposure image, and the long exposure image can be filtered, for example, the long exposure image with the smallest position change parameter is selected as the processed image; or, multiple long images can be used.
  • the exposure image or the short exposure image corresponding to each long exposure image eliminates the jitter existing in the image acquisition process, for example, by merging multiple long exposure images, or merging between a long exposure image and a corresponding short exposure image, etc.
  • the image merge can be a mean merge or a weighted merge.
  • the image processing method provided in the embodiment of the present application obtains at least one long exposure image taken by the first camera on the subject, and at least two photographed by the second camera on the subject within the exposure time of each long exposure image.
  • a short-exposure image wherein each long-exposure image and the at least two short-exposure images acquired during its exposure time are a group of exposure images; based on at least two short-exposures of the subject within each group of exposure images
  • the position in the image determines a position change parameter corresponding to the long exposure image; and processing the at least one long exposure image according to the position change parameter of each long exposure image to generate a processed image.
  • the two cameras are used to simultaneously acquire the long-exposure image and at least two short-exposure images corresponding to each long-exposure image, thereby avoiding the influence of the process of acquiring the short-exposure image on the long-exposure image, and maintaining the long-exposure image shooting.
  • the shooting quality of long exposure images is improved.
  • FIG. 3 is a schematic flowchart of another image processing method according to an embodiment of the present application. Referring to FIG. 3, the method in this embodiment includes the following steps 301 to 304.
  • step 301 at least one long exposure image captured by the first camera on the subject and at least two short exposure images captured by the second camera on the subject within the exposure time of each long exposure image are acquired.
  • each long exposure image and the at least two short exposure images acquired during its exposure time are a group of exposure images.
  • a position change parameter corresponding to the long exposure image is determined based on the position of the photographic subject in at least two short exposure images in each group of exposure images.
  • step 303 filtering is performed on a plurality of long-exposure images according to a filtering condition of the position change parameter.
  • the number of long-exposure images is greater than one, and all are obtained by shooting the same subject.
  • a position change parameter of each long exposure image is determined, and the position change parameter is used to represent the jitter existing in the long exposure image during the shooting process, that is, the blur state of the long exposure image.
  • the larger the position change parameter the more the jitter significantly, the more blurred the long exposure image.
  • the filter condition of the position change parameter is that the position change parameter is less than the first position change threshold.
  • the position change parameter filtering condition may also be a preset sorting range in the order of the position change parameter value size. For example, the position change parameters of multiple long-exposure images are sorted according to the value from small to large, and the long-exposure images are selected from the first position according to the number of images. For example, if the number of filtered images is 1, the first position is selected, that is, The long exposure image corresponding to the smallest position change parameter; if the number of filtered images is 2, the long exposure image corresponding to the first and second position change parameters is selected, and so on.
  • the position change parameter screening conditions long-exposure images with better quality among multiple long-exposure images can be sequenced, so as to avoid blurred images during subsequent processing and improve the image quality of the final processed images.
  • step 304 the filtered long-exposure images are combined to generate a processed image.
  • merging the corresponding pixel points of the filtered long exposure image may be, for example, determining an average pixel value of the corresponding pixel point in the filtered long exposure image, and determining an optimized image according to the obtained average pixel value.
  • the corresponding pixels of the screened long exposure image may also be weighted and combined, where the smaller the position change parameter value is, the larger the weight value is, and the larger the position change parameter value is, the longer the exposure image is.
  • the smaller the weight For example, the weight value of the long-exposure image is inversely proportional to its own position change parameter, the weighted average of the pixel values of the corresponding pixel points in the filtered long-exposure image is determined, and the optimized image is determined according to the obtained weighted average of the pixel values.
  • multiple groups of exposure images captured by the two cameras may be deleted, and only the processed images are saved, so that multiple groups of exposure images do not occupy a large amount of memory resources.
  • the image processing method provided in the embodiment of the present application reduces the image blur caused by the camera shake during the shooting process by merging the images of multiple clearer long-exposure images, and obtains an optimized image to improve the sharpness of the long-exposure image.
  • the method before filtering the multiple long-exposure images according to the filter condition of the position change parameter, the method further includes: if the position change parameter of any long exposure image is less than or equal to the second position change threshold, The processing of the plurality of long-exposure images is canceled, and the long-exposure image that is less than or equal to the second position change threshold is used as the processed image.
  • the second position change threshold is a position change parameter of a long exposure image taken when the photographing device has no shake or there is very little shake, and the long change image whose position change parameter is less than or equal to the second position change threshold has a higher image. Emotional level, no need to merge with other images and other processing, reducing the image processing process.
  • the second position change threshold is smaller than the first position change threshold, and may be 0, for example.
  • a position change parameter of the long exposure image in the group of exposure images is determined, and if the position change parameter of the long exposure image is less than or equal to a second position change threshold, it may be cancelled Multiple shots of the same subject reduce memory usage and simplify image processing.
  • FIG. 4 is a schematic flowchart of another image processing method according to an embodiment of the present application. As shown in FIG. 4, the method in this embodiment includes the following steps 401, 402, and 403.
  • step 401 at least one long exposure image captured by the first camera on the subject and at least two short exposure images captured by the second camera on the subject within the exposure time of each long exposure image are obtained.
  • each long exposure image and the at least two short exposure images acquired during its exposure time are a group of exposure images.
  • a position change parameter corresponding to the long exposure image is determined based on the position of the photographic subject in at least two short exposure images in each group of exposure images.
  • step 403 if the position change parameter of any of the long exposure images is greater than the third position change threshold, the long exposure image greater than the third position change threshold is processed based on the corresponding at least two short exposure images to generate a process After the image.
  • the position change parameter is greater than or equal to the third position change threshold, which indicates that the long-exposure image is blurred, the image quality is poor, and the image is unclear.
  • the third position change threshold may be the same as or different from the first position change threshold. It should be noted that, since the short or long exposure images are partly or completely clear when the short exposure images are taken, they can be used to optimize the long exposure images of the same group to improve the image quality of the long exposure images.
  • processing the long exposure image larger than the third position change threshold based on the corresponding at least two short exposure images to generate a processed image includes: in a group of exposure images, The long-exposure image of the position change threshold is combined with the corresponding one or more short-exposure images to generate a processed image and generate a processed image.
  • one or more clear short-exposure images are filtered out of at least two short-exposure images corresponding to the long-exposure image for merging with the long-exposure image.
  • processing the long exposure image that is greater than the third position change threshold based on the corresponding at least two short exposure images to generate a processed image includes: determining the long exposure image that is greater than the third position change threshold To-be-processed area; determining an image area corresponding to the to-be-processed area in the corresponding one or more short-exposure images, and comparing the corresponding area in the short-exposure image with the to-be-processed long-exposure image
  • the regions are merged to generate a processed image, wherein the region to be processed and the corresponding image region in the short-exposure image include the same shooting content.
  • the to-be-processed area of the long-exposure image is a blurred area of the image.
  • the long-exposure image can be divided into blocks, the sharpness of each image is determined, and the image block whose blur is sharp is determined as the area to be processed.
  • the position of the corresponding region in the short-exposure image is the same as the position of the region to be processed in the long-exposure image, where the short-exposure image and the long-exposure image have the same size.
  • one or more clear image areas are filtered out from the corresponding areas of the multiple short-exposure images for processing the to-be-processed areas of the long-exposure image.
  • the processing of the to-be-processed area of the long-exposure image may be averaging or weighted combining the corresponding area of the short-exposure image and the to-be-processed area of the long-exposure image; it may also be the correspondence of the short-exposure image with the highest definition
  • the area replaces the area to be processed for the long exposure image.
  • the brightness of the short exposure image may also be adjusted to match the brightness of the long exposure image.
  • the processed long-exposure image when there are multiple long-exposure images obtained by shooting the same subject, after processing the long-exposure image that is greater than or equal to the third position change threshold, the processed long-exposure image may be further processed. And the long exposure images whose position change parameter is smaller than the first position change threshold are merged to realize further optimization of the long exposure images.
  • the long exposure image is based on the acquired short exposure image. Processing improves the sharpness of long-exposure images.
  • FIG. 5 is a schematic flowchart of another image processing method according to an embodiment of the present application. As shown in FIG. 5, the method in this embodiment includes the following steps 501 to 506.
  • step 501 at least two long-exposure images taken by the first camera on the subject and at least two short-exposure images taken by the second camera on the subject within the exposure time of each long-exposure image are obtained, where:
  • Each long exposure image and the at least two short exposure images acquired during its exposure time are a set of exposure images.
  • the at least two long-exposure images are taken in a panorama stitching mode by using a mobile device to photograph the subject, and the panorama stitching image can be obtained by image stitching.
  • the panoramic stitching mode multiple long-exposure images are continuously acquired during the continuous and stable movement of the photographing device, and the contents of adjacent long-exposure images are continuous with each other. By stitching the adjacent long-exposure images, it can be included Consecutive full information panoramic image.
  • a position change parameter corresponding to the long exposure image is determined based on the position of the photographic subject in at least two short exposure images in each group of exposure images.
  • step 503 if the position change parameter of any of the long exposure images is greater than the third position change threshold, the long exposure image greater than the third position change threshold is processed based on the corresponding at least two short exposure images to generate a process After the image.
  • step 503 may be omitted and step 504 may be performed. If there are one or more long-exposure images whose position change parameter is greater than the third position change threshold, the long-exposure image whose position change parameter is greater than the third position change threshold is processed by performing step 503.
  • step 504 according to the stitching order of the processed long exposure images, adjacent long exposure images are determined for image stitching.
  • the stitching sequence of the long exposure images is determined by the continuity of the image content. If at least two long exposure images are acquired according to a fixed moving sequence, the shooting sequence of the long exposure images may be determined as the stitching sequence of the long exposure images. Record the shooting time of each long exposure image, for example, it can be the start exposure time or the end exposure time. If the shooting time of the long-exposure image cannot be determined or the photographing device does not move and shoot in the same order, the stitching order is determined by analyzing the position information of the photographic subject in the long-exposure image. Exemplarily, the positions of the subject in the three long-exposure images are divided into left, middle, and right, and it is determined that the stitching order of the three long-exposure images is 1, 2, and 3, which are adjacent in order.
  • the long exposure images adjacent to each other can be determined according to the stitching order. There are overlapping image areas or continuous image areas in the adjacent long exposure images.
  • step 505 the splicing position of the adjacent long-exposure image is adjusted according to the position information of the photographic subject in the adjacent long-exposure image.
  • the position information of the subject may be represented by the position information of the center point of the subject, or the position information of the subject may be represented by the position information of any fixed part of the subject.
  • the position information of the subject can be measured by the position of the nose of the subject.
  • the position information of the subject can be measured by the position of a fixed object in the landscape.
  • the fixed object can be a building or a tree.
  • adjusting the stitching position of the adjacent long exposure image according to the adjacent short exposure image corresponding to the adjacent long exposure image includes: according to the position of the photographic subject in the adjacent long exposure image Information to determine the position difference of the subject in the adjacent long exposure image; and adjust the stitching position of the adjacent long exposure image according to the position difference of the subject in the adjacent long exposure image to eliminate the The position difference of the subject is described.
  • the position information of the photographic subject may be represented by coordinates
  • the positional difference of the photographic subject in the adjacent long exposure image may be the coordinate difference of the photographic subject in the adjacent long exposure image.
  • the positional difference includes the horizontal position difference and the vertical position. Position difference.
  • adjust any one of the long exposure images in the above adjacent long exposure image according to the position difference for example, adjust the distance corresponding to the position difference up or down to eliminate the adjacent
  • the position of the subject in the long-exposure image is different to avoid misalignment of the image during image stitching.
  • any long-exposure image is adjusted so that the same object in the stitched image has no misalignment continuously.
  • the horizontal position difference in the position difference is used to eliminate repeated image areas in adjacent long-exposure images
  • the vertical position difference in the position difference is used to eliminate up-and-down dislocations in adjacent long-exposure images.
  • step 506 stitching processing is performed on the adjacent long exposure images according to the adjusted stitching position to generate a stitched image.
  • the long exposure image is a night scene long exposure image
  • the processed image obtained by image stitching is a night scene panorama image.
  • a long exposure shooting technology must be adopted when acquiring a night scene image, and when the night scene long exposure image is used to stitch the panoramic image, the adjacent night scene long exposure images need to be continuous without intervals.
  • a long exposure image of a night scene is continuously acquired by the first camera of the device, and a short exposure image corresponding to each long exposure image of the night scene is obtained by the second camera. Based on the short exposure, the long exposure image of the continuous night scene is not affected. The image stitches the night scene long exposure image.
  • two or more night scene long exposure images may be acquired at one location, and then two or more night scene long exposure images may be acquired at the next location, and multiples may be sequentially acquired.
  • Multiple night scene long exposure images in consecutive positions.
  • a night scene long exposure image with the smallest position change parameter is filtered according to its position change parameter, and is used to stitch the panoramic image.
  • each long-exposure image corresponds to multiple short-exposure images, which can accurately determine the true position change parameter of each long-exposure image, and then accurately screen out a long-exposure image with the smallest position change parameter. Therefore, the stitching of panoramic images The effect is better.
  • the image processing method provided in the embodiment of the present application processes at least two captured long exposure images through the position change parameters of each long exposure image to obtain a long exposure image with high definition, and according to the adjacent length in the stitching order
  • the position difference of the exposed images adjusts the splicing position of adjacent long exposure images to avoid the problem of image stitching misalignment caused by jitter between adjacent long exposure images, and improves the image quality of the stitched images.
  • FIG. 6 is a structural block diagram of an image processing apparatus according to an embodiment of the present application.
  • the apparatus may be implemented by software and / or hardware, and is generally integrated in an electronic device.
  • the long exposure image may be optimized by executing an image processing method.
  • the device includes an image acquisition module 601, a position change parameter determination module 602, and an image processing module 603.
  • the image acquisition module 601 is configured to acquire at least one long exposure image captured by the first camera on the subject and at least two short exposure images captured by the second camera on the subject within the exposure time of each long exposure image, wherein, each long exposure image and the at least two short exposure images acquired during its exposure time are a group of exposure images.
  • the position change parameter determining module 602 is configured to determine a position change parameter corresponding to a long exposure image based on the position of the photographic subject in at least two short exposure images in each group of exposure images.
  • the image processing module 603 is configured to process the at least one long exposure image according to the position change parameter of each long exposure image to generate a processed image.
  • the image processing device implementeds synchronous acquisition of a long-exposure image and at least two short-exposure images corresponding to each long-exposure image based on two cameras, thereby avoiding the influence of the process of acquiring the short-exposure image on the long-exposure image.
  • the corresponding short-exposure image is obtained, the long-exposure image is optimized, and the shooting quality of the long-exposure image is improved.
  • the position change parameter determination module 602 is configured to determine position information of the photographic subject in at least two short exposure images in each group of exposure images;
  • a change parameter of the position of the photographic subject in each long exposure image is determined according to a change parameter of the position information of the photographic subject in the adjacent short exposure images.
  • the number of the long-exposure images is greater than 1, and the image processing module 603 includes: an image filtering unit and a first image processing unit.
  • An image filtering unit configured to perform filtering on multiple long-exposure images according to a filtering condition of a position change parameter
  • the first image processing unit is configured to combine the screened long-exposure images to generate a processed image.
  • condition for filtering the position change parameter is that the position change parameter is less than a first position change threshold
  • the filtering condition of the position change parameter is a preset sorting range in the order of the value of the position change parameter.
  • the method further includes a second image processing unit.
  • the second image processing unit before filtering among multiple long-exposure images according to the filter condition of the position-change parameter, if there is a position-change parameter of any long-exposure image that is less than or equal to the second position-change threshold, canceling the multiple-exposure image
  • a long-exposure image that is less than or equal to the second position change threshold is used as the processed image.
  • the image processing module 603 is configured to:
  • the long-exposure image greater than the third position change threshold is processed based on the corresponding at least two short exposure images to generate a processed image.
  • the image processing module 603 includes a third image processing unit and a fourth image processing unit.
  • a third image processing unit configured to combine, in a group of exposure images, the long exposure image that is greater than the third position change threshold value with the corresponding one or more short exposure images to generate a processed image; or,
  • a fourth image processing unit configured to determine a region to be processed of the long-exposure image larger than a third position change threshold; and to determine an image corresponding to the region to be processed among the corresponding one or more short-exposure images Region, combining the corresponding region in the short-exposure image with the region to be processed in the long-exposure image to generate a processed image, where the region to be processed and the corresponding image region in the short-exposure image contain the same Shooting content.
  • At least two long-exposure images are at least two long-exposure images taken by a mobile device in a panoramic stitching mode
  • the method further includes a stitching order determination module, a stitching position adjustment module, and image stitching. Module.
  • the stitching order determination module is configured to determine an adjacent long exposure image for image stitching according to the stitching order of the processed long exposure image after processing the long exposure image whose position change parameter is greater than the third position change threshold;
  • a splicing position adjustment module configured to adjust a splicing position of the adjacent long-exposure image according to position information of a photographic subject in the adjacent long-exposure image
  • the image stitching module is configured to perform stitching processing on the adjacent long exposure images according to the adjusted stitching position to generate a stitched image.
  • the stitching order determination module is set as:
  • the shooting timing of the long-exposure image is determined as a stitching order of the long-exposure image; or, the stitching order of the long-exposure image is determined according to the position information of the shooting object in the at least two long-exposure images.
  • the splicing position adjustment module is configured as:
  • An embodiment of the present application further provides a storage medium containing computer-executable instructions, where the computer-executable instructions are used to execute an image processing method when executed by a computer processor, the method includes:
  • At least one long exposure image captured by the first camera on the subject and at least two short exposure images captured by the second camera on the subject within the exposure time of each long exposure image are obtained, where each long exposure image And the at least two short exposure images acquired during its exposure time are a group of exposure images;
  • Storage medium any type of memory device or storage device.
  • the term “storage medium” is intended to include: installation media such as CD-ROM, floppy disks, or magnetic tape devices; computer system memory or random access memory such as DRAM, DDRRAM, SRAM, EDORAM, Rambus RAM, etc .; non- Volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements, etc.
  • the storage medium may further include other types of memory or a combination thereof.
  • the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network such as the Internet.
  • the second computer system may provide program instructions to the first computer for execution.
  • storage medium may include two or more storage media that may reside in different locations, such as in different computer systems connected through a network.
  • the storage medium may store program instructions (for example, embodied as a computer program) executable by one or more processors.
  • a storage medium containing computer-executable instructions provided in the embodiments of the present application is not limited to the image processing operations described above, and may also be executed in the image processing method provided by any embodiment of the present application. Related operations.
  • FIG. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • the electronic device 700 may include: a memory 701, a processor 702, and a computer program stored on the memory 701 and executable on the processor 702. When the processor 702 executes the computer program, the image according to the embodiment of the present application is implemented. Approach.
  • the electronic device provided in the embodiment of the present application realizes the simultaneous acquisition of the long exposure image and at least two short exposure images corresponding to each long exposure image, avoiding the influence of the process of acquiring the short exposure image on the long exposure image, and maintaining the shooting of the long exposure image Based on the logic, the corresponding short-exposure image is obtained, the long-exposure image is optimized, and the shooting quality of the long-exposure image is improved.
  • FIG. 8 is a schematic structural diagram of another electronic device according to an embodiment of the present application.
  • the electronic device may include: a housing (not shown in the figure), a memory 801, a central processing unit (CPU) 802 (also referred to as a processor, hereinafter referred to as a CPU), and a circuit board (not shown in the figure) And power circuit (not shown in the figure).
  • CPU central processing unit
  • FIG. 8 is a schematic structural diagram of another electronic device according to an embodiment of the present application.
  • the electronic device may include: a housing (not shown in the figure), a memory 801, a central processing unit (CPU) 802 (also referred to as a processor, hereinafter referred to as a CPU), and a circuit board (not shown in the figure) And power circuit (not shown in the figure).
  • CPU central processing unit
  • the circuit board is disposed in a space surrounded by the housing; the CPU 802 and the memory 801 are disposed on the circuit board; and the power supply circuit is configured to supply power to each circuit or device of the electronic device
  • the memory 801 is configured to store executable program code; the CPU 802 runs a computer program corresponding to the executable program code by reading the executable program code stored in the memory 801 to implement the following steps:
  • At least one long exposure image captured by the first camera on the subject and at least two short exposure images captured by the second camera on the subject within the exposure time of each long exposure image are obtained, where each long exposure image And the at least two short exposure images acquired during its exposure time are a group of exposure images;
  • the electronic device further includes a peripheral interface 803, a radio frequency (RF) circuit 805, an audio circuit 806, a speaker 811, a power management chip 808, an input / output (I / O) subsystem 809, and other input / control A device 810, a touch screen 812, other input / control devices 810, and an external port 804. These components communicate through one or more communication buses or signal lines 807.
  • RF radio frequency
  • the illustrated electronic device 800 is merely an example of an electronic device, and the electronic device 800 may have more or fewer components than those shown in the figure, and two or more components may be combined. Or it can have different component configurations.
  • the various components shown in the figures can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.
  • the electronic device for image processing operations provided in this embodiment is described in detail below.
  • the electronic device is a mobile phone as an example.
  • Memory 801 which can be accessed by CPU 802, peripheral interface 803, etc.
  • the memory 801 can include high-speed random access memory, and can also include non-volatile memory, such as one or more disk storage devices, flash memory devices , Or other volatile solid-state storage devices.
  • the I / O subsystem 809 which can connect input / output peripherals on the device, such as touch screen 812 and other input / control devices 810, to peripheral interface 803.
  • the I / O subsystem 809 may include a display controller 8091 and one or more input controllers 8092 for controlling other input / control devices 810.
  • one or more input controllers 8092 receive electrical signals from or send electrical signals to other input / control devices 810, and other input / control devices 810 may include physical buttons (press buttons, rocker buttons, etc.) ), Dial, slide switch, joystick, click wheel.
  • the input controller 8092 can be connected to any of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
  • a touch screen 812 which is an input interface and an output interface between the user's electronic device and the user, and displays a visual output to the user.
  • the visual output may include graphics, text, icons, videos, and the like.
  • the display controller 8091 in the I / O subsystem 809 receives electrical signals from the touch screen 812 or sends electrical signals to the touch screen 812.
  • the touch screen 812 detects a contact on the touch screen, and the display controller 8091 converts the detected contact into interaction with a user interface object displayed on the touch screen 812, that is, realizes human-computer interaction.
  • the user interface object displayed on the touch screen 812 may be running Icons for games, icons connected to the appropriate network, etc. It is worth noting that the device may also include a light mouse, which is a touch-sensitive surface that does not display visual output, or an extension of the touch-sensitive surface formed by a touch screen.
  • the RF circuit 805 is mainly configured to establish communication between a mobile phone and a wireless network (that is, a network side), and realize data reception and transmission of the mobile phone and the wireless network. For example, send and receive text messages, e-mail, and so on. Specifically, the RF circuit 805 receives and sends an RF signal.
  • the RF signal is also referred to as an electromagnetic signal.
  • the RF circuit 805 converts an electric signal into an electromagnetic signal or converts an electromagnetic signal into an electric signal, and communicates with the communication network and other devices through the electromagnetic signal. For communication.
  • RF circuit 805 may include known circuits for performing these functions, including but not limited to antenna systems, RF transceivers, one or more amplifiers, tuners, one or more oscillators, digital signal processors, codec (COder-DECoder, CODEC) chipset, Subscriber Identity Module (SIM), and so on.
  • codec COder-DECoder
  • CODEC CODEC
  • SIM Subscriber Identity Module
  • the audio circuit 806 is mainly configured to receive audio data from the peripheral interface 803, convert the audio data into an electrical signal, and send the electrical signal to the speaker 811.
  • the speaker 811 is configured to restore a voice signal received by the mobile phone from the wireless network through the RF circuit 805 to a sound and play the sound to a user.
  • the power management chip 808 is configured to provide power and power management for the hardware connected to the CPU 802, the I / O subsystem, and peripheral interfaces.
  • the image processing apparatus, storage medium, and electronic device provided in the foregoing embodiments can execute the image processing method provided by any embodiment of the present application, and have corresponding function modules and beneficial effects for executing the method.
  • image processing method provided in any embodiment of the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Studio Devices (AREA)

Abstract

公开了图像处理方法、装置、存储介质及电子设备。其中方法包括:获取第一摄像头对拍摄对象拍摄的至少一张长曝光图像,以及第二摄像头在每张长曝光图像的曝光时间内分别对拍摄对象拍摄的至少两张短曝光图像,其中,每张长曝光图像和在其曝光时间内获取的至少两张短曝光图像为一组曝光图像;基于拍摄对象在每组曝光图像内的至少两张短曝光图像中的位置,确定对应长曝光图像的位置变化参数;根据每张长曝光图像的位置变化参数对至少一张长曝光图像进行处理,生成处理后的图像。

Description

图像处理方法以及装置、存储介质及电子设备
本申请要求在2018年08月16日提交中国专利局、申请号为201810935322.3的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及图像处理技术领域,例如涉及一种图像处理方法以及装置、存储介质及电子设备。
背景技术
随着智能终端的发展,智能终端中一般均具备图像拍摄功能,拍照也成为移动终端的常用功能之一,对智能终端的拍摄功能的要求也越来越高。
在拍摄功能中,长曝光拍摄因能展现夜间的车水马龙、具备光绘效果等优点,被用户投以关注度。长曝光拍摄可以把光线暗的景色拍的更清晰,例如长曝光拍摄可应用于全景图像的拍摄,尤其是夜景全景拍摄。但是由于用户常用的拍摄设备一般为手机或手表等电子设备,往往需要有用户手持或者基于手持支架实现图像拍摄,因此,在拍摄长曝光图像过程中,一般会存在由于用户抖动导致的图像质量问题,诸如图像不清晰,存在模糊等情况。
发明内容
本申请实施例提供图像处理方法、装置、存储介质及电子设备,实现对长曝光图像的图像质量优化。
第一方面,本申请实施例提供了一种图像处理方法,包括:
获取第一摄像头对拍摄对象拍摄的至少一张长曝光图像,以及第二摄像头在每张长曝光图像的曝光时间内分别对拍摄对象拍摄的至少两张短曝光图像,其中,每张长曝光图像和在其曝光时间内获取的所述至少两张短曝光图像为一组曝光图像;
基于所述拍摄对象在每组曝光图像内的至少两张短曝光图像中的位置,确定对应长曝光图像的位置变化参数;
根据所述每张长曝光图像的位置变化参数对所述至少一张长曝光图像进行处理,生成处理后的图像。
第二方面,本申请实施例提供了一种图像处理装置,包括:
图像获取模块,设置为获取第一摄像头对拍摄对象拍摄的至少一张长曝光图像,以及第 二摄像头在每张长曝光图像的曝光时间内分别对拍摄对象拍摄的至少两张短曝光图像,其中,每张长曝光图像和在其曝光时间内获取的所述至少两张短曝光图像为一组曝光图像;
位置变化参数确定模块,设置为基于所述拍摄对象在每组曝光图像内的至少两张短曝光图像中的位置,确定对应长曝光图像的位置变化参数;
图像处理模块,设置为根据所述每张长曝光图像的位置变化参数对所述至少一张长曝光图像进行处理,生成处理后的图像。
第三方面,本申请实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本申请实施例所述的图像处理方法。
第四方面,本申请实施例提供了一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如本申请实施例所述的图像处理方法。
本申请实施例中提供的图像处理方法,获取第一摄像头对拍摄对象拍摄的至少一张长曝光图像,以及第二摄像头在每张长曝光图像的曝光时间内分别对拍摄对象拍摄的至少两张短曝光图像,其中,每张长曝光图像和在其曝光时间内获取的所述至少两张短曝光图像为一组曝光图像;基于所述拍摄对象在每组曝光图像内的至少两张短曝光图像中的位置,确定对应长曝光图像的位置变化参数;根据所述每张长曝光图像的位置变化参数对所述至少一张长曝光图像进行处理,生成处理后的图像。通过采用上述方案,基于两个摄像头实现同步采集长曝光图像以及各长曝光图像对应的至少两张短曝光图像,避免了获取短曝光图像过程对长曝光图像的影响,在保持长曝光图像的拍摄逻辑的基础上,提高了长曝光图像的拍摄质量。
附图概述
图1为本申请实施例提供的一种图像处理方法的流程示意图;
图2为本申请实施例提供的两张摄像头在拍摄时的曝光时间示意图;
图3为本申请实施例提供的另一种图像处理方法的流程示意图;
图4为本申请实施例提供的另一种图像处理方法的流程示意图;
图5为本申请实施例提供的另一种图像处理方法的流程示意图;
图6为本申请实施例提供的一种图像处理装置的结构示意图;
图7为本申请实施例提供的一种电子设备的结构示意图;
图8为本申请实施例提供的另一种电子设备的结构示意图。
具体实施方式
下面结合附图并通过具体实施方式来进一步说明本申请的技术方案。可以理解的是,此处所描述的具体实施例仅仅用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。
在更加详细地讨论示例性实施例之前应当提到的是,一些示例性实施例被描述成作为流程图描绘的处理或方法。虽然流程图将各步骤描述成顺序的处理,但是其中的许多步骤可以被并行地、并发地或者同时实施。此外,各步骤的顺序可以被重新安排。当其操作完成时所述处理可以被终止,但是还可以具有未包括在附图中的附加步骤。所述处理可以对应于方法、函数、规程、子例程、子程序等等。
图1为本申请实施例提供的一种图像处理方法的流程示意图,该方法可以由图像处理装置执行,其中该装置可由软件和/或硬件实现,一般可集成在电子设备中。如图1所示,该方法包括:步骤101、步骤102和步骤103。
在步骤101中,获取第一摄像头对拍摄对象拍摄的至少一张长曝光图像,以及第二摄像头在每张长曝光图像的曝光时间内分别对拍摄对象拍摄的至少两张短曝光图像。
其中,每张长曝光图像和在其曝光时间内获取的所述至少两张短曝光图像为一组曝光图像。
示例性的,本申请实施例中的电子设备可包括手机和平板电脑等具有拍摄功能的智能设备。
其中,长曝光摄影是一种长时间开启快门的摄影技术,长曝光图像是基于长曝光摄影技术基于较长的曝光时间获取的图像,相应的,短曝光图像是摄像头基于较短的曝光时间获得的图像,示例性的,长曝光图像的曝光时间可以是250毫秒,短曝光图像的曝光时间可以是在1/15秒到1/60秒之间,例如30毫秒。长曝光摄影常用于夜间拍摄、光迹拍摄或者水影拍摄等,可以把光线暗的景色拍的更清晰,也可以拍出如梦幻般的画面,比如瀑布和城市公路夜景。然而由于长曝光图像的拍摄时间较长,用于在通过手持设备进行拍摄时,常存在由于用户手臂不自觉抖动导致的图像质量问题,本实施例中,通过在长曝光图像获取时间内获取的至少两张短曝光图像对长曝光图像进行优化,提高长曝光图像的拍摄质量。
需要说明的是,本实施例中通过具有至少两张摄像头的设备同时获取长曝光图像和短曝光图像,例如设备可以具有双摄像头。第一摄像头对拍摄对象拍摄的至少一张长曝光图像,第二摄像头在每张长曝光图像的曝光时间内分别对拍摄对象拍摄的至少两张短曝光图像。示例性的,第一摄像头和第二摄像头设置于设备的同侧,且两张摄像头的距离较小,可对同一拍摄对象进行拍摄。其中,第一摄像头和第二摄像头可以是同时启动。示例性的,参见图2,图2是本申请实施例提供的两张摄像头在拍摄时的曝光时间示意图。图2中,第一摄像头 和第二摄像头同时启动,第一摄像头通过0-t3时间段的长曝光获取长曝光图像,第二摄像头可以是分别在0-t1以及t2-t3两张时间段的进行短曝光获取两张短曝光图像。需要说明的是,图2仅是一个示例,第二摄像头获取的短曝光图像的数量可以是2个以上,短曝光图像的数量可根据用户设置的数量确定。第二摄像头的启动时间可以是与第一摄像头的启动时间相同,还可以是第二摄像头的启动时间晚于第一摄像头的启动时间,最后一张短曝光图像的曝光结束时刻可以是与长曝光图像的曝光结束时刻相同,或者还可以是最后一张短曝光图像的曝光结束时刻早于长曝光图像的曝光结束时刻。第二摄像头获取至少两张短曝光图像满足如下条件:短曝光时间以及曝光间隔之和小于或等于对应长曝光时间。本实施例中,每一张长曝光图像均对应至少两张短曝光图像。
本实施例中,每张长曝光图像和在其曝光时间内获取的至少两张短曝光图像为一组曝光图像,使得在同一时间段内获取的长曝光图像和短曝光图像形成对应关系,以便后续基于同一组曝光图像中的短曝光图像对长曝光图像进行处理。
通过两张摄像头同步获取长曝光图像和短曝光图像,避免了一张摄像头在同一时刻只能采集长曝光图像或短曝光图像的情况,导致的时间浪费,同时两张摄像头不存在相互干涉,即短曝光图像采集不会影响长曝光图像的获取,可根据用户需求确定长曝光图像的获取时间和获取数量,无需考虑在长曝光图像采集间隙设置短曝光图像的采集时间。在一实施例中,连续获取至少两张长曝光图像,每个长曝光图像的曝光时间内获取至少两张短曝光图像。示例性的,将上一长曝光图像的曝光时间的结束时刻,作为下一长曝光图像的曝光时间的启动时刻,即可以是无间隔地连续获取多张长曝光图像,同时,在每一张长曝光图像的获取过程中获取至少两张短曝光图像。需要说明的是,单个摄像头所拍摄的图像并不固定为长曝光图像或短曝光图像,也可和另一个摄像头进行互换。
在一实施例中,所述至少两张短曝光图像的曝光间隔和短曝光时间之和等于对应长曝光时间。示例性的,当获取第一张短曝光图像的曝光起始时刻与长曝光图像的曝光起始时刻相同,且最后一张短曝光图像的曝光结束时刻与长曝光图像的曝光结束时刻相同时,可实现至少两张短曝光图像的曝光间隔和短曝光时间之和等于长曝光时间,此时至少两张短曝光图像的采集时间跨度与长曝光图像的曝光图像相同,上述至少两张短曝光图像可准确确定长曝光图像在整个曝光时间内的位置变化参数,避免至少两张短曝光图像的跨度时间小于长曝光图像时,存在部分曝光时间遗漏导致的位置变化参数确定不准确的问题。
于各长曝光图像的曝光时间内获取至少两张短曝光图像,包括:于各长曝光图像的曝光时间内,根据相同时间间隔获取至少两张短曝光图像。其中,短曝光图像之间的时间间隔可以是根据短曝光图像数量对长曝光时间进行均匀划分确定,示例性的,长曝光时间为250ms,短曝光时间为30ms,若短曝光图像数量为2,则时间间隔为190ms,若短曝光图像 数量为3,则存在两张时间间隔,其分别为80ms,并以此类推。通过相同时间间隔获取至少两张短曝光图像,使得短曝光图像均匀分布于长曝光时间内,避免任一时间间隔过长导致的不准确,可准确确定每个时间间隔的位置变化参数。
在步骤102中,基于所述拍摄对象在每组曝光图像内的至少两张短曝光图像中的位置,确定对应长曝光图像的位置变化参数。
其中,长曝光图像的位置变化参数用于表示拍摄对象在至少两张短曝光图像中的位置变化,即当拍摄对象固定时拍照设备在曝光时间内的位置变化,示例性的,拍照设备在曝光时间内的空间位置变化可以由于拍照设备的抖动形成,当拍照设备为诸如手机等手持设备,在获取长曝光图像时,由于用户手抖动导致的拍照设备抖动导致长曝光图像存在位置变化参数。
在一些实施例中,基于所述拍摄对象在每组曝光图像内的至少两张短曝光图像中的位置,确定每张长曝光图像中所述拍摄对象的位置变化参数,包括:确定所述拍摄对象在每组曝光图像内的至少两张短曝光图像中的位置信息;根据每组曝光图像内的至少两张短曝光图像的拍照时序,确定相邻短曝光图像中拍摄对象位置信息的变化参数;根据所述相邻短曝光图像中拍摄对象位置信息的变化参数确定每张长曝光图像中所述拍摄对象的位置变化参数。其中,位置变化参数包括水平变化参数和垂直变化参数。示例性的,在上述至少两张短曝光图像中确定拍摄对象或拍摄对象的同一部位,并确定该拍摄对象或拍摄对象的同一部位在上述至少两张短曝光图像中的位置信息,在图像中的位置信息例如可以是坐标位置,根据位置信息差确定对应长曝光图像的位置变化参数,示例性的,同一物体的水平坐标差可确定为水平变化参数,同一物体的垂直坐标差可确定为垂直变化参数。
示例性的,若短曝光图像数量大于2时,可以依次确定相邻两张短曝光图像之间的子位置变化参数,并根据相邻短曝光图像的子位置变化参数确定长曝光图像的位置变化参数,例如可以是将相邻短曝光图像的子位置变化参数的绝对值的之和确定为长曝光图像的位置变化参数。多个子位置变化参数可以确定用户抖动导致的移动轨迹变化,利于更准确的校正长曝光图像。
在步骤103中,根据所述每张长曝光图像的位置变化参数对所述至少一张长曝光图像进行处理,生成处理后的图像。
示例性的,每张长曝光图像的位置变化参数可表征长曝光图像的图像指令,位置变化参数越大,表明在长曝光时间内,拍摄对象与拍照设备之间的位置变化越大,图像越模糊;反之,位置变化参数越小,表明在长曝光时间内,拍摄对象与拍照设备之间的位置变化越小,图像越清晰。其中,可通过位置变化参数可确定长曝光图像的清晰程度,还可对长曝光图像进行筛选,例如选择位置变化参数最小的长曝光图像作为处理后的图像;或者,还可以是通 过多张长曝光图像或每张长曝光图像对应的短曝光图像消除在图像获取过程中存在的抖动,例如通过对多张长曝光图像之间的合并,或长曝光图像与对应短曝光图像之间的合并等方式实现,其中图像合并可以是均值合并或加权合并。
本申请实施例中提供的图像处理方法,获取第一摄像头对拍摄对象拍摄的至少一张长曝光图像,以及第二摄像头在每张长曝光图像的曝光时间内分别对拍摄对象拍摄的至少两张短曝光图像,其中,每张长曝光图像和在其曝光时间内获取的所述至少两张短曝光图像为一组曝光图像;基于所述拍摄对象在每组曝光图像内的至少两张短曝光图像中的位置,确定对应长曝光图像的位置变化参数;根据所述每张长曝光图像的位置变化参数对所述至少一张长曝光图像进行处理,生成处理后的图像。通过采用上述方案,基于两个摄像头实现同步采集长曝光图像以及各长曝光图像对应的至少两张短曝光图像,避免了获取短曝光图像过程对长曝光图像的影响,在保持长曝光图像的拍摄逻辑的基础上,提高了长曝光图像的拍摄质量。
图3为本申请实施例提供的另一种图像处理方法的流程示意图,参见图3,本实施例的方法包括如下步骤301至步骤304。
在步骤301中,获取第一摄像头对拍摄对象拍摄的至少一张长曝光图像,以及第二摄像头在每张长曝光图像的曝光时间内分别对拍摄对象拍摄的至少两张短曝光图像。
其中,每张长曝光图像和在其曝光时间内获取的所述至少两张短曝光图像为一组曝光图像。
在步骤302中,基于所述拍摄对象在每组曝光图像内的至少两张短曝光图像中的位置,确定对应长曝光图像的位置变化参数。
在步骤303中,根据位置变化参数筛选条件在多张长曝光图像中进行筛选。
本实施例中,需要说明的是,长曝光图像数量大于1,且均是对同一拍摄对象拍摄得到。
示例性的,确定每一张长曝光图像的位置变化参数,该位置变化参数用于表征长曝光图像在拍摄过程中存在的抖动,即长曝光图像的模糊状态,位置变化参数越大,抖动越严重,长曝光图像越模糊。位置变化参数筛选条件为所述位置变化参数小于第一位置变化阈值,通过设置第一位置变化阈值,剔除位置变化参数大于或等于第一位置变化阈值的图像,减少模糊图像,其中第一位置变化阈值可以是根据用户设置的筛选标准确定的,还可以是根据历史图像位置变化参数确定的。位置变化参数筛选条件还可以为位置变化参数数值大小排序中的预设排序范围。例如将多张长曝光图像的位置变化参数按照数值进行由小到大的排序,根据图像数量从排序的首位依次选择长曝光图像,例如,若筛选的图像数量为1,则选择排序首位,即最小的位置变化参数对应的长曝光图像;若筛选的图像数量为2,则选择排序首位和第二位的位置变化参数对应的长曝光图像,并依次类推。通过上述的位置变化参数筛选条件 可筛序出多张长曝光图像中质量较优的长曝光图像,以便后续处理时避免模糊图像,以提高最终处理得到图像的图像质量。
在步骤304中,将筛选得到的长曝光图像进行合并,生成处理后的图像。
示例性的,将筛选出的长曝光图像的对应像素点进行合并,例如可以是确定筛选出的长曝光图像中对应像素点的像素值均值,根据得到的像素值均值确定优化图像。
示例性的,还可以是对筛选出的长曝光图像的对应像素点进行加权合并,其中,位置变化参数数值越小的长曝光图像的权值越大,位置变化参数数值越大的长曝光图像的权值越小。例如可以是长曝光图像的权值与自身位置变化参数成反比,确定筛选出的长曝光图像中对应像素点的像素值加权均值,根据得到的像素值加权均值确定优化图像。
示例性的,在确定处理后的图像之后,可将两个摄像头拍摄的多组曝光图像删除,仅保存处理后的图像,避免多组曝光图像占用大量内存资源。
本申请实施例中提供的图像处理方法,通过多张较清晰长曝光图像的图像合并,降低拍摄过程中拍照设备抖动导致的图像模糊,得到的优化图像,提高长曝光图像的清晰度。
在上述实施例的基础上,在根据位置变化参数筛选条件在多张长曝光图像中进行筛选之前,还包括:若存在任一长曝光图像的位置变化参数小于或等于第二位置变化阈值,则取消对所述多张长曝光图像的处理,将小于或等于第二位置变化阈值的长曝光图像作为处理后的图像。其中,第二位置变化阈值为拍照设备不存在抖动或者存在极微小抖动时拍摄的长曝光图像的位置变化参数,位置变化参数小于或等于第二位置变化阈值的长曝光图像,具有较高的图像情绪度,无需再与其他图像进行合并等处理,减少了图像处理过程。在一实施例中,第二位置变化阈值小于第一位置变化阈值,例如可以是0。在一些实施例中,在获取一组曝光图像时,确定该组曝光图像中的长曝光图像的位置变化参数,若该长曝光图像的位置变化参数小于或等于第二位置变化阈值,则可取消对同一拍摄对象的多次拍摄,减小占用内存和简化图像处理过程。
图4为本申请实施例提供的另一种图像处理方法的流程示意图,如图4所示,本实施例的方法包括如下步骤401、步骤402和步骤403。
在步骤401中,获取第一摄像头对拍摄对象拍摄的至少一张长曝光图像,以及第二摄像头在每张长曝光图像的曝光时间内分别对拍摄对象拍摄的至少两张短曝光图像。
其中,每张长曝光图像和在其曝光时间内获取的所述至少两张短曝光图像为一组曝光图像。
在步骤402中,基于所述拍摄对象在每组曝光图像内的至少两张短曝光图像中的位置,确定对应长曝光图像的位置变化参数。
在步骤403中,若任一所述长曝光图像的位置变化参数大于第三位置变化阈值,则基于 对应的至少两张短曝光图像对大于第三位置变化阈值的长曝光图像进行处理,生成处理后的图像。
其中,位置变化参数大于或等于第三位置变化阈值,表明该长曝光图像模糊,图像质量差,不清晰,第三位置变化阈值可以与第一位置变化阈值相同或不同。需要说明的是,由于短曝光图像在拍摄时,曝光时间段,短曝光图像的局部或全部图像清晰,可用于对同组的长曝光图像进行优化,以提高长曝光图像的图像质量。
在一些实施例中,基于对应的至少两张短曝光图像对大于第三位置变化阈值的长曝光图像进行处理,生成处理后的图像,包括:在一组曝光图像中,将所述大于第三位置变化阈值的长曝光图像与对应的一张或多张短曝光图像进行合并,生成处理后的图像,生成处理后的图像。示例性的,在长曝光图像对应的至少两张短曝光图像中筛选一张或多张清晰短曝光图像,用于与长曝光图像进行合并。
在一些实施例中,基于对应的至少两张短曝光图像对大于第三位置变化阈值的长曝光图像进行处理,生成处理后的图像,包括:确定所述大于第三位置变化阈值的长曝光图像的待处理区域;在所述对应的一张或多张短曝光图像中确定与所述待处理区域对应的图像区域,将所述短曝光图像中的对应区域与所述长曝光图像的待处理区域进行合并,生成处理后的图像,其中所述待处理区域与所述短曝光图像中对应的图像区域包含相同的拍摄内容。其中,长曝光图像的待处理区域为图像模糊区域,例如可以是对长曝光图像进行分块,分别确定各块图像的清晰度,将清晰度为模糊的图像块确定为待处理区域。短曝光图像中对应区域的位置与待处理区域在长曝光图像中的位置相同,其中短曝光图像和长曝光图像尺寸一致。在一实施例中,在多张短曝光图像的对应区域中筛选一个或多个清晰的图像区域,用于对长曝光图像的待处理区域进行处理。示例性的,对长曝光图像待处理区域的处理可以是将短曝光图像的对应区域与长曝光图像的待处理区域进行均值合并或加权合并;还可以是将清晰度最高的短曝光图像的对应区域替代长曝光图像的待处理区域。
需要说明的是,在基于至少两张短曝光图像对长曝光图像进行处理之前,还可以调节短曝光图像的亮度,以与长曝光图像亮度相匹配。
本实施例中,当存在多张对同一拍摄对象拍摄得到的多张长曝光图像时,在对大于或等于第三位置变化阈值的长曝光图像进行处理之后,还可以将处理后的长曝光图像以及位置变化参数小于第一位置变化阈值的长曝光图像进行合并,实现长曝光图像的进一步优化。
本申请实施例中提供的图像处理方法,当拍摄的一张长曝光图像或者多张长曝光图像的位置变化参数均大于或等于第三位置变化阈值时,基于采集的短曝光图像对长曝光图像进行处理,提高了长曝光图像的清晰度。
图5为本申请实施例提供的另一种图像处理方法的流程示意图,如图5所示,本实施例 的方法包括如下步骤501至步骤506。
在步骤501中,获取第一摄像头对拍摄对象拍摄的至少两张长曝光图像,以及第二摄像头在每张长曝光图像的曝光时间内分别对拍摄对象拍摄的至少两张短曝光图像,其中,每张长曝光图像和在其曝光时间内获取的所述至少两张短曝光图像为一组曝光图像。
其中,上述至少两张长曝光图像是在全景拼接模式下,通过移动的设备对拍摄对象拍摄的,可通过图像拼接的方式,得到全景拼接图像。其中,全景拼接模式中在拍照设备的持续平稳的移动过程中连续获取多张长曝光图像,且相邻的长曝光图像中内容彼此连续,通过将相邻的长曝光图像进行拼接,可得到包含连续完整信息的全景图像。
在步骤502中,基于所述拍摄对象在每组曝光图像内的至少两张短曝光图像中的位置,确定对应长曝光图像的位置变化参数。
在步骤503中,若任一所述长曝光图像的位置变化参数大于第三位置变化阈值,则基于对应的至少两张短曝光图像对大于第三位置变化阈值的长曝光图像进行处理,生成处理后的图像。
其中,对获取的长曝光图像的位置变化参数进行判断,若至少两张长曝光图像的位置变化参数均小于第三位置变化阈值,则可省略步骤503,执行步骤504。若存在一张或多张位置变化参数大于第三位置变化阈值的长曝光图像,则通过执行步骤503对上述位置变化参数大于第三位置变化阈值的长曝光图像进行处理。
在步骤504中,根据处理后的长曝光图像的拼接顺序,确定相邻的长曝光图像,以进行图像拼接。
其中,长曝光图像的拼接顺序为图像内容的连续性确定,若至少两张长曝光图像依据固定移动顺序获取,则可以是将长曝光图像的拍摄时序确定为长曝光图像的拼接顺序,其中,记录每一张长曝光图像的拍摄时刻,例如可以是起始曝光时刻或者结束曝光时刻。若不能确定长曝光图像的拍摄时刻或者拍照设备未按同一顺序移动拍摄,则通过分析长曝光图像中拍摄对象的位置信息确定拼接顺序。示例性的,拍摄对象在三张长曝光图像中的位置分为时左、中、右,则确定上述三张长曝光图像的拼接顺序为1、2和3,依次相邻。
根据拼接顺序可确定彼此相邻的长曝光图像,相邻的长曝光图像中存在重叠的图像区域或者存在内容连续的图像区域。
在步骤505中,根据所述相邻的长曝光图像中拍摄对象的位置信息,调节所述相邻的长曝光图像的拼接位置。
由于在连续获取多张长曝光图像的过程中,存在拍照设备的抖动导致相邻的长曝光图像存在图像错位,根据各长曝光图像中拍摄对象的位置信息调节相邻长曝光图像的拼接位置。其中,可以是通过拍摄对象的中心点的位置信息表征拍摄对象的位置信息,还可以是通过拍 摄对象的任一固定部位的位置信息表征拍摄对象的位置信息,示例性的,拍摄对象为人时,可以是通过拍摄对象的鼻尖位置衡量拍摄对象的位置信息;拍摄对象为风景时,可以是通过风景中一个固定物体的位置衡量拍摄对象的位置信息,例如固定物体可以是建筑或者树木等。
在一实施例中,根据所述相邻的长曝光图像对应的相邻短曝光图像调节所述相邻长曝光图像的拼接位置,包括:根据所述相邻的长曝光图像中拍摄对象的位置信息,确定所述相邻的长曝光图像中拍摄对象的位置差;根据所述相邻的长曝光图像中拍摄对象的位置差,调节所述相邻的长曝光图像的拼接位置,以消除所述拍摄对象的位置差。
其中,拍摄对象的位置信息可以是通过坐标表示,相邻的长曝光图像中拍摄对象的位置差可以是拍摄对象在相邻长曝光图像中的坐标差,该位置差包括包括水平位置差和垂直位置差,当相邻长曝光图像中存在垂直位置差时,根据位置差调节上述相邻长曝光图像中的任一长曝光图像,例如向上或向下调节位置差对应的距离,以消除相邻长曝光图像中拍摄对象的位置差,避免图像拼接时的图像错位。示例性的,当相邻长曝光图像存在上下错位时,调节任一长曝光图像,使得拼接后的图像中同一物体连续无错位。
其中,位置差中的水平位置差,用于消除相邻长曝光图像中的重复图像区域,位置差中的垂直位置差,用于消除相邻长曝光图像中的上下错位。
在步骤506中,根据调节后的拼接位置对所述相邻的长曝光图像进行拼接处理,生成拼接图像。
在一实施例中,所述长曝光图像为夜景长曝光图像,经过图像拼接得到处理后的图像为夜景全景图像。需要说明的是,获取夜景图像时,为了获取清晰的夜景图像,必须采用长曝光拍摄技术,且当夜景长曝光图像用于拼接全景图像时,相邻的夜景长曝光图像需连续无间隔。本实施例中,通过设备的第一摄像头连续获取夜景长曝光图像,第二摄像头获取每一张夜景长曝光图像对应的短曝光图像,在不影响获取连续夜景长曝光图像的同时,基于短曝光图像对夜景长曝光图像进行拼接处理。
在一实施例中,在获取夜景长曝光图像时,可以是对一个位置获取两张或多张夜景长曝光图像,再对下一位置获取两张或多张夜景长曝光图像,依次获取多个连续位置的多张夜景长曝光图像。对于每一个位置的多张夜景长曝光图像,根据其位置变化参数筛选出一张位置变化参数最小的夜景长曝光图像,用于进行全景图像的拼接。本实施例每个长曝光图像对应多张短曝光图像可以准确的判断每张长曝光图像的真实位置变化参数,进而准确参数筛选出一张位置变化参数最小的长曝光图像,因此全景图像的拼接的效果较好。
本申请实施例中提供的图像处理方法,通过各长曝光图像的位置变化参数对拍摄的至少两张长曝光图像进行处理,得到清晰度较高的长曝光图像,并依据拼接顺序中相邻长曝光图 像的位置差调节相邻长曝光图像的拼接位置,以避免相邻长曝光图像因抖动导致的图像拼接错位的问题,提高拼接图像的图像质量。
图6为本申请实施例提供的一种图像处理装置的结构框图,该装置可由软件和/或硬件实现,一般集成在电子设备中,可通过执行图像处理方法来对长曝光图像进行优化。如图6所示,该装置包括:图像获取模块601、位置变化参数确定模块602和图像处理模块603。
图像获取模块601,设置为获取第一摄像头对拍摄对象拍摄的至少一张长曝光图像,以及第二摄像头在每张长曝光图像的曝光时间内分别对拍摄对象拍摄的至少两张短曝光图像,其中,每张长曝光图像和在其曝光时间内获取的所述至少两张短曝光图像为一组曝光图像。
位置变化参数确定模块602,设置为基于所述拍摄对象在每组曝光图像内的至少两张短曝光图像中的位置,确定对应长曝光图像的位置变化参数。
图像处理模块603,设置为根据所述每张长曝光图像的位置变化参数对所述至少一张长曝光图像进行处理,生成处理后的图像。
本申请实施例中提供的图像处理装置,基于两个摄像头实现同步采集长曝光图像以及各长曝光图像对应的至少两张短曝光图像,避免了获取短曝光图像过程对长曝光图像的影响,在保持长曝光图像的拍摄逻辑的基础上,获取对应的短曝光图像,实现长曝光图像进行优化,提高了长曝光图像的拍摄质量。
在一实施例中,位置变化参数确定模块602设置为:确定所述拍摄对象在每组曝光图像内的至少两张短曝光图像中的位置信息;
根据每组曝光图像内的至少两张短曝光图像的拍照时序,确定相邻短曝光图像中拍摄对象位置信息的变化参数;
根据所述相邻短曝光图像中拍摄对象位置信息的变化参数确定每张长曝光图像中所述拍摄对象的位置变化参数。
在一实施例中,所述长曝光图像数量大于1,图像处理模块603包括:图像筛选单元和第一图像处理单元。
图像筛选单元,设置为根据位置变化参数筛选条件在多张长曝光图像中进行筛选;
第一图像处理单元,设置为将筛选得到的长曝光图像进行合并,生成处理后的图像。
在一实施例中,所述位置变化参数筛选条件为所述位置变化参数小于第一位置变化阈值;或者,
所述位置变化参数筛选条件为位置变化参数数值大小排序中的预设排序范围。
在一实施例中,还包括:第二图像处理单元。
第二图像处理单元,在根据位置变化参数筛选条件在多张长曝光图像中进行筛选之前,若存在任一长曝光图像的位置变化参数小于或等于第二位置变化阈值,则取消对所述多张长 曝光图像的处理,将小于或等于第二位置变化阈值的长曝光图像作为处理后的图像。
在一实施例中,图像处理模块603设置为:
若任一所述长曝光图像的位置变化参数大于第三位置变化阈值,则基于对应的至少两张短曝光图像对大于第三位置变化阈值的长曝光图像进行处理,生成处理后的图像。
在一实施例中,图像处理模块603包括:第三图像处理单元和第四图像处理单元。
第三图像处理单元,设置为在一组曝光图像中,将所述大于第三位置变化阈值的长曝光图像与对应的一张或多张短曝光图像进行合并,生成处理后的图像;或者,
第四图像处理单元,设置为确定所述大于第三位置变化阈值的长曝光图像的待处理区域;在所述对应的一张或多张短曝光图像中确定与所述待处理区域对应的图像区域,将所述短曝光图像中的对应区域与所述长曝光图像的待处理区域进行合并,生成处理后的图像,其中所述待处理区域与所述短曝光图像中对应的图像区域包含相同的拍摄内容。
在一实施例中,至少两张长曝光图像为在全景拼接模式下,通过移动的设备对拍摄对象拍摄至少两张长曝光图像,方法还包括:拼接顺序确定模块、拼接位置调节模块和图像拼接模块。
拼接顺序确定模块,设置为在对位置变化参数大于第三位置变化阈值的长曝光图像进行处理后,根据处理后的长曝光图像的拼接顺序,确定相邻的长曝光图像,以进行图像拼接;
拼接位置调节模块,设置为根据所述相邻的长曝光图像中拍摄对象的位置信息,调节所述相邻的长曝光图像的拼接位置;
图像拼接模块,设置为根据调节后的拼接位置对所述相邻的长曝光图像进行拼接处理,生成拼接图像。
在一实施例中,拼接顺序确定模块设置为:
将长曝光图像的拍摄时序确定为长曝光图像的拼接顺序;或者,根据所述至少两张长曝光图像中拍摄对象的位置信息确定长曝光图像的拼接顺序。
在一实施例中,拼接位置调节模块设置为:
根据所述相邻的长曝光图像中拍摄对象的位置信息,确定所述相邻的长曝光图像中拍摄对象的位置差;
根据所述相邻的长曝光图像中拍摄对象的位置差,调节所述相邻的长曝光图像的拼接位置,以消除所述拍摄对象的位置差。
本申请实施例还提供一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行图像处理方法,该方法包括:
获取第一摄像头对拍摄对象拍摄的至少一张长曝光图像,以及第二摄像头在每张长曝光图像的曝光时间内分别对拍摄对象拍摄的至少两张短曝光图像,其中,每张长曝光图像和在 其曝光时间内获取的所述至少两张短曝光图像为一组曝光图像;
基于所述拍摄对象在每组曝光图像内的至少两张短曝光图像中的位置,确定对应长曝光图像的位置变化参数;
根据所述每张长曝光图像的位置变化参数对所述至少一张长曝光图像进行处理,生成处理后的图像。
存储介质——任何的各种类型的存储器设备或存储设备。术语“存储介质”旨在包括:安装介质,例如CD-ROM、软盘或磁带装置;计算机系统存储器或随机存取存储器,诸如DRAM、DDRRAM、SRAM、EDORAM,兰巴斯(Rambus)RAM等;非易失性存储器,诸如闪存、磁介质(例如硬盘或光存储);寄存器或其它相似类型的存储器元件等。存储介质可以还包括其它类型的存储器或其组合。另外,存储介质可以位于程序在其中被执行的第一计算机系统中,或者可以位于不同的第二计算机系统中,第二计算机系统通过网络(诸如因特网)连接到第一计算机系统。第二计算机系统可以提供程序指令给第一计算机用于执行。术语“存储介质”可以包括可以驻留在不同位置中(例如在通过网络连接的不同计算机系统中)的两个或更多存储介质。存储介质可以存储可由一个或多个处理器执行的程序指令(例如具体实现为计算机程序)。
当然,本申请实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的图像处理操作,还可以执行本申请任意实施例所提供的图像处理方法中的相关操作。
本申请实施例提供了一种电子设备,该电子设备中可集成本申请实施例提供的图像处理装置。图7为本申请实施例提供的一种电子设备的结构示意图。电子设备700可以包括:存储器701,处理器702及存储在存储器701上并可在处理器702运行的计算机程序,所述处理器702执行所述计算机程序时实现如本申请实施例所述的图像处理方法。
本申请实施例提供的电子设备,实现同步采集长曝光图像以及各长曝光图像对应的至少两张短曝光图像,避免了获取短曝光图像过程对长曝光图像的影响,在保持长曝光图像的拍摄逻辑的基础上,获取对应的短曝光图像,实现长曝光图像进行优化,提高了长曝光图像的拍摄质量。
图8为本申请实施例提供的另一种电子设备的结构示意图。该电子设备可以包括:壳体(图中未示出)、存储器801、中央处理器(central processing unit,CPU)802(又称处理器,以下简称CPU)、电路板(图中未示出)和电源电路(图中未示出)。所述电路板安置在所述壳体围成的空间内部;所述CPU802和所述存储器801设置在所述电路板上;所述电源电路,设置为为所述电子设备的各个电路或器件供电;所述存储器801,设置为存储可执行程序代码;所述CPU802通过读取所述存储器801中存储的可执行程序代码来运行与所述可执 行程序代码对应的计算机程序,以实现以下步骤:
获取第一摄像头对拍摄对象拍摄的至少一张长曝光图像,以及第二摄像头在每张长曝光图像的曝光时间内分别对拍摄对象拍摄的至少两张短曝光图像,其中,每张长曝光图像和在其曝光时间内获取的所述至少两张短曝光图像为一组曝光图像;
基于所述拍摄对象在每组曝光图像内的至少两张短曝光图像中的位置,确定对应长曝光图像的位置变化参数;
根据所述每张长曝光图像的位置变化参数对所述至少一张长曝光图像进行处理,生成处理后的图像。
所述电子设备还包括:外设接口803、射频(Radio Frequency,RF)电路805、音频电路806、扬声器811、电源管理芯片808、输入/输出(I/O)子系统809、其他输入/控制设备810、触摸屏812、其他输入/控制设备810以及外部端口804,这些部件通过一个或多个通信总线或信号线807来通信。
应该理解的是,图示电子设备800仅仅是电子设备的一个范例,并且电子设备800可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。
下面就本实施例提供的用于对图像处理操作的电子设备进行详细的描述,该电子设备以手机为例。
存储器801,所述存储器801可以被CPU802、外设接口803等访问,所述存储器801可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
外设接口803,所述外设接口803可以将设备的输入和输出外设连接到CPU802和存储器801。
I/O子系统809,所述I/O子系统809可以将设备上的输入输出外设,例如触摸屏812和其他输入/控制设备810,连接到外设接口803。I/O子系统809可以包括显示控制器8091和用于控制其他输入/控制设备810的一个或多个输入控制器8092。其中,一个或多个输入控制器8092从其他输入/控制设备810接收电信号或者向其他输入/控制设备810发送电信号,其他输入/控制设备810可以包括物理按钮(按压按钮、摇臂按钮等)、拨号盘、滑动开关、操纵杆、点击滚轮。值得说明的是,输入控制器8092可以与以下任一个连接:键盘、红外端口、USB接口以及诸如鼠标的指示设备。
触摸屏812,所述触摸屏812是用户电子设备与用户之间的输入接口和输出接口,将可视输出显示给用户,可视输出可以包括图形、文本、图标、视频等。
I/O子系统809中的显示控制器8091从触摸屏812接收电信号或者向触摸屏812发送电信号。触摸屏812检测触摸屏上的接触,显示控制器8091将检测到的接触转换为与显示在触摸屏812上的用户界面对象的交互,即实现人机交互,显示在触摸屏812上的用户界面对象可以是运行游戏的图标、联网到相应网络的图标等。值得说明的是,设备还可以包括光鼠,光鼠是不显示可视输出的触摸敏感表面,或者是由触摸屏形成的触摸敏感表面的延伸。
RF电路805,主要设置为建立手机与无线网络(即网络侧)的通信,实现手机与无线网络的数据接收和发送。例如收发短信息、电子邮件等。具体地,RF电路805接收并发送RF信号,RF信号也称为电磁信号,RF电路805将电信号转换为电磁信号或将电磁信号转换为电信号,并且通过该电磁信号与通信网络以及其他设备进行通信。RF电路805可以包括用于执行这些功能的已知电路,其包括但不限于天线系统、RF收发机、一个或多个放大器、调谐器、一个或多个振荡器、数字信号处理器、编译码器(COder-DECoder,CODEC)芯片组、用户标识模块(Subscriber Identity Module,SIM)等等。
音频电路806,主要设置为从外设接口803接收音频数据,将该音频数据转换为电信号,并且将该电信号发送给扬声器811。
扬声器811,设置为将手机通过RF电路805从无线网络接收的语音信号,还原为声音并向用户播放该声音。
电源管理芯片808,设置为为CPU802、I/O子系统及外设接口所连接的硬件进行供电及电源管理。
上述实施例中提供的图像处理装置、存储介质及电子设备可执行本申请任意实施例所提供的图像处理方法,具备执行该方法相应的功能模块和有益效果。未在上述实施例中详尽描述的技术细节,可参见本申请任意实施例所提供的图像处理方法。

Claims (20)

  1. 一种图像处理方法,包括:
    获取第一摄像头对拍摄对象拍摄的至少一张长曝光图像,以及第二摄像头在每张长曝光图像的曝光时间内分别对所述拍摄对象拍摄的至少两张短曝光图像,其中,每张长曝光图像和在每张长曝光图像的曝光时间内获取的所述至少两张短曝光图像为一组曝光图像;
    基于所述拍摄对象在每组曝光图像内的至少两张短曝光图像中的位置,确定对应长曝光图像的位置变化参数;
    根据所述每张长曝光图像的位置变化参数对所述至少一张长曝光图像进行处理,生成处理后的图像。
  2. 根据权利要求1所述的方法,其中,基于所述拍摄对象在每组曝光图像内的至少两张短曝光图像中的位置,确定每张长曝光图像中所述拍摄对象的位置变化参数,包括:
    确定所述拍摄对象在每组曝光图像内的至少两张短曝光图像中的位置信息;
    根据每组曝光图像内的至少两张短曝光图像的拍照时序,确定相邻短曝光图像中拍摄对象位置信息的变化参数;
    根据所述相邻短曝光图像中拍摄对象位置信息的变化参数确定每张长曝光图像中所述拍摄对象的位置变化参数。
  3. 根据权利要求1所述的方法,其中,所述至少一张长曝光图像包括多张长曝光图像,其中,根据所述每张长曝光图像的位置变化参数对所述至少一张长曝光图像进行处理,生成处理后的图像,包括:
    根据位置变化参数筛选条件对所述多张长曝光图像进行筛选;
    将筛选得到的长曝光图像进行合并,生成处理后的图像。
  4. 根据权利要求3所述的方法,其中,所述位置变化参数筛选条件为以下任一种:
    所述位置变化参数小于第一位置变化阈值;或者,
    位置变化参数数值大小排序中的预设排序范围。
  5. 根据权利要求3所述的方法,在根据位置变化参数筛选条件在多张长曝光图像中进行筛选之前,还包括:
    在存在任一长曝光图像的位置变化参数小于或等于第二位置变化阈值的情况下,取消对所述多张长曝光图像的处理,将小于或等于第二位置变化阈值的长曝光图像作为处理后的图像。
  6. 根据权利要求1所述的方法,其中,根据所述每张长曝光图像的位置变化参数对所述至少一张长曝光图像进行处理,生成处理后的图像,包括:
    在任一所述长曝光图像的位置变化参数大于第三位置变化阈值的情况下,基于对应的至 少两张短曝光图像对大于第三位置变化阈值的长曝光图像进行处理,生成处理后的图像。
  7. 根据权利要求6所述的方法,其中,基于对应的至少两张短曝光图像对大于第三位置变化阈值的长曝光图像进行处理,生成处理后的图像,包括:
    在一组曝光图像中,将所述大于第三位置变化阈值的长曝光图像与对应的至少一张短曝光图像进行合并,生成处理后的图像;或者,
    确定所述大于第三位置变化阈值的长曝光图像的待处理区域;
    在所述对应的至少一张短曝光图像中确定与所述待处理区域对应的图像区域,将所述短曝光图像中对应的图像区域与所述大于第三位置变化阈值的长曝光图像的待处理区域进行合并,生成处理后的图像,其中所述待处理区域与所述短曝光图像中对应的图像区域包含相同的拍摄内容。
  8. 根据权利要求6所述的方法,其中,所述至少一张长曝光图像包括至少两张长曝光图像,所述至少两张长曝光图像为在全景拼接模式下,通过移动的设备对所述拍摄对象拍摄的至少两张长曝光图像,其中,在对位置变化参数大于第三位置变化阈值的长曝光图像进行处理后,还包括:
    根据处理后的长曝光图像的拼接顺序,确定相邻的长曝光图像,以进行图像拼接;
    根据所述相邻的长曝光图像中所述拍摄对象的位置信息,调节所述相邻的长曝光图像的拼接位置;
    根据调节后的拼接位置对所述相邻的长曝光图像进行拼接处理,生成拼接图像。
  9. 根据权利要求8所述的方法,其中,将长曝光图像的拍摄时序确定为长曝光图像的拼接顺序;或者,根据所述至少两张长曝光图像中拍摄对象的位置信息确定长曝光图像的拼接顺序。
  10. 根据权利要求8所述的方法,其中,根据所述相邻的长曝光图像对应的相邻短曝光图像调节所述相邻长曝光图像的拼接位置,包括:
    根据所述相邻的长曝光图像中拍摄对象的位置信息,确定所述相邻的长曝光图像中拍摄对象的位置差;
    根据所述相邻的长曝光图像中拍摄对象的位置差,调节所述相邻的长曝光图像的拼接位置,以消除所述拍摄对象的位置差。
  11. 一种图像处理装置,包括:
    图像获取模块,设置为获取第一摄像头对拍摄对象拍摄的至少一张长曝光图像,以及第二摄像头在每张长曝光图像的曝光时间内分别对拍摄对象拍摄的至少两张短曝光图像,其中,每张长曝光图像和在每张长曝光图像的曝光时间内获取的所述至少两张短曝光图像为一组曝 光图像;
    位置变化参数确定模块,设置为基于所述拍摄对象在每组曝光图像内的至少两张短曝光图像中的位置,确定对应长曝光图像的位置变化参数;
    图像处理模块,设置为根据所述每张长曝光图像的位置变化参数对所述至少一张长曝光图像进行处理,生成处理后的图像。
  12. 根据权利要求11所述的装置,其中,所述位置变化参数确定模块设置为:
    确定所述拍摄对象在每组曝光图像内的至少两张短曝光图像中的位置信息;根据每组曝光图像内的至少两张短曝光图像的拍照时序,确定相邻短曝光图像中拍摄对象位置信息的变化参数;根据所述相邻短曝光图像中拍摄对象位置信息的变化参数确定每张长曝光图像中所述拍摄对象的位置变化参数。
  13. 根据权利要求11所述的装置,其中,所述至少一张长曝光图像包括多张长曝光图像,图像处理模块包括:
    图像筛选单元,设置为根据位置变化参数筛选条件对所述多张长曝光图像进行筛选;
    第一图像处理单元,设置为将筛选得到的长曝光图像进行合并,生成处理后的图像。
  14. 根据权利要求13所述的装置,其中,所述位置变化参数筛选条件为以下任一种:
    所述位置变化参数小于第一位置变化阈值;或者,
    位置变化参数数值大小排序中的预设排序范围。
  15. 根据权利要求13所述的装置,还包括:
    第二图像处理单元,设置为在存在任一长曝光图像的位置变化参数小于或等于第二位置变化阈值的情况下,取消对所述多张长曝光图像的处理,将小于或等于第二位置变化阈值的长曝光图像作为处理后的图像。
  16. 根据权利要求11所述的装置,其中,所述图像处理模块设置为:
    在任一所述长曝光图像的位置变化参数大于第三位置变化阈值的情况下,基于对应的至少两张短曝光图像对大于第三位置变化阈值的长曝光图像进行处理,生成处理后的图像。
  17. 根据权利要求16所述的装置,其中,图像处理模块还包括:
    第三图像处理单元,设置为在一组曝光图像中,将所述大于第三位置变化阈值的长曝光图像与对应的至少一张短曝光图像进行合并,生成处理后的图像;或者,
    第四图像处理单元,设置为确定所述大于第三位置变化阈值的长曝光图像的待处理区域;在所述对应的至少一张短曝光图像中确定与所述待处理区域对应的图像区域,将所述短曝光图像中对应的图像区域与所述大于第三位置变化阈值的长曝光图像的待处理区域进行合并,生成处理后的图像,其中所述待处理区域与所述短曝光图像中对应的图像区域包含相同的拍 摄内容。
  18. 根据权利要求16所述的装置,所述图像处理模块包括:
    拼接顺序确定模块,设置为根据处理后的长曝光图像的拼接顺序,确定相邻的长曝光图像,以进行图像拼接;
    拼接位置调节模块,设置为根据所述相邻的长曝光图像中拍摄对象的位置信息,调节所述相邻的长曝光图像的拼接位置;
    图像拼接模块,用于设置为根据调节后的拼接位置对所述相邻的长曝光图像进行拼接处理,生成拼接图像。
  19. 一种计算机可读存储介质,其上存储有计算机程序,所述程序被处理器执行时实现如权利要求1-10中任一所述的图像处理方法。
  20. 一种电子设备,包括存储器,处理器及存储在存储器上并可在处理器运行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1-10任一所述的图像处理方法。
PCT/CN2019/093035 2018-08-16 2019-06-26 图像处理方法以及装置、存储介质及电子设备 WO2020034769A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810935322.3A CN109040589B (zh) 2018-08-16 2018-08-16 图像处理方法、装置、存储介质及电子设备
CN201810935322.3 2018-08-16

Publications (1)

Publication Number Publication Date
WO2020034769A1 true WO2020034769A1 (zh) 2020-02-20

Family

ID=64631782

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/093035 WO2020034769A1 (zh) 2018-08-16 2019-06-26 图像处理方法以及装置、存储介质及电子设备

Country Status (2)

Country Link
CN (1) CN109040589B (zh)
WO (1) WO2020034769A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111401477A (zh) * 2020-04-17 2020-07-10 Oppo广东移动通信有限公司 图像处理方法、装置、电子设备和计算机可读存储介质

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109040589B (zh) * 2018-08-16 2020-06-30 Oppo广东移动通信有限公司 图像处理方法、装置、存储介质及电子设备
CN109993737A (zh) * 2019-03-29 2019-07-09 联想(北京)有限公司 一种处理方法、设备及计算机可读存储介质
CN110619606A (zh) * 2019-09-19 2019-12-27 浙江大搜车软件技术有限公司 全景图像的确定方法、装置、计算机设备和存储介质
CN113810590A (zh) * 2020-06-12 2021-12-17 华为技术有限公司 图像处理方法、电子设备、介质和系统
CN113327215B (zh) * 2021-05-28 2022-10-21 浙江大华技术股份有限公司 一种宽动态图像合成方法、装置、电子设备及存储介质

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050047672A1 (en) * 2003-06-17 2005-03-03 Moshe Ben-Ezra Method for de-blurring images of moving objects
CN101668125A (zh) * 2008-09-03 2010-03-10 索尼株式会社 成像装置、固态成像器件、图像处理装置、方法和程序
CN101753825A (zh) * 2008-12-19 2010-06-23 三洋电机株式会社 摄像装置
CN105765967A (zh) * 2013-09-30 2016-07-13 谷歌公司 使用第二相机来调节第一相机的设置
CN105827964A (zh) * 2016-03-24 2016-08-03 维沃移动通信有限公司 一种图像处理方法及移动终端
US20180063441A1 (en) * 2014-05-30 2018-03-01 Apple Inc. Scene Motion Correction In Fused Image Systems
CN107820022A (zh) * 2017-10-30 2018-03-20 维沃移动通信有限公司 一种拍照方法及移动终端
CN109040589A (zh) * 2018-08-16 2018-12-18 Oppo广东移动通信有限公司 图像处理方法、装置、存储介质及电子设备

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000050151A (ja) * 1998-07-28 2000-02-18 Olympus Optical Co Ltd 撮像装置
US9049380B2 (en) * 2011-09-26 2015-06-02 Canon Kabushiki Kaisha Image processing apparatus for generating an image having an expanded dynamic range and method thereof, and image capture apparatus
CN202424857U (zh) * 2011-12-22 2012-09-05 鼎创电子股份有限公司 可得到高解像度影像的双镜头摄像模组
CN103973989B (zh) * 2014-04-15 2017-04-05 北京理工大学 获取高动态图像的方法及系统
JP2017112457A (ja) * 2015-12-15 2017-06-22 オリンパス株式会社 撮像装置、撮像プログラム、撮像方法
CN106603931A (zh) * 2017-02-27 2017-04-26 努比亚技术有限公司 一种双目拍摄方法及装置

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050047672A1 (en) * 2003-06-17 2005-03-03 Moshe Ben-Ezra Method for de-blurring images of moving objects
CN101668125A (zh) * 2008-09-03 2010-03-10 索尼株式会社 成像装置、固态成像器件、图像处理装置、方法和程序
CN101753825A (zh) * 2008-12-19 2010-06-23 三洋电机株式会社 摄像装置
CN105765967A (zh) * 2013-09-30 2016-07-13 谷歌公司 使用第二相机来调节第一相机的设置
US20180063441A1 (en) * 2014-05-30 2018-03-01 Apple Inc. Scene Motion Correction In Fused Image Systems
CN105827964A (zh) * 2016-03-24 2016-08-03 维沃移动通信有限公司 一种图像处理方法及移动终端
CN107820022A (zh) * 2017-10-30 2018-03-20 维沃移动通信有限公司 一种拍照方法及移动终端
CN109040589A (zh) * 2018-08-16 2018-12-18 Oppo广东移动通信有限公司 图像处理方法、装置、存储介质及电子设备

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111401477A (zh) * 2020-04-17 2020-07-10 Oppo广东移动通信有限公司 图像处理方法、装置、电子设备和计算机可读存储介质
CN111401477B (zh) * 2020-04-17 2023-11-14 Oppo广东移动通信有限公司 图像处理方法、装置、电子设备和计算机可读存储介质

Also Published As

Publication number Publication date
CN109040589A (zh) 2018-12-18
CN109040589B (zh) 2020-06-30

Similar Documents

Publication Publication Date Title
WO2020034769A1 (zh) 图像处理方法以及装置、存储介质及电子设备
CN109167931B (zh) 图像处理方法、装置、存储介质及移动终端
CN109547701B (zh) 图像拍摄方法、装置、存储介质及电子设备
EP3624439B1 (en) Imaging processing method for camera module in night scene, electronic device and storage medium
CN111418201B (zh) 一种拍摄方法及设备
CN108335279B (zh) 图像融合和hdr成像
CN108566516B (zh) 图像处理方法、装置、存储介质及移动终端
KR20200019728A (ko) 촬영 이동 단말
CN110572584B (zh) 图像处理方法、装置、存储介质及电子设备
KR102025714B1 (ko) 촬영 방법 및 장치
CN111028190A (zh) 图像处理方法、装置、存储介质及电子设备
CN109040523B (zh) 伪影消除方法、装置、存储介质及终端
CN110620873B (zh) 设备成像方法、装置、存储介质及电子设备
KR20150099302A (ko) 전자 장치와, 그의 제어 방법
CN109089043B (zh) 拍摄图像预处理方法、装置、存储介质及移动终端
CN109714582B (zh) 白平衡调整方法、装置、存储介质及终端
CN110958401A (zh) 一种超级夜景图像颜色校正方法、装置和电子设备
US10609265B2 (en) Methods and apparatus for synchronizing camera flash and sensor blanking
CN113099122A (zh) 拍摄方法、装置、设备和存储介质
CN106791451B (zh) 一种智能终端的拍照方法
CN113596294A (zh) 拍摄方法、装置和电子设备
CN110971841A (zh) 图像处理方法、装置、存储介质及电子设备
CN110581957B (zh) 图像处理方法、装置、存储介质及电子设备
CN111741187A (zh) 图像处理方法、装置及存储介质
WO2018219274A1 (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: 19849779

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

Country of ref document: EP

Kind code of ref document: A1