Picture processing methodTechnical Field
The invention belongs to the technical field of picture processing, and particularly relates to a picture processing method.
Background
At present, smart phones are more powerful, the function of taking pictures is also the momentum of chasing up cameras, and people sometimes need to explain pictures when taking pictures, so that sound is added to produce sound pictures. However, the space occupied by the storage of the sound is large, and the sound cannot be played in some occasions, so that the sound information needs to be converted into the character information, and meanwhile, the equipment of the sound photo does not support, so that the reading has a problem.
In summary, there is a need for a method for solving the above-mentioned technical problems, which can distinguish the picture type, decode the audio information in the read picture, convert the audio file into text information, and superimpose the text information in the picture in multiple ways, and generate a photo with a more versatile format, so that the picture information can be quickly known when the audio photo is not convenient to use, and an information description can be added to the ordinary silent photo.
Disclosure of Invention
In view of the defects of the prior art, the invention aims to provide a picture processing method, and aims to solve the problems that the existing sound picture occupies a large space, part of equipment does not support the existing sound picture, and part of occasions are not suitable for playing sound.
In order to achieve the purpose, the invention adopts the following technical scheme:
an image processing method is characterized by comprising the following steps:
acquiring pictures, including calling the pictures from a database or taking the pictures in real time, wherein the called pictures in the database are divided into audio pictures and silent pictures;
identifying a picture;
if the picture is recognized as the audio picture, decoding the audio picture to generate a primary picture file and an audio file, and decoding the audio information of the audio file into text information;
superposing the text information to the original picture file in a watermark mode or storing the text information to exif to generate a final picture, and analyzing exif data to display the text information when a user needs;
and if the silent picture or the real-time shot picture is identified, editing and inputting text information, overlaying the text information to the silent picture or the real-time shot picture in a watermark mode, or storing the text information into an exif to generate a final picture, and analyzing exif data to display the text information when a user needs.
Preferably, the real-time shot picture is in a bitmap format.
Preferably, the watermark superposition position of the watermark pattern is variable.
Preferably, the final picture is in a jpeg format.
Preferably, the text information of the edited input characters comprises voice input, handwriting input and pinyin input.
Compared with the prior art, the invention has the beneficial effects that:
the invention provides a picture processing method, which comprises the following steps: acquiring pictures, including calling the pictures from a database or taking the pictures in real time, wherein the called pictures in the database are divided into audio pictures and silent pictures; identifying a picture; if the picture is recognized as the audio picture, decoding the audio picture to generate a primary picture file and an audio file, and decoding the audio information of the audio file into text information; superposing the text information to the original picture file in a watermark mode or storing the text information to exif to generate a final picture, and analyzing exif data to display the text information when a user needs; and if the silent picture or the real-time shot picture is identified, editing and inputting text information, overlaying the text information to the silent picture or the real-time shot picture in a watermark mode, or storing the text information into an exif to generate a final picture, and analyzing exif data to display the text information when a user needs. The picture type is distinguished, the audio information in the picture is decoded and read, the audio file is converted into the text information, the text information is overlapped in the picture in multiple modes, and the picture with higher format universality is generated, so that the picture information can be quickly known when the audio picture is inconvenient to use, and information explanation can be added to the common soundless picture.
Drawings
FIG. 1 is a block flow diagram of the present invention.
Detailed Description
In order to make the objects, technical solutions and effects of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, the image processing method provided by the present invention is characterized by comprising the following steps:
acquiring pictures, including calling the pictures from a database or taking the pictures in real time, wherein the called pictures in the database are divided into audio pictures and silent pictures;
identifying a picture;
if the picture is recognized as the audio picture, decoding the audio picture to generate a primary picture file and an audio file, and decoding the audio information of the audio file into text information;
superposing the text information to the original picture file in a watermark mode or storing the text information to exif to generate a final picture, and analyzing exif data to display the text information when a user needs;
and if the silent picture or the real-time shot picture is identified, editing and inputting text information, overlaying the text information to the silent picture or the real-time shot picture in a watermark mode, or storing the text information into an exif to generate a final picture, and analyzing exif data to display the text information when a user needs.
Specifically, the method includes the steps of firstly obtaining a picture, wherein the picture is directly called from a database, the picture called from the database is divided into a sound picture and a soundless picture, the picture is shot in real time, the shot picture is the soundless picture without an audio file, then the obtained picture is identified, the type of the picture is judged, if the picture is the sound picture, the sound picture is decoded into a primary picture file and an audio file, and information of the audio file is decoded into text information. Then, the text information is superposed to the original picture file and a final picture is generated, two modes are adopted in the process, one mode is a watermark mode, the text information is superposed to the original picture file in a watermark mode and is directly displayed; the other method is to store the text information into exif data, then generate the final picture, and analyze the exif data to display the text information when the information needs to be acquired. If the picture is a silent picture or a real-time picture, the text character information is superimposed to the original picture file by adopting the two modes to generate a final picture.
In some embodiments, the live photograph is taken in bitmap format and the bitmap is a Windows standard format graphics file that defines an image as being made up of dots (pixels) that can be represented by a variety of colors, including 2, 4, 8, 16, 24, and 32 bit colors. For example, a 32-bit true color picture with 1024 × 768 resolution is stored in 1024 × 768 × 32/(8 × 1024) ═ 3072 KB.
In some embodiments, the watermark superposition position of the watermark mode is variable, and the default position of the watermark is adjusted through background editing control.
In some embodiments, the final picture is in a jpeg format, and the compression technology is advanced, so that redundant images and color data are removed by a lossy compression method, and a very rich and vivid image can be displayed while an extremely high compression rate is obtained, in other words, a better image quality can be obtained with a minimum of disk space.
In some embodiments, the editing input text information includes voice input, handwriting input, and pinyin input. Wherein. The voice input is that the internal voice recognition module recognizes the voice information and converts the voice information into the character information.
In summary, the working principle of the invention is as follows:
the invention provides a picture processing method, which comprises the following steps: acquiring pictures, including calling the pictures from a database or taking the pictures in real time, wherein the called pictures in the database are divided into audio pictures and silent pictures; identifying a picture; if the picture is recognized as the audio picture, decoding the audio picture to generate a primary picture file and an audio file, and decoding the audio information of the audio file into text information; superposing the text information to the original picture file in a watermark mode or storing the text information to exif to generate a final picture, and analyzing exif data to display the text information when a user needs; and if the silent picture or the real-time shot picture is identified, editing and inputting text information, overlaying the text information to the silent picture or the real-time shot picture in a watermark mode, or storing the text information into an exif to generate a final picture, and analyzing exif data to display the text information when a user needs. The picture type is distinguished, the audio information in the picture is decoded and read, the audio file is converted into the text information, the text information is overlapped in the picture in multiple modes, and the picture with higher format universality is generated, so that the picture information can be quickly known when the audio picture is inconvenient to use, and information explanation can be added to the common soundless picture.
It should be understood that equivalents and modifications of the technical solution and inventive concept thereof may occur to those skilled in the art, and all such modifications and alterations should fall within the scope of the appended claims.