CN107748642B - Method and device for adjusting picture, storage medium and electronic equipment - Google Patents

Method and device for adjusting picture, storage medium and electronic equipment Download PDF

Info

Publication number
CN107748642B
CN107748642B CN201711085784.2A CN201711085784A CN107748642B CN 107748642 B CN107748642 B CN 107748642B CN 201711085784 A CN201711085784 A CN 201711085784A CN 107748642 B CN107748642 B CN 107748642B
Authority
CN
China
Prior art keywords
picture
spacing
line spacing
value
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201711085784.2A
Other languages
Chinese (zh)
Other versions
CN107748642A (en
Inventor
王君龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201711085784.2A priority Critical patent/CN107748642B/en
Publication of CN107748642A publication Critical patent/CN107748642A/en
Application granted granted Critical
Publication of CN107748642B publication Critical patent/CN107748642B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/178Human faces, e.g. facial parts, sketches or expressions estimating age from face image; using age information for improving recognition

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Multimedia (AREA)
  • Character Input (AREA)

Abstract

The embodiment of the application discloses a method and a device for adjusting pictures, a storage medium and electronic equipment. The method comprises the following steps: after a picture to be read is obtained, the line spacing of a Chinese character part in the picture is obtained; if the line spacing is smaller than a preset first spacing, acquiring a face image of the user; acquiring the age value of the user according to the face image; and if the age value is detected to be smaller than or equal to a preset value, increasing the line spacing of the character part in the picture, wherein the increased line spacing is larger than or equal to the preset first spacing. The method and the device for selecting the point reading area on the picture can reduce the probability of error selection when the point reading area is selected on the picture.

Description

Method and device for adjusting picture, storage medium and electronic equipment
Technical Field
The present application belongs to the field of image processing technologies, and in particular, to a method and an apparatus for adjusting an image, a storage medium, and an electronic device.
Background
The point reading device can identify and position the point reading object according to the coordinate or code of the point reading object. The coding mode is to print codes on a book, identify the codes by using a reading pen to determine contents, and play corresponding audio according to the contents. The coordinate mode is that the position of the point reading machine is clicked by the point reading pen to determine the coordinate, and after the coordinate is confirmed, the corresponding audio is played in combination with the current page of the point reading equipment. However, in the related art, when a specific click-to-read area is selected by using a click-to-read device, misselection is likely to occur.
Disclosure of Invention
The embodiment of the application provides a method and a device for adjusting a picture, a storage medium and an electronic device, which can reduce the probability of mistaken selection when a point reading area is selected on the picture.
The embodiment of the application provides a method for adjusting pictures, which comprises the following steps:
after a picture to be read is obtained, the line spacing of a Chinese character part in the picture is obtained;
if the line spacing is smaller than a preset first spacing, acquiring a face image of the user;
acquiring an age value of the user according to the face image;
and if the age value is detected to be smaller than or equal to a preset value, increasing the line spacing of the character part in the picture, wherein the increased line spacing is larger than or equal to the preset first spacing.
The embodiment of the application provides a device for adjusting pictures, including:
the first acquisition module is used for acquiring the line spacing of the character part in the picture after the picture to be read is acquired;
the second acquisition module is used for acquiring a face image of the user if the line spacing is smaller than a preset first spacing;
the third acquisition module is used for acquiring the age value of the user according to the face image;
and the adjusting module is used for increasing the line spacing of the character part in the picture if the age value is detected to be smaller than or equal to a preset value, and the increased line spacing is larger than or equal to the preset first spacing.
An embodiment of the present application provides a storage medium, on which a computer program is stored, and when the computer program is executed on a computer, the computer is caused to execute the steps in the method for adjusting a picture provided in this embodiment.
The embodiment of the present application further provides an electronic device, which includes a memory and a processor, where the processor is configured to execute the steps in the method for adjusting a picture provided in this embodiment by calling a computer program stored in the memory.
According to the method, the device, the storage medium and the electronic equipment for adjusting the picture, after the picture to be clicked and read is obtained, the terminal can obtain the line spacing of the character part in the picture and detect whether the line spacing is smaller than the preset first spacing. If so, the terminal can acquire a face image of the user and acquire the age value of the user according to the face image. Thereafter, the terminal may detect whether the age value is less than or equal to a preset value. If so, the terminal can increase the line spacing of the character part in the picture to be read, and the increased line spacing is larger than or equal to the preset first spacing. That is, when the click-to-read function is implemented by the mobile terminal, the line spacing of the text portion in the picture to be clicked can be increased when the line spacing of the text portion in the picture to be clicked is small and the age of the current user is small, so that the user can more easily and accurately select a specific click-to-read region on the picture to be clicked, and the probability of mistaken selection when the click-to-read region is selected on the picture is reduced.
Drawings
The technical solution and the advantages of the present invention will be apparent from the following detailed description of the embodiments of the present invention with reference to the accompanying drawings.
Fig. 1 is a scene schematic diagram of a point-and-read function provided in an embodiment of the present application.
Fig. 2 is a flowchart illustrating a method for adjusting a picture according to an embodiment of the present application.
Fig. 3 is another flowchart illustrating a method for adjusting a picture according to an embodiment of the present application.
Fig. 4A to 4D are scene schematic diagrams of a method for adjusting pictures according to an embodiment of the present disclosure.
Fig. 5 is a schematic structural diagram of an apparatus for adjusting a picture according to an embodiment of the present application.
Fig. 6 is another schematic structural diagram of an apparatus for adjusting a picture according to an embodiment of the present disclosure.
Fig. 7 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
Fig. 8 is another schematic structural diagram of a mobile terminal according to an embodiment of the present application.
Detailed Description
Referring to the drawings, wherein like reference numbers refer to like elements, the principles of the present invention are illustrated as being implemented in a suitable computing environment. The following description is based on illustrated embodiments of the invention and should not be taken as limiting the invention with regard to other embodiments that are not detailed herein.
As will be described in detail below.
In one embodiment, the terminal may first obtain a reading sample, where the reading sample may be a picture, a photograph, or a code. After the click-to-read sample is obtained, the terminal may obtain a multimedia sample, where the multimedia sample may be an audio file or a video file. The terminal may then associate the retrieved click-to-read sample with the multimedia sample. For example, the terminal associates photo a with audio a, photo B with audio B, and photo C with video C. After associating the click-to-read sample with the multimedia sample, the terminal may store the sample data in a preset database.
It is to be understood that, in some embodiments, the click-to-read sample and the multimedia sample may be in a one-to-one correspondence relationship, a one-to-many relationship, a many-to-one relationship, or the like, which is not specifically limited in this embodiment.
When the point-reading function is used, a user can firstly use the mobile terminal to take a photo, or select a photo from an album, or scan a certain code. The picture taken by the user or the selected picture or the code obtained by scanning is the object needing to be read. After the object needing to be read is acquired, the terminal can search the photo or the code matched with the object needing to be read in a preset database. If the photo or the code matched with the object needing to be read exists in the preset database, the terminal can search the multimedia file associated with the photo or the code and play the multimedia file.
In one embodiment, for example, the sample is a photograph a containing three text segments, each of which is associated with a segment of audio. Then, when the photo shot by the user is matched with the photo a in the preset database, since the photo a contains three sections of characters and each section of character is associated with a corresponding section of audio, the user can select to play the corresponding audio by specifically selecting a certain section of character in the photo a. Or, the user may not make a specific selection, and then the terminal may play the audio corresponding to the three paragraphs of characters in sequence.
Referring to fig. 1, for example, a user uses a terminal to take a picture X, and the terminal finds that the picture X matches the picture a in a preset database. The photo A comprises three sections of characters, wherein the first section of characters is associated with the audio A, the second section of characters is associated with the audio B, and the third section of characters is associated with the audio C. For example, as shown in fig. 1, if the user circles the area of the second text on the screen, the terminal may play audio b accordingly.
It can be understood that the embodiment can implement a function of reading a text in a certain object (such as a photo) on the mobile terminal, and this way has the effects of low cost, good convenience, and the like.
It can be understood that the execution subject of the embodiment of the present application may be a terminal device such as a smart phone or a tablet computer.
Referring to fig. 2, fig. 2 is a schematic flow chart of a method for adjusting pictures according to an embodiment of the present application, where the flow chart may include:
in step S101, after the picture to be read is acquired, the line space of the character portion in the picture is acquired.
When the terminal is used to realize the click-to-read function, a user may first use the terminal to capture a content that the user wants to click-to-read, for example, the user uses the terminal to capture a page where the content that the user wants to click-to-read is located, and obtains a photo to be clicked and read. However, users using the click-to-read function are children generally, and when the children select a specific click-to-read area on a photo to be clicked, the children are prone to mistaken selection, especially when characters in the photo to be clicked are too dense.
In this embodiment, after the picture to be read is acquired, the terminal may first acquire the line spacing of the character part in the picture to be read.
For example, the terminal may acquire the line spacing of the text portion of the picture to be read when the display ratio of the picture to be read is 100%.
After the line spacing of the character part in the picture to be read is obtained, the terminal can detect whether the line spacing is smaller than a preset first spacing.
If the line spacing is not smaller than the preset first spacing, the line spacing of the character part of the picture to be read is considered to be larger, that is, the characters are not too dense. In this case, the user is not easy to select a specific click-to-read region in the picture to be clicked. Then the terminal may not adjust this picture.
If it is detected that the line pitch is smaller than the preset first pitch, the process proceeds to step S102.
In step S102, if it is detected that the line spacing is smaller than the preset first spacing, the face image of the user is acquired.
In step S103, the age value of the user is obtained according to the face image.
For example, steps S102 and S103 may include:
and the terminal detects that the line spacing of the character part in the picture to be read is smaller than the preset first spacing, and then the characters in the picture can be considered to be denser. In this case, the terminal may be triggered to acquire a face image of the current user. For example, the terminal may start a front camera to capture a face image of the user.
After the face image of the current user is acquired, the terminal can acquire the age value of the current user according to the face image.
Then, the terminal may determine whether the age value of the current user is less than or equal to a preset value. For example, the preset value may be 12.
If the age value of the current user is judged to be larger than the preset value, the current user can be considered not to be a child. The situation of mistaken selection is not easy to occur when a non-child user selects a specific click-to-read area on a picture to be clicked and read. Therefore, in this case, the terminal may not adjust the picture to be read on demand.
If the age value of the current user is judged to be smaller than or equal to the preset value, the current user can be considered as a child. At this time, the process proceeds to step S104.
In step S104, if it is detected that the age value is smaller than or equal to a predetermined value, the line spacing of the character portion in the picture is increased, and the increased line spacing is greater than or equal to a predetermined first spacing.
For example, the preset value is 12, and the terminal obtains the age value of the current user as 5 according to the face image of the current user, that is, the terminal determines that the age of the current user is 5 years old and belongs to children according to the face image of the current user, so that the terminal can increase the line spacing of the text portion in the picture to be clicked and read, so that the increased line spacing is greater than or equal to the preset first spacing.
That is, when the current user is determined to be a child, the terminal may increase the line spacing of the text portion in the picture to be clicked, so that the text portion that is originally denser becomes less dense. After the line spacing of the text part is increased, the child user can more easily and accurately select a specific click-to-read area on the picture to be clicked. Therefore, the probability of mistaken selection when the point reading area is selected on the picture can be reduced.
Referring to fig. 3, fig. 3 is another schematic flow chart of a method for adjusting pictures according to an embodiment of the present application, where the flow chart may include:
in step S201, after the picture to be clicked and read is acquired, the terminal acquires the line spacing of the text portion in the picture.
For example, when the terminal is used to implement the click-to-read function, the user may use the terminal to shoot a page where the content that the user wants to click-to-read is located, and obtain a photo to be clicked and read.
After the photo to be clicked and read is obtained, the terminal can obtain the line spacing of the character part in the photo.
For example, the terminal may acquire the line spacing of the text portion of the photo to be read when the display ratio of the photo to be read is 100%.
After the line spacing of the text part in the photo to be clicked and read is acquired, the terminal can detect whether the line spacing is smaller than a preset first spacing.
If the line spacing is not smaller than the preset first spacing, the line spacing of the character part of the picture to be read is considered to be larger, that is, the characters are not too dense. In this case, the user is not easy to select a specific click-to-read region in the picture to be clicked. Then the terminal may not adjust the line spacing for this photograph.
If it is detected that the line pitch is smaller than the preset first pitch, the process proceeds to step S202.
In step S202, if it is detected that the line spacing is smaller than the preset first spacing, the terminal acquires a face image of the user.
In step S203, the terminal acquires the age value of the user according to the face image.
For example, steps S202 and S203 may include:
and the terminal detects that the line spacing of the character part in the photo to be clicked and read is smaller than the preset first spacing, and then the characters in the photo can be considered to be denser. In this case, the terminal may be triggered to acquire a face image of the current user. For example, the terminal may start a front camera to capture a face image of the user.
After the face image of the current user is acquired, the terminal can acquire the age value of the current user according to the face image.
In one embodiment, a third party application with an age identified from the face image may be installed in the terminal in advance. Then, after the terminal acquires the face image of the current user, the terminal can call the third-party application in the background and transmit the face image of the current user to the third-party application, so that the age value of the current user is identified by using the function of identifying the age according to the face image by the third-party application.
After the age value of the current user is obtained, the terminal may determine whether the age value of the current user is less than or equal to a preset value. For example, the preset value may be 12.
If the age value of the current user is judged to be larger than the preset value, the current user can be considered not to be a child. The situation of mistaken selection is not easy to occur when a non-child user selects a specific click-to-read area on a photo to be clicked and read. Therefore, in this case, the terminal may not adjust the line pitch of the photograph to be read on.
If the age value of the current user is judged to be smaller than or equal to the preset value, the current user can be considered as a child. At this time, the process proceeds to step S204.
In step S204, if it is detected that the age value is less than or equal to the predetermined value, the terminal calculates the area of the picture and the area occupied by the character part in the picture.
In step S205, the terminal calculates the area ratio of the character portion in the picture according to the calculated area of the picture and the area occupied by the character portion in the picture.
In step S206, according to the area ratio, the terminal determines a corresponding target inter-row distance value, where the target inter-row distance value is greater than or equal to a preset first interval.
For example, steps S204, S205, and S206 may include:
the terminal detects that the obtained age value of the current user is less than or equal to a preset value, for example, the obtained age value of the current user by the terminal is 5, and the preset value is 12. Then the current user may be considered a child. In this case, the terminal may calculate the area of the photo to be read and the area occupied by the text portion in the photo.
After calculating the area of the photo and the area occupied by the character part in the photo, the terminal can calculate the area proportion occupied by the character part in the photo.
Then, the terminal can determine a target line spacing value corresponding to the area ratio according to the area ratio, wherein the target line spacing value is greater than or equal to a preset first spacing.
For example, the terminal calculates that the area of the photo to be clicked is 100, and the area of the text portion in the photo is 45. Then, the area ratio of the character portion in the photograph is 45%.
Then, the terminal may obtain a target inter-row distance value corresponding to the area ratio according to the calculated area ratio of 45%. The target line spacing value is greater than or equal to a preset first spacing.
For example, the terminal may set some area ratio values and line spacing values corresponding to the area ratio values in advance, and generate the correspondence table. Then, after calculating the area proportion of the text portion in the photo, the terminal may search the correspondence table, obtain the line spacing value corresponding to the area proportion, and determine it as the target line spacing value.
In one embodiment, in the correspondence table, the smaller the area ratio value is, the larger the line pitch value is.
In step S207, the terminal performs segmentation processing on the picture at the gaps between the rows.
In step S208, the terminal inserts a strip-shaped picture into the division between the rows, and splices the inserted strip-shaped picture and the picture where the corresponding row is located, where the numerical value of the row interval of the spliced picture is the target row interval value.
For example, steps S207 and S208 may include:
after determining the target inter-row distance value, the terminal may perform segmentation processing on the photo to be read at a gap between rows. Then, the terminal can insert the strip-shaped pictures at the division positions between the rows, and split the inserted strip-shaped pictures and the pictures where the corresponding rows are located, and the numerical value of the line spacing of the pictures formed after splitting is the target line spacing value.
In one embodiment, the picture may be divided sequentially at the gaps between the previous line and the next line in the order from the head line to the tail line of the text portion, then a strip-shaped picture (e.g., a rectangular picture) is inserted at the divided position, and then the picture in the previous line, the strip-shaped picture and the picture in the next line are pieced together. Namely, firstly, the picture is divided at the gap between the first line and the second line of the character part, then the rectangular picture is inserted at the division position between the first line and the second line, and then the picture of the first line, the inserted rectangular picture and the picture of the second line are spliced. Then, the picture is segmented at a gap between the second row and the third row of the once spliced picture, a rectangular picture is inserted into the segmented position between the second row and the third row, the picture in the second row, the inserted rectangular picture and the picture in the third row are spliced, and the like.
In one embodiment, the height for the stripe pictures inserted between the rows may be a difference between the target row spacing value determined in step S206 and the row spacing value of the text portion of the photo to be clicked and read acquired in step S201.
In another embodiment, when the photo is divided at the gaps between the rows, the gaps between all the upper and lower rows of the character part in the photo may be divided first, then the strip-shaped pictures are inserted into the divided positions, and finally the inserted pictures and the corresponding pictures of the rows are pieced together. For example, if the text portion includes three lines of text, the terminal may first segment the gap between the first line and the second line and the gap between the second line and the third line to obtain three pictures, which are the picture of the first line, the picture of the second line, and the picture of the third line. Then, the terminal inserts a strip of picture at the division between the first line and the second line, and inserts a strip of picture at the division between the second line and the third line. Finally, the terminal splices the five pictures (the picture of the first row, the picture of the second row, the picture of the third row, and the two inserted strip-shaped pictures).
In an implementation, this embodiment may further include the following steps:
acquiring the word space of the character part of each line after the segmentation processing;
comparing the word space of the character part of each line with the size of a preset second space;
for the lines with the word spacing smaller than the preset second spacing, the picture is segmented at the gaps between the words, and strip pictures are inserted at the segmentation positions between the words;
splicing the inserted strip-shaped picture with the picture where the corresponding character is positioned, wherein the character space of the line after the strip-shaped picture is inserted is larger than or equal to the preset second space.
For example, after the gap between the first line and the second line and the gap between the second line and the third line are divided to obtain three pictures, which are the picture of the first line, the picture of the second line, and the picture of the third line, respectively, the terminal may obtain the word pitch of the characters in each line after the division, that is, the terminal obtains the word pitch of the characters in the first line, the word pitch of the characters in the second line, and the word pitch of the characters in the third line. Then, the terminal may detect whether the word pitch of each line of characters is smaller than a preset second pitch. If a line with a word interval smaller than the preset second interval exists, the terminal can divide the picture at the gap between the word and the word in the line, and insert a strip picture at the division position between the word and the word. Finally, the terminal can splice the inserted strip-shaped picture and the picture where the corresponding character is located, and the character space of the line after the strip-shaped picture is inserted is larger than or equal to the preset second space.
It will be appreciated that in the manner described above, the word pitch of the lines having a smaller word pitch can be increased.
After increasing the word pitch of the row with the smaller word pitch, the terminal may stitch together the picture of the first row, the picture of the second row, the picture of the third row, and two strip-like pictures inserted between the rows to form a complete picture.
In one embodiment, the terminal may further determine a corresponding target inter-line distance value according to the age value, and increase the inter-line distance of the picture to be read to the corresponding target inter-line distance value. That is, after detecting that the age value of the current user is less than or equal to the preset value, the terminal may perform the following steps:
determining a corresponding target line spacing value according to the acquired age value of the user, wherein the target line spacing value is greater than or equal to a preset first spacing, and the line spacing value corresponding to the smaller the age value is;
dividing the picture at the gaps between the rows;
and inserting strip-shaped pictures at the division positions between the rows, splicing the inserted strip-shaped pictures and the pictures where the corresponding rows are positioned, wherein the numerical value of the line spacing of the pictures formed after splicing is the target line spacing value.
For example, the terminal may preset some age values and line spacing values corresponding to the age values, and the line spacing values corresponding to the age values may be larger as the age values are smaller. For example, the line spacing corresponding to the age value being less than or equal to 5 is 40, the line spacing corresponding to the age values 6 and 7 is 38, the line spacing corresponding to the age values 8 and 9 is 36, the line spacing corresponding to the age values 10 and 11 is 36, the line spacing corresponding to the age value 12 is 34, and so on, it should be understood that this example does not limit this embodiment.
Then, after detecting that the age value of the current user is less than or equal to the preset value, the terminal may search for a line spacing value corresponding to the age value of the current user and determine it as the target line spacing value. For example, if the terminal obtains the current user age value of 10, the terminal may determine 36 as the target inter-row distance value.
After the target line spacing value is determined, the terminal can perform segmentation processing on the picture to be read at the gaps between lines. Then, the terminal can insert the strip-shaped pictures at the division positions between the rows, and split the inserted strip-shaped pictures and the pictures where the corresponding rows are located, and the numerical value of the line spacing of the pictures formed after splitting is the target line spacing value.
In another embodiment, when it is detected that the age value of the current user is less than or equal to the preset value, the terminal may determine the target inter-row distance value according to the area ratio of the area of the text portion in the picture in the whole picture area and the age value of the current user. For example, the smaller the area ratio and the smaller the user age value, the larger the target inter-row distance value corresponding thereto, and so on.
In one embodiment, before performing the step of dividing the picture at the gap between the rows, the terminal may further include the following steps:
acquiring a background color of a picture;
then, when the terminal performs the step of inserting the stripe picture at the division between the rows, the step may include: and inserting the strip-shaped pictures at the division positions between the rows, wherein the color of the strip-shaped pictures for insertion is the background color.
It can be understood that, by setting the color of the strip-shaped picture for insertion as the background color, the overall style of the picture after line spacing adjustment can be kept consistent, and the user experience is improved.
In an implementation manner, before the step of acquiring the line spacing of the text portion of the picture in S201, the present embodiment may further include the following steps:
and if the target picture sample matched with the picture to be read is detected to exist in the preset storage space, the terminal acquires the multimedia file associated with the target picture sample.
Then, after the step of increasing the line spacing of the character part in the picture, the following steps can be further included: the terminal acquires a click-to-read area selected by a user in the picture with the increased line spacing; and according to the point-reading area, the terminal acquires a target playing file from the multimedia file associated with the target picture sample and plays the target playing file.
For example, after acquiring a picture to be clicked and read, the terminal may first detect whether a picture sample matching the picture to be clicked and read exists in a preset storage space.
If it is detected that the picture sample matched with the picture to be read does not exist in the preset storage space, it can be considered that the user does not make the picture sample matched with the picture to be read in advance, and in this case, the terminal can execute other operations.
If a target picture sample matched with the picture to be read is detected to exist in the preset storage space, the terminal can acquire a multimedia file associated with the target picture sample.
Then, after increasing the line spacing of the character portion in the picture to be clicked, the terminal may acquire a specific click-to-read region selected by the user in the picture after increasing the line spacing. Then, the terminal may obtain a target play file corresponding to the click-to-read region from the multimedia file associated with the target picture sample according to the click-to-read region selected by the user, and play the target play file.
For example, the picture to be read includes three paragraphs of characters, and the target picture associated with the picture to be read also includes three paragraphs of characters. The first section of characters of the target picture is associated with the audio A, the second section of characters is associated with the audio B, and the third section of characters is associated with the audio C. Then, when the user selects the area where the second section of characters is located in the picture to be read as the specific reading area, the terminal can correspondingly play the audio b.
Referring to fig. 4A to 4D, fig. 4A to 4D are schematic views of scenes of a method for adjusting pictures according to an embodiment of the present disclosure.
For example, a plurality of photos and audio/video files associated with the photos are stored in the terminal in advance. At the current moment, a user uses the terminal to shoot a photo containing the text content, and the photo is the photo to be read.
After the photo to be clicked and read is acquired, the terminal can calculate the line spacing of the text part when the display proportion of the photo is 100%. After the line spacing of the text part in the photo to be clicked and read is acquired, the terminal can detect whether the line spacing is smaller than a preset first spacing.
For example, as shown in fig. 4A, the numerical value of the line spacing of the text portion in the photo to be clicked and read acquired by the terminal is 8, and the numerical value of the preset first spacing is 10, that is, the terminal detects that the line spacing is smaller than the preset first spacing. In this case, the characters in the character portion in the photograph may be considered to be relatively dense. In this case, the terminal may turn on the front-facing camera to obtain a face image of the current user, and obtain an age value of the current user according to the face image.
After the age value of the current user is obtained, the terminal may determine whether the age value of the current user is less than or equal to a preset value. For example, the preset value may be 12, and the terminal obtains an age value of 5 for the current user, and the current user may be considered as a child. In this case, the terminal may calculate the area of the photo to be read and the area occupied by the text portion in the photo.
After calculating the area of the photo and the area occupied by the character part in the photo, the terminal can calculate the area proportion occupied by the character part in the photo. Then, the terminal can determine a target line spacing value corresponding to the area ratio according to the area ratio, wherein the target line spacing value is greater than or equal to a preset first spacing.
For example, the terminal calculates the area of the photo to be clicked to read as 100, and the area of the text portion in the photo as 22. Then, the area ratio of the text portion in the photograph is 22%. Then, the terminal may acquire a pitch value corresponding to the area ratio of 22% and determine it as a target pitch value. For example, the value of the target pitch value corresponding to the area ratio of 40% preset by the terminal is 20.
After determining the target inter-row distance value, the terminal may perform segmentation processing on the photo to be read at a gap between rows. Then, the terminal can insert the strip-shaped pictures at the division positions between the rows, and split the inserted strip-shaped pictures and the pictures where the corresponding rows are located, and the numerical value of the line spacing of the pictures formed after splitting is the target line spacing value.
For example, as shown in fig. 4B, the text portion of the photo to be read includes three lines of text, and the terminal may first perform a segmentation process on the photo at the gap between the first line and the second line, for example, perform a segmentation process on the photo along the dotted line in fig. 4A, that is, segment the photo to be read into a picture a and a picture B. A rectangular picture c is then inserted at the split between the first and second rows. The height of the rectangular picture c is the difference 12 between the target spacing value 20 and the original line spacing 8 of the photo to be read. Then, the terminal may stitch the picture a of the first row, the inserted rectangular picture c, and the picture b of the second row.
Then, the terminal may perform a division process on the picture at the gap between the second row and the third row, for example, perform a division process on the picture along the dotted line in fig. 4C, that is, divide the picture into a picture d and a picture f. A rectangular picture e is then inserted at the split between the second and third rows. The height of the rectangular picture e is also the difference 12 between the target spacing value 20 and the original line spacing 8 of the picture to be read. Then, the terminal may stitch the picture d in the second row, the inserted rectangular picture e, and the picture f in the third row, and the change process is as shown in fig. 4C.
The picture formed after the line spacing increasing operation is as shown in fig. 4D, the line spacing of the photograph in fig. 4D is changed to 20, and compared with the photograph (line spacing 8) in fig. 4A, when the user selects a specific click-to-read region in the photograph shown in fig. 4D, the probability of the occurrence of the false selection is greatly reduced.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an apparatus for adjusting a picture according to an embodiment of the present disclosure. The apparatus 300 for adjusting a picture may include: a first obtaining module 301, a second obtaining module 302, a third obtaining module 303, and an adjusting module 304.
The first obtaining module 301 is configured to obtain a line space of a character portion in a picture after obtaining the picture to be read.
For example, after acquiring a picture to be clicked, the first acquiring module 301 may first acquire a line spacing of a character portion in the picture to be clicked.
After the line spacing of the character part in the picture to be read is obtained, the terminal can detect whether the line spacing is smaller than a preset first spacing.
If the line spacing is not smaller than the preset first spacing, the line spacing of the character part of the picture to be read is considered to be larger, that is, the characters are not too dense. In this case, the user is not easy to select a specific click-to-read region in the picture to be clicked. Then the terminal may not adjust this picture.
A second obtaining module 302, configured to obtain a face image of the user if it is detected that the line interval is smaller than a preset first interval.
A third obtaining module 303, configured to obtain an age value of the user according to the face image.
For example, when the terminal detects that the line spacing of the text portion in the picture to be clicked and read is smaller than the preset first spacing, it may be considered that the text in the picture is denser. In this case, the second obtaining module 302 may be triggered to obtain the face image of the current user. For example, the terminal may start a front camera to capture a face image of the user.
After acquiring the face image of the current user, the third acquiring module 303 may acquire the age value of the current user according to the face image.
Then, the terminal may determine whether the age value of the current user is less than or equal to a preset value.
If the age value of the current user is judged to be larger than the preset value, the current user can be considered not to be a child. The situation of mistaken selection is not easy to occur when a non-child user selects a specific click-to-read area on a picture to be clicked and read. Therefore, in this case, the terminal may not adjust the picture to be read on demand.
The adjusting module 304 is configured to increase a line spacing of a character portion in the picture if it is detected that the age value is smaller than or equal to a preset value, where the increased line spacing is greater than or equal to the preset first spacing.
For example, according to the face image of the current user, the age value of the current user acquired by the third acquiring module 303 is 5, that is, the terminal determines that the age of the current user is 5 years and belongs to children according to the face image of the current user, then the adjusting module 304 may increase the line spacing of the text portion in the picture to be clicked and make the increased line spacing be greater than or equal to the preset first spacing.
In one embodiment, the adjustment module 304 may be configured to:
dividing the picture at the gaps between the rows;
and inserting the strip-shaped pictures at the division positions between the rows, and splicing the inserted strip-shaped pictures with the pictures of the corresponding rows.
For example, when the line spacing of the character portion in the picture to be read is increased, the adjusting module 304 may perform segmentation processing on the picture at the gaps between the lines; then, the adjusting module 304 inserts the strip-shaped pictures at the division between the rows, and splices the inserted strip-shaped pictures with the pictures of the corresponding rows.
In one embodiment, the adjustment module 304 may be further configured to:
acquiring the word space of the character part of each line after the segmentation processing;
comparing the word space of the character part of each line with the size of a preset second space;
for the lines with the word spacing smaller than the preset second spacing, the picture is segmented at the gaps between the words, and strip-shaped pictures are inserted at the segmentation positions between the words;
splicing the inserted strip-shaped picture with the picture where the corresponding character is located, wherein the character space of the line after the strip-shaped picture is inserted is larger than or equal to the preset second space.
For example, in another embodiment, when the photo is divided at the gaps between the rows, the gaps between all the upper and lower rows of the character part in the photo may be divided first, then the strip-shaped pictures are inserted into the respective divided positions, and finally the inserted pictures and the pictures corresponding to the rows are pieced together. For example, if the text portion includes three lines of text, the terminal may first segment the gap between the first line and the second line and the gap between the second line and the third line to obtain three pictures, which are the picture of the first line, the picture of the second line, and the picture of the third line. Then, the terminal inserts a strip of picture at the division between the first line and the second line, and inserts a strip of picture at the division between the second line and the third line. Finally, the terminal splices the five pictures (the picture of the first row, the picture of the second row, the picture of the third row, and the two inserted strip-shaped pictures).
After the three pictures, namely the picture of the first line, the picture of the second line and the picture of the third line, are obtained by dividing the gap between the first line and the second line and the gap between the second line and the third line, the terminal can obtain the word space of each line of characters after the division, namely the terminal obtains the word space of the first line of characters, the word space of the second line of characters and the word space of the third line of characters. Then, the adjusting module 304 may detect whether the word pitch of each line of the text is smaller than the preset second pitch. If a line with a word interval smaller than the preset second interval exists, the terminal can divide the picture at the gap between the word and the word in the line, and insert a strip picture at the division position between the word and the word. Finally, the terminal can splice the inserted strip-shaped picture and the picture where the corresponding character is located, and the character space of the line after the strip-shaped picture is inserted is larger than or equal to the preset second space.
After increasing the word pitch of the row with the smaller word pitch, the terminal may stitch together the picture of the first row, the picture of the second row, the picture of the third row, and two strip-like pictures inserted between the rows to form a complete picture.
Referring to fig. 6, fig. 6 is another schematic structural diagram of an apparatus for adjusting a picture according to an embodiment of the present disclosure. In an embodiment, the apparatus 300 for adjusting a picture may further include: a calculation module 305, a determination module 306, and a point-and-read module 307.
A calculating module 305, configured to calculate an area of the picture and an area occupied by a text portion in the picture; calculating the area proportion of the character part in the picture according to the calculated area of the picture and the area occupied by the character part; and determining a corresponding target line spacing value according to the area proportion, wherein the target line spacing value is greater than or equal to a preset first spacing.
Then, the adjusting module 304 may be configured to splice the inserted bar-shaped picture and the picture where the corresponding row is located, where a numerical value of a row interval of the spliced picture is the target row interval value.
For example, if the terminal detects that the obtained age value of the current user is less than or equal to the preset value, the current user may be considered as a child. In this case, the calculation module 305 may calculate the area of the photo to be read and the area occupied by the text portion in the photo.
After calculating the area of the photo and the area occupied by the text portion in the photo, the calculating module 305 may calculate the area ratio occupied by the text portion in the photo.
Then, the terminal can determine a target line spacing value corresponding to the area ratio according to the area ratio, wherein the target line spacing value is greater than or equal to a preset first spacing.
For example, the terminal calculates that the area of the photo to be clicked is 100, and the area of the text portion in the photo is 45. Then, the area ratio of the character portion in the photograph is 45%.
Then, the terminal may obtain a target inter-row distance value corresponding to the area ratio according to the calculated area ratio of 45%. The target line spacing value is greater than or equal to a preset first spacing.
For example, the terminal may set some area ratio values and line spacing values corresponding to the area ratio values in advance, and generate the correspondence table. Then, after calculating the area ratio of the text portion in the photo, the calculation module 305 may search the correspondence table, obtain the line spacing value corresponding to the area ratio, and determine it as the target line spacing value.
After determining the target inter-row distance value, the adjustment module 304 may segment the photo to be read at the gaps between rows on the photo. Then, the terminal can insert the strip-shaped pictures at the division positions between the rows, and split the inserted strip-shaped pictures and the pictures where the corresponding rows are located, and the numerical value of the line spacing of the pictures formed after splitting is the target line spacing value.
The determining module 306 is configured to determine a corresponding target inter-row distance value according to the obtained age value of the user, where the target inter-row distance value is greater than or equal to a preset first interval, and the smaller the age value, the larger the corresponding inter-row distance value.
Then the adjustment module 304 is used to segment the picture at the gaps between rows; and inserting strip-shaped pictures at the division positions between the rows, splicing the inserted strip-shaped pictures and the pictures where the corresponding rows are positioned, wherein the numerical value of the line spacing of the pictures formed after splicing is the target line spacing value.
For example, the terminal may preset some age values and line spacing values corresponding to the age values, and the line spacing values corresponding to the age values may be larger as the age values are smaller. For example, the line spacing corresponding to the age value being less than or equal to 5 is 40, the line spacing corresponding to the age values 6 and 7 is 38, the line spacing corresponding to the age values 8 and 9 is 36, the line spacing corresponding to the age values 10 and 11 is 36, the line spacing corresponding to the age value 12 is 34, and so on, it should be understood that this example does not limit this embodiment.
Then, after detecting that the age value of the current user is less than or equal to the preset value, the determining module 306 may find a line spacing value corresponding to the age value of the current user and determine it as the target line spacing value. For example, if the terminal obtains the current user age value of 10, the terminal may determine 36 as the target inter-row distance value.
After determining the target inter-row distance value, the adjustment module 304 may segment the picture at the gaps between rows on the picture to be read. Then, the terminal can insert the strip-shaped pictures at the division positions between the rows, and split the inserted strip-shaped pictures and the pictures where the corresponding rows are located, and the numerical value of the line spacing of the pictures formed after splitting is the target line spacing value.
A reading module 307, configured to obtain a multimedia file associated with a target picture sample if it is detected that the target picture sample matching the picture to be read exists in a preset storage space; acquiring a click-to-read area selected by a user in the picture with the increased line spacing; and acquiring a target playing file from the multimedia file associated with the target picture sample according to the point-reading area, and playing the target playing file.
For example, after acquiring a picture to be clicked and read, the terminal may first detect whether a picture sample matching the picture to be clicked and read exists in a preset storage space.
If it is detected that the picture sample matched with the picture to be read does not exist in the preset storage space, it can be considered that the user does not make the picture sample matched with the picture to be read in advance, and in this case, the terminal can execute other operations.
If it is detected that a target picture sample matching the picture to be read exists in the preset storage space, the reading module 307 may acquire a multimedia file associated with the target picture sample.
Then, after increasing the line spacing of the character portion in the picture to be clicked, the click-to-read module 307 may acquire a specific click-to-read region selected by the user in the picture after increasing the line spacing. Then, the reading module 307 may obtain a target playing file corresponding to the reading region from the multimedia file associated with the target picture sample according to the reading region selected by the user, and play the target playing file.
For example, the picture to be read includes three paragraphs of characters, and the target picture associated with the picture to be read also includes three paragraphs of characters. The first section of characters of the target picture is associated with the audio A, the second section of characters is associated with the audio B, and the third section of characters is associated with the audio C. Then, when the user selects the area where the second segment of text is located in the picture to be read as a specific reading area, the reading module 307 may correspondingly play the audio b.
An embodiment of the present application provides a storage medium, on which a computer program is stored, and when the computer program is executed on a computer, the computer is caused to execute the steps in the method for adjusting a picture provided in this embodiment.
The embodiment of the present application further provides an electronic device, which includes a memory and a processor, where the processor is configured to execute the steps in the method for adjusting a picture provided in this embodiment by calling a computer program stored in the memory.
For example, the electronic device may be a mobile terminal such as a tablet computer or a smart phone. Referring to fig. 7, fig. 7 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
The mobile terminal 400 may include a display unit 401, a memory 402, a processor 403, a camera unit 404, and the like. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 7 is not intended to be limiting of mobile terminals and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The display unit 401 may be used to display image information and the like, such as a display screen.
The memory 402 may be used to store applications and data. The memory 402 stores applications containing executable code. The application programs may constitute various functional modules. The processor 403 executes various functional applications and data processing by running an application program stored in the memory 402.
The processor 403 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or executing an application program stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the mobile terminal.
The camera unit 404 may be used to capture a face image, such as a camera.
In this embodiment, the processor 403 in the mobile terminal loads the executable code corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 403 runs the application programs stored in the memory 402, thereby implementing the steps:
after a picture to be read is obtained, the line spacing of a Chinese character part in the picture is obtained; if the line spacing is smaller than a preset first spacing, acquiring a face image of the user; acquiring an age value of the user according to the face image; and if the age value is detected to be smaller than or equal to a preset value, increasing the line spacing of the character part in the picture, wherein the increased line spacing is larger than or equal to the preset first spacing.
Referring to fig. 8, the mobile terminal 500 may include a display unit 501, a memory 502, a processor 503, a camera unit 504, an input unit 505, an output unit 506, a speaker 507, a microphone 508, and the like.
The display unit 501 may be used to display image information and the like, such as a display screen.
The memory 502 may be used to store applications and data. Memory 502 stores applications containing executable code. The application programs may constitute various functional modules. The processor 503 executes various functional applications and data processing by running an application program stored in the memory 502.
The processor 503 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or executing an application program stored in the memory 502 and calling data stored in the memory 502, thereby performing overall monitoring of the mobile terminal.
The camera unit 504 may be used to capture a face image, such as a camera.
The input unit 505 may be used to receive input numbers, character information, or user characteristic information, such as a fingerprint, and generate a keyboard, mouse, joystick, optical, or trackball signal input related to user setting and function control.
The output unit 506 may be used to display information input by or provided to the user and various graphical user interfaces of the mobile terminal, which may be composed of graphics, text, icons, video, and any combination thereof. The output unit may include a display panel.
In this embodiment, the processor 503 in the mobile terminal loads the executable code corresponding to the process of one or more application programs into the memory 502 according to the following instructions, and the processor 503 runs the application programs stored in the memory 502, thereby implementing the steps:
after a picture to be read is obtained, the line spacing of a Chinese character part in the picture is obtained; if the line spacing is smaller than a preset first spacing, acquiring a face image of the user; acquiring an age value of the user according to the face image; and if the age value is detected to be smaller than or equal to a preset value, increasing the line spacing of the character part in the picture, wherein the increased line spacing is larger than or equal to the preset first spacing.
In one embodiment, when the processor 503 executes the step of increasing the line spacing of the character part in the picture, it may execute: dividing the picture at the gaps between the rows; and inserting the strip-shaped pictures at the division positions between the rows, and splicing the inserted strip-shaped pictures with the pictures where the corresponding rows are positioned to increase the row spacing of the character part.
In one embodiment, before performing the step of dividing the picture at the gaps between the rows, the processor 503 may further perform: calculating the area of the picture and the area occupied by the character part in the picture; calculating the area proportion of the character part in the picture according to the calculated area of the picture and the area occupied by the character part; determining a corresponding target line spacing value according to the area proportion, wherein the target line spacing value is larger than or equal to a preset first spacing;
then, the processor 503, when performing the step of splicing the inserted stripe picture and the picture in which the corresponding row is located, may perform: splicing the inserted strip-shaped picture and the picture where the corresponding row is located, wherein the numerical value of the row spacing of the spliced picture is the target row spacing value.
In one embodiment, before performing the step of dividing the picture at the gaps between the rows, the processor 503 may further perform: and determining a corresponding target line spacing value according to the acquired age value of the user, wherein the target line spacing value is greater than or equal to a preset first spacing, and the line spacing value corresponding to the smaller the age value is.
Then, when the processor 503 executes the step of splicing the inserted bar-shaped picture with the picture in which the corresponding row is located, it may execute: splicing the inserted strip-shaped picture and the picture where the corresponding row is located, wherein the numerical value of the row spacing of the spliced picture is the target row spacing value.
In one embodiment, after the step of performing the segmentation processing on the picture at the gaps between the rows, the processor 503 may further perform: acquiring the word space of the character part of each line after the segmentation processing; comparing the word space of the character part of each line with the size of a preset second space; for the lines with the word spacing smaller than the preset second spacing, the picture is segmented at the gaps between the words, and strip-shaped pictures are inserted at the segmentation positions between the words; splicing the inserted strip-shaped picture with the picture where the corresponding character is located, wherein the character space of the line after the strip-shaped picture is inserted is larger than or equal to the preset second space.
In one embodiment, before the step of obtaining the line spacing of the text portion in the picture, the processor 503 may further perform: and if a target picture sample matched with the picture to be read is detected to exist in the preset storage space, acquiring a multimedia file associated with the target picture sample.
Then, after performing the step of increasing the line spacing of the character part in the picture, the processor 503 may further perform: acquiring a click-to-read area selected by a user in the picture with the increased line spacing; and acquiring a target playing file from the multimedia file associated with the target picture sample according to the point-reading area, and playing the target playing file.
In the above embodiments, the descriptions of the embodiments have respective emphasis, and parts that are not described in detail in a certain embodiment may refer to the above detailed description of the method for adjusting the picture, and are not described herein again.
The apparatus for adjusting pictures provided in the embodiment of the present application and the method for adjusting pictures in the above embodiments belong to the same concept, and any method provided in the method for adjusting pictures may be run on the apparatus for adjusting pictures, and a specific implementation process thereof is described in the method for adjusting pictures in detail in the embodiment, and is not described herein again.
It should be noted that, for the method for adjusting a picture according to the embodiment of the present application, it can be understood by those skilled in the art that all or part of the process of implementing the method for adjusting a picture according to the embodiment of the present application can be completed by controlling the relevant hardware through a computer program, where the computer program can be stored in a computer-readable storage medium, such as a memory, and executed by at least one processor, and during the execution, the process of the embodiment of the method for adjusting a picture can be included. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
In the device for adjusting a picture according to the embodiment of the present application, each functional module may be integrated into one processing chip, or each module may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium, such as a read-only memory, a magnetic or optical disk, or the like.
The method, the apparatus, the storage medium, and the electronic device for adjusting pictures provided in the embodiments of the present application are described in detail above, and a specific example is applied in the present application to explain the principle and the implementation of the present invention, and the description of the above embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method for adjusting pictures, comprising:
the terminal realizes a point reading function and acquires the line spacing of the Chinese character part in the picture after acquiring the picture to be point read;
if the line spacing is smaller than a preset first spacing, acquiring a face image of the user;
acquiring an age value of the user according to the face image;
if the age value is detected to be smaller than or equal to a preset value, increasing the line spacing of the character part in the picture, wherein the increased line spacing is larger than or equal to the preset first spacing;
acquiring a click-to-read area selected by a user in the picture with the increased line spacing;
and acquiring a target playing file according to the point-reading area, and playing the target playing file.
2. The method of adjusting pictures according to claim 1, wherein the increasing the line spacing of the character portion in the picture comprises:
dividing the picture at the gaps between the rows;
and inserting the strip-shaped pictures at the division positions between the rows, and splicing the inserted strip-shaped pictures with the pictures where the corresponding rows are positioned to increase the row spacing of the character part.
3. The method of adjusting pictures according to claim 2, wherein before the step of dividing the picture at the gaps between the rows, the method further comprises:
calculating the area of the picture and the area occupied by the character part in the picture;
calculating the area proportion of the character part in the picture according to the calculated area of the picture and the area occupied by the character part;
determining a corresponding target line spacing value according to the area proportion, wherein the target line spacing value is larger than or equal to a preset first spacing;
the splicing of the inserted strip-shaped picture and the picture where the corresponding row is located comprises the following steps: splicing the inserted strip-shaped picture and the picture where the corresponding row is located, wherein the numerical value of the row spacing of the spliced picture is the target row spacing value.
4. The method of adjusting pictures according to claim 2, wherein before the step of dividing the picture at the gaps between the rows, the method further comprises:
determining a corresponding target line spacing value according to the acquired age value of the user, wherein the target line spacing value is greater than or equal to a preset first spacing, and the line spacing value corresponding to the smaller the age value is;
the splicing of the inserted strip-shaped picture and the picture where the corresponding row is located comprises the following steps: splicing the inserted strip-shaped picture and the picture where the corresponding row is located, wherein the numerical value of the row spacing of the spliced picture is the target row spacing value.
5. The method of adjusting pictures according to claim 2, wherein the step of dividing the picture at the gaps between the rows further comprises:
acquiring the word space of the character part of each line after the segmentation processing;
comparing the word space of the character part of each line with the size of a preset second space;
for the lines with the word spacing smaller than the preset second spacing, the picture is segmented at the gaps between the words, and strip-shaped pictures are inserted at the segmentation positions between the words;
splicing the inserted strip-shaped picture with the picture where the corresponding character is located, wherein the character space of the line after the strip-shaped picture is inserted is larger than or equal to the preset second space.
6. The method for adjusting pictures according to claim 1, wherein before the step of obtaining the line spacing of the text portion in the picture, the method further comprises:
if a target picture sample matched with the picture to be read is detected to exist in a preset storage space, acquiring a multimedia file associated with the target picture sample;
after the step of increasing the line spacing of the character part in the picture, the method further comprises the following steps: acquiring a click-to-read area selected by a user in the picture with the increased line spacing; and acquiring a target playing file from the multimedia file associated with the target picture sample according to the point-reading area, and playing the target playing file.
7. An apparatus for adjusting pictures, comprising:
the first acquisition module is used for acquiring the line spacing of a character part in the picture after the terminal realizes the click-to-read function and acquires the picture to be click-read;
the second acquisition module is used for acquiring a face image of the user if the line spacing is smaller than a preset first spacing;
the third acquisition module is used for acquiring the age value of the user according to the face image;
the adjusting module is used for increasing the line spacing of the character part in the picture if the age value is detected to be smaller than or equal to a preset value, and the increased line spacing is larger than or equal to the preset first spacing;
and the point reading module is used for acquiring a point reading area selected by a user in the picture with the increased line spacing, acquiring a target playing file according to the point reading area, and playing the target playing file.
8. The apparatus for adjusting pictures according to claim 7, wherein the adjusting module is configured to:
dividing the picture at the gaps between the rows;
and inserting the strip-shaped pictures at the division positions between the rows, and splicing the inserted strip-shaped pictures with the pictures of the corresponding rows.
9. A storage medium having stored thereon a computer program, characterized in that the computer program, when executed on a computer, causes the computer to execute the method according to any of claims 1 to 6.
10. An electronic device comprising a memory, a processor, wherein the processor is configured to perform the method of any of claims 1 to 6 by invoking a computer program stored in the memory.
CN201711085784.2A 2017-11-07 2017-11-07 Method and device for adjusting picture, storage medium and electronic equipment Expired - Fee Related CN107748642B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711085784.2A CN107748642B (en) 2017-11-07 2017-11-07 Method and device for adjusting picture, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711085784.2A CN107748642B (en) 2017-11-07 2017-11-07 Method and device for adjusting picture, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN107748642A CN107748642A (en) 2018-03-02
CN107748642B true CN107748642B (en) 2020-04-10

Family

ID=61251910

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711085784.2A Expired - Fee Related CN107748642B (en) 2017-11-07 2017-11-07 Method and device for adjusting picture, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN107748642B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111078101B (en) * 2019-06-03 2021-08-20 广东小天才科技有限公司 Recognition method of reading content and electronic equipment
CN111078080B (en) * 2019-06-09 2021-06-25 广东小天才科技有限公司 Point reading control method and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105278821A (en) * 2014-07-22 2016-01-27 福建福昕软件开发股份有限公司北京分公司 Method and device for automatically regulating electronic document page
CN105759971A (en) * 2016-03-08 2016-07-13 珠海全志科技股份有限公司 Method and system for automatically prompting distance from human eyes to screen
CN106778623A (en) * 2016-12-19 2017-05-31 珠海格力电器股份有限公司 Terminal screen control method and device and electronic equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130283152A1 (en) * 2012-04-24 2013-10-24 Niranjan Damera Venkata Arranging text into columns
US10042539B2 (en) * 2015-02-11 2018-08-07 Adobe Systems Incorporated Dynamic text control for mobile devices

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105278821A (en) * 2014-07-22 2016-01-27 福建福昕软件开发股份有限公司北京分公司 Method and device for automatically regulating electronic document page
CN105759971A (en) * 2016-03-08 2016-07-13 珠海全志科技股份有限公司 Method and system for automatically prompting distance from human eyes to screen
CN106778623A (en) * 2016-12-19 2017-05-31 珠海格力电器股份有限公司 Terminal screen control method and device and electronic equipment

Also Published As

Publication number Publication date
CN107748642A (en) 2018-03-02

Similar Documents

Publication Publication Date Title
US11317139B2 (en) Control method and apparatus
CN107748615B (en) Screen control method and device, storage medium and electronic equipment
CN108495185B (en) Video title generation method and device
CN110691259B (en) Video playing method, system, device, electronic equipment and storage medium
CN106982368B (en) Video response speed detection method and system
CN109005283B (en) Method, device, terminal and storage medium for displaying notification message
CN107562680A (en) Data processing method, device and terminal device
US9607394B2 (en) Information processing method and electronic device
CN109639952B (en) Photographing question searching method and electronic equipment
CN111324352A (en) Code generation method of application page and related equipment
CN109743613B (en) Subtitle processing method, device, terminal and storage medium
CN109408652B (en) Picture searching method, device and equipment
CN107748642B (en) Method and device for adjusting picture, storage medium and electronic equipment
KR102505973B1 (en) Image processing apparatus, control method thereof and computer readable medium having computer program recorded therefor
CN112991555B (en) Data display method, device, equipment and storage medium
CN111401238A (en) Method and device for detecting character close-up segments in video
CN107766563B (en) Method and device for updating data, storage medium and electronic equipment
CN114363688B (en) Video processing method and device and non-volatile computer readable storage medium
CN114265525A (en) Text selection method and device, electronic equipment and readable storage medium
CN110597593B (en) User-guided task processing method and device, computer equipment and storage medium
CN107767712B (en) Method and device for adjusting matching degree, storage medium and electronic equipment
CN112055258B (en) Time delay testing method and device for loading live broadcast picture, electronic equipment and storage medium
CN113038218B (en) Video screenshot method, device, equipment and readable storage medium
CN112988005B (en) Method for automatically loading captions
CN113949926B (en) Video frame inserting method, storage medium and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200410

CF01 Termination of patent right due to non-payment of annual fee