An image processing method includes the steps of extracting edges from each of a plurality of original images, thereby obtaining edge images; extracting straight lines from the edge images, thereby obtaining line images; assuming extensions of the straight lines constituting the line images and setting vanishing points on the basis of the extensions; and trimming the plurality of original images so that positions of the vanishing points in the respective original images mutually match, thereby obtaining final images.
|
1. An image processing method comprising:
extracting edges from each original image of a plurality of original images, thereby obtaining an edge image;
extracting straight lines from the edge image, thereby obtaining line images;
determining extensions of the straight lines of the line images and setting a vanishing point based at least in part on the extensions; and
trimming each original image of the plurality of original images so that a position of the vanishing point of each original image of the plurality of original images matches with a position of a vanishing point of each other original image of the plurality of original images, thereby obtaining a final image corresponding to each original image.
7. An image processing apparatus comprising:
an edge extracting circuit configured to extract edges from each original image of a plurality of original images, thereby obtaining an edge image;
a line image circuit configured to extract straight lines from the edge image, thereby obtaining line images;
a vanishing point setting circuit configured to determine extensions of the straight lines of the line images and set a vanishing point based at least in part on the extensions; and
a trimming circuit configured to trim each original image of the plurality of original images so that a position of the vanishing point of each original image of the plurality of original images matches with a position of a vanishing point of each other original image of the plurality of original images, thereby obtaining a final image corresponding to each original image.
6. A computer-readable storage medium storing computer-executable instructions comprising an image processing program that, when executed by a computer, allow the computer to execute a method comprising:
extracting edges from each original image of a plurality of original images, thereby obtaining an edge image;
extracting straight lines from the edge image, thereby obtaining line images;
determining extensions of the straight lines of the line images and setting a vanishing point based at least in part on the extensions; and
trimming each original image of the plurality of original images so that a position of the vanishing point of each original image of the plurality of original images matches with a position of a vanishing point of each other original image of the plurality of original images, thereby obtaining a final image corresponding to each original image.
2. The image processing method according to
if a non-image area exists in the final image when the original image is trimmed so that the position of the vanishing point of each original image matches with the position of the vanishing point of each other original image, extending the original image to fill the non-image area.
3. The image processing method according to
wherein, when the original image is trimmed so that the position of the vanishing point of each original image matches with the position of the vanishing point of each other image, inclination of the original image is corrected so that the straight lines in the line images obtained from the original image match straight lines in line images obtained from each other original image of the plurality of original images.
4. The image processing method according to
wherein, when the final image is obtained by the trimming, the final image has a size based on the original image.
5. The image processing method according to
wherein the final image resulting from the trimming is stored in a storage device.
|
The present invention contains subject matter related to Japanese Patent Application JP 2008-034235 filed in the Japanese Patent Office on Feb. 15, 2008, the entire contents of which are incorporated herein by reference.
1. Field of the Invention
The present invention relates to an image processing method, a recording medium carrying an image processing program, and an image processing apparatus.
2. Description of the Related Art
Hereinafter, the above-described method for sequentially reproducing images captured at predetermined time intervals at short time intervals is called “slide-show reproducing”.
For example, if a user performs intermittent shooting while hanging a digital still camera on his/her neck during sightseeing and if the captured images are reproduced in a slide show, things and situations seen by the user during the sightseeing can be realistically reproduced.
A related-art document includes Patent Document 1: Japanese Unexamined Patent Application Publication No. 2003-250117.
However, if the digital still camera is significantly shaken during shooting, the direction of an optical axis of the digital still camera significantly changes in accordance with the shake. For this reason, as illustrated in
If such images are reproduced in a slide show, the position of a main subject and an entire composition significantly vary in an upward/downward or right/left direction in each image, although the images have similar content or the content gradually changes. This is not eye-friendly and may cause the user to have feeling of fatigue or sickness like motion sickness.
This is the same in moving images. If a main subject and an entire composition vary in an upward/downward or right/left direction in each frame during reproducing, those moving images are not eye-friendly and may cause feeling of fatigue or sickness.
According to an embodiment of the present invention, there is provided an image processing method including the steps of extracting edges from each of a plurality of original images, thereby obtaining edge images; extracting straight lines from the edge images, thereby obtaining line images; assuming extensions of the straight lines constituting the line images and setting vanishing points on the basis of the extensions; and trimming the plurality of original images so that positions of the vanishing points in the respective original images mutually match, thereby obtaining final images.
With this configuration, significant variations of a main subject and an entire composition in each image can be prevented in slide-show reproducing, which is eye-friendly and prevents feeling of fatigue or sickness like motion sickness.
<1> Outline of Embodiment of the Present Invention
Then, an edge extracting process is performed on the original image 11, so that an edge image 12 illustrated in
On the basis of this concept, extensions are assumed for all the straight lines constituting the line image 13 as illustrated in
After the vanishing point Px has been set, the original image 11 is trimmed so that the vanishing point Px is included in a frame (final image), whereby a trimmed image 14 illustrated in
Then, the trimmed image 14 is scaled up into an image 15 having the same size as that of the original image 11, as illustrated in
With the above-described process, significant variations of a main subject and an entire composition in each image do not occur during slide-show reproducing, as illustrated in
<2> Form More Appropriate Images
In the case where more appropriate slide-show reproducing is to be realized, the following correcting process should desirably be performed in the above-described process <1>.
<2-1> Set Trimming Area
For example, in the original image 11 illustrated in
In such a case, the final corrected image 15 has a blank area (non-image area) BLNK at the upper side as illustrated in
In the example illustrated in
Accordingly, the blank area BLNK does not appear in slide-show reproducing. The corrected image 15A is obtained by vertically extending the image 15. The content of the corrected image 15A is continuous to the previous and subsequent images and the image 15A is displayed for only a moment (e.g., for 0.8 seconds) during slide-show reproducing, which does not cause a user to feel unnaturalness.
In order to detect whether the trimming area TRMG lies off the line image 13 (image 11) as illustrated in
In this way, the presence or absence, the direction (position), and the size of the blank area BLNK can be detected on the basis of the position of the vanishing point Px with respect to the trimming OK area TROK, and the corrected image 15A illustrated in
<2-2> Correct Trimming Angle
The above-described <2-1> is applied to the case where the digital still camera is horizontally hung near a passenger's seat of a vehicle or on the neck of a user in a proper way. Actually, however, the digital still camera may temporarily incline to the right or left during running of the vehicle or walking of the user. In such a case, images captured at that time also incline and thus are not eye-friendly when being reproduced in a slide show.
In this case, the following process is performed after respective vanishing points Px and Px are set in two sequential images (n−1) and n.
(1) The image n is shifted so that the vanishing point Px of the image n matches the vanishing point Px of the image (n−1).
(2) The image n is rotated about the vanishing point
Px so that the extensions giving the vanishing point Px in the image n match the extensions giving the vanishing point Px in the image (n−1).
(3) Then, the trimming process from <2-1> is performed.
With this process, a final image does not incline even if the digital still camera temporarily inclines to the right or left, so that eye-friendly slide-show reproducing can be performed.
<3> Result of Process
<4> Configuration of Apparatus
The above-described processes <1> and <2> can be realized by dedicated hardware. Hereinafter, a description is given about the case where the processes <1> and <2> are realized by a personal computer.
With reference to
In this case, an OS (operating system) and various application programs are provided in the HDD 34, and also a routine 100 illustrated in
Furthermore, the original images (image data of the original images) illustrated in
Also, an input device 35, a card reader 36, and an USB (universal serial bus) port 37 connect to the system bus 39. In this case, the input device 35, such as a keyboard and a mouse, is operated by a user to input instructions or data, and the card reader 36 is used to access data in an external memory card (not illustrated) when the memory card is inserted. Furthermore, the USB port 37 is used to access data in an external USB device when the USB device is connected to a USB connector 38.
In
The original images taken in from the digital still camera 50 are stored in the HDD 34 and are corrected to the images as illustrated in
Furthermore, the personal computer 30 includes an audio reproducing circuit 41 and a display control circuit (GDC: graphic display controller) 43, which connect to the system bus 39. The audio reproducing circuit 41 performs a decoding process based on MP3 (MPEG (Motion Picture Experts Group)-1/audio layer 3) or the like as necessary when being supplied with digital audio data, D/A (digital to analog)—converts the digital audio data to analog audio signals, and supplies the analog audio signals to a speaker 42.
The display control circuit 43 includes a video RAM (not illustrated). Data to be displayed is supplied to the video RAM and is repeatedly read at predetermined intervals so as to be converted to video signals. Then, the video signals are supplied to a display 44 and images are displayed thereon.
<5> Operation of Apparatus
Now, the operation and process in the personal computer 30 illustrated in
<5-1>Operation of Performing Only Correction in Process <1>
In this case, after the power of the personal computer 30 has been turned on, the initial program loader in the nonvolatile memory 32 is executed by the CPU 31, and the OS is read from the HDD 34 and is executed after being transferred to the RAM 33, so that wait for execution of the application program occurs. Then, if instructions to execute the routine 100 are provided through an operation of the input device 35, the routine 100 is read from the HDD 34 and is transferred to the RAM 33, so that the execution of the routine 100 is started.
In the routine 100, the process is started from step 101 by the CPU 31. Then, in step 102, a first image among the original images stored in the HDD 34, that is, the original image 11 (
As a method for the edge extraction in step 111, the method described in J. Canny: “A Computational Approach to Edge Detection”, IEEE Transactions on Patten Analysis and Machine Intelligence, Vol. 8, No. 6, November 1986 can be used, for example.
Then, in step 112, straight lines are extracted from the edge image 12 formed in step 111 and the line image 13 (
Then, in step 113, the point Px where the largest number of extensions of the straight lines in the line image 13 converge or cross is set as a vanishing point (
Then, in step 114, the original image 11 is trimmed so that the range TRMG in
Then, in step 115, the trimmed image 14 formed in step 114 is scaled up to the size same as that of the original image 11, so that the final corrected image 15 is formed (
In step 121, it is determined whether the above-described correcting process has been performed on all the images (all the images to be corrected) in the HDD 34. If an uncorrected image remains, the process proceeds from step 121 to step 122. In step 122, a next uncorrected image is selected and the process returns to step 111. Then, the uncorrected image selected in step 122 is also corrected in the above-described manner.
After the above-described correcting process has been performed on all the images stored in the HDD 34, the completion is determined in step 121, and the process proceeds from step 121 to step 123. The routine 100 ends in step 123.
As described above, the routine 100 realizes the correcting process <1>. Accordingly, significant variations of a main subject and an entire composition in each image can be prevented during slide-show reproducing, so that eye-friendly and less fatiguing slide-show reproducing can be provided.
<5-2> Operation of Performing Also Formation of More Appropriate Images in Process <2>
In this case, a routine 200 illustrated in
In the routine 200, the process is started from step 201 by the CPU 31. Then, in step 202, a first image among the original images stored in the HDD 34, that is, the original image 11 (
Then, in step 212, straight lines are extracted from the edge image 12 formed in step 211 and the line image 13 (
Then, in step 221, whether the vanishing point Px was set in step 213 (presence/absence of the vanishing point Px) is determined. If it is determined that the vanishing point Px was set, the process proceeds from step 221 to step 222. In step 222, the above-described process (1) is performed, whereby the image n is shifted so that the vanishing point Px in the image n matches the vanishing point Px in the image (n−1). Then, in step 223, the above-described process (2) is performed, whereby the image n is rotated about the vanishing point Px so that the extensions giving the vanishing point Px in the image n match the extensions giving the vanishing point Px in the image (n−1).
The previous image (n−1) is temporarily stored in the RAM 33 for steps 222 and 223. When the first image (n=1) is processed, a reference image n=0 does not exist, and thus steps 222 and 223 are not performed.
Then, the process proceeds to step 224, where it is determined whether the vanishing point Px is positioned in the trimming OK area TROK (
On the other hand, if the vanishing point Px is not positioned in the trimming OK area TROK, the process proceeds from step 224 to step 225, where the original image 11 is extended to cover the blank area BLNK as illustrated in
In step 226, the original image 11 (or the image extended in step 225) is trimmed so that the range TRMG illustrated in
Then, in step 227, the trimmed image 14 formed in step 226 is scaled up to the same size as that of the original image 11 and the final corrected image 15 (or 15A) is formed (
Then, in step 231, it is determined whether the above-described correcting process has been performed on all the images (all the images to be corrected) in the HDD 34. If an uncorrected image remains, the process proceeds from step 231 to step 232. In step 232, a next uncorrected image is selected.
Then, in step 233, the image n selected in step 232 is compared with the previous image (n−1). In step 234, the similarity between the images n and (n−1) is determined. If the similarity has a predetermined value or more, it is determined that the images n and (n−1) are sequential sceneries and the process returns from step 234 to step 211. Then, the uncorrected image selected in step 232 is corrected in the above-described manner.
If the similarity between the images n and (n−1) has a value smaller than the predetermined value in step 234, it is determined that the images n and (n−1) are not sequential sceneries, and the process proceeds from step 234 to step 235. In step 235, the uncorrected image selected in step 232 is regarded as a first image as in step 202, and the process returns to step 211. Accordingly, step 211 and the subsequent steps are performed while the uncorrected image selected in step 232 being regarded as a first image, and correction is performed in the above-described manner.
Then, after the above-described correcting process has been performed on all the images stored in the HDD 34, the completion is determined in step 231, and the process proceeds from step 231 to step 236. In step 236, the routine 200 ends.
If the vanishing point Px is not set in step 221 (e.g., if only the horizon or a person exists in the image), the process proceeds from step 221 to step 241, where a process for no vanishing point Px is performed, and then the process proceeds to step 231.
As described above, the routine 200 can realize the process <2> for more appropriate images in addition to the correcting process <1>, so that more eye-friendly and less fatiguing slide-show reproducing can be provided.
<6> Conclusion
According to the above-described system, significant variations of a main subject and an entire composition in each image do not occur during slide-show reproducing, as illustrated in
Furthermore, even if the digital still camera temporarily inclines to the right or left, the final image does not incline and is eye-friendly when being reproduced in a slide show.
<7> Others
In the above-described embodiment, the original image 11 may be scaled down to a size (the number of dots) for easy process, the process <1> may be performed on the scaled-down image so as to set the trimming range TRMG, and the trimming range TRMG may be applied to the original image 11, so that the final corrected image 15 can be obtained.
In the above-described embodiment, the vanishing point Px is positioned at the center of the frame (final corrected image 15). However, the vanishing point Px is not necessarily positioned at the center of the frame, but the position of the vanishing point Px is fixed in sequential frames. For example, the position may be set by a user.
As described above, the above-described process is effective to images that change with correlation, and is thus more effective to moving images captured by a digital movie camera.
Furthermore, in the above-described embodiment, the trimmed image 14 is scaled up in step 227 in order to obtain the final corrected image 15 having the same size as that of the original image 11. Alternatively, the trimmed image 14 may be scaled up or down to the size set by a user, e.g., to the size having the number of dots equal to the number of dots of the display 44, so as to obtain the final corrected image 15.
It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and alterations may occur depending on design requirements and other factors insofar as they are within the scope of the appended claims or the equivalents thereof.
Sako, Yoichiro, Hayashi, Kazunori, Kon, Takayasu, Kamada, Yasunori, Kawakami, Itaru
Patent | Priority | Assignee | Title |
10068312, | Sep 17 2015 | Samsung Electronics Co., Ltd. | Image processing apparatus, image processing method, and computer-readable recording medium |
8514149, | Oct 16 2006 | Sony Corporation | Imaging display apparatus and method |
8624798, | Oct 16 2006 | Sony Corporation | Imaging display apparatus and method |
9179057, | Sep 27 2006 | Sony Corporation | Imaging apparatus and imaging method that acquire environment information and information of a scene being recorded |
9519339, | Oct 16 2006 | Sony Corporation | Imaging display apparatus and method |
9576204, | Mar 24 2015 | MONROE CAPITAL MANAGEMENT ADVISORS, LLC | System and method for automatic calculation of scene geometry in crowded video scenes |
9665167, | Oct 16 2006 | Sony Corporation | Imaging display apparatus and method |
9772686, | Oct 16 2006 | Sony Corporation | Imaging display apparatus and method |
Patent | Priority | Assignee | Title |
6778699, | Mar 27 2000 | Monument Peak Ventures, LLC | Method of determining vanishing point location from an image |
6968094, | Mar 27 2000 | Intellectual Ventures Fund 83 LLC | Method of estimating and correcting camera rotation with vanishing point location |
7502050, | Aug 31 2004 | XACTI CORPORATION | Unintentional hand movement canceling device |
7623153, | Aug 31 2004 | XACTI CORPORATION | Unintentional hand movement canceling device and imaging apparatus |
7773118, | Mar 25 2007 | FotoNation Limited | Handheld article with movement discrimination |
7893963, | Mar 27 2000 | Monument Peak Ventures, LLC | Digital camera which estimates and corrects small camera rotations |
20020036692, | |||
20050036673, | |||
20060044404, | |||
20060244749, | |||
CN1855150, | |||
EP1631062, | |||
JP2000272415, | |||
JP2002112252, | |||
JP2003250117, | |||
JP2004205398, | |||
JP2006245909, | |||
JP3238566, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Dec 11 2008 | HAYASHI, KAZUNORI | Sony Corporation | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 022211 | /0387 | |
Dec 11 2008 | KAMADA, YASUNORI | Sony Corporation | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 022211 | /0387 | |
Dec 12 2008 | KAWAKAMI, ITARU | Sony Corporation | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 022211 | /0387 | |
Dec 12 2008 | KON, TAKAYASU | Sony Corporation | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 022211 | /0387 | |
Jan 16 2009 | SAKO, YOICHIRO | Sony Corporation | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 022211 | /0387 | |
Feb 05 2009 | Sony Corporation | (assignment on the face of the patent) | / |
Date | Maintenance Fee Events |
Dec 30 2015 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Mar 02 2020 | REM: Maintenance Fee Reminder Mailed. |
Aug 17 2020 | EXP: Patent Expired for Failure to Pay Maintenance Fees. |
Date | Maintenance Schedule |
Jul 10 2015 | 4 years fee payment window open |
Jan 10 2016 | 6 months grace period start (w surcharge) |
Jul 10 2016 | patent expiry (for year 4) |
Jul 10 2018 | 2 years to revive unintentionally abandoned end. (for year 4) |
Jul 10 2019 | 8 years fee payment window open |
Jan 10 2020 | 6 months grace period start (w surcharge) |
Jul 10 2020 | patent expiry (for year 8) |
Jul 10 2022 | 2 years to revive unintentionally abandoned end. (for year 8) |
Jul 10 2023 | 12 years fee payment window open |
Jan 10 2024 | 6 months grace period start (w surcharge) |
Jul 10 2024 | patent expiry (for year 12) |
Jul 10 2026 | 2 years to revive unintentionally abandoned end. (for year 12) |