Abstract:
An image processing method and an imaging device thereof are disclosed in the present invention. The image processing method includes the steps of: in the process of imaging, continuously collecting image data to a cache module, and adjusting the collecting speed according to the remaining space of the cache module; generating images continuously according to the image data; and displaying the images on a display. Thus, the processing capacity of the imaging device is utilized to the maximum limit, and the data loss due to an excessive fast collection speed is prevented. Meanwhile, the real-time performance of displaying the exposure effect is improved, and the user experience is also improved. After the exposure, the user is allowed to choose several photographs with different exposure effects from the display, thus the user may obtain several photographs with various photographing effects by photographing one time, and the user experience is further improved.

Description:
CROSS-REFERENCE 
       [0001]    This application is a continuation application of International patent application No. PCT/CN2014/085629, filed on Aug., 30, 2014, which claims priority to Chinese Patent Application No. 201410069624.9, filed with the Chinese Patent Office on Feb. 27, 2014, both of which are herein incorporated by reference in its entirety. 
     
    
     TECHNICAL FIELD 
       [0002]    The disclosure relates to the field of photography, and in particular to an image processing method and imaging device. 
       BACKGROUND 
       [0003]    In an imaging device, a shutter speed represents a period of time a shutter stays open when the camera takes a photo. The shutter speed may decide, together with a size of a lens aperture (also known as an F-number), an amount of light reaching a film or a sensor, also known as exposure. The faster the shutter speed, the shorter an exposure time, and the less the exposure. However in this case, a moving object may leave a clearer image on the film. The slower the shutter speed, the longer the exposure time, and the more the exposure. However in this case, the image of the moving object on the film will appear fuzzy. In general, imaging with a shutter speed of 1/30 second or less may be called imaging with a slow shutter speed. Using imaging with a slow shutter speed, a photo with a special effect or an artistic effect may be obtained. 
         [0004]    In related art, during imaging with a slow shutter speed, an imaging device may collect image data at regular intervals, and continuously generate images using the image data, thereby displaying an exposure effect in real time. However, in related art image data are collected continuously at fixed intervals, instead of at intervals variable as needed. Different imaging devices may process data at different speeds. An imaging device may process data at different speeds under different circumstances. When an overly large interval is set, the exposure effect will not be displayed in real time, impacting user experience. When an overly short interval is set, image data collected in time may go beyond computing capacity of an imaging device, leading to data loss. 
       SUMMARY 
       [0005]    Embodiments herein provide an image processing method and imaging device, capable of making maximal use of processing capacity of an imaging device, improving a real-time nature in displaying the exposure effect, improving user experience. 
         [0006]    An image processing method herein may include: 
         [0007]    continuously collecting image data, and outputting the image data every set time; 
         [0008]    after outputting the image data, generating a new image, according to synthesize the image data and an image at the previous moment by adding image data that have been collected after commencement of the image data collection, and displaying the new image on a display; 
         [0009]    showing all generated images on the display for a user to choose from; and 
         [0010]    storing, in an image storing module, an image on the display chosen by the user. 
         [0011]    The adjusting a collecting speed according to space remaining in the caching module may include: 
         [0012]    determining whether the space remaining in the caching module reaches a preset value; 
         [0013]    when the space remaining in the caching module reaches the preset value, adjusting the collecting speed to a preset speed. 
         [0014]    The displaying the images on a display may include: 
         [0015]    displaying the images one by one on the display, overlaying an image generated earlier with an image generated later. 
         [0016]    The method may further include: after the displaying the images on a display, 
         [0017]    after the imaging ends, displaying all generated images on the display; 
         [0018]    storing, in an image storing module, an image on the display chosen by a user. 
         [0019]    The method may further include: after the displaying the images on a display, 
         [0020]    after the imaging ends, storing, in an image storing module, an image being displayed on the display. 
         [0021]    The continuously generating images according to the image data may include continuously generating preview-sized images and full-sized images respectively according to the image data. The displaying the images on a display may include displaying the preview-sized images on the display. 
         [0022]    The displaying the images on a display may include: 
         [0023]    displaying the preview-sized images one by one on the display, overlaying a preview-sized image generated earlier with a preview-sized image generated later. 
         [0024]    The method may further include: after the displaying the images on a display, after the imaging ends, displaying all generated preview-sized images on the display; 
         [0025]    storing, in an image storing module, a full-sized image corresponding to a preview-sized image on the display chosen by a user. 
         [0026]    The method may further include: after the displaying the images on a display, 
         [0027]    after the imaging ends, storing, in an image storing module, a full-sized image corresponding to a preview-sized image being displayed on the display. 
         [0028]    An imaging device as provided herein includes a controlling module, an imaging module, a caching module, a generating module, a temporary storage module, and a displaying module. 
         [0029]    The controlling module is configured for integrated control of operation of the modules. 
         [0030]    The imaging module is configured for: during imaging, continuously collecting image data into the caching module, and adjusting a collecting speed according to space remaining in the caching module. 
         [0031]    The caching module is configured for caching the image data. 
         [0032]    The generating module is configured for continuously generating images according to the image data. 
         [0033]    The temporary storage module is configured for temporarily storing the continuously generated images. 
         [0034]    The displaying module is configured for displaying the images on a display. 
         [0035]    The imaging module may be further configured for: determining whether the space remaining in the caching module reaches a preset value; 
         [0036]    when the space remaining in the caching module reaches the preset value, adjusting the collecting speed to a preset speed. 
         [0037]    The temporary storage module may include a first temporary storage unit and a second temporary storage unit. 
         [0038]    The displaying module may be configured for displaying the images one by one on the display, overlaying an image generated earlier with an image generated later. 
         [0039]    The device may further include an image storing module. The displaying module may be further configured for: after the imaging ends, displaying all generated images on the display. The controlling module may be further configured for storing, in the image storing module, an image on the display chosen by a user. 
         [0040]    The controlling module may be further configured for: after the imaging ends, storing, in the image storing module, an image being displayed on the display. 
         [0041]    The generating module may be configured for: continuously generating preview-sized images and full-sized images respectively according to the collected image data; storing the preview-sized images in the first temporary storage unit; and storing the full-sized images in the second temporary storage unit. 
         [0042]    The controlling module may be configured for outputting the preview-sized images in the first temporary storage unit to the displaying module to display the preview-sized images. 
         [0043]    The displaying module may be configured for displaying the preview-sized images one by one on the display, overlaying a preview-sized image generated earlier with a preview-sized image generated later. 
         [0044]    The displaying module may be further configured for: after the imaging ends, displaying all generated preview-sized images on the display. The controlling module may be further configured for storing, in the image storing module, a full-sized image corresponding to a preview-sized image on the display chosen by a user. 
         [0045]    The controlling module may be further configured for: after the imaging ends, storing, in the image storing module, a full-sized image corresponding to a preview-sized image being displayed on the display. 
         [0046]    With an image processing method as provided herein, image data may be collected continuously during the entire imaging process, images may be generated continuously using the collected image data, and the generated images may be displayed on a display in real time, such that the user may preview the exposure effect. During the image data collection, a collecting speed is adjusted in real time according to space remaining in a caching module, making maximal use of processing capacity of an imaging device while avoiding data loss caused by an overly large collecting speed, improving a real-time nature in displaying the exposure effect, improving user experience. After the exposure ends, the user is allowed to choose multiple photos with different exposure effects from the display, such that the user may obtain, with one photographing operation, multiple photos with various effects, further improving user experience. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0047]      FIG. 1  is a flowchart of an image processing method according to a first embodiment herein. 
           [0048]      FIG. 2  is a flowchart of an image processing method according to a second embodiment herein. 
           [0049]      FIG. 3  is a diagram of modules of an imaging device according to a first embodiment herein. 
           [0050]      FIG. 4  is a diagram of modules of an imaging device according to a second embodiment herein. 
       
    
    
       [0051]    Implementation, features, and advantages of the present disclosure will be described further with reference to embodiments and drawings. 
       DETAILED DESCRIPTION 
       [0052]    Note that an embodiment illustrated here is merely for explaining the present disclosure, and is not intended to limit the present disclosure. 
         [0053]    According to an embodiment herein, image data may be continuously collected, and after a period of time, image data collected in the period of time may be output every set time, either fixed time or unfixed time depending on the image processing speed of imaging device can be used for the set time; an image of a present moment may be synthesized according to image data output at the present moment and an image synthesized at the previous moment, and the image of the present moment may be displayed on a display; all synthesized images may be displayed on the display for a user to choose from; and an image on the display chosen by the user may be stored in an image storing module. 
         [0054]    Referring to  FIG. 1 , an image processing method according to a first embodiment herein includes steps as follows. 
         [0055]    In step S 101 , after imaging starts, image data are continuously collected into a caching module, and a collecting speed is adjusted in real time according to space remaining in the caching module. 
         [0056]    After a user presses a shutter button or triggers a virtual shutter button, an imaging device may start imaging, continuously collecting image data into a caching module. During the image data collection, it may be determined in real time whether the space remaining in the caching module reaches a preset value. When the space remaining in the caching module reaches the preset value, the collecting speed may be adjusted to a preset speed. 
         [0057]    For example, in response to detecting space remaining in the caching module of 50% or more, the imaging device may collect image data at a maximal collecting speed. In response to detecting space remaining in the caching module less than 50%, the imaging device may lower the present collecting speed by half. In response to detecting space remaining in the caching module restored back to 50% or more, the imaging device may again restore the maximal collecting speed. There may be multiple preset values and preset speeds, progressively increasing or decreasing, as needed. Thus, it is possible to make maximal use of the processing capacity of the imaging device, while avoiding data overflow and data loss caused by an overly large collecting speed. 
         [0058]    In step S 102 , images are continuously generated according to the image data. 
         [0059]    The imaging device may generate images by performing a series of operations on the collected image data, and temporarily store the generated images. The imaging device may synthesize a new image by performing an adding operation on image data presently received and image data received previously, and perform noise reduction on the generated image. Meanwhile, a synthesizing ratio for synthesizing a recently collected image may be controlled according to exposure of an existing image to suppress overexposure. Assume that RGB or YUV information of a first image is RGB 1  or YUV 1 . As YUV and RGB may be converted to each other, YUV is adopted hereinafter for illustrative purpose. Then, YUV information of an nth image may be YUVn=(1/m) *(YUV 1 + . . . +YUVn-1). The m is an aperture parameter. Even though the images are generated continuously, given a limited computing-processing speed of the imaging device, two images next to each other are actually generated with a time interval. The faster the computing speed, the shorter the time interval will be. The speed at which the images are generated may in turn impact the image data collecting speed in step S 101 . The faster the image generating speed, the faster the image data in the caching module may be read, the faster the space in the caching module may be vacated, and thereby the imaging device may collect the image data at a greater speed. 
         [0060]    The imaging device may continuously generate preview-sized images and full-sized images respectively according to the collected image data, and output and display the preview-sized images in real time on the display. A preview-sized image may refer to an image of a small number of pixels. A full-sized image may refer to an image of a large number of pixels required or set by the user, much larger than the number of pixels in a preview-sized image. An image of a large number of pixels is generated at a slow speed. With an imaging device of a slow computing speed, slow image generation will lead to intermittent image display in real time. The preview-sized images and the full-sized images may be generated respectively through two threads. The preview-sized images, each having a small number of pixels, may be generated faster, and thereby will be output and displayed on the display in real time more smoothly, avoiding intermittent display. 
         [0061]    In step S 103 , the images are displayed one by one on a display, overlaying an image generated earlier with an image generated later. 
         [0062]    As soon as the user presses the shutter, a first generated image P 1  may be displayed on the display, and after a period of time be overlaid with a second image P 2 , which per se may then be displayed on the display . . . , and an image Pn- 1  may be overlaid with an nth image Pn, which per se may then be displayed on the display. In this way, exposure effects at different exposure times may be displayed in real time during the imaging. 
         [0063]    In step S 104 , after the imaging ends, an image being displayed on the display may be stored. 
         [0064]    A shutter for imaging with a slow shutter speed may include a shutter B, a shutter T, etc. A shutter B stays open during a period from when the shutter is pressed to when the shutter is released. A shutter T stays open during a period from when the shutter is pressed to when the shutter is pressed again. When observing that an image with a satisfying exposure effect is being displayed on the display, the user may release the shutter B or press the shutter T again to end the imaging, thereby ending the entire exposure process. The imaging device may then store the image being displayed on the display. Thereby, the user may obtain a fairly good photo simply by one photographing operation. 
         [0065]    In case the preview-sized images and the full-sized images are generated respectively, a full-sized image generated last may be stored. 
         [0066]    Referring to  FIG. 2 , an image processing method according to a second embodiment herein may include steps as follows. 
         [0067]    In step S 201 , after imaging starts, image data are continuously collected into a caching module, and a collecting speed is adjusted in real time according to space remaining in the caching module. 
         [0068]    In step S 202 , images are continuously generated according to the image data. 
         [0069]    In step S 203 , the images are displayed one by one on a display, overlaying an image generated earlier with an image generated later. 
         [0070]    Steps S 201 ˜S 203  in the embodiment are identical to steps S 101 ˜S 103  in the first embodiment, with step S 201  corresponding to step S 101 , step S 202  corresponding to step S 102 , step S 203  corresponding to step S 103 , and thus are not repeated here. 
         [0071]    In step S 204 , after the imaging ends, all generated images may be displayed on the display. 
         [0072]    The user may release a shutter B or press a shutter T again to end the entire imaging process. The imaging device may tile the display with all generated images such that they are displayed. In this way, during imaging, photos with exposure effects at different exposure times may be displayed in real time, and images with different exposure effects may be displayed at the same time, such that the user may compare, and choose from, the displayed images. 
         [0073]    In S 205 , an image on the display chosen by a user may be stored. 
         [0074]    The user may view the generated images on the display, and choose therefrom one or more favorite images. The imaging device may store the image(s) chosen by the user. In this way, the user may obtain multiple photos with various effects merely with one photographing operation. 
         [0075]    Accordingly, with an image processing method herein, image data are collected continuously in the entire imaging process; images are continuously generated in real time using the collected image data and are displayed on the display, such that the user may preview the exposure effect. During the image data collection, the collecting speed is adjusted in real time according to the space remaining in the caching module, making maximal use of processing capacity of an imaging device while avoiding data loss caused by an overly large collecting speed, improving a real-time nature in displaying the exposure effect, improving user experience. After the exposure ends, the user is allowed to choose multiple photos with different exposure effects from the display, such that the user may obtain, with one photographing operation, multiple photos with various effects, further improving user experience. 
         [0076]    Referring to  FIG. 3 , an imaging device according to a first embodiment herein may be a camera, or terminal equipment such as a mobile phone, a tablet, etc., with a camera function. The imaging device implements an aforementioned image processing method. The imaging device may include a controlling module  110 , an imaging module  120 , a caching module  130 , a generating module  140 , a temporary storage module  150 , a displaying module  160 , and an image storing module  170 . 
         [0077]    The controlling module  110  may be configured for integrated control of operation of the modules, thereby controlling the entire flow. 
         [0078]    The imaging module  120  may be configured for: during imaging, continuously collecting image data into the caching module, and adjusting a collecting speed according to space remaining in the caching module. 
         [0079]    After a user presses a shutter button or triggers a virtual shutter button, the imaging module  120  may start imaging, continuously collecting image data into a caching module. During the image data collection, it may be determined in real time whether the space remaining in the caching module reaches a preset value. When the space remaining in the caching module reaches the preset value, the collecting speed may be adjusted to a preset speed. 
         [0080]    For example, in response to detecting space remaining in the caching module  130  of 50% or more, the imaging module  120  may collect image data at a maximal collecting speed. In response to detecting space remaining in the caching module  130  less than 50%, the imaging module may lower the present collecting speed by half. In response to detecting space remaining in the caching module  130  restored back to 50% or more, the imaging module may again restore the maximal collecting speed. There may be multiple preset values and preset speeds, progressively increasing or decreasing, as needed. Thus, it is possible to make maximal use of the processing capacity of the imaging device, while avoiding data overflow and data loss caused by an overly large collecting speed. 
         [0081]    The generating module  140  may be configured for continuously generating images according to the image data. 
         [0082]    The generating module  140  may read the image data in the caching module  130 , generate images by performing a series of operations on the collected image data, and store the generated images in the temporary storage module. The generating module  140  may synthesize a new image by performing an adding operation on image data presently received and image data received previously, and perform noise reduction on the generated image. Meanwhile, a synthesizing ratio for synthesizing a recently collected image may be controlled according to exposure of an existing image to suppress overexposure. Assume that RGB or YUV information of a first image is RGB 1  or YUV 1 . As YUV and RGB may be converted to each other, YUV is adopted hereinafter for illustrative purpose. Then, YUV information of an nth image may be YUVn=(1/m)* (YUV 1 + . . . +YUV n-1). The m is an aperture parameter. 
         [0083]    Even though the images are generated continuously, given a limited computing-processing speed of the generating module  140 , two images next to each other are actually generated with a time interval. The faster the computing speed, the shorter the time interval will be. Meanwhile, the speed at which the generating module  140  generates the images may in turn impact the speed at which the imaging module  120  collects the image data. The faster the image generating speed, the faster the image data in the caching module  130  may be read, the faster the space in the caching module may be vacated, and thereby the imaging module  120  may collect the image data at a greater speed. 
         [0084]    The displaying module  160  may be configured for displaying the continuously generated images in real time on the display. 
         [0085]    The controlling module  110  may output the images in the temporary storage module  150  to the displaying module  160  in real time. The displaying module  160  may display the images one by one on the display, overlaying an image generated earlier with an image generated later. As soon as the user presses the shutter, a first generated image P 1  may be displayed on the display, and after a period of time be overlaid with a second image P 2 , which per se may then be displayed on the display . . . , and an image Pn- 1  may be overlaid with an nth image Pn, which per se may then be displayed on the display. In this way, exposure effects at different exposure times may be displayed in real time during the imaging. 
         [0086]    A shutter for imaging with a slow shutter speed may include a shutter B, a shutter T, etc. A shutter B stays open during a period from when the shutter is pressed to when the shutter is released. A shutter T stays open during a period from when the shutter is pressed to when the shutter is pressed again. When observing that an image with a satisfying exposure effect is being displayed on the display, the user may release the shutter B or press the shutter T again to end the imaging, thereby ending the entire exposure process. After the imaging ends, the controlling module  110  may then store, in the image storing module  170 , the image being displayed on the display. Thereby, the user may obtain a fairly good photo simply by one photographing operation. 
         [0087]    In an embodiment, after the imaging ends, the controlling module  110  may control the displaying module  160  to tile the display with all images generated during the imaging, such that they are displayed. In this way, the user may compare, and choose from, the displayed images. In the end, the controlling module  110  may store, in the image storing module  170 , one or more images on the display chosen by the user(s). In this way, during imaging, photos with exposure effects at different exposure times may be displayed in real time, and images with different exposure effects may be displayed at the same time. 
         [0088]    Referring to  FIG. 4 , an imaging device according to a second embodiment herein may include a controlling module  110 , an imaging module  120 , a caching module  130 , a generating module  140 , a temporary storage module  150 , a displaying module  160 , and an image storing module  170 . 
         [0089]    The embodiment differs from the last embodiment in that the temporary storage module  150  may include a first temporary storage unit  151  and a second temporary storage unit  152 . The generating module  140  may continuously generate preview-sized images and full-sized images respectively through two threads according to the collected image data; store the preview-sized images in the first temporary storage unit  151 ; and store the full-sized images in the second temporary storage unit  152 . The controlling module  110  may output the preview-sized images in the first temporary storage unit  151  to the displaying module  160  to display the preview-sized images. After the imaging ends, the controlling module  110  may store, in the image storing module  170 , an image last stored in the second temporary storage unit  152 . In an embodiment, the controlling module  110  may copy an image chosen on the display by the user from the second temporary storage unit  152  to the image storing module  170 . 
         [0090]    A preview-sized image may refer to an image of a small number of pixels. A full-sized image may refer to an image of a large number of pixels required or set by the user, much larger than the number of pixels in a preview-sized image. An image of a large number of pixels is generated at a slow speed. With a generating module  140  of a slow computing speed, slow image generation will lead to intermittent image display in real time. The preview-sized images and the full-sized images may be generated respectively through two threads. The preview-sized images, each having a small number of pixels, may be generated faster, and thereby will be output and displayed on the display in real time more smoothly, avoiding intermittent display. 
         [0091]    An imaging device herein may continuously collect image data during the entire imaging with a slow shutter speed, continuously generate images using the collected image data, and display the generated images on a display in real time, such that the user may preview the exposure effect. During the image data collection, a collecting speed is adjusted in real time according to space remaining in a caching module, making maximal use of processing capacity of an imaging device while avoiding data loss caused by an overly large collecting speed, improving a real-time nature in displaying the exposure effect, improving user experience. After the exposure ends, the user is allowed to choose multiple photos with different exposure effects from the display, such that the user may obtain, with one photographing operation, multiple photos with various effects, further improving user experience. What described are merely embodiments of the present disclosure and are not intended to limit the patentable scope of the present disclosure. Any equivalent structure or flow variant made using content of the present disclosure and the drawings, or direct or indirect application to another related technical field, likewise falls within the patentable scope of the present disclosure. 
       INDUSTRIAL APPLICABILITY 
       [0092]    With an image processing method as provided herein, image data may be collected continuously during the entire imaging process, images may be generated continuously using the collected image data, and the generated images may be displayed on a display in real time, such that the user may preview the exposure effect. During the image data collection, a collecting speed is adjusted in real time according to space remaining in a caching module, making maximal use of processing capacity of an imaging device while avoiding data loss caused by an overly large collecting speed, improving a real-time nature in displaying the exposure effect, improving user experience. After the exposure ends, the user is allowed to choose multiple photos with different exposure effects from the display, such that the user may obtain, with one photographing operation, multiple photos with various effects, further improving user experience.