This application claims the benefit of Korean Patent Application No. 2005-37469, filed May 4, 2005, in the Korean Intellectual Property Office, the disclosure of which is incorporated herein by reference.
1. Field of the Invention
An aspect of the present invention relates to an apparatus and method for extracting moving images, and more particularly, to an apparatus and method for automatically extracting and outputting an image including a desired object from a moving image file.
2. Description of the Related Art
The development of information communication technologies has lead to the Internet rapid increase of the amount of multimedia information, such as characters, sounds, still and moving images and so on, circulated via the internet and other digital media. Moving images generally include computer-generated images, animations, images created by camcorders or mobile phones, etc. These images can be easily distributed and, recently, many users want to directly output them without storing them. Thus, a screen capture utility is installed on a PC and a desired screen is captured many times. However, different from the case of still images, a process of capturing, extracting, and printing a desired screen, from moving image screens including dozens of frames per second, is very difficult and time-consuming.
Referring to
The moving image outputting apparatus 120 includes a moving image receiver 121 receiving moving image data, an image extractor 122 extracting a key frame, a data converter 123 converting the extracted key frame data into printable data, and a printing unit 124 printing the converted printable data.
The image extractor 122 receives a moving image stream from the moving image receiver 121 and transmits data extracted in real time from the moving image stream to the data converter 123. The image extractor 122 compares and analyzes image data of each received frame with a reference frame to calculate characteristic values, sets a frame with a characteristic value greater than a predetermined threshold value to a key frame, and then outputs the key frame. The key frame is a significantly meaningful one of the frames of the moving images. In general, a frame representing a scene transition is extracted as the key frame. An algorithm for extracting a key frame includes a method of using brightness differences between pixels, a method of using brightness information, a method of using a brightness histogram of entire frames, etc.
However, these methods are difficult, expensive, and time-consuming since they may extract images undesired by a user and must compare all frames with a reference frame in order to extract a key frame.
An aspect of the present invention provides an apparatus and method for extracting moving images, capable of automatically extracting and outputting an image including a desired object from moving images when outputting the moving images through a printer.
According to an aspect of the present invention, there is provided a moving image extracting apparatus including: a reference image processor pre-processing a reference image and extracting features of the reference image; a frame information setting unit setting a sampling rate and a similar frame output rate; an image extractor selecting candidate frames from input moving images at the sampling rate, extracting features of the candidate frames, matching the extracted features of the reference image with the extracted features of the candidate frames to calculate similarities thereof, and selecting at least one frame with a similarity greater than a threshold value from the candidate frames; a frame buffer storing the frame selected by the image extractor; and a data converter converting the frame stored in the frame buffer into printable data.
According to another aspect of the present invention, the image extractor includes: a candidate frame selector selecting the candidate frames from the input moving images at the sampling rate; a pre-processing and feature-extracting unit pre-processing the candidate frames and extracting the features of the candidate frames; a similarity calculator matching the extracted features of the reference image with the extracted features of the candidate frame to calculate the similarities; and an output frame selector selecting the at least one frame with the similarity greater than the threshold value from the candidate frames and storing the at least one frame in the frame buffer.
According to another aspect of the present invention, if there is a plurality of successive similar images among frames stored in the frame buffer, the output frame selector rearranges the frames using the similarities and selects frames with high similarities from the rearranged frames according to the similar frame output rate.
According to another aspect of the present invention, the image extractor matches the feature-extracted reference image to the feature-extracted candidate frames using a Hausdorff method to calculate the similarities.
According to another aspect of the present invention, the moving image extracting apparatus further includes: a display unit displaying the frame selected by the image extractor to allow a user to determine whether or not to output the frame.
According to another aspect of the present invention, the input moving images are received from a host PC or from an external storage medium.
According to another aspect of the present invention, there is provided a moving image extracting method including: extracting features of a reference image; setting a sampling rate and a similar frame output rate; selecting candidate frames from input moving images at the sampling rate and extracting features of the candidate frames; matching the extracted features of the reference image with the extracted features of the candidate frames to calculate similarities and selecting at least one frame with a similarity greater than a threshold value from the candidate frames; and converting the selected frame into printable data.
According to another aspect of the present invention, the selecting of the at least one frame includes: matching the extracted features of the reference image with the extracted features of the candidate frames to calculate the similarities; and selecting the at least one frame with the similarity greater than the threshold value from the candidate frames and storing the selected frame in a frame buffer.
According to still another aspect of the present invention, there is provided a computer-readable medium having embodied thereon a computer program for executing the method for extracting the moving images.
Additional aspects and/or advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
These and/or other aspects and advantages of the invention will become apparent and more readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
The present invention will now be described more fully with reference to the accompanying drawings, in which exemplary embodiments of the invention are shown.
Referring to
The moving image extracting apparatus 200 may be installed in a printer driver device in a PC or in a printer.
The frame information setting unit 210 sets a sampling rate for extracting a predetermined number of frames from moving image data. This process is required to avoid overload, which can be caused when applying feature extraction and image matching to all frames of moving image data having 30 frames per second. Also, the frame information setting unit 210 sets a similar frame output rate for deciding how many similar frames should be extracted when similar images are extracted for successive frames.
The reference image processor 220 processes a reference image including an object desired by a user. The reference image may be a frame of moving image data, a scanned (or sketched) image, an image pre-stored in a PC, etc.
In order to correctly compare the reference image with each frame of moving images, the reference image processor 220 performs image pre-processing for grooming the reference image. The image pre-processing includes re-scaling for adjusting the size of the reference image, masking for eliminating unnecessary backgrounds, illumination gradient correction for adjusting the brightness of the reference image and eliminating the shadows, image enhancement by using an algorithm such as histogram smoothing, etc.
After pre-processing the reference image, the reference image processor 220 extracts features of the pre-processed reference image. Feature extracting technologies used for this process include feature-based, knowledge-based, template-based, and color-based technologies. In this embodiment, an edge detecting technology is used for extracting the features of the reference image.
The image extractor 230 randomly selects candidate frames from input moving images IN1 at the sampling rate set by the frame information setting unit 210, extracts features of the selected candidate frames, and matches the extracted features of the candidate frames with the extracted features of the reference image to calculate similarities thereof, and selects at least one frame with a similarity greater than a threshold value from the candidate frames. In this embodiment, in order to calculate a similarity between a reference image and a candidate frame, Hausdorff distance matching is used. The detailed configuration of the image extractor 230 will be described later with reference to
The frame buffer 240 stores the frame selected by the image extractor 230. The frame buffer 240 also stores the similarities of the respective frames calculated by the image extractor 230.
The data converter 250 converts the frame stored in the frame buffer 240 into printable data OUT1.
A display unit 260 displays the frame selected by the image extractor 230. A user can select whether or not to output the frame displayed by the display unit 260.
Referring to
The candidate frame selector 310 selects candidate frames from input moving images IN2 at a predetermined sampling rate. The input moving images IN2 may be moving images stored on a host PC (not shown) or moving images received from an external medium, such as a memory card, a digital camera, a digital camcorder, and so on.
The pre-processing and feature-extracting unit 320 performs pre-processing and feature extraction on the candidate frames. This process is the same as the process performed by the reference image processor 220.
The similarity calculator 330 matches the extracted features of the candidate frames with the extracted features of the reference image to calculate similarities thereof.
The output frame selector 340 selects at least one frame with a similarity greater than a threshold value from the candidate frames and stores the frame in the frame buffer 240. If there is a plurality of successive similar images among frames stored in the frame buffer 240, the output frame selector 340 rearranges the frames using the similarities, selects frames with high similarities from the rearranged frames at a predetermined similar frame output rate, and outputs the selected frames as output frames OUT2.
Referring to
In operation S410, the reference image processor 220 pre-processes a reference image and extracts features of the reference image. An exemplary reference image is shown in
In operation S420, the candidate frame selector 310 selects candidate frames from input moving images at the set sampling rate. An exemplary candidate frame is shown in
In operation S430, the pre-processing and feature-extracting unit 320 pre-processes the candidate frames and extracts features of the candidate frames. A resultant image obtained from extracting features of the candidate frame of
In operation S440, the similarity calculator 330 calculates similarities between the candidate frames and the reference image. In this embodiment, in order to calculate a similarity between a reference image and a candidate frame, Hausdorff distance matching is used.
‘Hausdorff distance’ is a distance between a group and a point nearest to the group in another group, where the ‘group’ corresponds to a cluster in a feature-extracted reference image and a feature-extracted candidate frame.
When two groups, A={a1, . . . , am} and B={b1, . . . , bn}, are provided, a Hausdorff distance between the two groups can be defined by Equation 1.
However, due to the asymmetry of the groups A and B, a distance between the groups A and B is different from that between the groups B and A. Accordingly, Equation 1 should be redefined by Equation 2.
H(A,B)=max(h(A,B), h(B,A))
Here, since H(A,B) are values calculated for a cluster of the reference image and respective clusters of the candidate frame, a plurality of Hausdorff distances are obtained. A smallest one of the Hausdorff distances is decided to be a Hausdorff distance between the reference image and the candidate frame. In this embodiment, an inverse number of the decided Hausdorff distance is a similarity.
In operation S450, the output frame selector 340 stores at least one frame with a similarity greater than a threshold value in the frame buffer 240.
In operation S460, if there are a plurality of successive similar images among frames stored in the frame buffer 240, the output frame selector 340 rearranges the frames using the similarities, selects frames with high similarities from the rearranged frames at a predetermined similar frame output rate, and outputs the selected frames as output frames.
An exemplary frame selected as an output frame according to the Hausdorff distance matching is shown in
In operation S470, the data converter 250 converts the selected output frames into printable data. The printable data is printed through a printer (not shown).
An aspect of the present invention can also be embodied as computer readable code on a computer readable recording medium. The computer readable recording medium is any data storage device that can store data which can be thereafter read by a computer system. Examples of the computer readable recording medium include read-only memory (ROM), random-access memory (RAM), CD-ROMs, magnetic tapes, floppy disks, optical data storage devices, and carrier waves. The computer readable recording medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion. Also, functional programs, codes, and code segments for implementing the aspect of the present invention can be easily induced by programmers in the art.
As described above, according to an aspect of the present invention, by automatically extracting and outputting an image including a desired object when outputting moving images through a printer, it is possible to reduce the time and cost for printing moving images and also provide various selection output options to a user.
Although a few embodiments of the present invention have been shown and described, it would be appreciated by those skilled in the art that changes may be made in this embodiment without departing from the principles and spirit of the invention, the scope of which is defined in the claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
2005-37469 | May 2005 | KR | national |