Abstract:
An example of the invention provides an electronic device. The electronic device includes a camera module, a control unit and a computing unit. The control unit controls the camera module to acquire a first image and a second image. The computing unit receives the first image and the second image to generate a third image, wherein the resolution of the third image is greater than the resolution of the first image and the resolution of the second image.

Description:
CROSS REFERENCE TO RELATED APPLICATIONS 
       [0001]    This application claims priority of Taiwan Patent Application No. 104137821, filed on Nov. 17, 2015, the entirety of which is incorporated by reference herein. 
       BACKGROUND OF THE INVENTION 
       [0002]    Field of the Invention 
         [0003]    The present invention relates to an image generation method and more particularly to a high-resolution image generation method according to known images. 
         [0004]    Description of the Related Art 
         [0005]    With the progress and development of technology, most handheld electronic devices, such as mobile phones, personal digital assistants, tablet, etc., are equipped with a camera unit to implement the camera function. In general, the camera module embedded on the handheld electronic device cannot be replaced. It means that the resolution of images taken by the camera module cannot be changed. It is inconvenient for uses who have the demand on high resolution images. 
       BRIEF SUMMARY OF THE INVENTION 
       [0006]    With the popularity of 3D images, more and more handheld electronic devices are equipped with a dual-lens camera module. The invention uses two images captured by the dual-lens camera module to generate a high-resolution image. 
         [0007]    An embodiment of the invention provides an electronic device including a camera module, a control unit and a computing unit. The control unit controls the camera module to capture a first image and a second image. The computing unit receives the first image and the second image to generate a third image, wherein a resolution of the third image is higher than a resolution of the first image and the second image. 
         [0008]    Another embodiment of the invention provides an image processing method for an electronic device with a camera module, comprising steps of capturing a first image and a second image via the camera module; applying an image to the first image and the second image to find corresponding relation between the first image and the second image; combining the first image and the second image to generate a third image according to the corresponding relation, wherein a resolution of the third image is higher than a resolution of the first image and the second image. 
         [0009]    A detailed description is given in the following embodiments with reference to the accompanying drawings. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0010]    The present invention can be more fully understood by reading the subsequent detailed description and examples with references made to the accompanying drawings, wherein: 
           [0011]      FIG. 1  is a schematic diagram of an electronic device according to an embodiment of the invention. 
           [0012]      FIG. 2  is a schematic diagram of a first image. 
           [0013]      FIG. 3  is a schematic diagram of a second image. 
           [0014]      FIG. 4  is a schematic of a temporarily image generated by the proposed image processing method. 
           [0015]      FIG. 5  is a schematic of a high-resolution image generated by the proposed image processing method. 
           [0016]      FIG. 6A  is a schematic of an electronic device with a dual-lens camera module according to an embodiment of the invention. 
           [0017]      FIG. 6B  is a flow chart of an image processing method according to an embodiment of the invention. 
           [0018]      FIG. 7A  is a schematic of an electronic device with a single-lens camera module according to another embodiment of the invention. 
           [0019]      FIG. 7B  is a flow chart of an image processing method according to another embodiment of the invention. 
           [0020]      FIG. 8A  is a schematic of an electronic device with a single-lens camera module according to another embodiment of the invention. 
           [0021]      FIG. 8B  is a flow chart of an image processing method according to another embodiment of the invention. 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0022]    The following description is of the best-contemplated mode of carrying out the invention. This description is made for the purpose of illustrating the general principles of the invention and should not be taken in a limiting sense. The scope of the invention is best determined by reference to the appended claims. 
         [0023]      FIG. 1  is a schematic diagram of an electronic device according to an embodiment of the invention. The electronic device comprises a first lens  11 , a second lens  12 , an image sensor  13  and an image processing unit  14 . The first lens  11  transmits a first light beam to the image sensor  13  to generate a first image. The second lens  12  transmits a second light beam to the image sensor  13  to generate a second image. In this embodiment, the resolution of the first image and the second image is N×M pixels. 
         [0024]    The image sensor  13  transmits the first image and the second image to the image processing unit  14  to generate a third image. In one embodiment, the image processing unit  13  first applies an image comparison procedure to the first image and the second image to find corresponding relation between the first image and the second image, and combines the first image and the second image to generate the third image according to the corresponding relation. 
         [0025]    In one embodiment, the image processing unit  14  may be a graphic processor, a controller of the electronic device or software or firmware executed by a processor or a controller. To clearly explain the operation of the image processing unit  14 , please refer to  FIGS. 2-5 . 
         [0026]      FIG. 2  is a schematic diagram of a first image.  FIG. 3  is a schematic diagram of a second image. When the image processing  14  receives the first image and the second image, the image processing unit  14  generates a temporarily image according to the first image and the second image, and the temporarily image is shown as  FIG. 4 .  FIG. 4  is a schematic of a temporarily image generated by the proposed image processing method. It is found that each pixel column of the first image and each pixel column of the second image are arranged alternately, and the first pixel Δ(0,0) of the first pixel column (pixels Δ(0,0) Δ(0,n)) of the second image is shifted one pixel to the first pixel O(0,0) of the first pixel column (pixels O(0,0)˜O(0,n)) of the first image. 
         [0027]    Then the computing unit  14  generates pixel values of unknown pixels according to the pixel values of known pixel (labeled as P(i,j) on  FIG. 4 ) to generate the third image, such as shown in  FIG. 5 . The pixel value of unknown pixel X(i,j) is generated as following: 
         [0028]    If the pixel X(i,j) is at the four edges of the third image, such as the first pixel column or the first pixel row, the pixel value of the pixel X(i,j) is generated by the following equation: 
         [0000]        X ( i,j )=(⅓)*[ P ( i− 1, j )+ P ( i+ 1, j )+ P ( i,j± 1)] or
 
         [0000]        X ( i,j )=(⅓)*[( P ( ij− 1)+ P ( i,j+ 1)+ P ( i± 1, j ))
 
         [0029]    If the pixel X(i,j) is at the four corners of the third image, such as the pixel X(2m,0) or X(0,2n), the pixel value of the pixel X(i,j) is generated by the following equation: 
         [0000]        X ( i,j )=(½)*[ P ( i± 1, j )+ P ( i,j± 1)]
 
         [0030]    If the pixel X(i,j) is at the internal position of the third image, the pixel value of the pixel X(i,j) is generated by the following equation: 
         [0000]        X ( i,j )=(¼)*[ P ( i+ 1, j )+ P ( i− 1, j )+ P ( i,j+ 1)+ P ( ij− 1)]
 
         [0031]    According to the paragraphs above, the invention can combine two images with resolution (N× M) to generate the third image with resolution (2N×2M). 
         [0032]    Furthermore, the pixel value generation of pixel X(i,j) above is for illustration only, and not to limit the invention thereto. A person skilled in the art can use a weight values according to a view angle difference between the first image and the second image to generate the pixel value pixel X(i,j). 
         [0033]    In another embodiment, the third image is generated by arranging each pixel column of the first image and each pixel column of the second image alternately or by arranging each pixel row of the first image and each pixel row of the second image alternately. For example, the first pixel column of the third image is the first pixel column of the first image, the second pixel column of the third image is the first pixel column of the second image and so on. In another example, the first pixel row of the third image is the first pixel row of the first image, the second pixel row of the third image is the first pixel row of the second image and so on. 
         [0034]      FIG. 6A  is a schematic of an electronic device with a dual-lens camera module according to an embodiment of the invention. The electronic device  60  comprises a control unit  61 , a computing unit  62 , a memory unit  63 , a display unit  64 , an I/O (input/output) unit  65 , a first camera module  66 , and a second camera module  67 . In one embodiment, the first camera module  66  and the second camera module  67  can be a camera module with dual lens, and the first camera module  66  and the second camera module  67  have respective image sensors for capturing images. 
         [0035]    In this embodiment the resolution of the image captured by the first camera module  66  and the second camera module  67  is (N×M). The control unit may be implemented by a controller or a processor to control the first camera module  66  and the second camera module  67 , such as the focus, shutter or aperture ratio thereof. In another embodiment, the control unit  61  processes all the operation of the electronic device. 
         [0036]    The memory unit  63  stores the first image and the second image captured by the first camera module  66  and the second camera module  67 . Furthermore, the memory unit  63  stores programs executed by the control unit  61 . The I/O unit  65  is provided to the user for inputting data a, controlling the electronic device  60  or outputting the data of the electronic device  60 . In one embodiment, the I/O unit  65  generates a control interface displayed in the display unit  64 . In this embodiment, the display unit  64  shows images captured by the first camera module  66  and the second camera module  67  or the image generated by the computing unit  62 . 
         [0037]    The computing unit  62  receives the first image and the second image captured by the first camera module  66  and the second camera module  67 , and applies an image comparison procedure to the first image and the second image to find corresponding relation between the first image and the second image to generate image information such as shown in  FIG. 2  and  FIG. 3 . Then, the computing unit  62  combines the first image and the second image to generate a third image, wherein the resolution of the third image is (2N*2M). The detail operation of the computing unit  62  can be referred to the description of  FIG. 4  and  FIG. 5 . 
         [0038]      FIG. 6B  is a flow chart of an image processing method according to an embodiment of the invention. The proposed image processing method can be applied to the electronic device with a dual-lens camera module. In one embodiment, the image processing method can be executed by the electronic device of  FIG. 6A . In step S 61 , the controller of the electronic device controls the dual-lens camera module or two camera modules to capture a first image and a second image. The first image and the second image may be captured at the same time or at different time points. 
         [0039]    In step S 62 , the first image and the second image are stored in the memory unit of the electronic device. In step S 63 , the computing unit of the electronic device accesses the first image and the second image, and applies an image to the first image and the second image to find corresponding relation between the first image and the second image, such as the image information shown in  FIG. 2  and  FIG. 3 . The computing unit combines the first image and the second image to generate the third image. In this embodiment, the resolution of the first image and the second image is (N×M), and the resolution of the third image is (2N×2M). The detail operation of the computing unit can be referred to the paragraphs corresponding to  FIG. 4  and  FIG. 5 . 
         [0040]    In step S 64 , the third image is stored in the memory of the electronic device and displayed by the display device of the electronic device. Note that when the user determines to generate a high-resolution image by the computing unit of the electronic device, the first image and the second image are not displayed on the display device of the electronic device. In step S 65 , the third image is displayed by the display device of the electronic device or transmitted to other device for displaying. 
         [0041]      FIG. 7A  is a schematic of an electronic device with a single-lens camera module according to another embodiment of the invention. Compared with the electronic device of  FIG. 6 , only one camera module is embedded in the electronic device and the camera module is controlled by the MEMS (microelectromechanical systems)  77  to capture two images at different time point to form a high-resolution image. The electronic device  70  comprises a control unit  71 , a computing unit  72 , a memory unit  73 , a display unit  74 , an I/O unit  75 , a camera module  76  and the MEMS  77 . 
         [0042]    In this embodiment the resolution of the first image or the second image captured by the camera module  76  is (N×M). The control unit  71  is implemented by a controller or a processor to control the camera module  76 , such as the focus, shutter or aperture ratio thereof. In another embodiment, the control unit  71  processes all the operation of the electronic device  70 . In this embodiment, the control unit  71  controls the camera module  76  to capture the first image at a first time point. Then, the control unit  71  transmits a control signal to the MEMS  77  to shift the camera module  76  for a predetermined distance or angle, and the camera module  76  captures the second image at a second time point. 
         [0043]    The memory unit  73  stores the first image and the second image captured by the camera module  76 . Furthermore, the memory unit  73  stores programs executed by the control unit  71 . The I/O unit  75  is provided to the user for inputting data, controlling the electronic device  70  or outputting the data of the electronic device  70 . In one embodiment, the I/O unit  75  generates a control interface displayed in the display unit  74 . In this embodiment, the display unit  74  shows images captured by the camera module  76  or the image generated by the computing unit  72 . 
         [0044]    The computing unit  72  receives the first image and the second image captured by the camera module  76 , and applies an image comparison procedure to the first image and the second image to find corresponding relation between the first image and the second image to generate image information such as shown in  FIG. 2  and  FIG. 3 . Then, the computing unit  72  combines the first image and the second image to generate a third image, wherein the resolution of the third image is (2N*2M). The detail operation of the computing unit  72  can be referred to the description of  FIG. 4  and  FIG. 5 . 
         [0045]      FIG. 7B  is a flow chart of an image processing method according to another embodiment of the invention. The proposed image processing method can be applied to the electronic device with a single-lens camera module. In one embodiment, the image processing method can be executed by the electronic device of  FIG. 7A . In step S 81 , the controller of the electronic device controls the camera module to capture a first image at a first time point. In step S 82 , the controller of the electronic device controls the MEMS to shift the camera module for a predetermined distance or angle, and the camera module captures the second image at a second time point. 
         [0046]    In step  73 , the first image and the second image are stored in the memory of the electronic device. In step S 74 , the computing device accesses the first image and the second image, and applies an image to the first image and the second image to find corresponding relation between the first image and the second image, such as the image information shown in  FIG. 2  and  FIG. 3 . The computing unit combines the first image and the second image to generate the third image. In this embodiment, the resolution of the first image and the second image is (N×M), and the resolution of the third image is (2N×2M). The detail operation of the computing unit can be referred to the paragraphs corresponding to  FIG. 4  and  FIG. 5 . 
         [0047]    In step S 75 , the third image is stored in the memory of the electronic device and displayed by the display device of the electronic device. Note that when the user determines to generate a high-resolution image by the computing unit of the electronic device, the first image and the second image are not displayed on the display device of the electronic device. In step S 76 , the third image is displayed by the display device of the electronic device or transmitted to other device for displaying. 
         [0048]      FIG. 8A  is a schematic of an electronic device with a single-lens camera module according to another embodiment of the invention. Compared with the electronic device of  FIG. 6 , only one camera module is embedded in the electronic device and the camera module is controlled by the MEMS (microelectromechanical systems)  87  to capture two images at different time point to form a high-resolution image. The electronic device  80  comprises a control unit  81 , a computing unit  82 , a memory unit  83 , a display unit  84 , an I/O unit  85  and a camera module  86 . The camera module  86  further comprises a MEMS  87  and a photosensitive element  88 . 
         [0049]    In this embodiment the resolution of the image captured by the camera module  86  is (N×M). The control unit  81  is implemented by a controller or a processor to control the camera module  86 , such as the focus, shutter or aperture ratio thereof. In another embodiment, the control unit  81  processes all the operation of the electronic device  80 . In this embodiment, the control unit  81  controls the camera module  86  to capture a first image at a first time point. Then, the control unit  81  transmits a control signal to the MEMS  87  to shift the photosensitive element  88  of the camera module  86  for a predetermined distance or angle, and the camera module  86  captures the second image at a second time point. 
         [0050]    The memory unit  83  stores the first image and the second image captured by the camera module  86 . Furthermore, the memory unit  83  stores programs executed by the control unit  81 . The I/O unit  85  is provided to the user for inputting data a, controlling the electronic device  80  or outputting the data of the electronic device  80 . In one embodiment, the I/O unit  85  generates a control interface displayed in the display unit  84 . In this embodiment, the display unit  84  shows images captured by the camera module  86  or the image generated by the computing unit  82 . 
         [0051]    The computing unit  82  receives the first image and the second image captured by the camera module  86 , and applies an image comparison procedure to the first image and the second image to find corresponding relation between the first image and the second image to generate image information such as shown in  FIG. 2  and  FIG. 3 . Then, the computing unit  82  combines the first image and the second image to generate a third image, wherein the resolution of the third image is (2N*2M). The detail operation of the computing unit  82  can be referred to the description of  FIG. 4  and  FIG. 5 . 
         [0052]      FIG. 8B  is a flow chart of an image processing method according to another embodiment of the invention. The proposed image processing method can be applied to the electronic device with a single-lens camera module. In one embodiment, the image processing method can be executed by the electronic device of  FIG. 8A . In step S 81 , the controller of the electronic device controls the camera module to capture a first image at a first time point. In step S 82 , the controller of the electronic device controls the MEMS to shift the photosensitive element of the camera module or the image sensor for a predetermined distance or angle, and the camera module captures the second image at a second time point. 
         [0053]    In step S 83 , the first image and the second image are stored in the memory of the electronic device. In step S 84 , the computing device accesses the first image and the second image, and applies an image to the first image and the second image to find corresponding relation between the first image and the second image, such as the image information shown in  FIG. 2  and  FIG. 3 . The computing unit combines the first image and the second image to generate the third image. In this embodiment, the resolution of the first image and the second image is (N×M), and the resolution of the third image is (2N×2M). The detail operation of the computing unit can be referred to the paragraphs corresponding to  FIG. 4  and  FIG. 5 . 
         [0054]    In step S 85 , the third image is stored in the memory of the electronic device and displayed by the display device of the electronic device. Note that when the user determines to generate a high-resolution image by the computing unit of the electronic device, the first image and the second image are not displayed on the display device of the electronic device. In step S 86 , the third image is displayed by the display device of the electronic device or transmitted to other device for displaying. 
         [0055]    While the invention has been described by way of example and in terms of the preferred embodiments, it is to be understood that the invention is not limited to the disclosed embodiments. To the contrary, it is intended to cover various modifications and similar arrangements (as would be apparent to those skilled in the art). Therefore, the scope of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.