CN110533628B - Method and device for determining screen direction and readable storage medium - Google Patents

Method and device for determining screen direction and readable storage medium Download PDF

Info

Publication number
CN110533628B
CN110533628B CN201910619500.6A CN201910619500A CN110533628B CN 110533628 B CN110533628 B CN 110533628B CN 201910619500 A CN201910619500 A CN 201910619500A CN 110533628 B CN110533628 B CN 110533628B
Authority
CN
China
Prior art keywords
image
pixels
screen
type
determining
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
CN201910619500.6A
Other languages
Chinese (zh)
Other versions
CN110533628A (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.)
China Mobile Communications Group Co Ltd
China Mobile Hangzhou Information Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Hangzhou Information Technology 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 China Mobile Communications Group Co Ltd, China Mobile Hangzhou Information Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201910619500.6A priority Critical patent/CN110533628B/en
Publication of CN110533628A publication Critical patent/CN110533628A/en
Application granted granted Critical
Publication of CN110533628B publication Critical patent/CN110533628B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30121CRT, LCD or plasma display

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Analysis (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention relates to the technical field of images, and discloses a method and a device for determining screen direction and a readable storage medium. In some embodiments of the present application, a method for determining a screen direction includes the steps of: acquiring an image of a first preset position of a recorded image of a screen; when the screen direction is a first direction, the image of the first preset position comprises a first identification image; when the screen direction is a second direction, the image of the first preset position does not comprise a first identification image; and determining the screen direction when the recorded image is recorded according to the image at the first preset position. In the implementation, the screen direction can be acquired under the condition that the App is returned to the background.

Description

Method and device for determining screen direction and readable storage medium
Technical Field
The embodiment of the invention relates to the technical field of images, in particular to a method and a device for determining screen direction and a readable storage medium.
Background
The iOS9 system supports the recording of screen content, and developers can obtain images of screens through a screen recording architecture (playback kit) and an extension plug-in (extension), but the iOS9 and iOS10 systems only support the recording of screen content in a current App, and only support the recording of screen content of the whole mobile phone until the iOS11 system issues, that is, screen content can still be recorded when an Application program (App) falls back to the background.
However, the inventors found that at least the following problems exist in the prior art: in the process of recording the screen by the App of the device of the iOS system, if the App exits to the background, the direction of the current screen cannot be acquired, and the viewing experience of the receiving end receiving the recorded image of the screen will be affected.
Disclosure of Invention
The embodiment of the invention aims to provide a method and a device for determining a screen direction and a readable storage medium, so that the screen direction can be acquired under the condition that an App exits to a background.
In order to solve the above technical problem, an embodiment of the present invention provides a method for determining a screen direction, including: acquiring an image of a first preset position of a recorded image of a screen; when the screen direction is a first direction, the image of the first preset position comprises a first identification image; when the screen direction is a second direction, the image of the first preset position does not comprise a first identification image; and determining the screen direction when the recorded image is recorded according to the image at the first preset position.
The embodiment of the invention also provides a device for determining the screen direction, which comprises: the device comprises an acquisition module and a determination module; the acquisition module is used for acquiring an image of a first preset position of a recorded image of a screen; when the screen direction is a first direction, the image of the first preset position comprises a first identification image; when the screen direction is a second direction, the image of the first preset position does not comprise a first identification image; the determining module is used for determining the screen direction when the recorded image is recorded according to the image at the first preset position.
The embodiment of the invention also provides a device for determining the screen direction, which comprises: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to enable the at least one processor to perform the method for determining a screen orientation as set forth in the above embodiments.
Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which when executed by a processor implements the method for determining the screen orientation mentioned in the above embodiments.
Compared with the prior art, the method and the device for determining the screen direction can determine whether the screen direction is the first direction when the image is recorded according to whether the image at the first preset position of the recorded image comprises the first identification image or not under the condition that the App is returned to the background, and further determine the screen direction when the image is recorded. Since the screen direction of the recorded image is known, the device for determining the screen direction may perform various processes on the recorded image based on the screen direction to improve the viewing experience of the user.
In addition, determining the screen direction according to the image at the first preset position specifically includes: acquiring feature information of a first type of pixel and feature information of a second type of pixel in an image at a first preset position; when the screen direction is a first direction, the first type of pixels form a first identification image, and the second type of pixels are pixels except the first type of pixels in the image at the first preset position; calculating a first difference value of the characteristic information of the first type of pixels and the characteristic information of the second type of pixels; and determining the screen direction according to the judgment result of whether the first difference value is larger than the first threshold value. In this implementation, the screen direction when the recorded image is recorded can be determined based on the characteristic information of the pixels.
In addition, before determining the screen direction according to the determination result of whether the first difference is greater than the first threshold, the method of determining the screen direction further includes: acquiring feature information of a third type of pixel and feature information of a fourth type of pixel in an image at a second preset position of the recorded image; when the screen direction is the first direction, the image at the second preset position comprises a second identification image, the third type of pixels form the second identification image, and the fourth type of pixels are pixels in the image at the second preset position except the third type of pixels; calculating a second difference value of the characteristic information of the third type of pixels and the characteristic information of the fourth type of pixels; determining the screen direction according to the judgment result of whether the first difference is greater than the first threshold, specifically comprising: and determining the screen direction according to the judgment result of whether the first difference value is larger than the first threshold value and the judgment result of whether the second difference value is larger than the second threshold value. In this implementation, the accuracy of the determination result of the screen direction is improved.
In addition, determining the screen direction according to the judgment result of whether the first difference is greater than the first threshold and the judgment result of whether the second difference is greater than the second threshold specifically includes: judging whether the first difference value is larger than a first threshold value; if the first difference is not larger than the first threshold, determining the screen direction as a second direction; if the first difference is larger than the first threshold, judging whether the second difference is larger than a second threshold; if the second difference is larger than the second threshold, determining the screen direction as the first direction; and if the second difference is not larger than the second threshold, determining the screen direction as the second direction.
In addition, determining the screen direction according to the judgment result of whether the first difference is greater than the first threshold specifically includes: if the first difference is larger than the first threshold value, judging whether the difference of the characteristic information between any two first-class pixels is smaller than a third threshold value; if yes, determining that the screen direction is the first direction, and if not, determining that the screen direction is the second direction. In this implementation, the accuracy of the determination result of the screen direction is improved.
In addition, the characteristic information of the first type of pixels is the brightness average value of the first type of pixels, and the characteristic information of the second type of pixels is the brightness average value of the second type of pixels.
In addition, the first identification image is an identification image on a navigation bar displayed on a screen.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
Fig. 1 is a flowchart of a method of determining a screen direction according to a first embodiment of the present invention;
FIG. 2 is a flow chart of a method of determining screen orientation in accordance with a second embodiment of the present invention;
fig. 3 is a schematic view of a screen interface when the screen orientation of the second embodiment of the present invention is a vertical direction;
FIG. 4 is a diagram illustrating a screen interface when the screen direction is the horizontal direction according to the second embodiment of the present invention
Fig. 5 is a schematic structural view of an apparatus for determining a screen direction according to a third embodiment of the present invention;
fig. 6 is a schematic structural diagram of an apparatus for determining a screen direction according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
The first embodiment of the invention relates to a method for determining the screen direction, which is applied to a device for determining the screen direction, such as a terminal or a server. Specifically, as shown in fig. 1, the method of determining the screen orientation includes:
step 101: and acquiring an image of a first preset position of a recorded image of the screen.
Specifically, when the screen direction is a first direction, the image of the first preset position comprises a first identification image; when the screen direction is the second direction, the first identification image is not included in the image of the first preset position. After the screen recording process is started, screen recording software starts to capture a screen and continuously generates a frame-by-frame recording image. The device for determining the screen direction acquires the recorded image and acquires an image of a first preset position of the recorded image.
In one example, the recorded image may be a YUV image. In the above description, "Y" represents brightness (Luminance), "U" represents chromaticity (chromaticity), and "V" represents saturation (chromaticity).
The device for determining the screen direction may be a terminal for installing screen recording software and recording images of the screen, or a terminal in communication connection with the terminal for installing screen recording software and recording images of the screen, that is, the image recording terminal may perform the operation for determining the screen direction, or the image receiving terminal may perform the operation for determining the screen direction.
In one example, the first identification image is an identification image on a navigation bar of an on-screen display, such as a cellular signal identification image or a wireless signal identification image. The type of the first marker image is not limited in this embodiment.
Step 102: and determining the screen direction when the recorded image is recorded according to the image at the first preset position of the recorded image.
Specifically, the screen direction determining means may determine the screen direction in recording the recorded image by analyzing the image at the first preset position.
When studying the iOS system, the inventors found that the iOS system has the following characteristics:
when the interface of the iOS system is in the vertical direction, namely the screen direction is in the vertical direction, a navigation bar in the screen and an identification image on the navigation bar are positioned at the top of the screen; when the interface of the iOS system is in the horizontal direction, namely the screen direction is the horizontal direction, the navigation bar and the identification image on the navigation bar are hidden.
2. The YUV image obtained by screen recording is always in the vertical direction.
Based on the above findings, the inventor believes that the screen direction when recording the screen image can be determined by determining whether the screen direction of the screen image is the first direction according to whether the image based on the first preset position includes the first identification image.
In one example, the designer may obtain a pre-recorded image of the screen when the screen direction is the first direction, mark the first identification image in the pre-recorded image with the calibration frame, and the device for determining the screen direction determines the first preset position by recognizing the position of the calibration frame.
In one example, the device for determining the screen direction identifies the image at the first preset position by an identification method based on a deep learning algorithm or other algorithms, determines whether the image at the first preset position includes a first identification image, determines the screen direction as the first direction if the determination is yes, and determines the screen direction as the second direction if the determination is not yes.
It should be noted that, as can be understood by those skilled in the art, in practical application, it may also be determined whether the image at the first preset position includes the first identification image in other manners, which are not listed here, and the present embodiment does not limit the determination of the specific determination method.
In one example, the first direction is a vertical direction and the second direction is a horizontal direction.
In one example, the recorded image of the screen is an image of an interface after the terminal where the screen is located retreats the application to the background, that is, a main interface image.
It should be noted that, after determining the screen direction of the recorded image, the device for determining the screen direction may perform various processing operations on the recorded image based on the screen direction of the recorded image, for example, determine the driving manner of the pixels of the screen at the receiving end based on the screen direction, so that the user does not need to tilt the head or adjust the direction of the receiving end to adapt to the recorded image. The present embodiment does not limit the subsequent operation of acquiring the screen direction of the recorded image.
The above description is only for illustrative purposes and does not limit the technical aspects of the present invention.
Compared with the prior art, the method for determining the screen direction provided in the embodiment can determine whether the screen direction when the image is recorded is the first direction according to whether the image at the first preset position of the recorded image includes the first identification image or not under the condition that the App is returned to the background, and further determine the screen direction when the image is recorded. Since the screen direction of the recorded image is known, the device for determining the screen direction may perform various processes on the recorded image based on the screen direction to improve the viewing experience of the user.
A second embodiment of the present invention is directed to a method for determining a screen direction, and the second embodiment exemplifies another method for determining a screen direction when recording a recorded image according to an image of a first preset position in the first embodiment.
Specifically, as shown in fig. 2, the apparatus for determining the screen direction includes the following sub-steps of, based on the image at the first predetermined position, determining the screen direction when recording the recorded image:
step 201: and acquiring the characteristic information of the first type of pixels and the characteristic information of the second type of pixels in the image at the first preset position.
Specifically, when the screen direction is the first direction, the first type of pixels form a first identification image, and the second type of pixels are pixels except the first type of pixels in the image at the first preset position.
In one example, the screen is a screen of the terminal, and the first identification image is an identification image in the navigation bar. The inventors have found that regardless of the color of the navigation bar, the color of the identification image of the navigation bar may be very different from the color of the navigation bar itself. Therefore, the apparatus for determining the screen direction may determine the screen direction when the recorded image is recorded by analyzing the feature information of the pixels of the image at the first preset position.
In one example, the feature information of the first type of pixels is a luminance average value of the first type of pixels, and the feature information of the second type of pixels is a luminance average value of the second type of pixels. Where the luminance may be the "Y" component in the YUV image.
It should be noted that, as can be understood by those skilled in the art, in practical applications, in addition to determining whether the image at the first preset position includes the first identification image according to the brightness average value, it may also be determined whether the first preset position includes the first identification image according to other feature information of the pixel, and the present embodiment is not limited to determining whether the image at the first preset position includes the feature information of the pixel of the first identification image.
Step 202: and calculating a first difference value of the characteristic information of the first type of pixels and the characteristic information of the second type of pixels, and determining the screen direction according to a judgment result of whether the first difference value is greater than a first threshold value.
Specifically, since the color of the identification image of the navigation bar may be greatly different from the color of the navigation bar itself, a judgment basis may be provided for determining whether the image at the first preset position includes the first identification image by calculating a difference between the feature information of the first type of pixel corresponding to the first identification image and the feature information of the second type of pixel.
The following exemplifies a manner of determining the screen direction according to the determination result of whether the first difference is greater than the first threshold.
In a first example, the device for determining the screen direction determines that the screen direction is the first direction if the first difference is greater than the first threshold, and determines that the screen direction is the second direction if the first difference is not greater than the first threshold.
Specifically, if the first difference is greater than the first threshold, it is determined that the difference between the feature information of the first-type pixel and the feature information of the second-type pixel is relatively large, that is, the difference between the color of the first identification image of the first-type pixel and the color of the first background image is relatively large, and the image at the first preset position includes the first identification image, so the screen direction is the first direction. Conversely, if the first difference is not greater than the first threshold, the screen direction is the second direction.
In a second example, the first identification image comprises only one color. If the device for determining the screen direction determines that the first difference value is larger than the first threshold value, judging whether the difference values of the feature information between any two first-type pixels are smaller than a third threshold value; if the difference value of the characteristic information between any two first-class pixels is smaller than a third threshold value, determining the screen direction as a first direction; and if the difference value of the characteristic information between the two first-class pixels is not smaller than a third threshold value, determining that the screen direction is the second direction, and if the first difference value is not larger than the first threshold value, determining that the screen direction is the second direction.
Specifically, if the first difference is greater than the first threshold, it is indicated that the difference between the feature information of the first-type pixel and the feature information of the second-type pixel is relatively large, that is, the difference between the color of the first identification image of the first-type pixel and the color of the first background image is relatively large, and it is indicated that the image at the first preset position includes the first identification image under the maximum probability. In order to further improve the accuracy of the final judgment result, the device for determining the screen direction performs further judgment based on the feature information of the first-class pixels, and because the first identification image only contains one color, the feature information of the first-class pixels is the same or extremely close, the device for determining the screen direction judges whether the difference value of the feature information between any two first-class pixels is smaller than a third threshold value, and if the difference value is smaller than the third threshold value, the screen direction is the first direction. And if the condition that the first difference is larger than the first threshold value is not met, or the condition that whether the difference of the characteristic information between any two first-class pixels is smaller than the third threshold value is not met, the screen direction is the second direction.
It is worth mentioning that the screen direction is further judged based on the characteristic information of the first type of pixels, and the accuracy of the judgment result is improved.
In a third example, before determining the screen direction according to the judgment result of whether the first difference is greater than the first threshold, before or after calculating the first difference, the device for determining the screen direction acquires the feature information of the third type of pixels and the feature information of the fourth type of pixels in the image at the second preset position of the recorded image; when the screen direction is the first direction, the image at the second preset position comprises a second identification image, the third type of pixels form the second identification image, and the fourth type of pixels are pixels in the image at the second preset position except the third type of pixels. And calculating a second difference value of the characteristic information of the third type of pixels and the characteristic information of the fourth type of pixels. The device for determining the screen direction determines the screen direction according to the judgment result of whether the first difference is greater than the first threshold and the judgment result of whether the second difference is greater than the second threshold.
In one example, the means for determining the screen orientation determines whether the first difference is greater than a first threshold; if the first difference is larger than a first threshold value, determining that the screen direction is a first direction; if the first difference is not larger than the first threshold, judging whether the second difference is larger than a second threshold; if the second difference is larger than the second threshold, determining the screen direction as the first direction; and if the second difference is not larger than the second threshold, determining the screen direction as the second direction.
In another example, the means for determining the screen orientation determines the screen orientation by:
step 2021: and judging whether the first difference value is larger than a first threshold value. If so, go to step 2022, otherwise, go to step 2023.
Step 2022: and judging whether the difference value between the characteristic information of any two first-class pixels is smaller than a third threshold value. If yes, go to step 2025. Otherwise, step 2023 is performed.
Step 2023: and judging whether the second difference value is larger than a second threshold value. If so, go to step 2024, otherwise, go to step 2026.
Step 2024: and judging whether the difference value between the feature information of any two third-class pixels is smaller than a fourth threshold value. If so, go to step 2025, otherwise, go to step 2026.
Step 2025: the screen direction is determined to be a first direction.
Step 2026: and determining the screen direction as a second direction.
It is worth mentioning that the screen direction is determined according to the judgment results of the two preset positions, so that the accuracy of the determined screen direction is further improved.
In one example, the feature information of the third type of pixels is a luminance average value of the third type of pixels, and the feature information of the fourth type of pixels is a luminance average value of the fourth type of pixels.
It should be noted that, in practical applications, the first threshold may be determined according to a difference between the feature information of the second type of pixels and the feature information of the first type of pixels when the screen direction is the vertical direction, and the second threshold may be determined according to a difference between the feature information of the fourth type of pixels and the feature information of the third type of pixels, for example, if the screen direction is the vertical direction, the difference between the feature information of the second type of pixels and the feature information of the first type of pixels is 10, and the difference between the feature information of the fourth type of pixels and the feature information of the third type of pixels is 9, the first threshold is 9 or 10, and the second threshold is 8 or 9.
It should be noted that, in practical applications, to further improve the accuracy of the screen direction, a similar determination logic as in the third example may be adopted to determine the screen direction according to the image at the first preset position, the image at the second preset position, and the image at the nth preset position of the image … … at the third preset position, and the number of the preset positions is not limited in this embodiment. n is a positive integer.
The method for determining the screen direction according to the present embodiment will be described below with reference to the actual situation.
It is assumed that the first identification image is a wireless signal identification image, the second identification image is a cellular signal identification image, the characteristic information of the pixel is the luminance of the pixel, and the first threshold value and the second threshold value are equal to 10. Under the condition that App is moved back to the background, when the screen direction is the vertical direction, the screen interface is as shown in fig. 3, and when the screen direction is the horizontal direction, the screen interface is as shown in fig. 4, as can be seen from fig. 4 and 5, when the screen direction is the vertical direction, the image 301 at the first preset position includes the wireless signal identification image, and the image 302 at the second preset position includes the cellular signal identification image. Accordingly, the screen direction determining means may determine the screen direction based on the result of the determination of whether the wireless signal identification image is present in the image 301 of the first preset position and the result of the determination of whether the cellular signal identification image is present in the image 302 of the second preset position. Firstly, a screen recording process starts to capture a screen, and a frame-by-frame YUV image is continuously generated. The device for determining the screen direction extracts an image 301 (hereinafter referred to as a first pixel block) at a first preset position of the YUV image according to the coordinate range of the first preset position. The device for determining the screen direction calculates the average value of the luminance of the first type pixels 3011 corresponding to the wireless signal identification image 3011 in the first pixel block (i.e., the Y component of the pixel), and calculates the average value of the luminance of the pixels (second type pixels 3012) other than the first type pixels 3011 in the first pixel block. The device for determining the screen direction extracts an image 302 (hereinafter referred to as a second pixel block) at a second preset position of the YUV image according to the coordinate range of the second preset position. The screen direction determining means calculates the average value of the luminance of the third type pixels 3021 corresponding to the cellular signal identification image in the second pixel block (i.e., the Y component of the pixel), and calculates the average value of the luminance of the pixels other than the third type pixels 3021 in the second pixel block (the fourth type pixels 3022). A first difference value of the average value of the luminance of the first type of pixels 3011 and the average value of the luminance of the second type of pixels 3012 and a second difference value of the average value of the luminance of the third type of pixels 3021 and the average value of the luminance of the fourth type of pixels 3022 are calculated. If the first difference is greater than 10 and the second difference is greater than 10, it indicates that there is a radio signal identification image in the image 301 of the first predetermined location and there is a cellular signal identification image in the image 302 of the second predetermined location, so the screen direction is vertical. If the first difference is less than 10, or the second difference is less than 10, the screen direction is the horizontal direction.
The above description is only for illustrative purposes and does not limit the technical aspects of the present invention.
Compared with the prior art, the method for determining the screen direction provided in the embodiment can determine whether the screen direction is the first direction when the recorded image is recorded according to the judgment result whether the image at the first preset position of the recorded image includes the first identification image and the judgment result whether the image at the second preset position includes the second identification image when the App is returned to the background, so that the accuracy of the finally determined screen direction is improved.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
A third embodiment of the present invention relates to an apparatus for determining a screen orientation, as shown in fig. 5, including: an acquisition module 401 and a determination module 402. The acquiring module 401 is configured to acquire an image of a first preset position of a recorded image of a screen; when the screen direction is a first direction, the image of the first preset position comprises a first identification image; and when the screen direction is the second direction, the image at the first preset position does not comprise the first identification image. The determining module 402 is configured to determine a screen direction when the recorded image is recorded according to the image at the first preset position.
In one example, determining the screen direction according to the image at the first preset position specifically includes: acquiring feature information of a first type of pixel and feature information of a second type of pixel in an image at a first preset position; when the screen direction is a first direction, the first type of pixels form a first identification image, and the second type of pixels are pixels except the first type of pixels in the image at the first preset position; calculating a first difference value of the characteristic information of the first type of pixels and the characteristic information of the second type of pixels; and determining the screen direction according to the judgment result of whether the first difference value is larger than the first threshold value.
In one example, before determining the screen direction according to the determination result of whether the first difference is greater than the first threshold, the method of determining the screen direction further includes: acquiring feature information of a third type of pixel and feature information of a fourth type of pixel in an image at a second preset position of the recorded image; when the screen direction is the first direction, the image at the second preset position comprises a second identification image, the third type of pixels form the second identification image, and the fourth type of pixels are pixels in the image at the second preset position except the third type of pixels; calculating a second difference value of the characteristic information of the third type of pixels and the characteristic information of the fourth type of pixels; determining the screen direction according to the judgment result of whether the first difference is greater than the first threshold, specifically comprising: and determining the screen direction according to the judgment result of whether the first difference value is larger than the first threshold value and the judgment result of whether the second difference value is larger than the second threshold value.
In one example, determining the screen direction according to the determination result of whether the first difference is greater than the first threshold and the determination result of whether the second difference is greater than the second threshold specifically includes: judging whether the first difference value is larger than a first threshold value; if the first difference is larger than a first threshold value, determining that the screen direction is a first direction; if the first difference is not larger than the first threshold, judging whether the second difference is larger than a second threshold; if the second difference is larger than the second threshold, determining the screen direction as the first direction; and if the second difference is not larger than the second threshold, determining the screen direction as a second direction.
In an example, determining the screen direction according to a determination result of whether the first difference is greater than the first threshold specifically includes: if the first difference is larger than the first threshold value, judging whether the difference of the characteristic information between any two first-class pixels is smaller than a third threshold value; if yes, determining the screen direction as a first direction.
In one example, the feature information of the first type of pixels is a luminance average value of the first type of pixels, and the feature information of the second type of pixels is a luminance average value of the second type of pixels.
In one example, the first identification image is an identification image on a navigation bar of the screen display.
It should be understood that this embodiment is a system example corresponding to the first embodiment, and may be implemented in cooperation with the first embodiment. The related technical details mentioned in the first embodiment are still valid in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the first embodiment.
It should be noted that each module referred to in this embodiment is a logical module, and in practical applications, one logical unit may be one physical unit, may be a part of one physical unit, and may be implemented by a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, a unit which is less closely related to solving the technical problem proposed by the present invention is not introduced in the present embodiment, but it does not indicate that no other unit exists in the present embodiment.
A fourth embodiment of the present invention relates to an apparatus for determining a screen orientation, as shown in fig. 6, including: at least one processor 501; and a memory 502 communicatively coupled to the at least one processor 501; the memory 502 stores instructions executable by the at least one processor 501, and the instructions are executed by the at least one processor 501, so that the at least one processor 501 can execute the method for determining the screen orientation according to the above embodiments.
The device for determining the screen direction comprises: one or more processors 501 and a memory 502, with one processor 501 being an example in fig. 6. The processor 501 and the memory 502 may be connected by a bus or other means, and fig. 6 illustrates the connection by the bus as an example. The memory 502 is a non-volatile computer readable storage medium for storing non-volatile software programs, non-volatile computer executable programs, and modules, such as the information of the first predetermined location in the embodiment of the present application, stored in the memory 502. The processor 501 executes various functional applications of the device and data processing, i.e., the above-described method of determining the screen orientation, by executing nonvolatile software programs, instructions, and modules stored in the memory 502.
The memory 502 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store a list of options, etc. Further, the memory 502 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 502 may optionally include memory located remotely from processor 501, which may be connected to an external device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
One or more modules are stored in memory 502 and, when executed by the one or more processors 501, perform a method of determining screen orientation in any of the method embodiments described above.
The product can execute the method provided by the embodiment of the application, has corresponding functional modules and beneficial effects of the execution method, and can refer to the method provided by the embodiment of the application without detailed technical details in the embodiment.
A fifth embodiment of the present invention relates to a computer-readable storage medium storing a computer program. The computer program realizes the above-described method embodiments when executed by a processor.
That is, as can be understood by those skilled in the art, all or part of the steps in the method according to the above embodiments may be implemented by a program instructing related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps in the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.

Claims (8)

1. A method of determining screen orientation, comprising:
acquiring an image of a first preset position of a recorded image of a screen; when the screen direction is a first direction, the image of the first preset position comprises a first identification image; when the screen direction is a second direction, the image of the first preset position does not comprise a first identification image;
acquiring the characteristic information of a first type of pixel and the characteristic information of a second type of pixel in the image at the first preset position; when the screen direction is a first direction, the first-class pixels form the first identification image, and the second-class pixels are pixels except the first-class pixels in the image at the first preset position;
calculating a first difference value between the characteristic information of the first type of pixels and the characteristic information of the second type of pixels, wherein the characteristic information of the first type of pixels is the brightness average value of the first type of pixels, and the characteristic information of the second type of pixels is the brightness average value of the second type of pixels;
and determining the screen direction according to the judgment result of whether the first difference value is larger than a first threshold value.
2. The method of claim 1, wherein before determining the screen direction according to the determination of whether the first difference is greater than a first threshold, the method further comprises:
acquiring feature information of a third type of pixels and feature information of a fourth type of pixels in an image at a second preset position of the recorded image; when the screen direction is a first direction, the image at the second preset position comprises a second identification image, the third type of pixels form the second identification image, and the fourth type of pixels are pixels in the image at the second preset position except the third type of pixels;
calculating a second difference value of the feature information of the third type of pixels and the feature information of the fourth type of pixels;
determining the screen direction according to a judgment result of whether the first difference is greater than a first threshold, specifically including:
and determining the screen direction according to the judgment result of whether the first difference value is larger than a first threshold value and the judgment result of whether the second difference value is larger than a second threshold value.
3. The method for determining a screen direction according to claim 2, wherein the determining the screen direction according to the determination result of whether the first difference is greater than a first threshold and the determination result of whether the second difference is greater than a second threshold specifically comprises:
judging whether the first difference value is larger than a first threshold value or not;
if the first difference is larger than a first threshold value, determining that the screen direction is the first direction;
if the first difference is not larger than a first threshold, judging whether the second difference is larger than a second threshold;
if the second difference is greater than the second threshold, determining that the screen direction is the first direction;
and if the second difference is not larger than the second threshold, determining the screen direction as a second direction.
4. The method for determining the screen direction according to claim 1, wherein the determining the screen direction according to the determination result of whether the first difference is greater than a first threshold specifically comprises:
if the first difference is determined to be larger than the first threshold, judging whether the difference of the feature information between any two first-class pixels is smaller than a third threshold; if yes, determining the screen direction as the first direction; if not, determining that the screen direction is the second direction.
5. The method of determining screen orientation of any of claims 1-4, wherein the first identification image is an identification image on a navigation bar of the screen display.
6. An apparatus for determining screen orientation, comprising: the device comprises an acquisition module and a determination module;
the acquisition module is used for acquiring an image of a first preset position of a recorded image of a screen; when the screen direction is a first direction, the image of the first preset position comprises a first identification image; when the screen direction is a second direction, the image of the first preset position does not comprise a first identification image;
the determining module is used for acquiring the characteristic information of a first type of pixel and the characteristic information of a second type of pixel in the image at the first preset position; when the screen direction is a first direction, the first type of pixels form the first identification image, and the second type of pixels are pixels except the first type of pixels in the image at the first preset position; calculating a first difference value between the characteristic information of the first type of pixels and the characteristic information of the second type of pixels, wherein the characteristic information of the first type of pixels is the brightness average value of the first type of pixels, and the characteristic information of the second type of pixels is the brightness average value of the second type of pixels; and determining the screen direction according to the judgment result of whether the first difference value is larger than a first threshold value.
7. An apparatus for determining screen orientation, comprising: at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method of determining screen orientation as claimed in any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the method of determining screen orientation of any of claims 1 to 5.
CN201910619500.6A 2019-07-10 2019-07-10 Method and device for determining screen direction and readable storage medium Active CN110533628B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910619500.6A CN110533628B (en) 2019-07-10 2019-07-10 Method and device for determining screen direction and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910619500.6A CN110533628B (en) 2019-07-10 2019-07-10 Method and device for determining screen direction and readable storage medium

Publications (2)

Publication Number Publication Date
CN110533628A CN110533628A (en) 2019-12-03
CN110533628B true CN110533628B (en) 2022-05-13

Family

ID=68659476

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910619500.6A Active CN110533628B (en) 2019-07-10 2019-07-10 Method and device for determining screen direction and readable storage medium

Country Status (1)

Country Link
CN (1) CN110533628B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6313853B1 (en) * 1998-04-16 2001-11-06 Nortel Networks Limited Multi-service user interface
CN101482765A (en) * 2006-04-28 2009-07-15 三星电子株式会社 Method and apparatus to control screen orientation of user interface of portable device
CN104122983A (en) * 2013-04-27 2014-10-29 中国移动通信集团公司 Adjusting method and device for screen displaying direction
CN108647057A (en) * 2018-05-10 2018-10-12 Oppo广东移动通信有限公司 Screen orientation setting method, device, storage medium and terminal
CN109189299A (en) * 2018-08-02 2019-01-11 珠海格力电器股份有限公司 A kind of screen methods of exhibiting, device, terminal and readable storage medium storing program for executing

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103763505A (en) * 2013-12-31 2014-04-30 华为技术有限公司 Method and device suitable for screen direction switching in video call

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6313853B1 (en) * 1998-04-16 2001-11-06 Nortel Networks Limited Multi-service user interface
CN101482765A (en) * 2006-04-28 2009-07-15 三星电子株式会社 Method and apparatus to control screen orientation of user interface of portable device
CN104122983A (en) * 2013-04-27 2014-10-29 中国移动通信集团公司 Adjusting method and device for screen displaying direction
CN108647057A (en) * 2018-05-10 2018-10-12 Oppo广东移动通信有限公司 Screen orientation setting method, device, storage medium and terminal
CN109189299A (en) * 2018-08-02 2019-01-11 珠海格力电器股份有限公司 A kind of screen methods of exhibiting, device, terminal and readable storage medium storing program for executing

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Virtual Video Synthesis for Personalized Training;Filippos 等;《IEEE》;20181217;第1-6页 *
界面中的注意力设计——ios平台的移动设备界面设计研究;冯冲;《万方数据知识服务平台》;20121231;第1-90页 *

Also Published As

Publication number Publication date
CN110533628A (en) 2019-12-03

Similar Documents

Publication Publication Date Title
CN110971929B (en) Cloud game video processing method, electronic equipment and storage medium
US11222211B2 (en) Method and apparatus for segmenting video object, electronic device, and storage medium
US20200074646A1 (en) Method for obtaining image tracking points and device and storage medium thereof
KR20200023651A (en) Preview photo blurring method and apparatus and storage medium
US9704227B2 (en) Method and apparatus for image enhancement
CN111385640B (en) Video cover determining method, device, equipment and storage medium
CN110399842B (en) Video processing method and device, electronic equipment and computer readable storage medium
KR20190060774A (en) Determining the distribution of blocks of an image based on the motion vectors of the blocks
CN107748882B (en) Lane line detection method and device
CN106651797B (en) Method and device for determining effective area of signal lamp
CN111080665B (en) Image frame recognition method, device, equipment and computer storage medium
CN110689014B (en) Method and device for detecting region of interest, electronic equipment and readable storage medium
CN114302226B (en) Intelligent cutting method for video picture
US8953893B2 (en) System and method to determine feature candidate pixels of an image
US9076207B1 (en) Image processing method, system and electronic device
CN111654747B (en) Bullet screen display method and device
CN110533628B (en) Method and device for determining screen direction and readable storage medium
CN108805883B (en) Image segmentation method, image segmentation device and electronic equipment
CN109993767B (en) Image processing method and system
CN108475430B (en) Picture quality evaluation method and device
CN113490009B (en) Content information implantation method, device, server and storage medium
KR102411911B1 (en) Apparatus and method for frame rate conversion
US9798932B2 (en) Video extraction method and device
CN104754248A (en) Method and device for acquiring target snapshot
CN113191210A (en) Image processing method, device and 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