The present application relates to a technique to create an image by combining a character with a still image.
The technique to create an image by combining a character string with a still image or a moving image is known generally. Further, as moving images spread in recent years, an image processing method is also proposed, which creates an image by extracting a still image corresponding to one frame from within a moving image, converting a voice within the moving image into a character string, and combining the character string with the still image.
Japanese Patent Laid-Open No. 2010-191934 has disclosed a technique to lay out an image into a comic-like image, which is obtained by extracting an image and a voice from within a moving image, converting the extracted voice into a character string, and combining the obtained character string.
However, there is a case where the voice within the moving image is a mixed voice mixed with an environmental sound or voices of a plurality of speakers. At this time, in a case where a character string corresponding to the voice is combined as described in Japanese Patent Laid-Open No. 2010-191934, it is considered that a character string having no meaning for a user is combined.
Consequently, in view of the above-described problem, an object of one embodiment of the present disclosure is to provide a technique to enable a use of an appropriate character string for combination in a case where the voice before or after an image selected from within a moving image is a mixed voice.
Consequently, one embodiment of the present disclosure is an image processing apparatus including: a selection unit configured to select, from a moving image including a plurality of frames, a part of the moving image; an extraction unit configured to extract a voice during a predetermined time corresponding to the selected part in the moving image; and a combination unit configured to combine a character string based on a voice extracted by the extraction unit, with the part of the moving image selected by the selection unit or a frame among frames corresponding to the part, wherein based on that a voice extracted by the extraction unit satisfies a predetermined condition corresponding to a mixed voice, the combination unit combines a character string prepared in advance with the selected part or the frame.
Further features of the present invention will become apparent from the following description of exemplary embodiments with reference to the attached drawings.
The data flow in the image processing apparatus 100 of the present embodiment is explained by using
In a case where the processing to convert an image into a comic-like image is started with the operation to the operation unit 204 by a user as a trigger, a moving image data acquisition unit 200 acquires moving image data from the nonvolatile memory 104 and transmits the acquired moving image data to an image data analysis unit 201. The image data analysis unit 201 receives the moving image data from the moving image data acquisition unit 200 and divides the moving image into still images at intervals of a certain number of frames, for example, still images at intervals of 20 frames as in
The image data analysis unit 201 transmits moving image data on scored still images, which corresponds to, for example, a predetermined time (in the present embodiment, five seconds before or after, or both before and after still image of interest) before or after (or both before and after) a still image of interest as a base point as shown in
The voice data analysis unit 202 extracts voice data from the received moving image data. In a case where it is determined that a part of the voice during a sampling period (five seconds in the present embodiment) is a mixed voice for the extracted voice data, the voice data analysis unit 202 regards that there is no valid voice and transmits information indicating that there is no valid voice to the image processing unit 203 along with the image ID. It is possible to implement the determination of whether or not a voice is a mixed voice by, for example, a method of separating a voice component by dynamically generating supervised activity as disclosed in Japanese Patent Laid-Open No. 2015-138053, a method of performing clustering by using a dictionary for which learning has been performed in advance, and the like. In a case where the voice is not a mixed voice during the entire sampling period, the voice data analysis unit 202 performs character string conversion to convert the voice into a character string by performing voice recognition for the extracted voice data. At the time of the character string conversion, while the portion that cannot be recognized as a word or a sentence because the voice of the moving image data (see
The image processing unit 203 receives the data received from the image data analysis unit 201 (that is, the data in the format in
In the following, frame division in the product to be created by the image processing apparatus 100 in the present embodiment and an example of the final product are explained by using
In the following, the image processing performed by the image processing unit 203 in the present embodiment is explained by using
First, at step S601, the image processing unit 203 performs initialization, Specifically, the value of a variable (referred to as an image counter i) for counting images and frames is set to 1 and at the same time, a constant value (referred to as MAX_KOMA) used as a threshold value of the number of frames is set. In the setting of MAX_KOMA, a value determined in accordance with a user input via the operation unit 204 is used. In the following, “step S-” is abbreviated and simply described as “S-”.
At S602, the image processing unit 203 applies the still image of image ID (i) to the ith frame (represented as frame (i)). Here, the image ID (i) is a value stored in the image ID field within the table shown in
At S603, the image processing unit 203 performs image processing for the still image resized at S602 and converts the still image into a comic-like image. “Conversion into a comic-like image” refers to, for example, conversion of a color image into a grayscale image, and the like.
At S604, the image processing unit 203 determines whether there exists a valid voice corresponding to the ith image (referred to as the image of interest). Specifically, the image processing unit 203 reads the value stored in a valid voice presence/absence field corresponding to the image ID (i) in the table shown in
In a case where the valid voice corresponding to the image of interest exists (YES at S604), at S605, the image processing unit 203 rasterizes the character string stored in the character string field (see
In a case where the valid voice corresponding to the image of interest does not exist (NO at S604), at S606, the image processing unit 203 reads the value of the theme information corresponding to the image ID (i) and searches for the character string suitable to this value from a table prepared in advance in the nonvolatile memory 104. The table stored in the nonvolatile memory 104 described previously has a configuration as illustrated in
As indicated by symbol 801 in
At S608, the image processing unit 203 increments the image counter i.
At S609, the image processing unit 203 determines whether the processing is performed the number of times corresponding to the number of frames (whether there is no unprocessed image). Specifically, the image processing unit 203 determines whether the value of the image counter i is greater than the value of MAX_KOMA. In a case where determination results at this step are affirmative, it is regarded that the processing is performed the number of times corresponding to the number of frames and the series of processing is terminated. In a case where the determination results at this step are negative, the processing returns to S602.
As explained above, according to the present embodiment, in a case where the voice before or after a still image selected from within a moving image is a mixed voice or it is not possible to determine the voice, an unnatural character string is prevented from being combined and it is made possible to provide a product with an added value higher than that of the prior art to a user.
In the following, the configuration of the image processing apparatus in the present embodiment is explained by using
In a case where a user inputs a theme of a moving image to be created and moving image data via the operation unit 204, and the CPU 101 of the image processing apparatus 100 receives the user input, creation of a moving image in which a character string is combined is started.
In a case where the creation of a combined moving image is started with the operation to the operation unit 204 by a user as a trigger, the moving image data acquisition unit 200 acquires moving image data from the nonvolatile memory 104 and transmits the acquired moving image data to the image data analysis unit 201. The image data analysis unit 201 receives the moving image data from the moving image data acquisition unit 200 and divides the moving image into moving images each corresponding to a predetermined time, for example, five seconds, and transmits the divided moving image to the voice data analysis unit 202. Further, the image data analysis unit 201 further divides the divided moving image corresponding to the predetermined time into still images at intervals of a certain number of frames, for example, still images at intervals of 20 frames as in
The voice data analysis unit 202 extracts voice data from the received moving image data. In a case where it is determined that at least a part of the voice during the sampling period (during five seconds in the present embodiment) is a mixed voice, the voice data analysis unit 202 regards that there is no valid voice and transmits information indicating that there is no valid voice to the image processing unit 203 along with the image ID. That is, in a case where the voice during the sampling period satisfies a condition corresponding to the characteristic of a mixed voice, the voice is determined to be a mixed voice. As the method of determining whether or not a voice is a mixed voice, for example, it is possible to adopt a method of separating a voice component by dynamically generating supervised activity as disclosed in Japanese Patent Laid-Open No. 2015-138053, a method of performing clustering by using a dictionary for which learning has been performed in advance, and the like. In a case where the voice is not a mixed voice during the sampling period, the voice data analysis unit 202 performs character string conversion to convert the voice into a character string by performing voice recognition for the extracted voice data. At the time of the character string conversion, while the portion that cannot be recognized as a word or a sentence because the voice of the moving image data before or after the still image described previously is started from the midway portion of a sentence and the like is deleted, the portion that can be recognized as a word or a sentence is converted into a character string. The converted character string is processed into the format as shown in
The image processing unit 203 receives the data received from the image data analysis unit 201 (that is, the data in the format in
In the following, an example of the final product that is created by the image processing apparatus 100 in the present embodiment is explained by using
In the following, the image processing performed by the image processing unit 203 in the present embodiment is explained by using
First, at S701, the image processing unit 203 performs initialization. Specifically, the value of a variable (referred to as a moving image counter i) for counting moving images is set to 1 and at the same time, a constant value (referred to as MAX_CNT) used as a threshold value of the number of moving images is set. As the value of MAX_CNT, the value obtained by dividing the total time of the moving image by the time (unit time) of the divided moving image is used.
At S702, the image processing unit 203 reads the value stored in the valid voice presence/absence field corresponding to the image ID (i) in the table shown in
In a case where it is determined that a valid voice exists (YES at S702), at S703, the image processing unit 203 rasterizes the character string stored in the character string field (see
In a case where it is determined that a valid voice does not exist (NO at S702), at S704, the image processing unit 203 reads the value of the theme information of the image ID (i) and searches for the character string suitable to the read value from the table stored in advance in the nonvolatile memory 104. The table stored in the nonvolatile memory 104 described previously has the configuration as shown in
The character string acquired at S704 is rasterized at S705 as in the processing performed at S703 and combined with the divided moving image of interest as a bitmap image.
At S706, the image processing unit 203 increments the moving image counter i.
At S707, the image processing unit 203 connects the divided moving image of interest (moving image of the image ID (i)) with which a character string is combined into the moving image obtained by connecting the divided moving images for which the processing at S602 to S609 has been performed so far. The processing at S707 is performed for the purpose of integrating a plurality of divided moving images into one moving image.
At S708, the image processing unit 203 determines whether the processing is performed the number of times corresponding to the total time of the moving image, in other words, determines whether there is an unprocessed divided moving image. Specifically, the image processing unit 203 determines whether the value of the moving image counter i is greater than the value of MAX_CNT. In a case where determination results at this step are affirmative, it is regarded that the processing is performed the number of times corresponding to the total time of the moving image and the series of processing is terminated. On the other hand, in a case where the determination results at this step are negative, the processing returns to S702.
As explained above, according to the present embodiment, it is made possible to provide a product with an added value higher than that of the prior art to a user by preventing an unnatural character string from being combined in a case where the voice before or after a still image selected from within a moving image is a mixed voice or it is not possible to determine the voice.
Embodiment(s) of the present invention can also be realized by a computer of a system or apparatus that reads out and executes computer executable instructions (e.g., one or more programs) recorded on a storage medium (which may also be referred to more fully as a ‘non-transitory computer-readable storage medium’) to perform the functions of one or more of the above-described embodiment(s) and/or that includes one or more circuits (e.g., application specific integrated circuit (ASIC)) for performing the functions of one or more of the above-described embodiment(s), and by a method performed by the computer of the system or apparatus by, for example, reading out and executing the computer executable instructions from the storage medium to perform the functions of one or more of the above-described embodiment(s) and/or controlling the one or more circuits to perform the functions of one or more of the above-described embodiment(s). The computer may comprise one or more processors (e.g., central processing unit (CPU), micro processing unit (MPU)) and may include a network of separate computers or separate processors to read out and execute the computer executable instructions. The computer executable instructions may be provided to the computer, for example, from a network or the storage medium. The storage medium may include, for example, one or more of a hard disk, a random-access memory (RAM), a read only memory (ROM), a storage of distributed computing systems, an optical disk (such as a compact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™), a flash memory device, a memory card, and the like.
According to one embodiment of the present disclosure, it is possible to use an appropriate character string for combination in a case where a voice before or after an image selected from within a moving image is a mixed voice.
While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.
This application claims the benefit of Japanese Patent Application No. 2019-123748, filed Jul. 2, 2019, which is hereby incorporated by reference wherein in its entirety.
Number | Date | Country | Kind |
---|---|---|---|
2019-123748 | Jul 2019 | JP | national |