This application claims the benefit of Taiwan application Serial No. 96124055, filed Jul. 2, 2007, the subject matter of which is incorporated herein by reference.
1. Field of the Invention
The invention relates to a method for processing images and an electronic device using the same and, more particularly, to a method for processing images and decreasing shake of images and an electronic device using the same.
2. Description of the Related Art
A digital image can be permanently stored, does not occupy space and can be processed by a follow-up program. Then, the digital image gradually replaces an analog image (such as a negative, a roll film, etc.). A conventional digital video cameral is taken as an example to illustrate a follow-up method for processing images.
If the user wants to process the stored digital image by a follow-up method, he may connect the transmission port 990 of the digital video camera 900 to the transmission port 890 of the computer system 800 via a transmission wire, and then the digital image is transmitted to the computer system 800 and is stored in the storage unit 870 of the computer system 800. The user can watch the stored digital image in the storage unit 870 through a display unit 880. Then, the user edits the digital image via the follow-up processing unit 810 of the computer system 800. Conventional follow-up processing programs executed by the computer system 800 include programs for deleting images, adding images, combining digital images, cutting digital images or recording voice. The conventional follow-up processing programs cannot decrease the shake of the pictures, and time and power are wasted.
The invention relates to a method for processing images and an electronic device using the same, and it decreases shake phenomena of pictures in a filling or enlarging mode.
According to the invention, a method for processing images is provided. The method for processing images includes the steps as follows. A plurality of pictures are successively captured in a frame. A shake parameter of each of the pictures relative to a preceding picture is analyzed. Each of the shake parameters includes a horizontal shift value, a vertical shift value and a rotation variety value. Each of the pictures is adjusted in the frame according to each of the shake parameters to allow the shake parameters of the adjusted pictures to be close to zero. After each of the pictures is adjusted, each of the adjusted pictures has at least a blank area in the frame. Each of the pictures has a boundary pattern, and the boundary pattern is adjacent to the blank area. Similar patters for connecting the boundary patterns are searched for from a plurality of reference pictures. The reference pictures are each of the pictures, a plurality of preceding pictures and a plurality of succeeding pictures. Each of the similar patterns fills the corresponding each of the blank areas. The filled pictures are compressed. The compressed pictures are stored.
According to another aspect of the invention, an electronic device is provided. The electronic device includes an image capturing unit, an analysis unit, an adjustment unit, a search unit, a filling unit, a compression unit and a storage unit. The image capturing unit is used for successively capturing a plurality of pictures in a frame. The analysis unit is used for analyzing a shake parameter of each of the pictures relative to a preceding picture. Each of the shake parameters includes a horizontal shift value, a vertical shift value and a rotation variety value. The adjustment unit is used for adjusting each of the pictures in the frame according to each of the shake parameters to allow the shake parameters to be close to zero. After each of the pictures is adjusted, each of the adjusted pictures has at least a blank area in the frame. Each of the pictures has a boundary pattern, and the boundary pattern is adjacent to the blank area. The search unit is used for searching for similar patters for connecting the boundary patterns from a plurality of reference pictures. The reference pictures are each of the pictures, a plurality of preceding pictures and a plurality of succeeding pictures. The filling unit is used for filling the corresponding each of the blank areas with each of the similar patterns. The compression unit is used for compressing each of the filled pictures. The storage unit is used for storing the compressed pictures.
According to the invention, a method for processing images is further provided. The method for processing images includes the steps as follows. A plurality of pictures are successively captured in a frame. A shake parameter of each of the pictures relative to a preceding picture is analyzed. Each of the shake parameters includes a horizontal shift value, a vertical shift value and a rotation variety value. Each of the pictures in the frame is adjusted according to each of the shake parameters to allow the shake parameters of the adjusted pictures to be close to zero. After each of the pictures is adjusted, each of the adjusted pictures has at least a blank area in the frame. Each of the pictures is cut with an overlap area, and the overlap area overlaps each of the adjusted pictures in the frame. The size of each of the cut pictures is enlarged to be the same with the size of the frame. The enlarged pictures are compressed. The compressed pictures are stored.
According to the invention, an electronic device is provided. The electronic device includes an image capturing unit, an analysis unit, an adjustment unit, a cutting unit, an enlarging unit, a compression unit and a storage unit. The image capturing unit is used for successively capturing a plurality of pictures in a frame. The analysis unit is used for analyzing a shake parameter of each of the pictures relative to a preceding picture. Each of the shake parameters includes a horizontal shift value, a vertical shift value and a rotation variety value. The adjustment unit is used for adjusting each of the pictures in the frame according to each of the shake parameters to allow the shake parameters to be close to zero. After each of the pictures is adjusted, each of the adjusted pictures has at least a blank area in the frame. The cutting unit cuts each of the pictures with an overlap area, and the overlap area overlaps each of the adjusted pictures in the frame. The enlarging unit is used for enlarging the size of each of the cut pictures to the size of the frame. The compression unit is used for compressing the enlarged pictures. The storage unit is used for storing the compressed pictures.
These and other features, aspects, and advantages of the present invention will become better understood with regard to the following description, appended claims, and accompanying drawings.
As shown in
As shown in
Next, as shown in
As shown in
In the step S108, the search unit 130 searches for similar patterns for connecting the boundary patterns C_T−1,C_T+1 and C_T+2 from a plurality of reference pictures. The reference pictures are each of the pictures, a plurality of the preceding pictures and a plurality of the succeeding pictures. In the embodiment, the reference pictures are each of the pictures, the thirty preceding pictures and the thirty succeeding pictures (taking the T+2th picture as an example, the reference pictures are the T−28th to T+32th pictures). That is, each of the pictures in the embodiment has sixty-one reference pictures.
The search unit 130 compares outlines of the reference pictures to search for each of the similar patterns. During the comparison process, if patterns similar to the outlines are found, but they cannot be used to connect the boundary patterns, the reference pictures can be enlarged, reduced, translated or rotated to be compared until the similar patterns for connecting the boundary patterns are found. Especially, when a user travels by a moving vehicle, patterns in the pictures are continuously enlarged or reduced along with the variety of the distance. The comparison efficiency increases by enlarging, reducing, translating or rotating the reference pictures.
In the step S108, the search unit 130 can rapidly search out each of the similar patterns from the reference pictures according to the change tendency of each of the shake parameters. Taking the embodiment as an example, the T−1th to T+2th pictures has a change tendency of gradually moving toward the bottom-right and rotating clockwise. The search unit 130 can rapidly search out the similar patterns according to the change tendency. As shown in
As shown in
In the step S110, the filling unit 150 can further correspondingly adjust the color and the brightness of each of the similar patterns according to the color and the brightness of each of the boundary patterns to allow the pictures to be smoothly connected.
In the step S112, the compression unit 160 compresses the filled pictures.
In the step S114, the storage unit 170 stores the compressed pictures. Therefore, the electronic device 100 can automatically finish the processing program for stabilizing the pictures before it compresses or stores the pictures. The user can watch the digital images which do not shake on the display unit 180 of the electronic device 100. Thus, the convenience in use greatly increases.
The difference between a method for processing images and an electronic device 200 using the same of the embodiment and the method for processing images and the electronic device 100 using the same of the first embodiment is the program for filling the blank areas, and other same content is not described for concise purpose. As shown in
As shown in
As shown in
In the steps S112 to S114, the stabilized pictures are compressed and stored.
The method for processing images and the electronic device using the same disclosed in the embodiment of the invention utilize a filling or enlarging mode to decrease the shake phenomenon of each of the pictures. The method for processing images and the electronic device using the same have the following advantages.
First, the shaking phenomenon of each of the pictures can be effectively improved to allow users to watch the images comfortably.
Second, if a filling mode is used to stabilize the pictures, the pictures can remain their original sizes, and captured objects cannot be lost.
Third, during the comparison process for searching for the similar patterns, if patterns having similar outlines are searched out, but they cannot be used to connect the boundary patterns, the reference pictures can be enlarged, reduced, translated or rotated to be compared until the similar patterns which can be used to connect the boundary patterns are found. Especially, when a user travels by a moving vehicle, patterns in the pictures are continuously enlarged or reduced along with the variety of the distance. The comparison efficiency increases by enlarging, reducing, translating or rotating the reference pictures.
Fourth, the search unit can rapidly search out the similar patterns according to the change tendency of the pictures.
Fifth, the filling unit can further correspondingly adjust the color and the brightness of each of the similar patterns according to the color and the brightness of each of the boundary patterns to allow the pictures to be smoothly connected.
Sixth, if an enlarging mode is used to stabilize the pictures, the operation complexity decreases, the memory occupies little, and the processing speed is high.
Seventh, in the method for processing images in the above embodiment, a program is executed for stabilizing the pictures before the images are compressed and stored to the electronic device. Then, a user can directly watch stable images on the electronic device without any follow-up processing program.
Although the present invention has been described in considerable detail with reference to certain preferred embodiments thereof, the disclosure is not for limiting the scope of the invention. Persons having ordinary skill in the art may make various modifications and changes without departing from the scope and spirit of the invention. Therefore, the scope of the appended claims should not be limited to the description of the preferred embodiments described above.
Number | Date | Country | Kind |
---|---|---|---|
96124055 | Jul 2007 | TW | national |