WO2017088292A1 - Display method and apparatus for adjusting picture character - Google Patents

Display method and apparatus for adjusting picture character Download PDF

Info

Publication number
WO2017088292A1
WO2017088292A1 PCT/CN2016/070512 CN2016070512W WO2017088292A1 WO 2017088292 A1 WO2017088292 A1 WO 2017088292A1 CN 2016070512 W CN2016070512 W CN 2016070512W WO 2017088292 A1 WO2017088292 A1 WO 2017088292A1
Authority
WO
WIPO (PCT)
Prior art keywords
positive direction
picture
text
direction vector
character
Prior art date
Application number
PCT/CN2016/070512
Other languages
French (fr)
Chinese (zh)
Inventor
李戎
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017088292A1 publication Critical patent/WO2017088292A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/54Browsing; Visualisation therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/56Information retrieval; Database structures therefor; File system structures therefor of still image data having vectorial format

Definitions

  • the present invention relates to the field of terminal display, and in particular to a display method and apparatus for adjusting picture characters.
  • the invention provides a display method and device for adjusting picture characters, so as to at least solve the problem that the display direction is wrong when the characters in the picture are read in the related art, and the user is inconvenient to read.
  • a method for displaying a picture text including:
  • the picture is adjusted according to the angle ⁇ , wherein the text area is displayed in a positive direction in the adjusted picture.
  • the designated location is a center point location of the screen.
  • the positive direction vector of the text area comprises at least one of the following:
  • the positive direction vector of the text area is a positive direction vector of the single character
  • the positive direction vector of the character region is an average value of the positive direction vectors of the plurality of characters.
  • a positive direction vector of the character region is an average value of positive direction vectors of the plurality of character regions.
  • adjusting the picture according to the angle ⁇ includes:
  • a display device for adjusting picture characters including:
  • An identification module configured to identify a text area in a picture on the screen
  • a calculation module configured to calculate an angle ⁇ between a positive direction vector of the text region and a polar axis of the text region, wherein the polar axis is a coordinate axis obtained by extending polar coordinates along a positive direction of the X axis, The polar coordinates are polar coordinates of a pole at a specified position of the screen;
  • the adjustment module is configured to adjust the picture according to the angle ⁇ , wherein the text area is displayed in a positive direction in the adjusted picture.
  • the apparatus comprises: the designated location being a center point location of the screen.
  • the positive direction vector of the text area comprises at least one of the following:
  • the positive direction vector of the text area is a positive direction vector of the single character
  • the positive direction vector of the character region is an average value of the positive direction vectors of the plurality of characters.
  • a positive direction vector of the character region is an average value of positive direction vectors of the plurality of character regions.
  • the adjustment module comprises:
  • a first adjusting unit configured to rotate the picture counterclockwise ( ⁇ /2)- ⁇ if 0 ⁇ ( ⁇ /2);
  • the second adjustment unit is set to rotate the picture clockwise by ⁇ -( ⁇ /2) if ( ⁇ /2) ⁇ ⁇ ⁇ 2 ⁇ .
  • the text area in the picture on the screen is recognized, and the angle ⁇ between the positive direction vector of the text area and the polar axis of the text area is calculated, wherein the polar axis is a polar coordinate extending along the positive direction of the X axis.
  • the obtained coordinate axis, wherein the polar coordinate of the pole is the designated position of the screen, and the image is adjusted according to the angle ⁇ , wherein the adjusted text field displays the text area in the positive direction, which solves the problem of reading the text in the picture.
  • the display direction is wrong, the user is inconvenient to read, and the effect of displaying the text in the positive direction of the reading picture to the user is achieved.
  • FIG. 1 is a flow chart of a method for adjusting a picture text display according to an embodiment of the present invention
  • FIG. 2 is a structural block diagram 1 of a display device for adjusting picture characters according to an embodiment of the present invention
  • FIG. 3 is a structural block diagram 2 of a display device for adjusting picture characters according to an embodiment of the present invention
  • FIG. 4 is a flow chart of rotating a picture according to a text direction in accordance with a preferred embodiment of the present invention
  • 5A is a schematic diagram showing a stage of a recognized character region for rotating a picture according to a text direction according to a preferred embodiment of the present invention
  • 5B is a schematic diagram showing a stage of calculating a positive direction vector direction of a text region according to a text direction according to a preferred embodiment of the present invention
  • 5C is a schematic diagram showing a stage of rotating a picture according to a text direction according to a preferred embodiment of the present invention.
  • FIG. 6 is a schematic diagram of an example of a single text forward direction vector calculation in accordance with a preferred embodiment of the present invention.
  • FIG. 7 is a diagram showing an example of polar angle calculation of a text region having only a single character in accordance with a preferred embodiment of the present invention.
  • FIG. 8 is a diagram showing an example of polar angle calculation of a plurality of characters in a text area according to a preferred embodiment of the present invention.
  • FIG. 9 is a schematic diagram of a plurality of text regions and corresponding positive direction vectors in accordance with a preferred embodiment of the present invention.
  • FIG. 10 is a schematic diagram of rotating a picture according to a positive direction vector of a text area, in accordance with a preferred embodiment of the present invention.
  • FIG. 11 is a flow diagram of rotating a picture according to a positive direction vector of a text region in accordance with a preferred embodiment of the present invention.
  • FIG. 1 is a flowchart of a method for displaying the picture text according to an embodiment of the present invention. As shown in FIG. 1 , the process includes the following steps:
  • Step S102 identifying a text area in the picture on the screen
  • Step S104 calculating an angle ⁇ between a positive direction vector of the character region and a polar axis of the text region, wherein the polar axis is a coordinate axis obtained by extending polar coordinates along a positive direction of the X axis, wherein the polar coordinate is The specified position of the screen is the polar coordinates of the pole;
  • Step S106 the picture is adjusted according to the angle ⁇ , wherein the adjusted text area displays the text area in the positive direction.
  • the text area in the picture on the screen is identified, and the angle ⁇ between the positive direction vector of the text area and the polar axis of the text area is calculated, wherein the polar axis is a polar coordinate extending along the positive direction of the X axis.
  • the obtained coordinate axis, wherein the polar coordinate of the pole is the designated position of the screen, and the image is adjusted according to the angle ⁇ , wherein the adjusted text field displays the text area in the positive direction, which solves the problem of reading the text in the picture.
  • the display direction is wrong, the user is inconvenient to read, and the effect of displaying the text in the positive direction of the reading picture to the user is achieved.
  • the designated position is the center point position of the screen.
  • the positive direction vector of the text area includes, when the text area has only a single character, the positive direction vector of the text area is a positive direction vector of the single character and/or there are multiple in the text area. In the case of a character, the positive direction vector of the text area is the average of the positive direction vectors of the plurality of characters.
  • the positive direction vector of the character region is an average value of the positive direction vectors of the plurality of character regions.
  • adjusting the picture according to the angle ⁇ includes: if 0 ⁇ ( ⁇ /2), rotating the picture counterclockwise ( ⁇ /2)- ⁇ ; if ( ⁇ /2) ⁇ ⁇ 2 ⁇ , the picture is rotated clockwise by ⁇ -( ⁇ /2).
  • a display device for adjusting picture characters is also provided.
  • the device is used to implement the above-mentioned embodiments and preferred embodiments, and the detailed description thereof has been omitted.
  • the term "module” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • FIG. 2 is a block diagram of a structure of a display device for adjusting picture characters according to an embodiment of the present invention. As shown in FIG. 2, the device includes:
  • the identification module 22 is configured to identify a text area in the picture on the screen
  • a calculation module 24 configured to calculate an angle ⁇ between a positive direction vector of the text region and a polar axis of the text region, wherein the polar axis is a coordinate axis obtained by extending polar coordinates along a positive direction of the X axis, the pole The coordinate is the polar coordinate of the pole with the specified position of the screen;
  • the adjusting module 26 is configured to adjust the picture according to the angle ⁇ , wherein the adjusted text area displays the text area in a positive direction.
  • the recognition module 22 identifies the text area in the picture on the screen, and the calculation module 24 calculates an angle ⁇ between the positive direction vector of the text area and the polar axis of the text area, wherein the polar axis is a polar coordinate edge
  • the coordinate axis obtained by extending the positive direction of the X-axis, wherein the polar coordinate is the polar coordinate of the pole, and the adjustment module 26 adjusts the image according to the angle ⁇ , wherein the adjusted image displays the text in the positive direction.
  • the area solves the problem that the display direction is wrong when the text in the picture is read, and the user is inconvenient to read, thereby achieving the effect of displaying the text in the positive direction of the reading picture to the user.
  • FIG. 3 is a structural block diagram 2 of a display device for adjusting picture characters according to an embodiment of the present invention. As shown in FIG. 3, the adjustment module 26 further includes:
  • the first adjusting unit 32 is configured to rotate the picture counterclockwise ( ⁇ /2)- ⁇ if 0 ⁇ ( ⁇ /2);
  • the second adjusting unit 34 is configured to rotate the picture clockwise by ⁇ -( ⁇ /2) if ( ⁇ /2) ⁇ ⁇ ⁇ 2 ⁇ .
  • each of the above modules may be implemented by software or hardware.
  • the foregoing may be implemented by, but not limited to, the foregoing modules are all located in the same processor; or, the modules are located in multiple At In the processor.
  • the image display method shown in the preferred embodiment of the present invention includes a mobile terminal display screen, an image display module, and a character recognition module.
  • the text recognition module can also calculate the positive direction vector of the text while recognizing the text.
  • the angle of rotation of the image is determined based on the positive direction vector of the text.
  • the image display module of the preferred embodiment includes an image display algorithm, an image rotation algorithm, and a method of invoking a text recognition module.
  • the image rotation algorithm rotates the image by any angle, clockwise and counterclockwise.
  • the image display algorithm is used to completely display the image rotated at any angle on the screen of the smart terminal.
  • FIG. 4 is a flowchart of rotating a picture according to a text direction according to an embodiment of the present invention. As shown in FIG. 4, the steps include:
  • Step S401 identifying a text area in the picture
  • Step S402 calculating an angle between the positive direction vector of the text region and the polar axis - the polar angle ⁇ ;
  • Step S403 calculating an angle at which the picture needs to be rotated according to the size of ⁇ , and performing a rotation operation.
  • step S404 a picture is displayed.
  • FIG. 5 is a schematic diagram of rotating a picture according to a text direction according to a preferred embodiment of the present invention. As shown in FIG. 5, the steps include:
  • Step 1 Identify the text area stage, as shown in the picture in Figure 5A;
  • Step 2 Calculate the positive direction vector phase of the text area, as shown in the picture in Figure 5B;
  • Step 3 Rotate the picture phase, as shown in the picture in Figure 5C.
  • the positive direction vector of the text area is indicated by a dashed arrow.
  • the text area is indicated by a dotted rectangular box.
  • the angle between the positive direction vector of the text area and the polar axis is denoted by ⁇ .
  • a preferred embodiment of the preferred embodiment of the present invention rotates the picture and displays it by accurately calculating the angle between the positive direction vector of the text and the polar axis of the coordinate system.
  • the specific scheme can be divided into several parts: (1) the method of calculating the positive direction vector of a single character; (2) the method of calculating the positive direction vector of the text area; (3) the method of calculating the positive direction vector of the picture text; (4) according to the text
  • a method of rotating a picture with a polar angle corresponding to a positive direction vector of a region The four methods are detailed below.
  • FIG. 6 is an exemplary diagram of a single text positive direction vector calculation.
  • Each successfully matched text (the text in Figure 6) has a corresponding bounding box, as shown by the rectangular box in Figure 6. According to the unit, the positive direction vector of the text can be determined (arrow in Fig. 6).
  • FIG. 6 is a schematic diagram of a single text forward direction vector calculation according to a preferred embodiment of the present invention. As shown in FIG. 6, an arrow represents a positive direction vector, a bold "middle” character represents a character to be recognized, and a thin “middle” character represents a character recognition. The algorithm matches the resulting text, and the outer rectangular box represents the border of the "matched text”.
  • the text area has only a single text and the text area has multiple words.
  • the calculation of the positive direction vector of the text area is discussed separately.
  • Case 1 The text area has only a single text (as shown in Figure 8)
  • the positive direction vector of a single character can be regarded as the positive direction vector of the text area.
  • the polar angle corresponding to the positive direction vector of a single text can also be regarded as the polar angle of the positive direction vector of the text area.
  • FIG. 7 is a diagram showing an example of polar angle calculation of a text region having only a single character, as shown in FIG. 7, in accordance with a preferred embodiment of the present invention.
  • the arrows represent the positive direction vector.
  • the positive direction vector of the text area is the average of all the text positive direction vectors. Its corresponding polar angle is also the average of all positive direction vector polar angles. Its calculation formula is For example, each text in Figure 8 has a positive direction vector and corresponds to its respective polar angle. The polar angle corresponding to the positive direction vector of the text area is calculated as:
  • Figure 8 is a diagram showing an example of polar angle calculation of a plurality of characters in a text area, as shown in Figure 8, in accordance with a preferred embodiment of the present invention.
  • Red arrow indicates the positive direction vector text
  • ⁇ 1, ⁇ 2, ⁇ 3, ⁇ 4 each represent a polar angle character corresponding to the positive direction of the vector.
  • each text area has its own positive direction vector.
  • FIG. 9 is a schematic diagram of a plurality of text regions and corresponding positive direction vectors in accordance with a preferred embodiment of the present invention, as shown in FIG. 9 showing an angle between a positive direction vector (indicated by an arrow) and a polar axis corresponding to two text regions.
  • ⁇ A and ⁇ B average all positive direction vectors to get an average positive direction vector, whose polar angle is also the average of the polar angles.
  • FIG. 10 is a schematic diagram of rotating a picture according to a positive direction vector of a text area according to a preferred embodiment of the present invention. As shown in FIG. 10, the corresponding angle is rotated clockwise or counterclockwise according to the polar angle of the positive direction vector of the text area.
  • FIG. 11 is a flow chart of rotating a picture according to a positive direction vector of a text area according to a preferred embodiment of the present invention. As shown in FIG. 11, the steps include:
  • Step S1101 Establish polar coordinates, with the center of the screen as the pole, and the positive direction of the X along the positive direction of the screen.
  • the polar coordinates are fixed;
  • Step S1102 Calculate the angle of rotation according to the polar angle of the positive direction vector of the text region. If 0 ⁇ /2, rotate ⁇ /2- ⁇ counterclockwise; if ⁇ /2 ⁇ 2 ⁇ , rotate ⁇ - ⁇ /2 clockwise;
  • Step S1103 Display a picture.
  • the text in the picture can be displayed to the user forever, so that the user can view the picture with the text, without manually rotating the screen or rotating the picture in the gallery.
  • the buttons of the left-handed and right-handed pictures can be transferred from the eye-catching position to the menu option, so that the image is more completely displayed to the user, which increases the user experience.
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation.
  • the technical solution of the present invention which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method of various embodiments of the present invention.
  • Embodiments of the present invention also provide a storage medium.
  • the storage medium may be configured to store program code for performing the method steps of the above embodiment:
  • the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • a mobile hard disk e.g., a hard disk
  • magnetic memory e.g., a hard disk
  • the processor performs the method steps of the foregoing embodiments according to the stored program code in the storage medium.
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • a text area in a picture on a screen is recognized, and an angle ⁇ between a positive direction vector of the text area and a polar axis of the text area is calculated, wherein the polar axis is a polar coordinate a coordinate axis extending along a positive direction of the X-axis, wherein the polar coordinate is a polar coordinate of a pole at a specified position of the screen, and the map is adjusted according to the angle ⁇
  • the adjusted text area is displayed in the positive direction, which solves the problem that the display direction is wrong when the text in the picture is read, and the user is inconvenient to read, thereby achieving the effect that the text in the reading picture is displayed in the positive direction to the user.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Controls And Circuits For Display Device (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

A display method and apparatus for adjusting a picture character. The method comprises: identifying a character region in a picture on a screen (S102); calculating an included angle á b etween a positive direction vector of the character region and a polar axis of the character region, wherein the polar axis is a coordinate axis obtained by polar coordinates extending along a positive direction of an X axis, and the polar coordinates are polar coordinates taking a specific location on the screen as a pole (S104); and adjusting the picture according to the included angle á, wherein the character region is displayed in the positive direction of the adjusted picture (S106). The method solves the problem of inconvenient reading for a user due to a wrong character display direction in a reading picture, and thus achieves the effect of displaying characters in a reading picture in a positive direction to a user.

Description

调整图片文字的显示方法及装置Method and device for adjusting picture text display 技术领域Technical field
本发明涉及终端显示领域,具体而言,涉及一种调整图片文字的显示方法及装置。The present invention relates to the field of terminal display, and in particular to a display method and apparatus for adjusting picture characters.
背景技术Background technique
在图库中全屏浏览图片的时候,经常看到一些包含文字的图片显示方向不对,需要将屏幕旋转后才能看清图片中的文字。When viewing pictures in full screen in the gallery, I often see some pictures with text displayed in the wrong direction. I need to rotate the screen to see the text in the picture.
针对相关技术中,图片中文字显示方向不对,用户阅读不方便的问题,目前还没有有效解决方案。In view of the related art, the text in the picture is displayed in the wrong direction, and the user is inconvenient to read, and there is currently no effective solution.
发明内容Summary of the invention
本发明提供了一种调整图片文字的显示方法及装置,以至少解决相关技术中阅读图片中文字时显示方向不对,用户阅读不方便的问题。The invention provides a display method and device for adjusting picture characters, so as to at least solve the problem that the display direction is wrong when the characters in the picture are read in the related art, and the user is inconvenient to read.
根据本发明的一个实施例,提供了一种调整图片文字的显示方法,包括:According to an embodiment of the present invention, a method for displaying a picture text is provided, including:
识别屏幕上图片中的文字区域;Identify the text area in the picture on the screen;
计算所述文字区域的正方向向量与所述文字区域的极轴之间的夹角α,其中,所述极轴是极坐标沿X轴的正方向延伸得到的坐标轴,所述极坐标以所述屏幕的指定位置为极点的极坐标;Calculating an angle α between a positive direction vector of the text region and a polar axis of the text region, wherein the polar axis is a coordinate axis obtained by extending a polar coordinate in a positive direction of the X axis, wherein the polar coordinate is The specified position of the screen is the polar coordinate of the pole;
依据所述夹角α调整所述图片,其中,调整后的所述图片中正方向显示所述文字区域。The picture is adjusted according to the angle α, wherein the text area is displayed in a positive direction in the adjusted picture.
在本发明的实施例中,所述指定位置为所述屏幕的中心点位置。In an embodiment of the invention, the designated location is a center point location of the screen.
在本发明的实施例中,所述文字区域的正方向向量包括以下至少之一:In an embodiment of the invention, the positive direction vector of the text area comprises at least one of the following:
在所述文字区域只有单个文字时,所述文字区域的正方向向量为所述单个文字的正方向向量;When the text area has only a single character, the positive direction vector of the text area is a positive direction vector of the single character;
在所述文字区域的有多个文字时,所述文字区域的正方向向量为所述多个文字的正方向向量的平均值。When there are a plurality of characters in the character region, the positive direction vector of the character region is an average value of the positive direction vectors of the plurality of characters.
在本发明的实施例中,在所述文字区域为多个的情况下,所述文字区域的正方向向量为所述多个文字区域的正方向向量的平均值。In an embodiment of the present invention, when there are a plurality of character regions, a positive direction vector of the character region is an average value of positive direction vectors of the plurality of character regions.
在本发明的实施例中,依据所述夹角α调整所述图片包括:In an embodiment of the invention, adjusting the picture according to the angle α includes:
若0<α<(π/2),则将所述图片逆时针旋转(π/2)-α;若(π/2)<α<2π,则将所述图片顺 时针旋转α-(π/2)。If 0<α<(π/2), the picture is rotated counterclockwise (π/2)-α; if (π/2)<α<2π, the picture is shun The hour hand rotates α-(π/2).
根据本发明的另一实施例,提供了一种调整图片文字的显示装置,包括:According to another embodiment of the present invention, a display device for adjusting picture characters is provided, including:
识别模块,设置为识别屏幕上图片中的文字区域;An identification module configured to identify a text area in a picture on the screen;
计算模块,设置为计算所述文字区域的正方向向量与所述文字区域的极轴之间的夹角α,其中,所述极轴是极坐标沿X轴的正方向延伸得到的坐标轴,所述极坐标以所述屏幕的指定位置为极点的极坐标;a calculation module configured to calculate an angle α between a positive direction vector of the text region and a polar axis of the text region, wherein the polar axis is a coordinate axis obtained by extending polar coordinates along a positive direction of the X axis, The polar coordinates are polar coordinates of a pole at a specified position of the screen;
调整模块,设置为依据所述夹角α调整所述图片,其中,调整后的所述图片中正方向显示所述文字区域。The adjustment module is configured to adjust the picture according to the angle α, wherein the text area is displayed in a positive direction in the adjusted picture.
在本发明的实施例中,所述装置包括:所述指定位置为所述屏幕的中心点位置。In an embodiment of the invention, the apparatus comprises: the designated location being a center point location of the screen.
在本发明的实施例中,所述文字区域的正方向向量包括以下至少之一:In an embodiment of the invention, the positive direction vector of the text area comprises at least one of the following:
在所述文字区域只有单个文字时,所述文字区域的正方向向量为所述单个文字的正方向向量;When the text area has only a single character, the positive direction vector of the text area is a positive direction vector of the single character;
在所述文字区域的有多个文字时,所述文字区域的正方向向量为所述多个文字的正方向向量的平均值。When there are a plurality of characters in the character region, the positive direction vector of the character region is an average value of the positive direction vectors of the plurality of characters.
在本发明的实施例中,在所述文字区域为多个的情况下,所述文字区域的正方向向量为所述多个文字区域的正方向向量的平均值。In an embodiment of the present invention, when there are a plurality of character regions, a positive direction vector of the character region is an average value of positive direction vectors of the plurality of character regions.
在本发明的实施例中,所述调整模块包括:In an embodiment of the invention, the adjustment module comprises:
第一调整单元,设置为若0<α<(π/2),则将所述图片逆时针旋转(π/2)-α;a first adjusting unit, configured to rotate the picture counterclockwise (π/2)-α if 0<α<(π/2);
第二调整单元,设置为若(π/2)<α<2π,则将所述图片顺时针旋转α-(π/2)。The second adjustment unit is set to rotate the picture clockwise by α-(π/2) if (π/2) < α < 2π.
通过本发明,识别屏幕上图片中的文字区域,计算该文字区域的正方向向量与该文字区域的极轴之间的夹角α,其中,该极轴是极坐标沿X轴的正方向延伸得到的坐标轴,该极坐标以该屏幕的指定位置为极点的极坐标,依据该夹角α调整该图片,其中,调整后的该图片中正方向显示该文字区域,解决了阅读图片中文字时显示方向不对,用户阅读不方便的问题,进而达到了阅读图片中文字正方向显示给用户的效果。According to the present invention, the text area in the picture on the screen is recognized, and the angle α between the positive direction vector of the text area and the polar axis of the text area is calculated, wherein the polar axis is a polar coordinate extending along the positive direction of the X axis. The obtained coordinate axis, wherein the polar coordinate of the pole is the designated position of the screen, and the image is adjusted according to the angle α, wherein the adjusted text field displays the text area in the positive direction, which solves the problem of reading the text in the picture. The display direction is wrong, the user is inconvenient to read, and the effect of displaying the text in the positive direction of the reading picture to the user is achieved.
附图说明DRAWINGS
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the invention, and are intended to be a part of the invention. In the drawing:
图1是根据本发明实施例的一种调整图片文字的显示方法的流程图;1 is a flow chart of a method for adjusting a picture text display according to an embodiment of the present invention;
图2是根据本发明实施例的一种调整图片文字的显示装置的结构框图一; 2 is a structural block diagram 1 of a display device for adjusting picture characters according to an embodiment of the present invention;
图3是根据本发明实施例的一种调整图片文字的显示装置的结构框图二;3 is a structural block diagram 2 of a display device for adjusting picture characters according to an embodiment of the present invention;
图4是根据本发明优选实施例的根据文字方向旋转图片的流程图;4 is a flow chart of rotating a picture according to a text direction in accordance with a preferred embodiment of the present invention;
图5A是根据本发明优选实施例的根据文字方向旋转图片的识别文字区域阶段示意图;5A is a schematic diagram showing a stage of a recognized character region for rotating a picture according to a text direction according to a preferred embodiment of the present invention;
图5B是根据本发明优选实施例的根据文字方向旋转图片的计算文字区域正方向向量阶段示意图;5B is a schematic diagram showing a stage of calculating a positive direction vector direction of a text region according to a text direction according to a preferred embodiment of the present invention;
图5C是根据本发明优选实施例的根据文字方向旋转图片的旋转图片阶段示意图;5C is a schematic diagram showing a stage of rotating a picture according to a text direction according to a preferred embodiment of the present invention;
图6是根据本发明优选实施例的单个文字正方向向量计算示例的示意图;6 is a schematic diagram of an example of a single text forward direction vector calculation in accordance with a preferred embodiment of the present invention;
图7是根据本发明优选实施例的只有单个文字的文字区域的极角计算示例图;7 is a diagram showing an example of polar angle calculation of a text region having only a single character in accordance with a preferred embodiment of the present invention;
图8是根据本发明优选实施例的文字区域有多个文字的极角计算示例图;8 is a diagram showing an example of polar angle calculation of a plurality of characters in a text area according to a preferred embodiment of the present invention;
图9是根据本发明优选实施例的中多个文字区域及相应正方向向量的示意图;9 is a schematic diagram of a plurality of text regions and corresponding positive direction vectors in accordance with a preferred embodiment of the present invention;
图10是根据本发明优选实施例的一种根据文字区域正方向向量旋转图片的示意图;10 is a schematic diagram of rotating a picture according to a positive direction vector of a text area, in accordance with a preferred embodiment of the present invention;
图11是根据本发明优选实施例的根据文字区域正方向向量旋转图片的流程图。11 is a flow diagram of rotating a picture according to a positive direction vector of a text region in accordance with a preferred embodiment of the present invention.
具体实施方式detailed description
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The invention will be described in detail below with reference to the drawings in conjunction with the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It is to be understood that the terms "first", "second" and the like in the specification and claims of the present invention are used to distinguish similar objects, and are not necessarily used to describe a particular order or order.
在本实施例中提供了一种调整图片文字的显示的方法,图1是根据本发明实施例的一种调整图片文字的显示方法的流程图,如图1所示,该流程包括如下步骤:In the embodiment, a method for adjusting the display of the picture text is provided. FIG. 1 is a flowchart of a method for displaying the picture text according to an embodiment of the present invention. As shown in FIG. 1 , the process includes the following steps:
步骤S102,识别屏幕上图片中的文字区域;Step S102, identifying a text area in the picture on the screen;
步骤S104,计算该文字区域的正方向向量与该文字区域的极轴之间的夹角α,其中,该极轴是极坐标沿X轴的正方向延伸得到的坐标轴,该极坐标以该屏幕的指定位置为极点的极坐标;Step S104, calculating an angle α between a positive direction vector of the character region and a polar axis of the text region, wherein the polar axis is a coordinate axis obtained by extending polar coordinates along a positive direction of the X axis, wherein the polar coordinate is The specified position of the screen is the polar coordinates of the pole;
步骤S106,依据该夹角α调整该图片,其中,调整后的该图片中正方向显示该文字区域。Step S106, the picture is adjusted according to the angle α, wherein the adjusted text area displays the text area in the positive direction.
通过上述步骤,识别屏幕上图片中的文字区域,计算该文字区域的正方向向量与该文字区域的极轴之间的夹角α,其中,该极轴是极坐标沿X轴的正方向延伸得到的坐标轴,该极坐标以该屏幕的指定位置为极点的极坐标,依据该夹角α调整该图片,其中,调整后的该图片中正方向显示该文字区域,解决了阅读图片中文字时显示方向不对,用户阅读不方便的问题,进而达到了阅读图片中文字正方向显示给用户的效果。 Through the above steps, the text area in the picture on the screen is identified, and the angle α between the positive direction vector of the text area and the polar axis of the text area is calculated, wherein the polar axis is a polar coordinate extending along the positive direction of the X axis. The obtained coordinate axis, wherein the polar coordinate of the pole is the designated position of the screen, and the image is adjusted according to the angle α, wherein the adjusted text field displays the text area in the positive direction, which solves the problem of reading the text in the picture. The display direction is wrong, the user is inconvenient to read, and the effect of displaying the text in the positive direction of the reading picture to the user is achieved.
在本实施例中,该指定位置为该屏幕的中心点位置。In this embodiment, the designated position is the center point position of the screen.
在本实施例中,该文字区域的正方向向量包括,在该文字区域只有单个文字时,该文字区域的正方向向量为该单个文字的正方向向量和/或在该文字区域的有多个文字时,该文字区域的正方向向量为该多个文字的正方向向量的平均值。In this embodiment, the positive direction vector of the text area includes, when the text area has only a single character, the positive direction vector of the text area is a positive direction vector of the single character and/or there are multiple in the text area. In the case of a character, the positive direction vector of the text area is the average of the positive direction vectors of the plurality of characters.
在本实施例中,在该文字区域为多个的情况下,该文字区域的正方向向量为该多个文字区域的正方向向量的平均值。In the present embodiment, when there are a plurality of character regions, the positive direction vector of the character region is an average value of the positive direction vectors of the plurality of character regions.
在本实施例中,依据该夹角α调整该图片包括,若0<α<(π/2),则将该图片逆时针旋转(π/2)-α;若(π/2)<α<2π,则将该图片顺时针旋转α-(π/2)。In this embodiment, adjusting the picture according to the angle α includes: if 0<α<(π/2), rotating the picture counterclockwise (π/2)-α; if (π/2)<α <2π, the picture is rotated clockwise by α-(π/2).
在本实施例中还提供了一种调整图片文字的显示装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In this embodiment, a display device for adjusting picture characters is also provided. The device is used to implement the above-mentioned embodiments and preferred embodiments, and the detailed description thereof has been omitted. As used below, the term "module" may implement a combination of software and/or hardware of a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
图2是根据本发明实施例的一种调整图片文字的显示装置的结构框图一,如图2所示,该装置包括:2 is a block diagram of a structure of a display device for adjusting picture characters according to an embodiment of the present invention. As shown in FIG. 2, the device includes:
识别模块22,用于识别屏幕上图片中的文字区域;The identification module 22 is configured to identify a text area in the picture on the screen;
计算模块24,用于计算该文字区域的正方向向量与该文字区域的极轴之间的夹角α,其中,该极轴是极坐标沿X轴的正方向延伸得到的坐标轴,该极坐标以该屏幕的指定位置为极点的极坐标;a calculation module 24, configured to calculate an angle α between a positive direction vector of the text region and a polar axis of the text region, wherein the polar axis is a coordinate axis obtained by extending polar coordinates along a positive direction of the X axis, the pole The coordinate is the polar coordinate of the pole with the specified position of the screen;
调整模块26,用于依据该夹角α调整该图片,其中,调整后的该图片中正方向显示该文字区域。The adjusting module 26 is configured to adjust the picture according to the angle α, wherein the adjusted text area displays the text area in a positive direction.
通过上述步骤,识别模块22识别屏幕上图片中的文字区域,计算模块24计算该文字区域的正方向向量与该文字区域的极轴之间的夹角α,其中,该极轴是极坐标沿X轴的正方向延伸得到的坐标轴,该极坐标以该屏幕的指定位置为极点的极坐标,调整模块26依据该夹角α调整该图片,其中,调整后的该图片中正方向显示该文字区域,解决了阅读图片中文字时显示方向不对,用户阅读不方便的问题,进而达到了阅读图片中文字正方向显示给用户的效果。Through the above steps, the recognition module 22 identifies the text area in the picture on the screen, and the calculation module 24 calculates an angle α between the positive direction vector of the text area and the polar axis of the text area, wherein the polar axis is a polar coordinate edge The coordinate axis obtained by extending the positive direction of the X-axis, wherein the polar coordinate is the polar coordinate of the pole, and the adjustment module 26 adjusts the image according to the angle α, wherein the adjusted image displays the text in the positive direction. The area solves the problem that the display direction is wrong when the text in the picture is read, and the user is inconvenient to read, thereby achieving the effect of displaying the text in the positive direction of the reading picture to the user.
图3是根据本发明实施例的一种调整图片文字的显示装置的结构框图二,如图3所示,该调整模块26还包括:FIG. 3 is a structural block diagram 2 of a display device for adjusting picture characters according to an embodiment of the present invention. As shown in FIG. 3, the adjustment module 26 further includes:
第一调整单元32,用于若0<α<(π/2),则将该图片逆时针旋转(π/2)-α;The first adjusting unit 32 is configured to rotate the picture counterclockwise (π/2)-α if 0<α<(π/2);
第二调整单元34,用于若(π/2)<α<2π,则将该图片顺时针旋转α-(π/2)。The second adjusting unit 34 is configured to rotate the picture clockwise by α-(π/2) if (π/2) < α < 2π.
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述模块分别位于多个处 理器中。It should be noted that each of the above modules may be implemented by software or hardware. For the latter, the foregoing may be implemented by, but not limited to, the foregoing modules are all located in the same processor; or, the modules are located in multiple At In the processor.
下面结合优选实施例和实施方式对本发明进行详细说明。The invention will now be described in detail in conjunction with the preferred embodiments and embodiments.
本发明优选实施例所示的图像显示方法包括移动终端显示屏幕、图像显示模块和文字识别模块。其中文字识别模块在识别文字的同时也可计算出文字的正方向向量。本发明优选实施例就根据文字的正方向向量来确定图像的旋转角度,优选实施例的图像显示模块包括图像显示算法,图像旋转算法和调用文字识别模块的方法。图像旋转算法可将图像按顺时针和逆时针分别旋转任意角度。图像显示算法用以将旋转任意角度后的图像完整地显示在智能终端的屏幕上。The image display method shown in the preferred embodiment of the present invention includes a mobile terminal display screen, an image display module, and a character recognition module. The text recognition module can also calculate the positive direction vector of the text while recognizing the text. In a preferred embodiment of the invention, the angle of rotation of the image is determined based on the positive direction vector of the text. The image display module of the preferred embodiment includes an image display algorithm, an image rotation algorithm, and a method of invoking a text recognition module. The image rotation algorithm rotates the image by any angle, clockwise and counterclockwise. The image display algorithm is used to completely display the image rotated at any angle on the screen of the smart terminal.
图4为本发明实施例根据文字方向旋转图片的流程图,如图4所示,其步骤包括:FIG. 4 is a flowchart of rotating a picture according to a text direction according to an embodiment of the present invention. As shown in FIG. 4, the steps include:
步骤S401,在图片中识别文字区域;Step S401, identifying a text area in the picture;
步骤S402,计算出文字区域正方向向量与极轴的夹角——极角α;Step S402, calculating an angle between the positive direction vector of the text region and the polar axis - the polar angle α;
步骤S403,根据α的大小计算出图片需要旋转的角度,并执行旋转操作。Step S403, calculating an angle at which the picture needs to be rotated according to the size of α, and performing a rotation operation.
步骤S404,显示图片。In step S404, a picture is displayed.
图5为本发明优选实施例的根据文字方向旋转图片的示意图,如图5所示,其步骤包括:FIG. 5 is a schematic diagram of rotating a picture according to a text direction according to a preferred embodiment of the present invention. As shown in FIG. 5, the steps include:
步骤一:识别文字区域阶段,如图5A的图片所示;Step 1: Identify the text area stage, as shown in the picture in Figure 5A;
步骤二:计算文字区域正方向向量阶段,如图5B的图片所示;Step 2: Calculate the positive direction vector phase of the text area, as shown in the picture in Figure 5B;
步骤三:旋转图片阶段,如图5C的图片所示。Step 3: Rotate the picture phase, as shown in the picture in Figure 5C.
文字区域正方向向量用虚线箭头表示。文字区域用虚线矩形框表示。文字区域正方向向量与极轴的夹角标识为α。The positive direction vector of the text area is indicated by a dashed arrow. The text area is indicated by a dotted rectangular box. The angle between the positive direction vector of the text area and the polar axis is denoted by α.
本发明优选实施例的最佳的技术实施方案是通过准确计算出文字正方向向量与坐标系极轴的夹角——极角α,来旋转图片并显示。具体方案可以分为几个部分:(1)计算单个文字正方向向量的方法;(2)计算文字区域正方向向量的方法;(3)计算图片文字正方向向量的方法;(4)根据文字区域正方向向量所对应的极角旋转图片的方法。下面分别详述这四种方法。A preferred embodiment of the preferred embodiment of the present invention rotates the picture and displays it by accurately calculating the angle between the positive direction vector of the text and the polar axis of the coordinate system. The specific scheme can be divided into several parts: (1) the method of calculating the positive direction vector of a single character; (2) the method of calculating the positive direction vector of the text area; (3) the method of calculating the positive direction vector of the picture text; (4) according to the text A method of rotating a picture with a polar angle corresponding to a positive direction vector of a region. The four methods are detailed below.
方法1,计算单个文字正方向向量实施例: Method 1, calculating a single text positive direction vector embodiment:
文字识别算法会逐个匹配文字区域中的每个文字,并计算每个文字对应的正方向向量。图6是单个文字正方向向量计算的示例图。每个匹配成功的文字(图6中细体文字)均有一个对应的边框(bounding box),如图6中矩形框所示。根据该单元可确定文字的正方向向量(图6中箭头)。The text recognition algorithm will match each text in the text area one by one and calculate the positive direction vector corresponding to each text. Figure 6 is an exemplary diagram of a single text positive direction vector calculation. Each successfully matched text (the text in Figure 6) has a corresponding bounding box, as shown by the rectangular box in Figure 6. According to the unit, the positive direction vector of the text can be determined (arrow in Fig. 6).
图6为本发明优选实施例的单个文字正方向向量计算示例,如图6所示,箭头代表正方向向量,粗体“中”字代表需要识别的字符,细体“中”字代表文字识别算法匹配得到的文字,其外围的矩形框代表“匹配得到的文字”所在的边框。 6 is a schematic diagram of a single text forward direction vector calculation according to a preferred embodiment of the present invention. As shown in FIG. 6, an arrow represents a positive direction vector, a bold "middle" character represents a character to be recognized, and a thin "middle" character represents a character recognition. The algorithm matches the resulting text, and the outer rectangular box represents the border of the "matched text".
方法2,计算文字区域正方向向量实施例:Method 2, calculating the positive direction vector of the text area.
计算文字区域正方向向量分两种情况:文字区域只有单个文字和文字区域有多个文字。下面就这两种情况分别讨论文字区域正方向向量的计算。There are two cases in which the positive direction vector of the text area is calculated: the text area has only a single text and the text area has multiple words. In the following two cases, the calculation of the positive direction vector of the text area is discussed separately.
情况1:文字区域只有单个文字(如图8所示)Case 1: The text area has only a single text (as shown in Figure 8)
该情况下,单个文字的正方向向量可视为文字区域的正方向向量。单个文字正方向向量对应的极角也可视为文字区域正方向向量的极角。In this case, the positive direction vector of a single character can be regarded as the positive direction vector of the text area. The polar angle corresponding to the positive direction vector of a single text can also be regarded as the polar angle of the positive direction vector of the text area.
图7是根据本发明优选实施例的只有单个文字的文字区域的极角计算示例图,如图7所示。箭头代表正方向向量。7 is a diagram showing an example of polar angle calculation of a text region having only a single character, as shown in FIG. 7, in accordance with a preferred embodiment of the present invention. The arrows represent the positive direction vector.
情况2:文字区域有多个文字(如图8所示)Case 2: There are multiple texts in the text area (as shown in Figure 8)
该情况下,文字区域的正方向向量为所有文字正方向向量的平均。其对应的极角也为所有正方向向量极角的平均。其计算公式为
Figure PCTCN2016070512-appb-000001
例如:图8中每个文字均有一个正方向向量,且对应各自的极角。该文字区域正方向向量对应的极角的计算方法为:
Figure PCTCN2016070512-appb-000002
Figure PCTCN2016070512-appb-000003
In this case, the positive direction vector of the text area is the average of all the text positive direction vectors. Its corresponding polar angle is also the average of all positive direction vector polar angles. Its calculation formula is
Figure PCTCN2016070512-appb-000001
For example, each text in Figure 8 has a positive direction vector and corresponds to its respective polar angle. The polar angle corresponding to the positive direction vector of the text area is calculated as:
Figure PCTCN2016070512-appb-000002
Figure PCTCN2016070512-appb-000003
图8是根据本发明优选实施例的文字区域有多个文字的极角计算示例图,如图8所示。红色箭头代表文字正方向向量,α1、α2、α3、α4分别代表各个文字正方向向量对应的极角。Figure 8 is a diagram showing an example of polar angle calculation of a plurality of characters in a text area, as shown in Figure 8, in accordance with a preferred embodiment of the present invention. Red arrow indicates the positive direction vector text, α 1, α 2, α 3, α 4 each represent a polar angle character corresponding to the positive direction of the vector.
方法3,计算图片文字正方向向量实施例:Method 3, calculating the positive direction vector of the picture text embodiment:
图片中可能有多个文字区域,而每个文字区域都有自己的正方向向量。There may be multiple text areas in the picture, and each text area has its own positive direction vector.
图9是根据本发明优选实施例的中多个文字区域及相应正方向向量的示意图,如图9所示显示了两个文字区域对应的正方向向量(箭头所示)与极轴的夹角αA和αB。对于这种情况,将所有正方向向量做平均,得到一个平均正方向向量,它的极角也是各个极角的平均
Figure PCTCN2016070512-appb-000004
可以通过α来计算图片需要旋转多少角度。
9 is a schematic diagram of a plurality of text regions and corresponding positive direction vectors in accordance with a preferred embodiment of the present invention, as shown in FIG. 9 showing an angle between a positive direction vector (indicated by an arrow) and a polar axis corresponding to two text regions. α A and α B . For this case, average all positive direction vectors to get an average positive direction vector, whose polar angle is also the average of the polar angles.
Figure PCTCN2016070512-appb-000004
You can use α to calculate how many angles the picture needs to be rotated.
方法4:根据文字区域正方向向量所对应的极角旋转图片实施例:Method 4: Rotating the picture according to the polar angle corresponding to the positive direction vector of the text area:
图10是根据本发明优选实施例的一种根据文字区域正方向向量旋转图片的示意图,如图10所示,根据文字区域正方向向量的极角,顺时针或者逆时针旋转对应的角度。FIG. 10 is a schematic diagram of rotating a picture according to a positive direction vector of a text area according to a preferred embodiment of the present invention. As shown in FIG. 10, the corresponding angle is rotated clockwise or counterclockwise according to the polar angle of the positive direction vector of the text area.
图11是根据本发明优选实施例的根据文字区域正方向向量旋转图片的流程图,如图11所示,其步骤包括:11 is a flow chart of rotating a picture according to a positive direction vector of a text area according to a preferred embodiment of the present invention. As shown in FIG. 11, the steps include:
步骤S1101:建立极坐标,以屏幕中心为极点,屏幕上沿X正方向为极轴。极坐标固定不变;Step S1101: Establish polar coordinates, with the center of the screen as the pole, and the positive direction of the X along the positive direction of the screen. The polar coordinates are fixed;
步骤S1102:根据文字区域正方向向量的极角,计算旋转的角度。若0<α<π/2,则逆时针旋转π/2-α;若π/2<α<2π,则顺时针旋转α-π/2; Step S1102: Calculate the angle of rotation according to the polar angle of the positive direction vector of the text region. If 0<α<π/2, rotate π/2-α counterclockwise; if π/2<α<2π, rotate α-π/2 clockwise;
步骤S1103:显示图片。Step S1103: Display a picture.
通过上述实施例中描述的图片中文字显示方法,可以使得图片中的文字永远正直地显示给用户,从而方便用户查看带有文字的图片,不需要手动旋转屏幕或者在图库中旋转图片。对于图库的设计者而言,而可以把左旋和右旋图片的按钮从醒目的位置转移到菜单选项中,从而使得图像更完整地显示给用户,增加了用户体验。Through the picture Chinese character display method described in the above embodiment, the text in the picture can be displayed to the user forever, so that the user can view the picture with the text, without manually rotating the screen or rotating the picture in the gallery. For the designer of the gallery, the buttons of the left-handed and right-handed pictures can be transferred from the eye-catching position to the menu option, so that the image is more completely displayed to the user, which increases the user experience.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例该的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, The optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method of various embodiments of the present invention.
本发明的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以被设置为存储用于执行上述实施例的方法步骤的程序代码:Embodiments of the present invention also provide a storage medium. Optionally, in the embodiment, the storage medium may be configured to store program code for performing the method steps of the above embodiment:
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。Optionally, in this embodiment, the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory. A variety of media that can store program code, such as a disc or a disc.
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行上述实施例的方法步骤。Optionally, in this embodiment, the processor performs the method steps of the foregoing embodiments according to the stored program code in the storage medium.
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。For example, the specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the optional embodiments, and details are not described herein again.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。It will be apparent to those skilled in the art that the various modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above description is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
工业实用性Industrial applicability
基于本发明实施例提供的上述技术方案,识别屏幕上图片中的文字区域,计算该文字区域的正方向向量与该文字区域的极轴之间的夹角α,其中,该极轴是极坐标沿X轴的正方向延伸得到的坐标轴,该极坐标以该屏幕的指定位置为极点的极坐标,依据该夹角α调整该图 片,其中,调整后的该图片中正方向显示该文字区域,解决了阅读图片中文字时显示方向不对,用户阅读不方便的问题,进而达到了阅读图片中文字正方向显示给用户的效果。 According to the above technical solution provided by the embodiment of the present invention, a text area in a picture on a screen is recognized, and an angle α between a positive direction vector of the text area and a polar axis of the text area is calculated, wherein the polar axis is a polar coordinate a coordinate axis extending along a positive direction of the X-axis, wherein the polar coordinate is a polar coordinate of a pole at a specified position of the screen, and the map is adjusted according to the angle α In the slice, the adjusted text area is displayed in the positive direction, which solves the problem that the display direction is wrong when the text in the picture is read, and the user is inconvenient to read, thereby achieving the effect that the text in the reading picture is displayed in the positive direction to the user.

Claims (10)

  1. 一种调整图片文字的显示方法,包括:A method for adjusting the display of picture text, including:
    识别屏幕上图片中的文字区域;Identify the text area in the picture on the screen;
    计算所述文字区域的正方向向量与所述文字区域的极轴之间的夹角α,其中,所述极轴是极坐标沿X轴的正方向延伸得到的坐标轴,所述极坐标以所述屏幕的指定位置为极点的极坐标;Calculating an angle α between a positive direction vector of the text region and a polar axis of the text region, wherein the polar axis is a coordinate axis obtained by extending a polar coordinate in a positive direction of the X axis, wherein the polar coordinate is The specified position of the screen is the polar coordinate of the pole;
    依据所述夹角α调整所述图片,其中,调整后的所述图片中正方向显示所述文字区域。The picture is adjusted according to the angle α, wherein the text area is displayed in a positive direction in the adjusted picture.
  2. 根据权利要求1所述的方法,其中,所述指定位置为所述屏幕的中心点位置。The method of claim 1 wherein said designated location is a center point location of said screen.
  3. 根据权利要求1所述的方法,其中,所述文字区域的正方向向量包括以下至少之一:The method of claim 1 wherein the positive direction vector of the text region comprises at least one of:
    在所述文字区域只有单个文字时,所述文字区域的正方向向量为所述单个文字的正方向向量;When the text area has only a single character, the positive direction vector of the text area is a positive direction vector of the single character;
    在所述文字区域的有多个文字时,所述文字区域的正方向向量为所述多个文字的正方向向量的平均值。When there are a plurality of characters in the character region, the positive direction vector of the character region is an average value of the positive direction vectors of the plurality of characters.
  4. 根据权利要求1所述的方法,其中,在所述文字区域为多个的情况下,所述文字区域的正方向向量为所述多个文字区域的正方向向量的平均值。The method according to claim 1, wherein when the plurality of character regions are plural, a positive direction vector of the character region is an average value of positive direction vectors of the plurality of character regions.
  5. 根据权利要求1所述的方法,其中,依据所述夹角α调整所述图片包括:The method of claim 1, wherein adjusting the picture according to the angle α comprises:
    若0<α<(π/2),则将所述图片逆时针旋转(π/2)-α;若(π/2)<α<2π,则将所述图片顺时针旋转α-(π/2)。If 0<α<(π/2), the picture is rotated counterclockwise (π/2)-α; if (π/2)<α<2π, the picture is rotated clockwise α-(π /2).
  6. 一种调整图片文字的显示装置,位于终端中,包括:A display device for adjusting picture text, located in the terminal, comprising:
    识别模块,设置为识别屏幕上图片中的文字区域;An identification module configured to identify a text area in a picture on the screen;
    计算模块,设置为计算所述文字区域的正方向向量与所述文字区域的极轴之间的夹角α,其中,所述极轴是极坐标沿X轴的正方向延伸得到的坐标轴,所述极坐标以所述屏幕的指定位置为极点的极坐标;a calculation module configured to calculate an angle α between a positive direction vector of the text region and a polar axis of the text region, wherein the polar axis is a coordinate axis obtained by extending polar coordinates along a positive direction of the X axis, The polar coordinates are polar coordinates of a pole at a specified position of the screen;
    调整模块,设置为依据所述夹角α调整所述图片,其中,调整后的所述图片中正方向显示所述文字区域。The adjustment module is configured to adjust the picture according to the angle α, wherein the text area is displayed in a positive direction in the adjusted picture.
  7. 根据权利要求6所述的装置,其中,所述指定位置为所述屏幕的中心点位置。The apparatus of claim 6, wherein the designated location is a center point location of the screen.
  8. 根据权利要求6所述的装置,其中,所述文字区域的正方向向量包括以下至少之一:The apparatus of claim 6, wherein the positive direction vector of the text region comprises at least one of:
    在所述文字区域只有单个文字时,所述文字区域的正方向向量为所述单个文字的正方向向量; When the text area has only a single character, the positive direction vector of the text area is a positive direction vector of the single character;
    在所述文字区域的有多个文字时,所述文字区域的正方向向量为所述多个文字的正方向向量的平均值。When there are a plurality of characters in the character region, the positive direction vector of the character region is an average value of the positive direction vectors of the plurality of characters.
  9. 根据权利要求6所述的装置,其中,在所述文字区域为多个的情况下,所述文字区域的正方向向量为所述多个文字区域的正方向向量的平均值。The apparatus according to claim 6, wherein when the plurality of character regions are plural, a positive direction vector of the character region is an average value of positive direction vectors of the plurality of character regions.
  10. 根据权利要求6所述的装置,其中,所述调整模块包括:The apparatus of claim 6 wherein said adjustment module comprises:
    第一调整单元,设置为若0<α<(π/2),则将所述图片逆时针旋转(π/2)-α;a first adjusting unit, configured to rotate the picture counterclockwise (π/2)-α if 0<α<(π/2);
    第二调整单元,设置为若(π/2)<α<2π,则将所述图片顺时针旋转α-(π/2)。 The second adjustment unit is set to rotate the picture clockwise by α-(π/2) if (π/2) < α < 2π.
PCT/CN2016/070512 2015-11-25 2016-01-08 Display method and apparatus for adjusting picture character WO2017088292A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510830409.0 2015-11-25
CN201510830409.0A CN106776656A (en) 2015-11-25 2015-11-25 Adjust the display methods and device of picture character

Publications (1)

Publication Number Publication Date
WO2017088292A1 true WO2017088292A1 (en) 2017-06-01

Family

ID=58762908

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/070512 WO2017088292A1 (en) 2015-11-25 2016-01-08 Display method and apparatus for adjusting picture character

Country Status (2)

Country Link
CN (1) CN106776656A (en)
WO (1) WO2017088292A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110020299A (en) * 2017-11-06 2019-07-16 北京嘀嘀无限科技发展有限公司 The method of adjustment and device of display position

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107608604B (en) * 2017-09-26 2019-06-07 维沃移动通信有限公司 A kind of image display method and mobile terminal
CN108573473A (en) * 2018-04-27 2018-09-25 平安科技(深圳)有限公司 Picture rotation method, apparatus, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130178287A1 (en) * 2010-12-13 2013-07-11 Microsoft Corporation Human-computer interface system having a 3d gaze tracker
CN103543822A (en) * 2012-07-11 2014-01-29 罗震威 Method for controlling display directions of screen characters and images by using facial recognition
CN103885611A (en) * 2014-04-22 2014-06-25 锤子科技(北京)有限公司 Method and device for adjusting image
CN104104796A (en) * 2014-07-17 2014-10-15 广东欧珀移动通信有限公司 Intelligent reminding method and device for direction of mobile device and mobile device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100585623C (en) * 2007-03-30 2010-01-27 无敌科技(西安)有限公司 Method and system for discriminating handwriting characters
FR2977964B1 (en) * 2011-07-13 2013-08-23 Commissariat Energie Atomique METHOD FOR ACQUIRING A ROTATION ANGLE AND COORDINATES OF A ROTATION CENTER

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130178287A1 (en) * 2010-12-13 2013-07-11 Microsoft Corporation Human-computer interface system having a 3d gaze tracker
CN103543822A (en) * 2012-07-11 2014-01-29 罗震威 Method for controlling display directions of screen characters and images by using facial recognition
CN103885611A (en) * 2014-04-22 2014-06-25 锤子科技(北京)有限公司 Method and device for adjusting image
CN104104796A (en) * 2014-07-17 2014-10-15 广东欧珀移动通信有限公司 Intelligent reminding method and device for direction of mobile device and mobile device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110020299A (en) * 2017-11-06 2019-07-16 北京嘀嘀无限科技发展有限公司 The method of adjustment and device of display position

Also Published As

Publication number Publication date
CN106776656A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
US10878609B2 (en) Efficient image synthesis
US8872855B2 (en) Adjusting orientation of content regions in a page layout
US10795553B2 (en) Systems and methods for intelligent layered interactive programmatic elements for fixed content
US10134183B2 (en) Labeling for three-dimensional occluded shapes
TWI544445B (en) Computer-implemented method, article and apparatus for annotating street view images with contextual information
WO2016131390A1 (en) Electronic map display method, apparatus and electronic device
US9734591B2 (en) Image data processing method and electronic device supporting the same
WO2019019595A1 (en) Image matching method, electronic device method, apparatus, electronic device and medium
US10488885B2 (en) Display adjustment method and device
WO2017088292A1 (en) Display method and apparatus for adjusting picture character
JP2022541977A (en) Image labeling method, device, electronic device and storage medium
US20150371430A1 (en) Identifying Imagery Views Using Geolocated Text
EP3043257A1 (en) Method and apparatus for simultaneously displaying more items
CN113559501B (en) Virtual unit selection method and device in game, storage medium and electronic equipment
WO2017088282A1 (en) Display method and apparatus for adjusting picture character
WO2015200439A1 (en) Computerized systems and methods for analyzing and determining properties of virtual environments
WO2017000647A1 (en) Image display method and device
EP3016005A1 (en) Method and system for offering of similar photos in real time based on photographing context information of a geographically proximate user group
CN112800163B (en) Map interface display method and device, computer equipment and storage medium
US10528215B2 (en) Arrangement of graphic elements based on shape locations
US10198164B1 (en) Triggering location selector interface by continuous zooming
US11698719B2 (en) Systems and methods for automated derivation of interactive layers for fixed content
US20160171699A1 (en) Automated registration of three-dimensional vectors to three-dimensional linear features in remotely-sensed data

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16867521

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16867521

Country of ref document: EP

Kind code of ref document: A1