[go: up one dir, main page]

CN107908613B - Picture display method and device - Google Patents

Picture display method and device Download PDF

Info

Publication number
CN107908613B
CN107908613B CN201711392122.XA CN201711392122A CN107908613B CN 107908613 B CN107908613 B CN 107908613B CN 201711392122 A CN201711392122 A CN 201711392122A CN 107908613 B CN107908613 B CN 107908613B
Authority
CN
China
Prior art keywords
rotation angle
target picture
historical
picture
current rotation
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.)
Active
Application number
CN201711392122.XA
Other languages
Chinese (zh)
Other versions
CN107908613A (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.)
Taikang Insurance Group Co Ltd
Taikang Pension Insurance Co Ltd
Original Assignee
Taikang Insurance Group Co Ltd
Taikang Pension Insurance Co 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 Taikang Insurance Group Co Ltd, Taikang Pension Insurance Co Ltd filed Critical Taikang Insurance Group Co Ltd
Priority to CN201711392122.XA priority Critical patent/CN107908613B/en
Publication of CN107908613A publication Critical patent/CN107908613A/en
Application granted granted Critical
Publication of CN107908613B publication Critical patent/CN107908613B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0483Interaction with page-structured environments, e.g. book metaphor
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/04845Interaction 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 for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/189Automatic justification

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The invention provides a picture display method and a picture display device, wherein before a target picture is displayed, if the target picture is determined to be a picture to be displayed, an index of the target picture is obtained, the index of the target picture corresponds to the current rotation angle of the target picture, and the current rotation angle is determined by historical operation data, so that the most appropriate current rotation angle is fed back according to the historical operation data; acquiring the current rotation angle of the target picture according to the index of the target picture; and determining the corrected display direction of the target picture according to the current rotation angle and the original direction of the target picture, and displaying the target picture in the corrected display direction. The image content of the target picture does not need to be identified, the calculation process is simple, and the current rotation angle is determined according to the learning of historical operation data, so that the target picture can be displayed in the direction meeting the current requirement.

Description

Picture display method and device
Technical Field
The present invention relates to image processing technologies, and in particular, to a method and an apparatus for determining an image display direction.
Background
In the process of handling various electronic services, a client needs to provide and upload relevant certification materials attached with photos. Most of the photos are collected by the clients, and the direction adjustment and processing are not performed through professionals and equipment, so that the problem that the direction of the photos displayed in the data is wrong easily occurs.
In a conventional picture display method, characters in a picture are generally recognized, and when the characters can be correctly recognized, the direction of the characters in the picture is taken as the display direction of the picture.
The existing picture display method needs to determine the correct display direction according to the recognition of characters in pictures, is limited to manuscript pictures, but has various image contents used in business, and is difficult to recognize certificate photos, real photos and the like which do not contain characters or have complex typesetting directions.
Disclosure of Invention
The invention provides a picture display method and a picture display device, which are simple in calculation process, suitable for pictures of any type and any content and wide in applicability.
According to a first aspect of the present invention, there is provided a picture display method, comprising:
if the target picture is determined to be the picture to be displayed, acquiring an index of the target picture, wherein the index of the target picture corresponds to the current rotation angle of the target picture, and the current rotation angle is an angle determined by historical operation data;
acquiring the current rotation angle of the target picture according to the index of the target picture;
and determining a correction display direction of the target picture according to the current rotation angle and the original direction of the target picture, and displaying the target picture in the correction display direction.
Optionally, the historical operating data includes: historical rotation angles and operation times for acquiring the historical rotation angles;
after the displaying the target picture in the modified display direction, further comprising:
when the target picture quits displaying, obtaining the last rotation angle of the target picture relative to the original direction;
and updating the historical operation data of the target picture according to the last rotation angle, and determining a new current rotation angle according to the updated historical operation data.
Optionally, the updating the historical operation data of the target picture according to the last rotation angle includes:
judging whether a historical rotation angle identical to the last rotation angle exists in the historical rotation angles corresponding to the target picture;
if so, adding 1 to the operation times corresponding to the historical rotation angle which is the same as the last rotation angle;
and if not, taking the last rotation angle as a new historical rotation angle and storing the new historical rotation angle into the historical operation data, and setting the operation times corresponding to the new historical rotation angle as 1.
Optionally, the determining a new current rotation angle according to the updated historical operation data includes:
acquiring the maximum operation times from all the operation times of the updated historical operation data;
and determining the historical rotation angle corresponding to the maximum operation times as a new current rotation angle.
Optionally, after determining the historical rotation angle corresponding to the maximum number of operations as a new current rotation angle, the method further includes:
acquiring the total times of all operation times of the updated historical operation data;
and if the ratio of the maximum operation times to the total times is greater than a zero clearing threshold value, clearing the historical rotation angle and obtaining the operation times of the historical rotation angle.
Optionally, before the obtaining the index of the target picture if the target picture is determined to be the picture to be displayed, the method further includes:
when the target picture is received and stored, generating a unique image feature code of the target picture according to the image feature code of the target picture;
judging whether an index identical to the unique image feature code exists or not;
if not, setting the current rotation angle of the target picture to be 0 degree, and determining the unique image feature code as the indexes of the target picture and the current rotation angle;
and if so, determining the index which is the same as the unique image feature code as the index of the target picture.
Optionally, if it is determined that the target picture is displayed in the document, determining a modified display direction of the target picture according to the current rotation angle and the original direction of the target picture includes:
determining the typesetting direction of the manuscript according to the display direction of the characters in the manuscript;
acquiring a reference rotation angle from the original direction of the target picture to the typesetting direction;
obtaining a correction angle according to the reference rotation angle and the current rotation angle;
and determining the display direction of the target picture after rotating the correction angle relative to the original direction as a correction display direction.
According to a second aspect of the present invention, there is provided a picture display device comprising:
the index acquisition module is used for acquiring an index of a target picture if the target picture is determined to be a picture to be displayed, wherein the index of the target picture corresponds to the current rotation angle of the target picture, and the current rotation angle is an angle determined by historical operation data;
the current rotation angle acquisition module is used for acquiring the current rotation angle of the target picture according to the index of the target picture;
and the correction display module is used for determining the correction display direction of the target picture according to the current rotation angle and the original direction of the target picture and displaying the target picture in the correction display direction.
According to a third aspect of the present invention, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the first aspect of the present invention and various alternative picture display methods of the first aspect.
According to a fourth aspect of the present invention, there is provided an electronic apparatus comprising: a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to execute the executable instructions to perform the first aspect of the invention and various optional picture display methods of the first aspect.
Before a target picture is displayed, if the target picture is determined to be the picture to be displayed, acquiring an index of the target picture, wherein the index of the target picture corresponds to the current rotation angle of the target picture, and the current rotation angle is determined by historical operation data, so that the most appropriate current rotation angle is fed back according to the historical operation data; acquiring the current rotation angle of the target picture according to the index of the target picture; and determining the corrected display direction of the target picture according to the current rotation angle and the original direction of the target picture, and displaying the target picture in the corrected display direction. The image content of the target picture does not need to be identified, the calculation process is simple, and the current rotation angle is determined according to the learning of historical operation data, so that the target picture can be displayed in the direction meeting the current requirement.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is an application scenario provided in an embodiment of the present invention;
fig. 2 is a schematic flowchart of a picture display method according to an embodiment of the present invention;
FIG. 3 is an example of a modified display orientation provided by an embodiment of the present invention;
fig. 4 is an example of vertically displaying the target picture in the document according to the embodiment of the present invention;
fig. 5 is an example of displaying the target picture horizontally in the document according to the embodiment of the present invention;
fig. 6 is a schematic structural diagram of an image display device according to an embodiment of the present invention;
FIG. 7 is a schematic view of another image display device according to an embodiment of the present invention;
fig. 8 is a schematic diagram of a hardware structure of an electronic device according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be understood that, in various embodiments of the present invention, the sequence numbers of the processes do not mean the execution sequence, and the execution sequence of the processes should be determined by the functions and the internal logic of the processes, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
It should be understood that in the present application, "comprising" and "having" and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in the present invention, "B corresponding to A" means that B is associated with A, from which B can be determined. Determining B from a does not mean determining B from a alone, but may be determined from a and/or other information. And the matching of A and B means that the similarity of A and B is greater than or equal to a preset threshold value.
As used herein, "if" may be interpreted as "at … …" or "when … …" or "in response to a determination" or "in response to a detection", depending on the context.
It should be understood that, in the present invention, the target picture quitting display refers to a situation that the target picture is closed, switched to a background, switched to display of other pictures or interfaces, and the like, and the target picture is moved out of the current display interface so that the target picture is finished being displayed.
The original direction of the target picture is the display direction inherent to the target picture itself, and is usually determined by the position of a reference line of an acquisition device that acquires the target picture. And when the display device does not perform any rotation processing on the target picture or the current rotation angle is 0, displaying the target picture in the original direction of the target picture.
In the invention, the target picture is rotated by the rotation angle according to the rules of positive anticlockwise rotation and negative clockwise rotation, namely, if the rotation angle is a positive value, the target picture is rotated anticlockwise, and if the rotation angle is a negative value, the target picture is rotated clockwise.
The technical solution of the present invention will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
The image display method of this embodiment may be applied to an online service system, and fig. 1 is an application scenario provided in the embodiment of the present invention. As shown in fig. 1, when a client transacts an insurance service, the client needs to log in the online service system of the server 130 at the personal client 110 to fill in personal information, and upload personal identification card scan pieces, physical examination report scan pieces and other related photos. Most of the pictures are collected by clients, and the original direction of the pictures is not modified by professional retouching software although the display direction is adjusted during previewing before uploading. After receiving the pictures uploaded by the client, the online service system of the server 130 first displays the application document and the pictures in the application document to the auditor. The auditor logs in the online service system of the server 130 through the computer 120 responsible for the first process. If the auditor finds that the display direction of the picture is wrong, the display direction of the picture can be adjusted, for example, the picture is manually rotated by 90 degrees relative to the original direction by clicking a rotating button, the online service system records the rotated picture for 1 time of rotating operation with the rotating angle of 90 degrees when the picture is quitted to be displayed, and the online service system automatically determines the correct display direction of the picture according to the recorded historical data when the file is subsequently displayed or the rotated picture is to be displayed on other files such as service contracts, payment notices and the like. The subsequent process service personnel logs in the network service system of the server 130 through the computer 120 responsible for the processes two to N.
For example, if a document scanner is displayed at a 90 ° rotation angle with respect to the original direction 3 times but at a 270 ° rotation angle with respect to the original direction 19 times as recorded in the history data, the online service system defaults to display at a 270 ° rotation angle with respect to the original direction when displaying the document scanner at the 20 th time. In the application scene of the picture display, for a client, the client does not need to perform professional processing on the acquired picture, and the system can display the picture correctly no matter how the display direction of the picture is, so that convenience is brought to the client. For business personnel handling business, the business file is usually in a fixed format, and no matter whether the display of the picture submitted by a client meets the file specification or not, the system can adjust the subsequent display direction according to the historical display.
Fig. 2 is a schematic flowchart of a picture display method according to an embodiment of the present invention. The main body of the method shown in fig. 2 is an electronic device, which may be a personal computer terminal, a client, a server, a business processing system, or the like. Further, the terminal may be a mobile terminal or a fixed terminal. The mobile terminal includes, but is not limited to, a mobile device having an image capturing or receiving function, such as a mobile phone, a Personal Digital Assistant (PDA), a tablet computer, a portable device (e.g., a laptop computer, a pocket computer, or a handheld computer). The fixed terminal includes but is not limited to a fixed device with an image capturing or receiving function, such as an entrance guard, a smart phone, a console, and the like. The embodiment of the present invention does not limit the form of the terminal. The method flow shown in fig. 2 specifically includes the following steps:
s101, if the target picture is determined to be the picture to be displayed, the index of the target picture is obtained.
The index of the target picture corresponds to the current rotation angle of the target picture, and the current rotation angle is determined by historical operation data.
Optionally, the target picture may be determined to be a picture to be displayed when the target picture is inserted, or the target picture is previewed, or a document including the target picture is displayed. The method for obtaining the index of the target picture may be to perform Secure Hash Algorithm (SHA) on the target picture to obtain the unique image feature code of the target picture, and use the unique image feature code as the index of the target picture, or may be to bind and store the indexes of the target picture and the target picture in advance, and obtain the index bound and stored with the target picture while obtaining the target picture.
The index of the target picture may be a unique image feature code obtained through a feature code algorithm operation, or a code given to the target picture according to a preset rule, for example, a serial number including time information. The feature code Algorithm for obtaining the unique image feature code from the target picture may include, but is not limited to, Message Digest Algorithm fifth edition (MD 5 for short), or SHA. The index of the target picture and the current rotation angle of the target picture have a mapping relationship, in other words, the current rotation angle of the target picture can be queried according to the index of the target picture.
The current rotation angle is specifically an angle determined by calculation from historical operating data. The historical operation data of the target picture and the current rotation angle of the target picture correspond to the same index. In one implementation, the historical operation data may be historical rotation angles of the final display direction relative to the original direction of the target picture at each display of the target picture, and the number of operations corresponding to each historical rotation angle. For example: historical rotation angle of 270 degrees corresponds to operation times of 19 times; the historical rotation angle is 90 degrees, and the corresponding operation times are 3 times; the historical rotation angle of 30 degrees corresponds to the operation times of 1 time. In another implementation, the historical operation data may include an operation time, such as a last operation time each time the display is exited, in addition to the historical rotation angle and the number of operations. The implementation manner of determining the current rotation angle from the historical operation data may be to determine the historical rotation angle with the largest operation times as the current rotation angle, or may determine the historical rotation angle corresponding to the last operation time as the current rotation angle.
And S102, acquiring the current rotation angle of the target picture according to the index of the target picture.
Optionally, the index of each picture may correspond to the picture itself, the current rotation angle of the picture, and the historical operation data, and then the query relationship among the picture itself, the current rotation angle of the picture, and the historical operation data may be established through the index.
S103, determining the corrected display direction of the target picture according to the current rotation angle and the original direction of the target picture, and displaying the target picture in the corrected display direction.
Alternatively, one implementation manner of determining the correction direction may be to rotate the target picture relative to the original direction by the current rotation angle, and the obtained direction is used as the correction direction. Fig. 3 is an example of modifying a display direction according to an embodiment of the present invention. As shown in fig. 3, the target picture is a portrait picture, the original direction is displayed head to left and body to right, the current rotation angle is 270 °, and the obtained correction direction is head to head and body to down. The rotation direction of all angles of the invention follows the rule of positive anticlockwise rotation and negative clockwise rotation.
According to the picture display method provided by the embodiment of the invention, before the target picture is displayed, if the target picture is determined to be the picture to be displayed, the index of the target picture is obtained, the index of the target picture corresponds to the current rotation angle of the target picture, and the current rotation angle is the angle determined by the historical operation data, so that the most appropriate current rotation angle is fed back according to the historical operation data; acquiring the current rotation angle of the target picture according to the index of the target picture; and determining the corrected display direction of the target picture according to the current rotation angle and the original direction of the target picture, and displaying the target picture in the corrected display direction. The image content of the target picture does not need to be identified, the calculation process is simple, and the current rotation angle is determined according to the learning of historical operation data, so that the target picture can be displayed in the direction meeting the current requirement.
Optionally, the historical operation data may include: historical rotation angle and the operation times for acquiring the historical rotation angle. On the basis of the embodiment shown in fig. 1, after each time the target picture is displayed, the process of updating the current rotation angle is further included:
firstly, when the target picture is detected to quit displaying, the last rotation angle of the target picture relative to the original direction is obtained. And then updating the historical operation data of the target picture according to the last rotation angle. And finally, determining a new current rotation angle according to the updated historical operation data. For example, the user operates the target picture to rotate it by 90 °, 180 ° and 270 ° in sequence from the original direction, and finally exits from the display to obtain the last determined 270 ° as the last rotation angle. 270 ° is added to the historical operating data of the target picture. As an example of optional historical operation data, the original historical operation data in the target picture includes:
historical rotation angle of 270 degrees corresponds to operation times of 19 times;
the historical rotation angle is 90 degrees, and the corresponding operation times are 3 times;
the historical rotation angle of 30 degrees corresponds to the operation times of 1 time.
Then, in the updated historical operation data, include:
historical rotation angle of 270 degrees corresponds to operation times of 20 times;
the historical rotation angle is 90 degrees, and the corresponding operation times are 3 times;
the historical rotation angle of 30 degrees corresponds to the operation times of 1 time.
Optionally, the specific process of updating the historical operation data of the target picture according to the last rotation angle may be: and judging whether the historical rotation angle identical to the last rotation angle exists in the historical rotation angles corresponding to the target picture.
If it is determined that the target picture has been rotated by the same angle in the historical operation and displayed, 1 is added to the number of operations corresponding to the historical rotation angle having the same last rotation angle to accumulate the number of operations for the existing historical rotation angle, as described in the above example of the historical operation data.
If not, the newly obtained last rotation angle is shown to appear for the first time, the target picture is not rotated and displayed at the same angle in the historical operation, the obtained last rotation angle is used as a new historical rotation angle and is stored in the historical operation data, the operation frequency corresponding to the new historical rotation angle is set to be 1, and the initialized assignment of the operation frequency is carried out on the newly added historical rotation angle.
Alternatively, the specific process of determining the new current rotation angle according to the updated historical operation data may be to determine the current rotation angle with the largest number of operations. For example, the maximum operation times among all the operation times of the updated historical operation data is acquired, and then the historical rotation angle corresponding to the maximum operation times is determined as the new current rotation angle. For another example, the current rotation angle may be determined based on a ratio of the number of operations of each historical rotation angle to all the number of operations. Suppose there are only 4 historical rotation angles, 0 °, 90 °, 180 °, and 270 °, respectively, and the number of operations for the 4 historical rotation angles is Mi(i ∈ (0..3)), where i ∈ (0.), 1, 2, and 3 sequentially indicate that the historical rotation angle is 0 °, 90 °, 180 °, and 270 °. The ratio of the number of operations of 4 historical rotation angles is Ri
Figure BDA0001517769230000091
Will maximize RiAnd determining the corresponding historical rotation angle as a new current rotation angle.
Optionally, in order to avoid that the current rotation angle meeting the user requirement cannot be updated in time due to too large accumulation of the original historical rotation angles after the user requirement is changed, after the historical rotation angle corresponding to the maximum operation frequency is determined as the new current rotation angle, whether to be cleared may be further detected. Specifically, the zero clearing may be performed periodically, or may be performed when the maximum number of times of operation is far greater than the number of other times of operation. For example, the total number of all the operation times of the updated historical operation data is acquired, and if the ratio of the maximum operation time to the total number is greater than the zero clearing threshold, the historical rotation angle is cleared and the operation times of acquiring the historical rotation angle are acquired.
Optionally, before obtaining the index of the target picture, a process of setting an index for the target picture is further included:
and when the target picture is received and stored, generating a unique image feature code of the target picture according to the image feature code of the target picture. The unique image feature code obtained by the image feature of the target picture is a feature code with uniqueness, and each picture can only obtain one unique image feature code, so that the index taking the unique image feature code as the target picture has uniqueness. The unique image feature code may be generated by a fifth version of the Message Digest Algorithm (MD 5 for short), or by a series of hash algorithms such as SHA.
After the unique image feature code of the target picture is obtained, judging whether an index identical to the unique image feature code exists or not;
if not, the target picture is a new picture which is not stored, the current rotation angle of the target picture is set to be 0 degree, and the unique image feature code is determined as the index of the target picture and the current rotation angle.
And if so, indicating that the target picture is the stored picture, and determining the index of the target picture by using the index which is the same as the unique image feature code.
Optionally, if it is determined that the target picture is displayed in the document, determining a modified display direction of the target picture according to the current rotation angle and the original direction of the target picture, specifically including a process of further determining the modified display direction according to the layout direction of the document:
firstly, determining the typesetting direction of the document according to the display direction of characters in the document. Fig. 4 is an example of vertically displaying the target picture in the document according to an embodiment of the present invention. Fig. 5 is an example of transversely displaying the target picture in the document according to an embodiment of the present invention. When the text is included in the document, the layout direction of the document is determined according to the display direction of the text. In the example shown in fig. 4, the document layout is a vertical layout. In the example shown in fig. 5, the document layout is a landscape layout. And after the typesetting direction of the manuscript is obtained, acquiring a reference rotation angle from the original direction of the target picture to the typesetting direction. For example, the reference rotation angle is 90 ° in the original direction of the target picture shown in fig. 3 and the document layout direction shown in fig. 5. Then, a correction angle is obtained based on the reference rotation angle and the current rotation angle. For example, if the reference rotation angle is 90 ° and the current rotation angle is 270 °, the correction angle of the target picture obtained from 90 ° +270 ° is 360 °. And finally, determining the display direction of the target picture which is rotated by the correction angle relative to the original direction as the correction display direction. And when the correction angle is 360 degrees, determining the direction of the target picture after rotating 360 degrees relative to the original direction as the correction display direction.
Fig. 6 is a schematic structural diagram of an image display device according to an embodiment of the present invention. As shown in fig. 6, includes:
an index obtaining module 11, configured to obtain an index of a target picture if the target picture is determined to be a picture to be displayed, where the index of the target picture corresponds to a current rotation angle of the target picture, and the current rotation angle is an angle determined by historical operation data;
a current rotation angle searching module 12, configured to obtain a current rotation angle of the target picture according to the index of the target picture;
and the correction display module 13 is configured to determine a correction display direction of the target picture according to the current rotation angle and the original direction of the target picture, and display the target picture in the correction display direction.
The image display apparatus in the embodiment shown in fig. 6 can be correspondingly used to perform the steps in the embodiment of the image display method shown in fig. 2, and the implementation principle and the technical effect are similar, which are not described herein again.
Optionally, the historical operating data comprises: historical rotation angle and the operation times for acquiring the historical rotation angle.
Optionally, fig. 7 is a schematic structural diagram of another picture display device according to an embodiment of the present invention. As shown in fig. 7, the method further includes: a current rotation angle determining module 14, configured to, after the target picture is displayed in the modified display direction and when the target picture exits from being displayed, obtain a last rotation angle at which the target picture rotates relative to the original direction; and updating the historical operation data of the target picture according to the last rotation angle, and determining a new current rotation angle according to the updated historical operation data.
Optionally, the current rotation angle determining module is specifically configured to:
judging whether a historical rotation angle identical to the last rotation angle exists in the historical rotation angles corresponding to the target picture; if so, adding 1 to the operation times corresponding to the historical rotation angle which is the same as the last rotation angle; and if not, taking the last rotation angle as a new historical rotation angle and storing the new historical rotation angle into the historical operation data, and setting the operation times corresponding to the new historical rotation angle as 1.
Optionally, the current rotation angle determining module is specifically configured to:
acquiring the maximum operation times from all the operation times of the updated historical operation data; and determining the historical rotation angle corresponding to the maximum operation times as a new current rotation angle.
Optionally, the current rotation angle determining module is further configured to: after the historical rotation angle corresponding to the maximum operation times is determined as a new current rotation angle, acquiring the total times of all operation times of the updated historical operation data; and if the ratio of the maximum operation times to the total times is greater than a zero clearing threshold value, clearing the historical rotation angle and obtaining the operation times of the historical rotation angle.
Optionally, the index obtaining module is further configured to:
generating a unique image feature code of a target picture according to the image feature code of the target picture before acquiring the index of the target picture and when receiving and storing the target picture if the target picture is determined to be the picture to be displayed; judging whether an index identical to the unique image feature code exists or not; if not, setting the current rotation angle of the target picture to be 0 degree, and determining the unique image feature code as the indexes of the target picture and the current rotation angle; and if so, determining the index which is the same as the unique image feature code as the index of the target picture.
Optionally, the modification display module is specifically configured to:
if the target picture is determined to be displayed in the manuscript, determining the typesetting direction of the manuscript according to the display direction of characters in the manuscript; acquiring a reference rotation angle from the original direction of the target picture to the typesetting direction; obtaining a correction angle according to the reference rotation angle and the current rotation angle; and determining the display direction of the target picture after rotating the correction angle relative to the original direction as a correction display direction.
Fig. 8 is a schematic diagram of a hardware structure of an electronic device according to the present invention. As shown in fig. 8, the electronic apparatus includes: a processor 811 and a memory 812; wherein
A memory 812 for storing the computer program, which may also be a flash memory (flash).
The processor 811 is configured to execute the execution instructions stored in the memory to implement the steps executed by the electronic device in the above-mentioned picture display method. Reference may be made in particular to the description relating to the preceding method embodiment.
Alternatively, the memory 812 may be separate or integrated with the processor 811.
When the memory 812 is a separate device from the processor 811, the electronic apparatus may further include:
a bus 813 is used to connect the memory 812 and the processor 811.
The invention further provides a readable storage medium, wherein the readable storage medium stores an execution instruction, and when at least one processor of the electronic device executes the execution instruction, the electronic device executes the picture display method provided by the various embodiments. Readable media include, among other things, computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an Application Specific Integrated Circuits (ASIC). Additionally, the ASIC may reside in user equipment. Of course, the processor and the storage medium may reside as discrete components in a communication device.
The present invention also provides a program product comprising execution instructions stored in a readable storage medium. The at least one processor of the electronic device may read the execution instruction from the readable storage medium, and the execution of the execution instruction by the at least one processor causes the electronic device to implement the picture display method provided in the various embodiments described above.
In the above embodiments of the electronic device, it should be understood that the Processor may be a Central Processing Unit (CPU), other general-purpose processors, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor, or in a combination of the hardware and software modules within the processor.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. A picture display method, comprising:
if the target picture is determined to be the picture to be displayed, acquiring an index of the target picture, wherein the index of the target picture corresponds to the current rotation angle of the target picture, and the current rotation angle is an angle determined by historical operation data;
acquiring the current rotation angle of the target picture according to the index of the target picture;
determining a correction display direction of the target picture according to the current rotation angle and the original direction of the target picture, and displaying the target picture in the correction display direction;
the historical operating data includes: historical rotation angles and operation times for acquiring the historical rotation angles;
after the displaying the target picture in the modified display direction, further comprising:
when the target picture quits displaying, obtaining the last rotation angle of the target picture relative to the original direction;
updating historical operation data of the target picture according to the last rotation angle, and determining a new current rotation angle according to the updated historical operation data;
determining a new current rotation angle according to the updated historical operation data, including:
acquiring the maximum operation times from all the operation times of the updated historical operation data;
and determining the historical rotation angle corresponding to the maximum operation times as a new current rotation angle.
2. The method according to claim 1, wherein the updating the historical operation data of the target picture according to the last rotation angle comprises:
judging whether a historical rotation angle identical to the last rotation angle exists in the historical rotation angles corresponding to the target picture;
if so, adding 1 to the operation times corresponding to the historical rotation angle which is the same as the last rotation angle;
and if not, taking the last rotation angle as a new historical rotation angle and storing the new historical rotation angle into the historical operation data, and setting the operation times corresponding to the new historical rotation angle as 1.
3. The method according to claim 1, wherein after determining the historical rotation angle corresponding to the maximum operation number as a new current rotation angle, further comprising:
acquiring the total times of all operation times of the updated historical operation data;
and if the ratio of the maximum operation times to the total times is greater than a zero clearing threshold value, clearing the historical rotation angle and obtaining the operation times of the historical rotation angle.
4. The method according to claim 1, wherein before the obtaining the index of the target picture if the target picture is determined to be the picture to be displayed, the method further comprises:
when the target picture is received and stored, generating a unique image feature code of the target picture according to the image feature code of the target picture;
judging whether an index identical to the unique image feature code exists or not;
if not, setting the current rotation angle of the target picture to be 0 degree, and determining the unique image feature code as the indexes of the target picture and the current rotation angle;
and if so, determining the index which is the same as the unique image feature code as the index of the target picture.
5. The method of claim 1, wherein if it is determined that the target picture is displayed in a document, the determining a modified display direction of the target picture according to the current rotation angle and the original direction of the target picture comprises:
determining the typesetting direction of the manuscript according to the display direction of the characters in the manuscript;
acquiring a reference rotation angle from the original direction of the target picture to the typesetting direction;
obtaining a correction angle according to the reference rotation angle and the current rotation angle;
and determining the display direction of the target picture after rotating the correction angle relative to the original direction as a correction display direction.
6. A picture display device, comprising:
the index acquisition module is used for acquiring an index of a target picture if the target picture is determined to be a picture to be displayed, wherein the index of the target picture corresponds to the current rotation angle of the target picture, and the current rotation angle is an angle determined by historical operation data;
the current rotation angle acquisition module is used for acquiring the current rotation angle of the target picture according to the index of the target picture;
the correction display module is used for determining the correction display direction of the target picture according to the current rotation angle and the original direction of the target picture and displaying the target picture in the correction display direction;
the historical operating data includes: historical rotation angles and operation times for acquiring the historical rotation angles;
a current rotation angle determining module, configured to, after the target picture is displayed in the corrected display direction and when the target picture exits from being displayed, obtain a last rotation angle at which the target picture rotates with respect to the original direction;
updating historical operation data of the target picture according to the last rotation angle, and determining a new current rotation angle according to the updated historical operation data;
the current rotation angle determining module is specifically configured to obtain the maximum operation times from all operation times of the updated historical operation data; and determining the historical rotation angle corresponding to the maximum operation times as a new current rotation angle.
7. A computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing the picture display method according to any one of claims 1 to 5.
8. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the picture display method of any one of claims 1-5 via execution of the executable instructions.
CN201711392122.XA 2017-12-21 2017-12-21 Picture display method and device Active CN107908613B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711392122.XA CN107908613B (en) 2017-12-21 2017-12-21 Picture display method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711392122.XA CN107908613B (en) 2017-12-21 2017-12-21 Picture display method and device

Publications (2)

Publication Number Publication Date
CN107908613A CN107908613A (en) 2018-04-13
CN107908613B true CN107908613B (en) 2021-06-22

Family

ID=61870570

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711392122.XA Active CN107908613B (en) 2017-12-21 2017-12-21 Picture display method and device

Country Status (1)

Country Link
CN (1) CN107908613B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112672197B (en) * 2019-10-16 2024-07-09 海信视像科技股份有限公司 Animation display method and device and terminal equipment
CN111400634A (en) * 2020-04-22 2020-07-10 成都安易迅科技有限公司 Image processing method and device and readable storage medium
CN111461906A (en) * 2020-05-28 2020-07-28 深圳麦亚信科技股份有限公司 Fast vehicle insurance claim settlement method and device, computer equipment and storage medium
CN115696028A (en) * 2021-07-30 2023-02-03 广州视源电子科技股份有限公司 Image direction adjusting method and device, storage medium and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104732486A (en) * 2015-03-23 2015-06-24 海信集团有限公司 Picture display method and device
CN106530234A (en) * 2016-10-14 2017-03-22 广州酷狗计算机科技有限公司 Picture display method and device

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2997509B2 (en) * 1990-06-20 2000-01-11 株式会社日立製作所 Document creation device
CN102685080B (en) * 2011-03-17 2015-05-20 腾讯科技(北京)有限公司 Picture processing method and system
CN104850457B (en) * 2015-05-27 2018-05-08 北京航天理想科技股份有限公司 The rapid loading display method and system of large nuber of images in a kind of associated diagram
CN106610821B (en) * 2015-10-22 2020-05-12 海信视像科技股份有限公司 Method for displaying picture on terminal and terminal
CN107103270A (en) * 2016-02-23 2017-08-29 云智视像科技(上海)有限公司 A kind of face identification system of the dynamic calculation divided group coefficient based on IDF
CN105913381A (en) * 2016-04-25 2016-08-31 乐视控股(北京)有限公司 Method for processing display position of rotated image and device thereof
CN106294798B (en) * 2016-08-15 2020-01-17 华为技术有限公司 Thumbnail-based image sharing method and terminal
CN106648150A (en) * 2016-11-15 2017-05-10 努比亚技术有限公司 Picture adjusting device and method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104732486A (en) * 2015-03-23 2015-06-24 海信集团有限公司 Picture display method and device
CN106530234A (en) * 2016-10-14 2017-03-22 广州酷狗计算机科技有限公司 Picture display method and device

Also Published As

Publication number Publication date
CN107908613A (en) 2018-04-13

Similar Documents

Publication Publication Date Title
US11341605B1 (en) Document rectification via homography recovery using machine learning
CN107908613B (en) Picture display method and device
JP5757366B2 (en) How to exchange business card information by combining character recognition and image verification
US9076069B2 (en) Registering metadata apparatus
US11481683B1 (en) Machine learning models for direct homography regression for image rectification
US12175780B2 (en) Document verification by combining multiple images
WO2013004036A1 (en) Business card recognition method combining character recognition and image matching
CN111860527A (en) Image correction method, image correction device, computer equipment and storage medium
CN109756760B (en) Video tag generation method, device and server
US20180267946A1 (en) Techniques and systems for storing and protecting signatures and images in electronic documents
CN107728892B (en) Picture display method, device, terminal and storage medium
US20150256712A1 (en) Methods and devices for form-independent registration of filled-out content
WO2021047182A1 (en) Ocr-based picture data recognition method and apparatus, and computer device
CN113688658B (en) Object identification method, device, equipment and medium
CN108737763B (en) Video connection method and device, computer equipment and storage medium
CN109450867B (en) An identity authentication method, device and storage medium
WO2019148732A1 (en) Vehicle liability cognizance method, terminal, and computer-readable storage medium
CN110660091A (en) Image registration processing method and device and photographing correction operation system
CN109672710B (en) File uploading method, system and equipment
JP2016218849A (en) Planar transformation parameter estimation apparatus, method, and program
CN105100616B (en) Image processing method and electronic equipment
WO2019056701A1 (en) Information processing method and apparatus, computer device and storage medium
CN113516598A (en) Image correction method, device and server
CN112364868A (en) Rotation correction method and device for electronic file
CN113657384B (en) Certificate image correction method and device, storage medium and electronic 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
GR01 Patent grant
GR01 Patent grant