WO2016019770A1 - 图片的合成方法、装置及存储介质 - Google Patents

图片的合成方法、装置及存储介质 Download PDF

Info

Publication number
WO2016019770A1
WO2016019770A1 PCT/CN2015/082988 CN2015082988W WO2016019770A1 WO 2016019770 A1 WO2016019770 A1 WO 2016019770A1 CN 2015082988 W CN2015082988 W CN 2015082988W WO 2016019770 A1 WO2016019770 A1 WO 2016019770A1
Authority
WO
WIPO (PCT)
Prior art keywords
picture
moving object
preset
brightness
background
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2015/082988
Other languages
English (en)
French (fr)
Inventor
邹明双
里强
苗雷
崔小辉
魏宇星
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology Co Ltd
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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to US15/329,224 priority Critical patent/US10186066B2/en
Publication of WO2016019770A1 publication Critical patent/WO2016019770A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/00Two-dimensional [2D] image generation
    • G06T11/60Creating or editing images; Combining images with text
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/00Two-dimensional [2D] image generation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/71Circuitry for evaluating the brightness variation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/2621Cameras specially adapted for the electronic generation of special effects during image pickup, e.g. digital cameras, camcorders, video cameras having integrated special effects capability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/2625Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects for obtaining an image which is composed of images from a temporal image sequence, e.g. for a stroboscopic effect
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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

Definitions

  • the present invention relates to the field of image processing, and in particular, to a method, an apparatus, and a computer storage medium for synthesizing pictures.
  • Star-track shooting is mainly used to capture starlight in the sky.
  • star-track shooting is a very important experience.
  • the starry sky picture is usually taken as the shooting background, and the shooting background is relatively simple, which can not meet the diversified needs of the shooting background of the star-track picture, and affect the experience of the star-track shooting.
  • an embodiment of the present invention provides a method, a device, and a computer storage medium for synthesizing a picture, so as to solve at least the problem that the image capturing background cannot meet the diversification requirements of the picture and affect the experience of picture shooting.
  • a method for synthesizing a picture according to an embodiment of the present invention includes:
  • the trajectory picture of the currently captured moving object is combined with the background to generate a target picture.
  • the photographing the moving object includes:
  • the first picture is used as the first synthesized moving object track picture
  • the generated new trajectory picture is combined with the background to generate a target picture.
  • the method further includes:
  • the brightness value of the background in the target picture is restored to the brightness value before the adjustment.
  • the method further includes:
  • the track picture of the currently-shot moving object and the last synthesized moving object track picture to generate a new moving object track picture include:
  • the pixel in the last synthesized moving object track picture at the same position is replaced with the current shooting.
  • the track picture of the currently captured moving object and the last synthesized moving object track picture to generate a new moving object track picture include:
  • the currently-moved moving object trajectory picture is added to the last synthesized moving object trajectory picture to generate a new moving object trajectory picture.
  • the setting the preset picture as the shooting background includes:
  • the preset picture is set as the shooting background.
  • the method further includes:
  • the preset picture after the brightness adjustment is set as the shooting background.
  • the embodiment of the invention further provides a picture synthesizing device, comprising:
  • a processing module configured to acquire a preset picture and set a preset picture as a shooting background
  • a shooting module configured to shoot a moving object
  • the compositing module is configured to synthesize the trajectory picture of the currently captured moving object and the background at the end of the shooting to generate a target picture.
  • the processing module is further configured to: when the first picture is captured, use the first picture as a first synthesized moving object track picture;
  • the shooting module is further configured to take a picture every preset time after the first picture is taken;
  • the compositing module is configured to combine the currently captured picture with the last synthesized moving object trajectory picture to generate a new moving object trajectory picture every time a picture is captured; at the end of the shooting, a new generated image A trajectory picture of the moving object is combined with the background to generate a target picture.
  • the processing module is further configured to restore the brightness value of the background in the target picture to a brightness value before the adjustment.
  • the processing module is further configured to adjust a transparency of the background and/or the trajectory picture of the moving object in the target picture.
  • the picture synthesizing device when the captured picture is a star track picture, the picture synthesizing device further includes a determining module configured to determine whether the brightness of the pixel in the moving object track picture currently being shot at the same position is greater than the last synthesized moving object. The brightness of the pixels in the track image;
  • the synthesizing module is further configured to: when the determining module determines that the brightness of the pixel in the moving object track picture currently being shot at the same position is greater than the brightness of the pixel in the last synthesized moving object track picture, the same position is synthesized last time.
  • the pixels in the moving object track picture are replaced with the pixels in the currently taken moving object track picture.
  • the synthesizing module is further configured to add the currently captured moving object track picture and the last synthesized moving object track picture to generate a new moving object track picture.
  • the processing module is further configured to acquire a brightness value of the preset picture
  • the determining module is further configured to determine whether the brightness value is greater than a preset brightness threshold
  • the processing module is further configured to set the preset picture as the shooting background when the brightness value is less than or equal to the preset brightness threshold;
  • the processing module is further configured to: when the brightness value of the preset picture is greater than a preset brightness threshold, adjust a brightness of the preset picture to adjust a brightness value of the preset picture to be less than or equal to The preset brightness threshold; setting the brightness-adjusted preset picture as a shooting background.
  • An embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer executable instructions, where the computer executable instructions are used to execute the foregoing picture. resolve resolution.
  • the method and device for synthesizing pictures and the computer storage medium provided by the embodiments of the present invention acquire a preset picture as a background of picture shooting, and combine the currently captured picture with a picture as a shooting background at the end of shooting. Generate a target image. The selection of the picture as the background of the picture, to meet the diverse needs of the picture shooting background, improve the experience of picture shooting.
  • FIG. 1 is a schematic flow chart of a first embodiment of a method for synthesizing pictures according to the present invention
  • FIG. 2 is a schematic flow chart of a second embodiment of a method for synthesizing pictures according to the present invention.
  • FIG. 3 is a schematic flow chart of a third embodiment of a method for synthesizing pictures according to the present invention.
  • FIG. 4 is a schematic flow chart of a fourth embodiment of a method for synthesizing pictures according to the present invention.
  • FIG. 5 is a schematic diagram of functional modules of a first embodiment of a synthesizing apparatus for a picture according to the present invention
  • FIG. 6 is a schematic diagram of functional modules of a second embodiment of a synthesizing apparatus for a picture of the present invention.
  • FIG. 1 is a schematic flowchart of a first embodiment of a method for synthesizing pictures according to the present invention.
  • the method for synthesizing the picture comprises:
  • Step S10 acquiring a preset picture, and setting a preset picture as a background image
  • a preset picture when a picture capturing instruction is received, or before a picture is taken, a preset picture is acquired, and the process of acquiring the preset picture may be: receiving a picture input instruction, And the process of acquiring the preset image may be: receiving a picture selection instruction, and selecting a corresponding picture from the pre-stored picture according to the selection instruction, where the corresponding picture is received.
  • the preset selection condition is that the number of browsing of the pre-stored picture exceeds a preset browsing number threshold (for example, 3 times, 5 times, etc.), or the interval between the storage time of the pre-stored picture and the current time is less than a preset time threshold (for example, 1 day, 20 hours, etc.).
  • the preset picture may be an image processed image, such as a character and/or a scene extracted from a picture, or an unprocessed original picture, such as no characters and/or scenes. Extracted pictures. After the preset picture is acquired, the preset picture is set as the background image (background picture).
  • the main body of the method for synthesizing the picture may be a mobile camera device such as a mobile phone, a tablet pad, or a notebook computer, and is preferably a mobile phone in this embodiment.
  • Step S20 shooting a trajectory of the moving object
  • step S30 at the end of the shooting, the track picture of the currently captured moving object is combined with the background to generate a target picture.
  • the first picture When shooting a moving object, when the first picture is taken, the first picture is taken as the first synthesized moving object track picture; after the first picture is taken, one picture is taken every preset time, each time Taking a picture, synthesizing the currently captured picture with the last synthesized moving object track picture to generate a new moving object track picture; at the end of the shooting, taking the taken track picture of the moving object with the The background is synthesized to generate a target image.
  • the first picture After setting the preset picture as the shooting background, immediately or after a certain time interval (30s, 1 minute, etc.), or when receiving a picture shooting instruction, the first picture is taken, When the first picture is captured, the first picture is taken as the first synthesized moving object track picture. Before taking a picture, the position of the picture taking device can be adjusted to position the shooting target in the taken picture at the expected position of the background. In other embodiments of the present invention, in order to enable the user to better view each picture, the background and the corresponding captured moving object track picture may be combined to obtain a target picture to improve the user experience.
  • the currently captured picture is combined with the last synthesized moving object track picture to generate a new moving object track picture.
  • the second picture needs to be combined with the first picture to generate a new moving object track picture; the third picture is taken at a preset time interval, and when the third picture is taken, The third picture is combined with the second synthesized moving object track to generate a new moving object track picture, and so on, and each synthesized picture is used as a new moving object track picture for completion.
  • the preset time is an exposure time, that is, an exposure time required for the picture shooting, for example, 120s, 200s, and the like.
  • the target picture is a combination of trajectories of the same shooting target in pictures taken at different times.
  • the shooting of the picture is stopped, and at the end of the shooting, the currently recorded moving object track picture and the A background is obtained by synthesizing the acquired currently recorded moving object trajectory picture with the background to generate a target picture.
  • the currently photographed moving object trajectory picture is merged with the background picture to display the moving object trajectory picture on the background.
  • the process of the currently captured moving object track picture and the last synthesized moving object track picture to generate a new moving object track picture may include: displaying the currently captured moving object track picture Picture of the moving object track with the last synthesis
  • the addition operation is performed to generate a new moving object trajectory picture, that is, the last synthesized moving object trajectory picture is superimposed with the pixels in the currently captured starry sky picture to generate a composite illuminating picture.
  • the picture data is collected due to the preset exposure time, so the composite picture is also intermittently generated.
  • the pixel that satisfies the preset condition is selected from the last synthesized moving object track picture and the currently captured starry sky picture, and then the addition operation is performed on the pixel.
  • whether the brightness parameter of the pixel is greater than a threshold may be directly determined, and if yes, determining that the pixel meets the preset condition.
  • the pixel whose brightness parameter is greater than the threshold from the last synthesized moving object track picture and the currently captured starry sky picture (ie, the absolute value of the brightness of a point on the picture is greater than the threshold)
  • only the pixels satisfying the preset condition are executed.
  • the addition operation filters the pixels with lower brightness to a certain extent, thereby avoiding the accumulation effect of the ambient light and polluting the picture of the final synthesized picture.
  • the magnitude of the threshold may be determined according to the average brightness of the picture; the brightness parameter is an optical parameter such as an RGB value, a YUV value, or the like.
  • the pixel unit 1 includes a pixel unit 1 and a pixel unit 2, and the pixel unit is a total of n pixel units.
  • the pixel parameters of the pixel unit 101 to the pixel unit 200 in the last synthesized moving object track picture are greater than a threshold, and the pixel unit 1 to If the brightness parameter in the currently photographed starry sky picture is greater than the threshold value, the pixel object of the pixel object 1 to the pixel unit 200 and the pixel parameter of the currently photographed starry sky picture are added. It is assumed that the brightness parameter value of the pixel unit 1 in the current picture to be combined is 10, and the brightness parameter value in the currently photographed starry sky picture is 100, and then the addition operation is performed in the synthetic light picture (new moving object track picture).
  • the synthetic light painting picture is also subjected to noise reduction processing, and at the same time, according to the exposure degree of the existing picture, the synthesis ratio of the newly synthesized light picture is controlled, and overexposure is suppressed.
  • the trajectory picture of the currently-shot moving object and the last synthesized moving object trajectory picture are used to generate a new moving object trajectory picture.
  • the process includes: obtaining pixels at different times in the same position, determining whether the brightness of the pixels in the moving object track picture currently being shot at the same position is greater than the brightness of the pixels in the last synthesized moving object track picture, and if so, the last synthesized The pixels in the moving object track picture are replaced with the pixels in the currently photographed starry sky picture. After the pixels with smaller brightness in the last synthesized moving object track picture are all replaced, the final synthesized new star track picture is obtained.
  • the star-track picture synthesis of the embodiment is performed by using the brightness selection method, and the already synthesized star-track picture is used as the last synthesized moving object track picture; then the brightness of the moving picture in the subsequent picture is selected to be brighter than the last synthesized moving object track picture.
  • the synthetic method of replacing pixels is performed by using the brightness selection method, and the already synthesized star-track picture is used as the last synthesized moving object track picture; then the brightness of the moving picture in the subsequent picture is selected to be brighter than the last synthesized moving object track picture.
  • the first starry sky image has been taken.
  • the first starry sky image is taken as the first synthesized moving object track image.
  • the second image is taken, the first starry sky image and the second starry sky are taken.
  • the pixels of the corresponding position of the picture are compared. If the brightness of one position pixel of the second starry sky picture is greater than the brightness of the corresponding position pixel of the first starry sky picture, the pixel of the second starry sky picture is extracted to replace the first star sky.
  • the image includes pixel unit 1, pixel unit 2, and pixel unit n, a total of n pixel units, wherein the brightness of the picture currently taken by the pixel unit 501 to the pixel unit 700 is greater than the last synthesized moving object track.
  • the picture replaces the pixels of the pixel unit 501 to the pixel unit 700 in the current picture with the pixels of the pixel unit 501 to the pixel unit 700 in the last synthesized moving object track picture, and obtains a new composite picture as a new one after the replacement is completed.
  • Moving object track picture new synthetic star track picture).
  • the currently photographed moving object trajectory picture is combined with the background to generate a target picture.
  • a target picture For example, taking a nebula shot as an example, a shot is taken after a long exposure (first predetermined duration), and a nebula picture is taken.
  • the certain length of time is preferably 120s. That is, an exposure of 120s takes a picture of a nebula.
  • the preset picture is acquired as the background of the picture shooting, and at the end of the shooting, the currently captured moving object track picture is combined with the background to generate a target picture.
  • the selection of the picture as the background of the picture to meet the diverse needs of the picture shooting background, improve the experience of picture shooting.
  • FIG. 2 is a schematic flow chart of a second embodiment of a method for synthesizing pictures according to the present invention. Based on the first embodiment of the method for synthesizing the above picture, the step S10 includes:
  • Step S11 obtaining a preset picture and a brightness value of the preset picture
  • step S12 it is determined whether the brightness value is greater than a preset brightness threshold; if yes, the following steps S14 and S15 are performed, and if not, the following step S13 is performed.
  • the preset brightness threshold is set in advance by the user. For example, if the brightness is at most 100, the preset brightness threshold may be set to 20 or 30, etc., and the preset brightness threshold may be viewed in the picture under the brightness.
  • the shooting target is subject to.
  • the process of obtaining the brightness value of the preset picture may be: acquiring an average brightness value of the preset picture; the process of acquiring the brightness value of the preset picture may also be: according to the brightness value
  • the size is divided into several regions, and the average brightness values of the regions are respectively obtained, and the obtained brightness values are sequentially compared with the preset brightness thresholds to determine whether the obtained brightness values are greater than the Preset brightness threshold.
  • step S13 the preset picture is set as the shooting background.
  • the preset brightness threshold When the brightness value is less than or equal to the preset brightness threshold, it means that the shooting target in the picture can be clearly captured under the brightness value. It is not necessary to adjust the brightness of the shooting background, and the preset picture is set as the shooting background of the picture.
  • Step S14 adjusting the brightness of the preset picture to adjust the brightness value of the preset picture to be less than or equal to the preset brightness threshold;
  • the brightness value of the preset picture is reduced to be less than or equal to the preset brightness threshold.
  • step S15 the preset picture after the brightness adjustment is set as the shooting background.
  • the brightness of the preset picture When the brightness value of the preset picture is greater than the preset brightness threshold, that is, under the brightness, the shooting target cannot be clearly captured. Therefore, the brightness of the preset picture needs to be adjusted, and the preset is adjusted.
  • the brightness of the picture is adjusted to adjust the brightness value of the preset picture to be less than or equal to the preset brightness threshold. For example, if the preset brightness threshold is 30, the brightness value of the preset picture is adjusted to be less than or equal to 30.
  • the preset picture after the brightness adjustment is set as the shooting background. That is, a preset picture whose brightness is less than or equal to the preset brightness threshold is used as the shooting background of the picture.
  • the brightness value of the preset picture to be set as the background is first acquired, and when the brightness value is greater than the preset brightness threshold, the brightness of the preset picture is performed. Adjusting to adjust the brightness value of the preset picture to be less than or equal to the preset brightness threshold, so that the shooting target can be clearly captured under the background, thereby improving the experience of picture shooting.
  • FIG. 3 is a schematic flowchart diagram of a third embodiment of a method for synthesizing pictures according to the present invention. And the brightness of the preset picture is adjusted according to the second embodiment of the method for synthesizing the image. After the step S30, the method further includes:
  • Step S50 restoring the brightness value of the background in the target picture to the brightness value before the adjustment.
  • the captured track image of the moving object is The background is synthesized to generate a target picture, and the brightness value of the background in the target picture is restored to the brightness value before the adjustment. If the overall average brightness value of the background is adjusted, the overall average brightness value of the background is restored to the brightness value before the adjustment; if the background is divided into different areas and the brightness values are respectively adjusted, respectively Each area of the background The brightness value is restored to the brightness value before the adjustment.
  • the background brightness value in the target image may be acquired after the target image is synthesized, and the obtained brightness value is less than the expected threshold.
  • the brightness value is 50, 60, etc.
  • the brightness of the background is adjusted so that the brightness value of the background in the target picture reaches a desired threshold.
  • acquiring a brightness value of the target picture adjusting the brightness of the target picture to be greater than or equal to the expected threshold value when the acquired brightness value is less than the expected threshold.
  • the brightness of the background is adjusted, and after the target picture is synthesized, the brightness of the background is restored to the brightness before the adjustment, so that the user can better view through the synthesized picture. Go to the shooting target, improve the experience of picture shooting, and improve the user experience.
  • FIG. 4 is a schematic flowchart diagram of a fourth embodiment of a method for synthesizing pictures according to the present invention.
  • the third embodiment of the synthesis method based on the above picture, after the step S30, further includes:
  • Step S40 adjusting the background of the target image and/or the transparency of the trajectory picture of the moving object, so that the user simultaneously views the background and the trajectory picture of the moving object from the target picture.
  • the background and the track image of the moving object after synthesizing the target picture, it is determined whether the background and the track image of the moving object can be simultaneously viewed from the target picture, and if so, there is no need to adjust the transparency of the target picture; Adjusting the transparency of the background and/or the trajectory picture of the moving object in the target picture, that is, the transparency of the background may be separately adjusted, or the transparency of the trajectory picture of the moving object may be separately adjusted, or adjusted simultaneously
  • the background and the transparency of the trajectory picture of the moving object for example, respectively adjusting the transparency of the background and the trajectory picture of the moving object to 50%, the user can simultaneously view the same from the target picture at the same time
  • the background and the trajectory picture of the moving object that is, the background does not cover the trajectory picture of the moving object, and the trajectory picture of the moving object does not cover the background.
  • the transparency of the target picture is adjusted to enable simultaneous viewing of the back.
  • the scene and the trajectory picture of the moving object effectively avoid the problem that the background and the shooting target cannot be viewed at the same time, improve the experience of the picture shooting, and improve the user experience.
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the foregoing method for synthesizing pictures.
  • the embodiment of the invention further provides a picture synthesizing device.
  • FIG. 5 is a schematic diagram of functional modules of a first embodiment of a synthesizing apparatus for a picture according to the present invention.
  • the synthesizing device of the picture comprises: a processing module 10, a photographing module 20 and a synthesizing module 30.
  • the processing module 10 is configured to acquire a preset picture, and set the preset picture as a shooting background;
  • a preset picture when a picture capturing instruction is received, or before a picture is taken, a preset picture is acquired, and the process of acquiring the preset picture may be: receiving a picture input instruction, inputting the picture into the instruction
  • the process of obtaining a preset picture may also be: receiving a picture selection instruction, and selecting a corresponding picture from the pre-stored picture according to the selection instruction, where the corresponding picture is
  • the preset picture may be: receiving the picture acquisition instruction, randomly selecting a picture from the pre-stored picture as the preset picture, or selecting the preset from the pre-stored picture. Select a picture of the condition as the default picture.
  • the preset selection condition is that the number of browsing of the pre-stored picture exceeds a preset browsing number threshold (for example, 3 times, 5 times, etc.), or the interval between the storage time of the pre-stored picture and the current time is less than a preset time threshold (for example, 1 day, 20 hours, etc.).
  • the preset picture may be an image processed image, such as a character and/or a scene extracted from a picture, or an unprocessed original picture, such as no characters and/or scenes. Extracted pictures. After the preset picture is acquired, the preset picture is set as the shooting background.
  • the photographing module 20 is configured to photograph a trajectory of a moving object
  • the compositing module 30 is configured to synthesize a trajectory picture of the currently captured moving object and the background at the end of the shooting to generate a target picture.
  • the first picture When shooting a moving object, when the first picture is captured, the first picture is taken as the first synthesized moving object track picture; after the first picture is taken, one picture is taken every preset time Each time a picture is captured, the currently captured picture is combined with the last synthesized moving object track picture to generate a new moving object track picture; at the end of the shooting, the captured moving picture of the moving object is The background is synthesized to generate a target picture.
  • the first picture After setting the preset picture as the shooting background, immediately or after a certain time interval (30s, 1 minute, etc.), or when receiving a picture shooting instruction, the first picture is taken, and the first picture is taken. When the picture is taken, the first picture is taken as the first synthesized moving object track picture.
  • the position of the picture taking device Before taking a picture, the position of the picture taking device can be adjusted to position the shooting target in the taken picture at the expected position of the background.
  • the background and the corresponding captured moving object track picture may be combined to improve the user experience.
  • the first picture After taking the first picture, take a picture every preset time, and each time a picture is taken, the currently captured picture is combined with the last synthesized moving object track picture to generate a new moving object track picture. . That is, when the first picture is taken, the first picture is taken as the first synthesized moving object track picture, and the second picture is taken at intervals of the preset time, when the second picture is completed.
  • the second picture needs to be combined with the first picture to generate a new moving object track picture; the third picture is taken at a preset time interval, and when the third picture is taken, The third picture and the second time The resulting moving object trajectory is combined to generate a new moving object trajectory picture, and so on, each synthesized picture is taken as a new moving object trajectory picture for the next picture to be taken when the next picture is taken Perform a synthesis to generate a new moving object track picture.
  • the preset time is an exposure time, that is, an exposure time required for the picture shooting, for example, 120s, 200s, and the like.
  • the target picture is a combination of trajectories of the same shooting target in pictures taken at different times.
  • the shooting of the picture is stopped, and at the end of the shooting, the currently recorded moving object track picture and the A background is obtained by synthesizing the acquired currently recorded moving object trajectory picture with the background to generate a target picture.
  • the currently photographed moving object trajectory picture is merged with the background picture to display the moving object trajectory picture on the background.
  • the process of the currently captured moving object track picture and the last synthesized moving object track picture to generate a new moving object track picture may include: displaying the currently captured moving object track picture Adding to the track image of the last synthesized moving object to generate a new moving object track picture, that is, the last synthesized moving object track picture is superimposed with the pixels in the currently captured starry sky picture to generate a composite light drawing image.
  • the picture data is collected due to the preset exposure time, so the composite picture is also intermittently generated.
  • the pixel that satisfies the preset condition is selected from the last synthesized moving object track picture and the currently captured starry sky picture, and then the addition operation is performed on the pixel.
  • whether the brightness parameter of the pixel is greater than a threshold may be directly determined, and if yes, determining that the pixel meets the preset condition.
  • the addition operation filters the pixels with lower brightness to a certain extent, thereby avoiding the accumulation effect of the ambient light and polluting the picture of the final synthesized picture.
  • the size of the threshold may be determined according to the average brightness of the picture;
  • the numbers are optical parameters such as RGB value and YUV value.
  • the pixel unit 1 includes a pixel unit 1 and a pixel unit 2, and the pixel unit is a total of n pixel units.
  • the pixel parameters of the pixel unit 101 to the pixel unit 200 in the last synthesized moving object track picture are greater than a threshold, and the pixel unit 1 to If the brightness parameter in the currently photographed starry sky picture is greater than the threshold value, the pixel object of the pixel object 1 to the pixel unit 200 and the pixel parameter of the currently photographed starry sky picture are added. It is assumed that the brightness parameter value of the pixel unit 1 in the current picture to be combined is 10, and the brightness parameter value in the currently photographed starry sky picture is 100, and then the addition operation is performed in the synthetic light picture (new moving object track picture).
  • the synthetic light painting picture is also subjected to noise reduction processing, and at the same time, according to the exposure degree of the existing picture, the synthesis ratio of the newly synthesized light picture is controlled, and overexposure is suppressed.
  • the process of generating a new moving object trajectory picture by using the trajectory picture of the currently-shot moving object and the last synthesized moving object trajectory picture includes: acquiring pixels at different times in the same position. And determining whether the brightness of the pixel in the moving object track picture currently being shot at the same position is greater than the brightness of the pixel in the last synthesized moving object track picture, and if so, replacing the pixel in the last synthesized moving object track picture with the current.
  • the pixels in the starry sky picture are the new star track picture that is finally synthesized after all the pixels with smaller brightness in the last synthesized moving object track picture are replaced.
  • the star-track picture synthesis of the embodiment is performed by using the brightness selection method, and the already synthesized star-track picture is used as the last synthesized moving object track picture; then the brightness of the moving picture in the subsequent picture is selected to be brighter than the last synthesized moving object track picture.
  • the synthetic method of replacing pixels is performed by using the brightness selection method, and the already synthesized star-track picture is used as the last synthesized moving object track picture; then the brightness of the moving picture in the subsequent picture is selected to be brighter than the last synthesized moving object track picture.
  • the first starry sky image has been taken.
  • the first starry sky image is taken as the first synthesized moving object track image.
  • the second image is taken, the first starry sky image and the second starry sky are taken.
  • the pixels of the corresponding position of the picture are compared. If the brightness of a position pixel of the second starry sky picture is greater than the brightness of the corresponding position pixel of the first starry sky picture, the first extraction is performed.
  • the pixels of the two starry sky images replace the pixels corresponding to the position of the first starry sky image, and finally get a composite star track image (new moving object track image), and then use this synthetic star track image as the last time.
  • the synthesized moving object track picture is subjected to the same processing for the subsequent star image, and finally the target star track picture is obtained.
  • the image includes pixel unit 1, pixel unit 2, and pixel unit n, a total of n pixel units, wherein the brightness of the picture currently taken by the pixel unit 501 to the pixel unit 700 is greater than the last synthesized moving object track.
  • the picture replaces the pixels of the pixel unit 501 to the pixel unit 700 in the current picture with the pixels of the pixel unit 501 to the pixel unit 700 in the last synthesized moving object track picture, and obtains a new composite picture as a new one after the replacement is completed.
  • Moving object track picture new synthetic star track picture).
  • the currently photographed moving object trajectory picture is combined with the background to generate a target picture.
  • a target picture For example, taking a nebula shot as an example, a shot is taken after a long exposure, and a nebula picture is taken.
  • the certain length of time is preferably 120 s. That is, an exposure of 120s takes a picture of a nebula.
  • the preset picture is acquired as the background of the picture shooting, and at the end of the shooting, the currently captured moving object track picture is combined with the background to generate a target picture.
  • the selection of the picture as the background of the picture to meet the diverse needs of the picture shooting background, improve the experience of picture shooting.
  • FIG. 6 is a schematic diagram of functional modules of a second embodiment of a synthesizing apparatus for a picture according to the present invention.
  • the composition of the picture further includes a determination module 40.
  • the processing module 10 is further configured to acquire a brightness value of the preset picture
  • the determining module 40 is configured to determine whether the brightness value is greater than a preset brightness threshold
  • the preset brightness threshold is set in advance by the user. If the brightness is at most 100, the preset brightness threshold may be set to 20 or 30, etc., the preset. The brightness threshold is based on the shooting target in the picture that can be viewed under the brightness.
  • the process of obtaining the brightness value of the preset picture may be: acquiring an average brightness value of the preset picture; the process of acquiring the brightness value of the preset picture may also be: according to the brightness value
  • the size is divided into several regions, and the average brightness values of the regions are respectively obtained, and the obtained brightness values are sequentially compared with the preset brightness thresholds to determine whether the obtained brightness values are greater than the Preset brightness threshold.
  • the processing module 10 is further configured to set the preset picture as the shooting background when the brightness value is less than or equal to the preset brightness threshold.
  • the preset brightness threshold When the brightness value is less than or equal to the preset brightness threshold, it means that the shooting target in the picture can be clearly captured under the brightness value. It is not necessary to adjust the brightness of the shooting background, and the preset picture is set as the shooting background of the picture.
  • the processing module 10 is further configured to: when the brightness value of the preset picture is greater than a preset brightness threshold, adjust a brightness of the preset picture to adjust a brightness value of the preset picture to be less than or And being equal to the preset brightness threshold; setting the brightness-adjusted preset picture as a shooting background.
  • the brightness of the preset picture When the brightness value of the preset picture is greater than the preset brightness threshold, that is, under the brightness, the shooting target cannot be clearly captured. Therefore, the brightness of the preset picture needs to be adjusted, and the preset is adjusted.
  • the brightness of the picture is adjusted to adjust the brightness value of the preset picture to be less than or equal to the preset brightness threshold. For example, if the preset brightness threshold is 30, the brightness value of the preset picture is adjusted to be less than or equal to 30.
  • the preset picture after the brightness adjustment is set as the shooting background. That is, a preset picture whose brightness is less than or equal to the preset brightness threshold is used as the shooting background of the picture.
  • the brightness value of the preset picture to be set as the background is first acquired, and when the brightness value is greater than the preset brightness threshold, the brightness of the preset picture is performed. Adjusting to adjust the brightness value of the preset picture to be less than or equal to the Preset brightness threshold.
  • the shooting target can be clearly captured in the background, thereby improving the experience of picture shooting.
  • the synthesizing module 30 is further configured to synthesize the captured trajectory picture of the moving object with the background to generate a target picture;
  • the processing module 10 is further configured to restore the brightness value of the background in the target picture to the brightness value before the adjustment.
  • the captured track image of the moving object is The background is synthesized to generate a target picture, and the brightness value of the background in the target picture is restored to the brightness value before the adjustment. If the overall average brightness value of the background is adjusted, the overall average brightness value of the background is restored to the brightness value before the adjustment; if the background is divided into different areas and the brightness values are respectively adjusted, respectively The brightness values of the respective regions of the background are restored to the brightness values corresponding to the adjustment.
  • the background brightness value in the target picture may be acquired after the target picture is synthesized, and the obtained brightness value is less than the expected threshold.
  • the brightness value is 50, 60, etc.
  • the brightness of the background is adjusted so that the brightness value of the background in the target picture reaches a desired threshold.
  • acquiring a brightness value of the target picture adjusting the brightness of the target picture to be greater than or equal to the expected threshold value when the acquired brightness value is less than the expected threshold.
  • the brightness of the background is adjusted, and after the target picture is synthesized, the brightness of the background is restored to the brightness before the adjustment, so that the user can better view through the synthesized picture. Go to the trajectory of the shooting target, improve the experience of picture shooting, and improve the user experience.
  • the processing module 10 is further configured to adjust a transparency of the background and/or the current to-be-composited picture in the target picture to enable a user to view the target picture.
  • the background and the current picture to be synthesized are simultaneously viewed.
  • the background and the track image of the moving object after synthesizing the generated target picture, it is determined whether the background and the track image of the moving object can be simultaneously viewed from the target picture, and if so, there is no need to adjust the transparency of the target picture; No, adjusting the transparency of the background and/or the trajectory picture of the moving object in the target picture, that is, the transparency of the background may be separately adjusted, or the transparency of the trajectory picture of the moving object may be separately adjusted, or simultaneously Adjusting the background and the transparency of the trajectory picture of the moving object, for example, respectively adjusting the transparency of the background and the trajectory picture of the moving object to 50%, so that the user can simultaneously view from the target picture at the same time
  • the background and the trajectory picture of the moving object that is, the background does not cover the trajectory picture of the moving object, and the trajectory picture of the moving object does not cover the background.
  • the transparency of the target picture is adjusted to enable simultaneous viewing of the background and the scene.
  • the trajectory picture of the moving object effectively avoids the problem that the background and the shooting target cannot be viewed at the same time, improves the experience of the picture shooting, and improves the user experience.
  • the processing module 10, the imaging module 20, the synthesizing module 30, and the judging module 40 may each be a central processing unit (CPU), or a digital signal processing (DSP), or a micro processing unit. (MPU, Micro Processor Unit), or Field Programmable Gate Array (FPGA).
  • CPU central processing unit
  • DSP digital signal processing
  • MPU Micro Processor Unit
  • FPGA Field Programmable Gate Array
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may employ hardware embodiments, software embodiments, or junctions. In the form of an embodiment of the software and hardware aspects. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Studio Devices (AREA)

Abstract

一种图片的合成方法、装置及计算机存储介质,所述图片的合成方法包括:获取预设的图片,将预设的图片设置为拍摄背景;对运动物体的轨迹进行拍摄;在拍摄结束时,将当前拍摄到的运动物体的轨迹图片与所述背景进行合成,生成目标图片。

Description

图片的合成方法、装置及存储介质 技术领域
本发明涉及图像处理领域,尤其涉及图片的合成方法、装置及计算机存储介质。
背景技术
星轨拍摄主要用于拍摄星空中的星光,对于摄影爱好者来说,星轨拍摄是一种非常重要的体验。目前在星轨图片拍摄的过程中,通常将拍摄的星空图片作为拍摄背景,拍摄背景较为单一,无法满足星轨图片的拍摄背景多样化需求,影响星轨拍摄的体验。
发明内容
为解决现有存在的技术问题,本发明实施例在于提供一种图片的合成方法、装置及计算机存储介质,以至少解决无法满足图片的拍摄背景多样化需求,影响图片拍摄的体验的问题。
本发明实施例提供的一种图片的合成方法,所述方法包括:
获取预设的图片,将预设的图片设置为拍摄背景;
对运动物体进行拍摄;
在拍摄结束时,将当前拍摄到的运动物体的轨迹图片与所述背景进行合成,生成目标图片。
上述方案中,所述对运动物体进行拍摄包括:
在拍摄到第一张图片时,将所述第一张图片作为第一次合成的运动物体轨迹图片;
在拍摄第一张图片之后,每隔预设时间拍摄一张图片,每拍摄到一张 图片,将当前拍摄到的图片与上一次合成的运动物体轨迹图片进行合成以生成新的运动物体轨迹图片;
在拍摄结束时,将生成的新的轨迹图片与所述背景进行合成,生成目标图片。
上述方案中,所述将生成的新的运动物体的轨迹图片与所述背景进行合成,生成目标图片之后所述方法还包括:
将所述目标图片中所述背景的亮度值恢复为调整前的亮度值。
上述方案中,所述将生成的新的运动物体的轨迹图片与所述背景进行合成,生成目标图片之后,所述方法还包括:
调整所述目标图片中所述背景及/或所述运动物体的轨迹图片的透明度。
上述方案中,当拍摄的图片为星轨图片时,所述当前拍摄的运动物体的轨迹图片与上一次合成的运动物体轨迹图片以生成新的运动物体轨迹图片包括:
判断同一位置当前拍摄的运动物体轨迹图片中的像素的亮度是否大于上一次合成的运动物体轨迹图片中的像素的亮度;
若同一位置当前拍摄的运动物体轨迹图片中的像素的亮度大于上一次合成的运动物体轨迹图片中的像素的亮度,则将同一位置上一次合成的运动物体轨迹图片中的像素替换为当前拍摄的运动物体轨迹图片中的像素。
上述方案中,当拍摄的图片为光绘图片时,所述当前拍摄的运动物体的轨迹图片与上一次合成的运动物体轨迹图片以生成新的运动物体轨迹图片包括:
将当前拍摄的运动物体轨迹图片与上一次合成的运动物体轨迹图片进行加法运算,生成新的运动物体轨迹图片。
上述方案中,当拍摄的图片为星云图片时,
在一定时长的曝光后进行拍摄,拍摄得到星云图片。
上述方案中,所述将预设的图片设置为拍摄背景包括:
获取所述预设的图片的亮度值,判断所述亮度值是否大于预设亮度阈值;
在所述亮度值小于或等于预设亮度阈值时,将预设的图片设置为拍摄背景。
上述方案中,所方法还包括:
在所述预设的图片的亮度值大于预设亮度阈值时,调整所述预设的图片的亮度以将所述预设的图片的亮度值调整至小于或者等于所述预设亮度阈值;
将亮度调整后的所述预设的图片设置为拍摄背景。
本发明实施例还提供一种图片的合成装置,包括:
处理模块,配置为获取预设的图片,将预设的图片设置为拍摄背景;
拍摄模块,配置为对运动物体进行拍摄;
合成模块,配置为在拍摄结束时,将当前拍摄到的运动物体的轨迹图片与所述背景进行合成,生成目标图片。
上述方案中,所述处理模块,还配置为在拍摄到第一张图片时,将所述第一张图片作为第一次合成的运动物体轨迹图片;
所述拍摄模块,还配置为在拍摄第一张图片之后,每隔预设时间拍摄一张图片;
所述合成模块,配置为在每拍摄到一张图片,将当前拍摄到的图片与上一次合成的运动物体轨迹图片进行合成以生成新的运动物体轨迹图片;在拍摄结束时,将生成的新的运动物体的轨迹图片与所述背景进行合成,生成目标图片。
上述方案中,
所述处理模块,还配置为将所述目标图片中所述背景的亮度值恢复为调整前的亮度值。
上述方案中,所述处理模块,还配置为调整所述目标图片中所述背景及/或所述运动物体的轨迹图片的透明度。
上述方案中,当拍摄的图片为星轨图片时,所述图片的合成装置还包括判断模块,配置为判断同一位置当前拍摄的运动物体轨迹图片中的像素的亮度是否大于上一次合成的运动物体轨迹图片中的像素的亮度;
所述合成模块,还配置为当判断模块判断为同一位置当前拍摄的运动物体轨迹图片中的像素的亮度大于上一次合成的运动物体轨迹图片中的像素的亮度,则将同一位置上一次合成的运动物体轨迹图片中的像素替换为当前拍摄的运动物体轨迹图片中的像素。
上述方案中,当拍摄的图片为光绘图片时,所述合成模块,还配置为将当前拍摄的运动物体轨迹图片与上一次合成的运动物体轨迹图片进行加法运算,生成新的运动物体轨迹图片。
上述方案中,
所述处理模块,还配置为获取所述预设的图片的亮度值;
所述判断模块,还配置为判断所述亮度值是否大于预设亮度阈值;
所述处理模块,还配置为在所述亮度值小于或等于预设亮度阈值时,将预设的图片设置为拍摄背景;
所述处理模块,还配置为在所述预设的图片的亮度值大于预设亮度阈值时,调整所述预设的图片的亮度以将所述预设的图片的亮度值调整至小于或者等于所述预设亮度阈值;将亮度调整后的所述预设的图片设置为拍摄背景。
本发明实施例还提供了一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行前述的图片的 合成方法。
本发明实施例提供的图片的合成方法、装置及计算机存储介质,通过获取预设的图片作为图片拍摄的背景,并在拍摄结束时,将当前拍摄到的图片与作为拍摄背景的图片进行合成,生成目标图片。实现选择图片作为图片的拍摄背景,满足图片的拍摄背景多样化需求,提高了图片拍摄的体验。
附图说明
图1为本发明图片的合成方法的第一实施例的流程示意图;
图2为本发明图片的合成方法的第二实施例的流程示意图;
图3为本发明图片的合成方法的第三实施例的流程示意图;
图4为本发明图片的合成方法的第四实施例的流程示意图;
图5为本发明图片的合成装置的第一实施例的功能模块示意图;
图6为本发明图片的合成装置的第二实施例的功能模块示意图。
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
本发明实施例提供一种图片的合成方法,参照图1,图1为本发明图片的合成方法的第一实施例的流程示意图。
在一实施例中,所述图片的合成方法包括:
步骤S10,获取预设的图片,将预设的图片设置为拍摄背景图片;
在本实施例中,当接收到图片拍摄指令时,或者在进行图片拍摄之前,获取预设的图片,所述获取预设的图片的过程可以是:接收图片输入指令, 将所述图片输入指令对应的图片作为预设的图片,所述获取预设的图片的过程也还可以是:接收图片选择指令,根据选择指令从预存的图片中选择对应的图片,所述对应的图片即为预设的图片;所述获取预设的图片的过程也还可以是:接收图片获取指令,从预存的图片中随机选择一张图片作为预设的图片,或者从预存的图片中选择满足预设选择条件的一张图片作为预设的图片。所述预设选择条件为预存的图片的浏览次数超过预设浏览次数阈值(例如,3次、5次等),或预存的图片的存储时间离当前时间的间隔小于预设时间阈值(例如,1天、20个小时等)。所述预设的图片可以是进行图像处理过的图片,例如从一张图片中提取出的人物和/或景物,也可以是一张未经过处理的原始图片,如未进行人物及/或景物提取的图片。在获取到预设的图片后,将预设的图片设置为拍摄背景图片(背景图片)。在本发明其他实施例中,为了使得图片的拍摄更好的融合人们的预期,可以是获取预设的图片,从所述预设的图片中提取出人物和/或景物,将提取的人物和/或景物作为拍摄背景。执行所述图片的合成方法的主体可以是手机、平板电脑pad、笔记本电脑等移动摄像设备,在本实施例中优选为手机。
步骤S20,对运动物体的轨迹进行拍摄;
步骤S30,在拍摄结束时,将当前拍摄到的运动物体的轨迹图片与所述背景进行合成,生成目标图片。
当拍摄运动物体时,在拍摄到第一张图片时,将第一张图片作为第一次合成的运动物体轨迹图片;在拍摄第一张图片之后,每隔预设时间拍摄一张图片,每拍摄到一张图片,将当前拍摄到的图片与上一次合成的运动物体轨迹图片进行合成以生成新的运动物体轨迹图片;在拍摄结束时,将拍摄的所述运动物体的轨迹图片与所述背景进行合成,生成目标图片。
在将所述预设的图片设置为拍摄背景后,即时或者,在间隔一定时间(30s、1分钟等)之后,或者在接收到图片拍摄指令时,拍摄第一张图片, 在拍摄到第一张图片时,将所述第一张图片作为第一次合成的运动物体轨迹图片。在拍摄图片之前,可以调整拍摄图片装置的位置,以将拍摄的图片中拍摄目标的位置在所述背景的预期位置。在本发明其他实施例中,为了能使得用户能更好的观看每一张图片,可以将背景与对应的拍摄的运动物体轨迹图片进行合成,得到目标图片,以提高用户体验。
在拍摄第一张图片之后,每隔预设时间拍摄一张图片,每拍摄到一张图片,将当前拍摄到的图片与上一次合成的运动物体轨迹图片进行合成以生成新的运动物体轨迹图片。即在完成第一张图片的拍摄时,将所述第一张图片作为第一次合成的运动物体轨迹图片,间隔预设时间,进行第二张图片的拍摄,在完成第二张图片拍摄时,需要将所述第二张图片与所述第一张图片合成,以生成新的运动物体轨迹图片;间隔预设时间,进行第三张图片的拍摄,在完成第三张图片拍摄时,将所述第三张图片与第二次合成的运动物体轨迹合成,以生成新的运动物体轨迹图片,以此类推,将每一次合成的图片作为新的运动物体轨迹图片,以供在完成下一张图片拍摄时,与下一张图片进行合成生成新的运动物体轨迹图片。所述预设时间为曝光时间,即为所述图片拍摄需要的曝光时间,例如,为120s、200s等。
所述目标图片是由不同时刻拍摄的图片中同一拍摄目标的轨迹所组合而成的。在接收到图片拍摄结束指令时,或者在预设的拍摄时间(2个小时、4个小时等)到达时,停止图片的拍摄,在拍摄结束时,获取当前拍摄的运动物体轨迹图片及所述背景,将获取的当前拍摄的运动物体轨迹图片与所述背景进行合成,生成目标图片。即将所述当前拍摄的运动物体轨迹图片与所述背景图片融合,以在所述背景上显示所述运动物体轨迹图片。
例如,以合成光绘图片为例,所述当前拍摄的运动物体的轨迹图片与上一次合成的运动物体轨迹图片以生成新的运动物体轨迹图片的过程可以包括:将当前拍摄的运动物体轨迹图片与上一次合成的运动物体轨迹图片 进行加法运算,生成新的运动物体轨迹图片,即上一次合成的运动物体轨迹图片与当前拍摄到的星空图片中的像素进行叠加,生成一张合成的光绘图片。因间隔预设曝光时间采集图片数据,因此合成图片也是间断的生成。
作为优选,从上一次合成的运动物体轨迹图片与当前拍摄到的星空图片中选出满足预设条件的像素,然后对该像素执行加法运算。
具体的,在某些实施例中,在判断某一像素是否满足预设条件时,可以直接判断该像素的亮度参数是否大于阈值,若是,则判定该像素满足预设条件。从上一次合成的运动物体轨迹图片与当前拍摄到的星空图片中选出亮度参数大于阈值的像素(即图片上某点亮度的绝对值大于阈值)后,只对这些满足预设条件的像素执行加法运算,从而对亮度较低的像素进行了一定程度的过滤,避免了环境光的累计效果对最终的合成光绘图片的画面造成污染。所述阈值的大小可根据图片的平均亮度而定;所述亮度参数为RGB值、YUV值等光学参数。
例如,图片中包括像素单元1、像素单元2…像素单元n共n个像素单元,其中像素单元101~像素单元200在上一次合成的运动物体轨迹图片中的像素参数大于阈值,像素单元1~100在当前拍摄的星空图片中的亮度参数大于阈值,则对像素单元1~像素单元200的上一次合成的运动物体轨迹图片和当前拍摄的星空图片的像素参数执行加法运算。假设像素单元1在当前待合成图片中的亮度参数值为10,在当前拍摄的星空图片中的亮度参数值为100,则执行加法运算后在合成光绘图片(新的运动物体轨迹图片)中像素单元1的亮度参数值就为100+10=110。此外,还对合成光绘图片进行降噪处理,同时还根据现有图片的曝光度,控制新合成光绘图片的合成比例,抑制过曝产生。
例如,以合成目标星轨图片为例,所述将当前拍摄的运动物体的轨迹图片与上一次合成的运动物体轨迹图片以生成新的运动物体轨迹图片的过 程包括:获取同一位置不同时间的像素,判断同一位置当前拍摄的运动物体轨迹图片中的像素的亮度是否大于上一次合成的运动物体轨迹图片中的像素的亮度,若是,则将上一次合成的运动物体轨迹图片中的像素替换为当前拍摄的星空图片中的像素,在上一次合成的运动物体轨迹图片中亮度较小的像素全部替换完后,即为最终合成的新的星轨图片。即,本实施例的星轨图片合成采用亮度选择的方式进行,以已经合成的星轨图片作为上一次合成的运动物体轨迹图片;然后选择后续图片中亮度比上一次合成的运动物体轨迹图片亮的像素进行替换的合成方法。
比如已经拍摄了第一张星空图片,这时就以第一张星空图片为第一次合成的运动物体轨迹图片,当第二张图片拍摄完成时,将第一张星空图片与第二张星空图片的对应位置的像素进行对比,如果第二张星空图片一个位置像素的亮度大于第一张星空图片中对应位置像素的亮度,则提取出第二张星空图片的像素来替换掉第一张星空图片对应位置的像素,最后就得到了一张合成星轨图片(新的运动物体轨迹图片),然后又以这张合成的星轨图片作为上一次合成的运动物体轨迹图片,对后续得到的星空图片进行相同的处理,最终得到目标星轨图片。
又如,图像中包括像素单元1、像素单元2…像素单元n共n个像素单元,其中像素单元501~像素单元700共200个像素单元当前拍摄的图片的亮度大于上一次合成的运动物体轨迹图片,则将当前的图片中像素单元501~像素单元700的像素替换上一次合成的运动物体轨迹图片中像素单元501~像素单元700的像素,替换完成后获得一张新的合成图片作为新的运动物体轨迹图片(新的合成星轨图片)。
当拍摄的为运动物体时,将当前拍摄到的运动物体轨迹图片与所述背景进行合成,生成目标图片。例如,以星云拍摄为例,在一定时长(第一预定时长)的曝光后进行拍摄,拍摄得到星云图片。所述一定时长优选为 120s。即曝光120s拍摄出一张星云图片。
本实施例通过获取预设的图片作为图片拍摄的背景,并在拍摄结束时,将当前拍摄到的运动物体轨迹图片与所述背景进行合成,生成目标图片。实现选择图片作为图片的拍摄背景,满足图片的拍摄背景多样化需求,提高了图片拍摄的体验。
参照图2,图2为本发明图片的合成方法的第二实施例的流程示意图。基于上述图片的合成方法的第一实施例,所述步骤S10包括:
步骤S11,获取预设的图片及所述预设的图片的亮度值;
步骤S12,判断所述亮度值是否大于预设亮度阈值;若是,则执行下述步骤S14和步骤S15,若否,则执行下述步骤S13。
在获取到预设的图片之后,获取所述预设的图片的亮度值,并判断所述亮度值是否大于预设亮度阈值。所述预设亮度阈值为用户提前设置,例如亮度最大为100,则可以将所述预设亮度阈值设置为20或30等,所述预设亮度阈值以能在所述亮度下观看到图片中的拍摄目标为准。所述获取所述预设的图片的亮度值的过程可以是:获取所述预设的图片的平均亮度值;所述获取所述预设的图片的亮度值的过程也可以是:按照亮度值大小将所述预设的图片分为几个区域,并分别获取几个区域的平均亮度值,将获取的亮度值依次与预设亮度阈值进行比对,以判断获取的亮度值是否大于所述预设亮度阈值。
步骤S13,将预设的图片设置为拍摄背景。
在所述亮度值小于或等于预设亮度阈值时,即代表在所述亮度值下能清晰地拍摄图片中的拍摄目标。无需对所述拍摄背景的亮度进行调整,将预设的图片设置为图片的拍摄背景。
步骤S14,调整所述预设的图片的亮度以将所述预设的图片的亮度值调整至小于或者等于所述预设亮度阈值;
将所述预设的图片的亮度值减小至小于或者等于所述预设亮度阈值。
步骤S15,将亮度调整后的所述预设的图片设置为拍摄背景。
在所述预设的图片的亮度值大于预设亮度阈值时,即在所述亮度下,无法清晰的拍摄到拍摄目标,因此,需要调整所述预设的图片的亮度,调整所述预设的图片的亮度以将所述预设的图片的亮度值调整至小于或者等于所述预设亮度阈值。例如,预设亮度阈值为30,则将所述预设的图片的亮度值调整至小于或者等于30。将亮度调整后的所述预设的图片设置为拍摄背景。即将亮度小于或者等于所述预设亮度阈值的预设的图片作为图片的拍摄背景。
本发明实施例通过在设置拍摄背景的过程中,先获取待设置为背景的预设的图片的亮度值,在所述亮度值大于预设亮度阈值时,对所述预设的图片的亮度进行调整以将所述预设的图片的亮度值调整至小于或等于所述预设亮度阈值,以能在所述背景下能清晰的拍摄到所述拍摄目标,进而提高图片拍摄的体验。
参照图3,图3为本发明图片的合成方法的第三实施例的流程示意图。基于上述图片的合成方法的第二实施例,调整所述预设的图片的亮度,在所述步骤S30之后,所述方法还包括:
步骤S50,将所述目标图片中所述背景的亮度值恢复为调整前的亮度值。
在将所述预设的图片的亮度值进行调整之后,即在有将所述预设的图片的亮度值调整至小于或等于预设亮度阈值后,将拍摄的所述运动物体的轨迹图片与所述背景进行合成生成目标图片,将所述目标图片中所述背景的亮度值恢复为调整前的亮度值。若调整的为所述背景的整体平均亮度值时,则将所述背景的整体平均亮度值恢复为调整前的亮度值;若将所述背景划分为不同区域,分别进行亮度值调整,则分别将所述背景的各个区域 的亮度值恢复为对应调整前的亮度值。在本发明其他实施例中,为了能更好的观看到目标图片中的拍摄目标,也还可以是在合成得到目标图片之后,获取目标图片中的背景亮度值,在获取的亮度值小于预期阈值(亮度值为50、60等)时,调整所述背景的亮度,以使目标图片中的背景的亮度值达到预期阈值。或者获取所述目标图片的亮度值,在获取的亮度值小于所述预期阈值,将所述目标图片的亮度调整至大于或等于所述预期阈值。本实施例通过在拍摄图片前,有对所述背景的亮度进行调整,在合成得到目标图片之后,将所述背景的亮度恢复成调整前亮度,以使用户能更好的通过合成的图片观看到拍摄目标,提高图片拍摄的体验,并提高了用户体验。
参照图4,图4为本发明图片的合成方法的第四实施例的流程示意图。基于上述图片的合成方法的第三实施例,在所述步骤S30之后,还包括:
步骤S40,调整所述目标图片中所述背景及/或所述运动物体的轨迹图片的透明度,以使用户从所述目标图片中同时观看到所述背景与所述运动物体的轨迹图片。
在本实施例中,在合成目标图片之后,判断是否能从所述目标图片中同时观看到所述背景与所述运动物体的轨迹图片,若是,则无需调整所述目标图片的透明度;若否,则调整所述目标图片中所述背景及/或所述运动物体的轨迹图片的透明度,即可以单独调整所述背景的透明度,或单独调整所述运动物体的轨迹图片的透明度,或同时调整所述背景及所述运动物体的轨迹图片的透明度,例如,分别将所述背景和所述运动物体的轨迹图片的透明度调整为50%,则用户可以同时从所述目标图片中同时观看到所述背景和所述运动物体的轨迹图片,即所述背景不会覆盖所述运动物体的轨迹图片,同时所述运动物体的轨迹图片也不会覆盖所述背景。在本实施例通过在不能从所述目标图片中同时观看到所述背景与所述运动物体的轨迹图片时,进行所述目标图片的透明度的调整,以使能同时观看到所述背 景与所述运动物体的轨迹图片,有效避免不能同时观看到背景和拍摄目标的问题,提高图片拍摄的体验,也提高了用户体验。
本发明实施例还提供了一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行前述的图片的合成方法。
本发明实施例进一步提供一种图片的合成装置。
参照图5,图5为本发明图片的合成装置的第一实施例的功能模块示意图。
在一实施例中,所述图片的合成装置包括:处理模块10、拍摄模块20及合成模块30。
所述处理模块10,配置为获取预设的图片,将预设的图片设置为拍摄背景;
在本实施例中,当接收到图片拍摄指令时,或者在进行图片拍摄之前,获取预设的图片,所述获取预设的图片的过程可以是:接收图片输入指令,将所述图片输入指令对应的图片作为预设的图片,所述获取预设的图片的过程也还可以是:接收图片选择指令,根据所述选择指令从预存的图片中选择对应的图片,所述对应的图片即为预设的图片;所述获取预设的图片的过程也还可以是:接收图片获取指令,从预存的图片中随机选择一张图片作为预设的图片,或者从预存的图片中选择满足预设选择条件的一张图片作为预设的图片。所述预设选择条件为预存的图片的浏览次数超过预设浏览次数阈值(例如,3次、5次等),或预存的图片的存储时间离当前时间的间隔小于预设时间阈值(例如,1天、20个小时等)。所述预设的图片可以是进行图像处理过的图片,例如从一张图片中提取出的人物及/或景物,也可以是一张未经过处理的原始图片,如未进行人物及/或景物提取的图片。在获取到预设的图片后,将预设的图片设置为拍摄背景。在本发明其他实 施例中,为了使得图片的拍摄更好的融合人们的预期,可以是获取预设的图片,从所述预设的图片中提取出人物及/或景物,将提取的人物及/或景物作为拍摄背景。
所述拍摄模块20,配置为对运动物体的轨迹进行拍摄;
所述合成模块30,配置为在拍摄结束时,将当前拍摄到的运动物体的轨迹图片与所述背景进行合成,生成目标图片。
当拍摄运动物体时,在拍摄到第一张图片时,将所述第一张图片作为第一次合成的运动物体轨迹图片;在拍摄第一张图片之后,每隔预设时间拍摄一张图片,每拍摄到一张图片,将当前拍摄到的图片与上一次合成的运动物体轨迹图片进行合成以生成新的运动物体轨迹图片;在拍摄结束时,将拍摄的所述运动物体的轨迹图片与所述背景进行合成,生成目标图片。
在将所述预设的图片设置为拍摄背景后,即时或者,在间隔一定时间(30s、1分钟等)之后,或者在接收到图片拍摄指令时,拍摄第一张图片,在拍摄到第一张图片时,将所述第一张图片作为第一次合成的运动物体轨迹图片。在拍摄图片之前,可以调整拍摄图片装置的位置,以将拍摄的图片中拍摄目标的位置在所述背景的预期位置。在本发明其他实施例中,为了能使得用户能更好的观看每一张图片,可以将背景与对应的拍摄的运动物体轨迹图片进行合成,以提高用户体验。
在拍摄第一张图片之后,每隔预设时间拍摄一张图片,每拍摄到一张图片,将当前拍摄到的图片与上一次合成的运动物体轨迹图片进行合成以生成新的运动物体轨迹图片。即在完成第一张图片的拍摄时,将所述第一张图片作为第一次合成的运动物体轨迹图片,间隔预设时间,进行第二张图片的拍摄,在完成第二张图片拍摄时,需要将所述第二张图片与所述第一张图片合成,以生成新的运动物体轨迹图片;间隔预设时间,进行第三张图片的拍摄,在完成第三张图片拍摄时,将所述第三张图片与第二次合 成的运动物体轨迹合成,以生成新的运动物体轨迹图片,以此类推,将每一次合成的图片作为新的运动物体轨迹图片,以供在完成下一张图片拍摄时,与下一张图片进行合成生成新的运动物体轨迹图片。所述预设时间为曝光时间,即为所述图片拍摄需要的曝光时间,例如,为120s、200s等。
所述目标图片是由不同时刻拍摄的图片中同一拍摄目标的轨迹所组合而成的。在接收到图片拍摄结束指令时,或者在预设的拍摄时间(2个小时、4个小时等)到达时,停止图片的拍摄,在拍摄结束时,获取当前拍摄的运动物体轨迹图片及所述背景,将获取的当前拍摄的运动物体轨迹图片与所述背景进行合成,生成目标图片。即将所述当前拍摄的运动物体轨迹图片与所述背景图片融合,以在所述背景上显示所述运动物体轨迹图片。
例如,以合成光绘图片为例,所述当前拍摄的运动物体的轨迹图片与上一次合成的运动物体轨迹图片以生成新的运动物体轨迹图片的过程可以包括:将当前拍摄的运动物体轨迹图片与上一次合成的运动物体轨迹图片进行加法运算,生成新的运动物体轨迹图片,即上一次合成的运动物体轨迹图片与当前拍摄到的星空图片中的像素进行叠加,生成一张合成的光绘图片。因间隔预设曝光时间采集图片数据,因此合成图片也是间断的生成。
作为优选,从上一次合成的运动物体轨迹图片与当前拍摄到的星空图片中选出满足预设条件的像素,然后对该像素执行加法运算。
具体的,在某些实施例中,在判断某一像素是否满足预设条件时,可以直接判断该像素的亮度参数是否大于阈值,若是,则判定该像素满足预设条件。从上一次合成的运动物体轨迹图片与当前拍摄到的星空图片中选出亮度参数大于阈值的像素(即图片上某点亮度的绝对值大于阈值)后,只对这些满足预设条件的像素执行加法运算,从而对亮度较低的像素进行了一定程度的过滤,避免了环境光的累计效果对最终的合成光绘图片的画面造成污染。所述阈值的大小,可根据图片的平均亮度而定;所述亮度参 数为RGB值、YUV值等光学参数。
例如,图片中包括像素单元1、像素单元2…像素单元n共n个像素单元,其中像素单元101~像素单元200在上一次合成的运动物体轨迹图片中的像素参数大于阈值,像素单元1~100在当前拍摄的星空图片中的亮度参数大于阈值,则对像素单元1~像素单元200的上一次合成的运动物体轨迹图片和当前拍摄的星空图片的像素参数执行加法运算。假设像素单元1在当前待合成图片中的亮度参数值为10,在当前拍摄的星空图片中的亮度参数值为100,则执行加法运算后在合成光绘图片(新的运动物体轨迹图片)中像素单元1的亮度参数值就为100+10=110。此外,还对合成光绘图片进行降噪处理,同时还根据现有图片的曝光度,控制新合成光绘图片的合成比例,抑制过曝产生。
例如,以合成目标星轨图片为例,所述将当前拍摄的运动物体的轨迹图片与上一次合成的运动物体轨迹图片以生成新的运动物体轨迹图片的过程包括:获取同一位置不同时间的像素,判断同一位置当前拍摄的运动物体轨迹图片中的像素的亮度是否大于上一次合成的运动物体轨迹图片中的像素的亮度,若是,则将上一次合成的运动物体轨迹图片中的像素替换为当前拍摄的星空图片中的像素,在上一次合成的运动物体轨迹图片中亮度较小的像素全部替换完后,即为最终合成的新的星轨图片。即,本实施例的星轨图片合成采用亮度选择的方式进行,以已经合成的星轨图片作为上一次合成的运动物体轨迹图片;然后选择后续图片中亮度比上一次合成的运动物体轨迹图片亮的像素进行替换的合成方法。
比如已经拍摄了第一张星空图片,这时就以第一张星空图片为第一次合成的运动物体轨迹图片,当第二张图片拍摄完成时,将第一张星空图片与第二张星空图片的对应位置的像素进行对比,如果第二张星空图片一个位置像素的亮度大于第一张星空图片中对应位置像素的亮度,则提取出第 二张星空图片的像素来替换掉第一张星空图片对应位置的像素,最后就得到了一张合成星轨图片(新的运动物体轨迹图片),然后又以这张合成星轨图片为上一次合成的运动物体轨迹图片,对后续得到的星空图片进行相同的处理,最终得到目标星轨图片。
又如,图像中包括像素单元1、像素单元2…像素单元n共n个像素单元,其中像素单元501~像素单元700共200个像素单元当前拍摄的图片的亮度大于上一次合成的运动物体轨迹图片,则将当前的图片中像素单元501~像素单元700的像素替换上一次合成的运动物体轨迹图片中像素单元501~像素单元700的像素,替换完成后获得一张新的合成图片作为新的运动物体轨迹图片(新的合成星轨图片)。
当拍摄的为运动物体时,将当前拍摄到的运动物体轨迹图片与所述背景进行合成,生成目标图片。例如,以星云拍摄为例,在一定时长的曝光后进行拍摄,拍摄得到星云图片。所述一定时长优选为120s。即曝光120s拍摄出一张星云图片。
本实施例通过获取预设的图片作为图片拍摄的背景,并在拍摄结束时,将当前拍摄到的运动物体轨迹图片与所述背景合成,生成目标图片。实现选择图片作为图片的拍摄背景,满足图片的拍摄背景多样化需求,提高了图片拍摄的体验。
参照图6,图6为本发明图片的合成装置的第二实施例的功能模块示意图。所述图片的合成装置还包括判断模块40。
所述处理模块10,还配置为获取所述预设的图片的亮度值;
所述判断模块40,配置为判断所述亮度值是否大于预设亮度阈值;
在获取到预设的图片之后,获取所述预设的图片的亮度值,并判断所述亮度值是否大于预设亮度阈值。所述预设亮度阈值为用户提前设置,若,亮度最大为100,则可以将所述预设亮度阈值设置为20或30等,所述预设 亮度阈值以能在所述亮度下能观看到图片中的拍摄目标为准。所述获取所述预设的图片的亮度值的过程可以是:获取所述预设的图片的平均亮度值;所述获取所述预设的图片的亮度值的过程也可以是:按照亮度值大小将所述预设的图片分为几个区域,并分别获取几个区域的平均亮度值,将获取的亮度值依次与预设亮度阈值进行比对,以判断获取的亮度值是否大于所述预设亮度阈值。
所述处理模块10,还配置为在所述亮度值小于或等于预设亮度阈值时,将预设的图片设置为拍摄背景。
在所述亮度值小于或等于预设亮度阈值时,即代表在所述亮度值下能清晰地拍摄图片中的拍摄目标。无需对所述拍摄背景的亮度进行调整,将预设的图片设置为图片的拍摄背景。
所述处理模块10,还配置为在所述预设的图片的亮度值大于预设亮度阈值时,调整所述预设的图片的亮度以将所述预设的图片的亮度值调整至小于或者等于所述预设亮度阈值;将亮度调整后的所述预设的图片设置为拍摄背景。
在所述预设的图片的亮度值大于预设亮度阈值时,即在所述亮度下,无法清晰的拍摄到拍摄目标,因此,需要调整所述预设的图片的亮度,调整所述预设的图片的亮度以将所述预设的图片的亮度值调整至小于或者等于所述预设亮度阈值。例如,预设亮度阈值为30,则将所述预设的图片的亮度值调整至小于或者等于30。将亮度调整后的所述预设的图片设置为拍摄背景。即将亮度小于或者等于所述预设亮度阈值的预设的图片作为图片的拍摄背景。
本发明实施例通过在设置拍摄背景的过程中,先获取待设置为背景的预设的图片的亮度值,在所述亮度值大于预设亮度阈值时,对所述预设的图片的亮度进行调整以将所述预设的图片的亮度值调整至小于或等于所述 预设亮度阈值。以能在所述背景下能清晰的拍摄到所述拍摄目标,进而提高图片拍摄的体验。
在一个优选的方案中,所述合成模块30,还配置为将拍摄的所述运动物体的轨迹图片与所述背景进行合成,生成目标图片;
所述处理模块10,还配置为将所述目标图片中所述背景的亮度值恢复为调整前的亮度值。
在将所述预设的图片的亮度值进行调整之后,即在有将所述预设的图片的亮度值调整至小于或等于预设亮度阈值后,将拍摄的所述运动物体的轨迹图片与所述背景进行合成生成目标图片,将所述目标图片中所述背景的亮度值恢复为调整前的亮度值。若调整的为所述背景的整体平均亮度值时,则将所述背景的整体平均亮度值恢复为调整前的亮度值;若将所述背景划分为不同区域,分别进行亮度值调整,则分别将所述背景的各个区域的亮度值恢复为对应调整前的亮度值。在本发明其他实施例中,为了能更好的观看到星轨图片中的星星,也还可以是在合成得到目标图片之后,获取目标图片中的背景亮度值,在获取的亮度值小于预期阈值(亮度值为50、60等)时,调整所述背景的亮度,以使目标图片中的背景的亮度值达到预期阈值。或者获取所述目标图片的亮度值,在获取的亮度值小于所述预期阈值,将所述目标图片的亮度调整至大于或等于所述预期阈值。本实施例通过在拍摄图片前,有对所述背景的亮度进行调整,在合成得到目标图片之后,将所述背景的亮度恢复成调整前亮度,以使用户能更好的通过合成的图片观看到拍摄目标的运行轨迹,提高图片拍摄的体验,并提高了用户体验。
在一个优选的方案中,所述处理模块10,还配置为调整所述目标图片中所述背景及/或所述当前待合成图片的透明度,以使用户从所述目标图片 中同时观看到所述背景与所述当前待合成图片。
在本实施例中,在合成生成目标图片之后,判断是否能从所述目标图片中同时观看到所述背景与所述运动物体的轨迹图片,若是,则无需调整所述目标图片的透明度;若否,则调整所述目标图片中所述背景及/或所述运动物体的轨迹图片的透明度,即可以单独调整所述背景的透明度,或单独调整所述运动物体的轨迹图片的透明度,或同时调整所述背景及所述运动物体的轨迹图片的透明度,例如,分别将所述背景和所述运动物体的轨迹图片的透明度调整为50%,则用户可以同时从所述目标图片中同时观看到所述背景和所述运动物体的轨迹图片,即所述背景不会覆盖所述运动物体的轨迹图片,同时所述运动物体的轨迹图片也不会覆盖所述背景。在本实施例通过在不能从所述目标图片中同时观看到所述背景与所述运动物体的轨迹图片时,进行所述目标图片的透明度的调整,以使能同时观看到所述背景与所述运动物体的轨迹图片,有效避免不能同时观看到背景和拍摄目标的问题,提高图片拍摄的体验,也提高了用户体验。
在实际应用中,所述处理模块10、拍摄模块20、合成模块30及判断模块40均可由中央处理单元(CPU,Central Processing Unit)、或数字信号处理(DSP,Digital Signal Processor)、或微处理器(MPU,Micro Processor Unit)、或现场可编程门阵列(FPGA,Field Programmable Gate Array)等来实现。
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结 合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。

Claims (17)

  1. 一种图片的合成方法,所述方法包括:
    获取预设的图片,将预设的图片设置为拍摄背景;
    对运动物体进行拍摄;
    在拍摄结束时,将当前拍摄到的运动物体的轨迹图片与所述背景进行合成,生成目标图片。
  2. 根据权利要求1所述的图片的合成方法,其中,所述对运动物体进行拍摄包括:
    在拍摄到第一张图片时,将所述第一张图片作为第一次合成的运动物体轨迹图片;
    在拍摄第一张图片之后,每隔预设时间拍摄一张图片,每拍摄到一张图片,将当前拍摄到的图片与上一次合成的运动物体轨迹图片进行合成以生成新的运动物体轨迹图片;
    在拍摄结束时,将生成的新的运动物体的轨迹图片与所述背景进行合成,生成目标图片。
  3. 根据权利要求2所述的图片的合成方法,其中,所述将生成的新的运动物体的轨迹图片与所述背景进行合成,生成目标图片之后,所述方法还包括:
    将所述目标图片中所述背景的亮度值恢复为调整前的亮度值。
  4. 根据权利要求2所述的图片的合成方法,其中,所述将生成的新的运动物体的轨迹图片与所述背景进行合成,生成目标图片之后,所述方法还包括:
    调整所述目标图片中所述背景及/或所述运动物体的轨迹图片的透明度。
  5. 根据权利要求2所述的图片的合成方法,其中,当拍摄的图片为星轨图片时,所述将当前拍摄的运动物体的轨迹图片与上一次合成的运动物体轨迹图片以生成新的运动物体轨迹图片包括:
    判断同一位置当前拍摄的运动物体轨迹图片中的像素的亮度是否大于上一次合成的运动物体轨迹图片中的像素的亮度;
    若同一位置当前拍摄的运动物体轨迹图片中的像素的亮度大于上一次合成的运动物体轨迹图片中的像素的亮度,则将同一位置上一次合成的运动物体轨迹图片中的像素替换为当前拍摄的运动物体轨迹图片中的像素。
  6. 根据权利要求2所述的图片的合成方法,其中,当拍摄的图片为光绘图片时,所述将当前拍摄的运动物体的轨迹图片与上一次合成的运动物体轨迹图片以生成新的运动物体轨迹图片包括:
    将当前拍摄的运动物体轨迹图片与上一次合成的运动物体轨迹图片进行加法运算,生成新的运动物体轨迹图片。
  7. 根据权利要求1所述的图片的合成方法,其中,当拍摄的图片为星云图片时,
    在第一预定时长的曝光后进行拍摄,拍摄得到星云图片。
  8. 根据权利要求1至7任选一项所述的图片的合成方法,其中,所述将预设的图片设置为拍摄背景包括:
    获取所述预设的图片的亮度值,判断所述亮度值是否大于预设亮度阈值;
    在所述亮度值小于或等于预设亮度阈值时,将预设的图片设置为拍摄背景。
  9. 根据权利要求8所述的图片的合成方法,其中,所述方法还包括:
    在所述预设的图片的亮度值大于预设亮度阈值时,调整所述预设的图片的亮度以将所述预设的图片的亮度值调整至小于或者等于所述预设亮度 阈值;
    将亮度调整后的所述预设的图片设置为拍摄背景。
  10. 一种图片的合成装置,所述装置包括:
    处理模块,配置为获取预设的图片,将预设的图片设置为拍摄背景;
    拍摄模块,配置为对运动物体进行拍摄;
    合成模块,配置为在拍摄结束时,将当前拍摄到的运动物体的轨迹图片与所述背景进行合成,生成目标图片。
  11. 根据权利要求10所述的图片的合成装置,其中,所述处理模块,还配置为在拍摄到第一张图片时,将所述第一张图片作为第一次合成的运动物体轨迹图片;
    所述拍摄模块,还配置为在拍摄第一张图片之后,每隔预设时间拍摄一张图片;
    所述合成模块,配置为在每拍摄到一张图片,将当前拍摄到的图片与上一次合成的运动物体轨迹图片进行合成以生成新的运动物体轨迹图片;在拍摄结束时,将生成的新的运动物体的轨迹图片与所述背景进行合成,生成目标图片。
  12. 根据权利要求11所述的图片的合成装置,其中,所述处理模块,还配置为将所述目标图片中所述背景的亮度值恢复为调整前的亮度值。
  13. 根据权利要求11所述的图片的合成装置,其中,所述处理模块,还配置为调整所述目标图片中所述背景及/或所述运动物体的轨迹图片的透明度。
  14. 根据权利要求11所述的图片的合成装置,其中,当拍摄的图片为星轨图片时,所述图片的合成装置还包括判断模块,配置为判断同一位置当前拍摄的运动物体轨迹图片中的像素的亮度是否大于上一次合成的运动物体轨迹图片中的像素的亮度;
    所述合成模块,还配置为当判断模块判断为同一位置当前拍摄的运动物体轨迹图片中的像素的亮度大于上一次合成的运动物体轨迹图片中的像素的亮度,则将同一位置上一次合成的运动物体轨迹图片中的像素替换为当前拍摄的运动物体轨迹图片中的像素。
  15. 根据权利要求11所述的图片的合成装置,其中,
    当拍摄的图片为光绘图片时,所述合成模块,还配置为将当前拍摄的运动物体轨迹图片与上一次合成的运动物体轨迹图片进行加法运算,生成新的运动物体轨迹图片。
  16. 根据权利要求14所述的图片的合成装置,其中,
    所述处理模块,还配置为获取所述预设的图片的亮度值;
    所述判断模块,还配置为判断所述亮度值是否大于预设亮度阈值;
    所述处理模块,还配置为在所述亮度值小于或等于预设亮度阈值时,将预设的图片设置为拍摄背景;
    所述处理模块,还配置为在所述预设的图片的亮度值大于预设亮度阈值时,调整所述预设的图片的亮度以将所述预设的图片的亮度值调整至小于或者等于所述预设亮度阈值;将亮度调整后的所述预设的图片设置为拍摄背景。
  17. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1至9任一项所述的图片的合成方法。
PCT/CN2015/082988 2014-08-06 2015-06-30 图片的合成方法、装置及存储介质 Ceased WO2016019770A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/329,224 US10186066B2 (en) 2014-08-06 2015-06-30 Method, device and storage medium for image synthesis

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410385239.5A CN104134225B (zh) 2014-08-06 2014-08-06 图片的合成方法及装置
CN201410385239.5 2014-08-06

Publications (1)

Publication Number Publication Date
WO2016019770A1 true WO2016019770A1 (zh) 2016-02-11

Family

ID=51806894

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/082988 Ceased WO2016019770A1 (zh) 2014-08-06 2015-06-30 图片的合成方法、装置及存储介质

Country Status (3)

Country Link
US (1) US10186066B2 (zh)
CN (1) CN104134225B (zh)
WO (1) WO2016019770A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113709389A (zh) * 2020-05-21 2021-11-26 北京达佳互联信息技术有限公司 一种视频渲染方法、装置、电子设备及存储介质

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6391383B2 (ja) * 2014-02-10 2018-09-19 キヤノン株式会社 画像処理装置、その制御方法、プログラム及び記憶媒体
CN104134225B (zh) * 2014-08-06 2016-03-02 深圳市中兴移动通信有限公司 图片的合成方法及装置
CN105791661A (zh) * 2014-12-22 2016-07-20 深圳富泰宏精密工业有限公司 拍照系统及方法
CN106331462A (zh) * 2015-06-25 2017-01-11 宇龙计算机通信科技(深圳)有限公司 一种轨迹照片的拍摄方法、装置及移动终端
CN105072350B (zh) 2015-06-30 2019-09-27 华为技术有限公司 一种拍照方法及装置
CN105100775B (zh) * 2015-07-29 2017-12-05 努比亚技术有限公司 一种图像处理方法及装置、终端
KR20170014556A (ko) * 2015-07-30 2017-02-08 삼성전자주식회사 이동체를 촬영하는 방법 및 촬영 장치.
CN105208286A (zh) * 2015-10-15 2015-12-30 广东欧珀移动通信有限公司 一种模拟慢速快门的拍摄方法及装置
CN105959535A (zh) * 2016-04-27 2016-09-21 乐视控股(北京)有限公司 基于图片合成的多次曝光方法和系统
CN105959588A (zh) * 2016-05-30 2016-09-21 努比亚技术有限公司 移动终端、光绘照片的拍摄装置及方法
CN107426506B (zh) * 2017-03-31 2019-10-29 努比亚技术有限公司 一种天体拍摄的方法及终端
US10742899B1 (en) * 2017-08-30 2020-08-11 Snap Inc. Systems, devices, and methods for image enhancement
US11172192B2 (en) * 2018-12-27 2021-11-09 Waymo Llc Identifying defects in optical detector systems based on extent of stray light
CN110213485B (zh) * 2019-06-04 2021-01-08 维沃移动通信有限公司 一种图像处理方法及终端
CN111369445B (zh) * 2020-05-27 2020-09-15 北京伟杰东博信息科技有限公司 一种图像处理方法、系统及移动终端
CN112492209B (zh) * 2020-11-30 2022-04-29 维沃移动通信有限公司 拍摄方法、拍摄装置和电子设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103177469A (zh) * 2011-12-26 2013-06-26 深圳光启高等理工研究院 视频合成终端及其方法
US20130242121A1 (en) * 2012-03-12 2013-09-19 Casio Computer Co., Ltd. Image composing apparatus for continuously shooting plural images and combining the plural images
CN103327253A (zh) * 2013-06-26 2013-09-25 深圳市中兴移动通信有限公司 多重曝光方法和摄像装置
CN104134225A (zh) * 2014-08-06 2014-11-05 深圳市中兴移动通信有限公司 图片的合成方法及装置

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100516638B1 (ko) * 2001-09-26 2005-09-22 엘지전자 주식회사 화상 통신 시스템
JP4068485B2 (ja) * 2002-09-30 2008-03-26 株式会社東芝 画像合成方法、画像合成装置、画像合成プログラム
US7460730B2 (en) * 2005-08-04 2008-12-02 Microsoft Corporation Video registration and image sequence stitching
JP5895409B2 (ja) * 2011-09-14 2016-03-30 株式会社リコー 撮像装置
US9813638B2 (en) * 2012-08-28 2017-11-07 Hi Pablo, Inc. Lightpainting live view
US9070230B2 (en) * 2013-07-23 2015-06-30 Adobe Systems Incorporated Simulating strobe effects with digital image content
JP6126491B2 (ja) * 2013-08-08 2017-05-10 キヤノン株式会社 撮像装置及びその制御方法、プログラム、記憶媒体
KR102126453B1 (ko) * 2013-11-20 2020-06-24 삼성전자주식회사 전자 장치 및 전자 장치의 영상 처리 방법
JP6391383B2 (ja) * 2014-02-10 2018-09-19 キヤノン株式会社 画像処理装置、その制御方法、プログラム及び記憶媒体

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103177469A (zh) * 2011-12-26 2013-06-26 深圳光启高等理工研究院 视频合成终端及其方法
US20130242121A1 (en) * 2012-03-12 2013-09-19 Casio Computer Co., Ltd. Image composing apparatus for continuously shooting plural images and combining the plural images
CN103327253A (zh) * 2013-06-26 2013-09-25 深圳市中兴移动通信有限公司 多重曝光方法和摄像装置
CN104134225A (zh) * 2014-08-06 2014-11-05 深圳市中兴移动通信有限公司 图片的合成方法及装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113709389A (zh) * 2020-05-21 2021-11-26 北京达佳互联信息技术有限公司 一种视频渲染方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN104134225A (zh) 2014-11-05
US20170213371A1 (en) 2017-07-27
US10186066B2 (en) 2019-01-22
CN104134225B (zh) 2016-03-02

Similar Documents

Publication Publication Date Title
CN104134225B (zh) 图片的合成方法及装置
US9591237B2 (en) Automated generation of panning shots
CN104796594B (zh) 一种预览界面特殊效果即时呈现方法及终端设备
JP6395810B2 (ja) 動きゴーストフィルタリングのための基準画像選択
US20180109711A1 (en) Method and device for overexposed photography
CN105323497A (zh) 恒定包围的高动态范围(cHDR)操作
CN108668093A (zh) Hdr图像的生成方法及装置
TWI777098B (zh) 一種圖像處理方法及裝置、電子設備、儲存介質
CN105049728A (zh) 一种拍摄图像的获取方法和装置
KR20150108774A (ko) 비디오 시퀀스를 프로세싱하는 방법, 대응하는 디바이스, 컴퓨터 프로그램 및 비일시적 컴퓨터 판독가능 매체
US20110149098A1 (en) Image processing apparutus and method for virtual implementation of optical properties of lens
WO2016008356A1 (zh) 星轨拍摄的方法、物体运动轨迹的拍摄方法和移动终端
WO2016011877A1 (zh) 拍摄光绘视频的方法和移动终端、存储介质
KR102207633B1 (ko) 촬영 장치 및 그 제어 방법
CN104917973A (zh) 动态曝光调整方法及其电子装置
CN105072350A (zh) 一种拍照方法及装置
US20160019681A1 (en) Image processing method and electronic device using the same
JP6432399B2 (ja) 画像処理装置および画像処理方法
WO2016015544A1 (zh) 运动物体的轨迹的拍摄方法及装置
US20170214847A1 (en) Method for Setting Shooting Parameters of HDR mode and Electronic Device Using the Same
CN105812670A (zh) 一种拍照的方法及终端
CN106162024A (zh) 照片处理方法及装置
CN109120856B (zh) 一种摄像方法及装置
CN103973962B (zh) 图像处理方法及图像采集装置
KR101437898B1 (ko) 단일 영상을 이용한 hdr 영상 생성 장치 및 방법

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

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 15329224

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 04/07/2017)

122 Ep: pct application non-entry in european phase

Ref document number: 15829171

Country of ref document: EP

Kind code of ref document: A1