WO2019033510A1 - Method for recognizing vr application program, and electronic device - Google Patents

Method for recognizing vr application program, and electronic device Download PDF

Info

Publication number
WO2019033510A1
WO2019033510A1 PCT/CN2017/103193 CN2017103193W WO2019033510A1 WO 2019033510 A1 WO2019033510 A1 WO 2019033510A1 CN 2017103193 W CN2017103193 W CN 2017103193W WO 2019033510 A1 WO2019033510 A1 WO 2019033510A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
interface
black image
black
gray value
Prior art date
Application number
PCT/CN2017/103193
Other languages
French (fr)
Chinese (zh)
Inventor
孟亚州
Original Assignee
歌尔科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 歌尔科技有限公司 filed Critical 歌尔科技有限公司
Publication of WO2019033510A1 publication Critical patent/WO2019033510A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection

Definitions

  • the present invention relates to the field of virtual reality technologies, and in particular, to a method and an electronic device for identifying a VR application.
  • VR Virtual Reality
  • the invention provides a method for identifying a VR application and an electronic device for efficiently identifying a VR application from a large number of applications.
  • the invention provides a method for identifying a VR application, comprising:
  • the at least four image blocks are black image blocks, identifying a black image region in the interface image according to a gray value of a pixel point included in the interface image;
  • the to-be-identified application is a VR application.
  • determining whether the at least four reference image blocks are all black image blocks according to the gray value of the pixel points included in the at least four reference image blocks comprises: acquiring the at least four reference image blocks The number of pixels whose gray value is smaller than the specified gray threshold; the ratio of the number of pixels whose gray value is smaller than the specified gray threshold to the total number of pixels included in the at least four reference image blocks; The ratio is greater than or equal to the set ratio threshold, and then determining that the at least four image blocks are black image blocks.
  • the method further includes: if the at least four reference image blocks are not all black image blocks, determining that the to-be-identified application is a non-VR application.
  • identifying the black image area in the interface image according to the gray value of the pixel point included in the interface image comprising: acquiring, in the interface image, that the gray value is less than the specified gray threshold An area in which the pixel point is located; acquiring a geometric envelope map of the suspect black image area according to the coordinates of the pixel point included in the suspect black image area; if the geometric envelope image exists and the top angle of the interface image The coincident apex angle or the longitudinal center axis of the geometric envelope map coincides with the longitudinal center axis of the interface image, and it is determined that the suspect black image region belongs to the black image region of the interface image.
  • judging the gray value according to the pixel points included in the black image area Whether the left and right portions of the black image area correspond to each other includes: determining whether the black image area is symmetrical along a longitudinal central axis of the interface image according to a gray value of a pixel point included in the black image area.
  • determining whether the black image area is symmetrical along a longitudinal central axis of the interface image according to a gray value of a pixel point included in the black image area comprises: along a longitudinal central axis of the interface image The black image area is divided into two sub-image areas; the similarity rate of the two sub-image areas is calculated according to the total number of pixels included in the two sub-image areas and the number of symmetric pixel points having the same gray value; If the similarity ratio is greater than the set similarity threshold, it is determined that the black image area is symmetrical along a longitudinal center axis of the interface image.
  • calculating a similarity ratio of the two sub-image regions according to a total number of pixels included in the two sub-image regions and a number of symmetric pixel points having the same gray value in the two sub-image regions including : establishing a coordinate system with the horizontal central axis of the interface image as an abscissa axis and the longitudinal central axis of the interface image as an ordinate axis; in the two sub-image regions, obtaining the same ordinate and opposite the abscissa a pixel as a symmetric pixel; counting the number of symmetric pixel points having the same gray value, and obtaining an average of the total number of pixels included in the two sub-image regions; symmetric pixels having the same gray value
  • the ratio of the number of points to the average value determines the similarity rate of the two sub-image areas.
  • the present invention also provides a VR application identification electronic device, including: a memory and a processor;
  • the memory is configured to: store one or more instructions; the processor is configured to execute the one or more computer instructions for: obtaining at least four specified sizes from four corners of an interface image of an application to be identified Reference image block;
  • the at least four image blocks are black image blocks, identifying a black image region in the interface image according to a gray value of a pixel point included in the interface image;
  • the processor is specifically configured to: acquire, in the at least four reference image blocks, a number of pixels whose gray value is smaller than a specified gray threshold; and calculate that the gray value is smaller than a specified gray threshold. a ratio of the number of pixels to the total number of pixels included in the at least four reference image blocks; if the ratio is greater than or equal to the set ratio threshold, determining that the at least four image blocks are black image blocks.
  • the processor is specifically configured to: obtain, in the interface image, an area where a pixel point whose gray value is smaller than the specified gray level threshold is used as a suspicious black image area; according to the suspect black image area a coordinate of the included pixel, acquiring a geometric envelope of the suspect black image region; if the geometric envelope has an apex angle coincident with a vertex of the interface image or a longitudinal direction of the geometric envelope The axis coincides with the longitudinal center axis of the interface image, and it is determined that the suspect black image area belongs to the black image area of the interface image.
  • the VR application identification method and the electronic device provided by the present invention determine whether the left and right parts of the interface image correspond to each other by judging whether the black image block is a black image block at the four corners of the interface image of the application to be identified. Further, when it is determined that the left and right portions of the interface image correspond, the application to be identified is determined to be a VR application. This method is not limited by the package name or name of the application, and the recognition efficiency of the VR application is high.
  • FIG. 1a is a schematic flowchart of a method for identifying a VR application according to an embodiment of the present invention
  • Figure 1b is a schematic diagram of an interface image of a VR application
  • FIG. 2 is a schematic flowchart of another method for identifying a VR application according to an embodiment of the present invention.
  • 2b is a schematic diagram of selecting a reference image block at four corners of an interface image according to an embodiment of the present invention
  • 2c is a schematic diagram of a geometric envelope diagram for acquiring a suspicious black image region in an interface image according to an embodiment of the present invention
  • 2d is another schematic diagram of acquiring a geometric envelope diagram of a suspicious black image area in an interface image according to an embodiment of the present invention
  • 2e is a schematic diagram of establishing a coordinate system on an interface image according to an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram showing the internal configuration of the head mounted display device 400 in some embodiments provided by the present invention.
  • FIG. 1 is a schematic flowchart of a method for identifying a VR application according to an embodiment of the present invention. Referring to FIG. 1a, the method includes:
  • Step 101 Acquire at least four reference image blocks of a specified size from four corners of the interface image of the application to be identified.
  • Step 102 Determine, according to the gray value of the pixel points included in the at least four reference image blocks, whether the at least four reference image blocks are black image blocks; if yes, perform step 103; if not, execute Step 106.
  • Step 103 Identify a black image area in the interface image according to a gray value of a pixel point included in the interface image.
  • Step 104 Determine whether the left and right portions of the black image region correspond according to the gray value of the pixel included in the black image region; if yes, execute step 105; if no, execute step 106.
  • Step 105 Determine that the to-be-identified application is a VR application.
  • Step 106 Determine that the to-be-identified application is a non-VR application.
  • the application to be identified may be any application installed on a VR device or a terminal device such as a mobile phone.
  • the interface image is a corresponding image of any interface of the application to be recognized, and includes an interface style and an interface element of the application to be recognized.
  • the application store or the application scenario can be accessed to find the application to be identified, the application to be recognized is opened, and the interface image of any interface of the application to be recognized is obtained.
  • the application to be identified can be found on the desktop or in the application list, and the application to be recognized is opened and an interface image of any interface of the application to be recognized is obtained.
  • the shape of the interface image is a rectangle, and the four corners of the interface image are the areas near the four vertices of the interface image.
  • at least one reference image block may be acquired at each corner of the interface image.
  • the size of the reference image block is specified, and the specified size is associated with the size of the interface image.
  • the display interface of the VR application includes a content image area and a black image area.
  • the content image area is used to display interface information of the VR content or the VR application
  • the black image area is a non-content image area.
  • the display interface of the VR application includes two content image areas that are parallel to the direction in which the user's left and right eyes are connected. It can be considered that in the rectangular interface image of the VR application, the two content image areas are removed, and the remaining part is the black image area.
  • 2b is a schematic diagram of an interface image of the VR application. In FIG. 1b, the mesh portion is a content image area, and the portion outside the mesh is a black image area.
  • both content image areas have a certain degree of barrel distortion. Furthermore, this barrel distortion causes the four corners of the interface image of the VR application to be black. In the interface image of a non-VR application, the four corners of the image are not necessarily black. Therefore, the embodiment can determine that the reference image block on the four corners of the interface image is No black, to initially screen out non-VR applications.
  • the black image contains pixels with a gray value that is usually small, usually between 0-10. Therefore, optionally, after acquiring at least four reference image blocks, determining, according to the gray value of the pixel points included in each reference image block, whether the reference image block is a black image block to implement preliminary screening of non-VR applications .
  • the interface image of the non-VR application may also have a case where all four corners are black. Therefore, if at least four reference image blocks acquired in step 101 are not all black image blocks, the interface image may be considered as an interface image of a non-VR application. If at least four reference image blocks acquired in step 101 are black image blocks, the interface image may be considered to be an interface image of the VR application. However, it is necessary to further determine that the interface image is indeed an interface image of the VR application.
  • the interface image is determined to be an interface image of the VR application according to the corresponding features of the left and right portions of the black image area in the interface image.
  • the black image area in the interface image may be identified according to the gray value of the pixel points included in the interface image.
  • the interface displayed by the VR application is a dual screen interface, and the left and right screens respectively correspond to the positions of the left eye and the right eye of the user. Further, at the same time, the display contents seen by the left and right eyes of the user are different to produce a strong stereoscopic depth. Furthermore, it can be considered that if an interface image is an interface image of a VR application, the left and right portions of the black image area in the interface image must correspond.
  • this step can determine whether the left and right portions of the interface image correspond to each other by the gray value of the pixel point included in the black image area of the interface image. If so, it can be determined that the application to be identified is a VR application, otherwise it is a non-VR application.
  • the application to be identified by determining whether the four corners of the interface image of the application to be identified are all black image blocks to initially screen the non-VR application program, it is further determined whether the left and right portions of the interface image correspond. Further, when determining the corresponding left and right portions of the interface image, the application to be identified is determined.
  • the order is a VR application. This method is not limited by the package name or name of the application, and the recognition efficiency of the VR application is high.
  • the interface image may be a screen capture image obtained by taking a screen shot for any interface of the application to be identified, or may be performed on any interface of the application to be identified. Take the captured image.
  • the technical solution of the embodiment of the present invention is further described in the following section by taking a screen shot image of the object to be identified as an example.
  • FIG. 2 is a schematic flowchart of another method for identifying a VR application according to an embodiment of the present invention. Referring to FIG. 2a, the method includes:
  • Step 201 Obtain at least four reference image blocks of a specified size from four corners of the screen capture image of the application to be identified;
  • Step 202 Acquire, in the at least four reference image blocks, a number of pixels whose gray value is smaller than a specified gray threshold;
  • Step 203 Calculate a ratio of a number of pixel points whose gray value is smaller than a specified gray level threshold to a total number of pixel points included in the at least four reference image blocks.
  • Step 204 Determine whether the ratio is less than a set proportional threshold. If yes, go to step 210; if no, go to step 205.
  • Step 205 Identify a black image area in the screen capture image according to a gray value of a pixel point included in the screen capture image.
  • Step 206 dividing the black image area into two left and right sub-image areas along a longitudinal central axis of the screen capture image
  • Step 207 Calculate a similarity ratio of the two sub-image regions according to a total number of pixels included in the two sub-image regions and a number of symmetric pixel points with the same gray value.
  • Step 208 Determine, according to the similarity ratio of the two sub-image regions, whether the black image region is symmetric along a longitudinal central axis of the screen capture image; if yes, perform step 209; if no, perform step 210.
  • Step 209 Determine that the to-be-identified application is a VR application.
  • Step 210 Determine that the to-be-identified application is a non-VR application.
  • step 201 when at least four reference image blocks of a specified size are acquired from the four corners of the screen capture image of the application to be identified, the four vertices of the screen capture image may be used as a starting point for image selection, and the specified size is selected on the screen capture image.
  • the image area obtains the at least four reference image blocks.
  • only one square reference image block may be taken at each corner of the screen capture image.
  • four reference image blocks rect1, rect2, rect3, and rect4 are selected on the screen image, and the vertices of each reference image block coincide with the vertices of the screen image.
  • the advantage of selecting the starting point of the vertices of the screen image as the image is that, for the screen image with different degrees of distortion of the content image area, the possibility of including the content image in the reference image block can be reduced, and the black image is further improved.
  • the accuracy of the block identification is that, for the screen image with different degrees of distortion of the content image area, the possibility of including the content image in the reference image block can be reduced, and the black image is further improved.
  • the content image area on a VR application interface is highly distorted, resulting in a smaller black image area at the four corners of the VR application interface.
  • the starting point selected by the vertex of the screen image as the image can avoid the pixel points selected to the content image area.
  • the specified size is associated with the size of the screenshot image.
  • the selected reference image block is more effective, but the embodiment of the present invention does not limit the size of the specified size.
  • the number C of pixels of the at least four reference image blocks whose gray value is smaller than the specified gray threshold may be acquired.
  • the specified gray value threshold is small, usually a single digit.
  • the gray value of the pixel may be acquired first.
  • obtaining the gray value of the pixel included in the reference image block may adopt the following optional methods:
  • Gray R * 0.3 + G * 0.59 + B * 0.11;
  • Gray (R*30+G*59+B*11)/100
  • R, G, and B are the values of any pixel on the reference image block on the three color components of red, green, and blue, respectively, and Gray is the calculated gray value of the pixel.
  • step 203 the ratio P1 of the number of pixel points whose gray value is smaller than the specified gray level threshold to the total number of pixel points included in the reference image block is calculated, and the following formula can be used:
  • a is the number of pixels included in the longitudinal direction of the reference image block
  • b is the number of pixels included in the height direction of the reference image block
  • N is the total number of reference image blocks, N ⁇ 4.
  • step 204 in the present embodiment, preferably, when the set proportional threshold is 99%, the recognition efficiency and accuracy of the black image block are high. That is, if P1 is greater than 99%, it may be determined that at least four reference image blocks acquired in step 201 are black image blocks.
  • the black image area in the screen shot image refers to a portion of the screen shot image other than the content image area.
  • the suspicious black image region in which the grayscale value is smaller than the specified grayscale threshold is identified from the screen capture image, and the black image region is distinguished from the suspect black image region.
  • the image content displayed in the content image area of the screen shot image has black portions, and the black portion contains pixel points whose gray value is also smaller than the specified gray scale threshold.
  • the suspect black image area may contain black portions in the content image area.
  • the black image area of the screen capture image may be identified from the suspect black image area by using the following method:
  • a regular geometric figure can be used to draw the maximum contour of the suspect black image area as a geometric envelope of the suspect black image area.
  • the maximum value of the abscissa of the pixel, the minimum value of the abscissa, the maximum value of the ordinate, and the ordinate of the pixel in the suspect black image area may be calculated first.
  • the minimum value, and the geometric envelope diagram of the suspect black image area is determined by these four maximum values.
  • the geometric envelope map of the suspect black image area After determining the geometric envelope map of the suspect black image area, determining that the geometric envelope map is There is an apex angle that coincides with the apex angle of the screen shot image, or whether the longitudinal center axis of the geometric envelope map coincides with the longitudinal center axis of the screen shot image. Determining that if the geometric envelope map has an apex angle that coincides with a vertex angle of the screen shot image, or determines that a longitudinal central axis of the geometric envelope map coincides with a longitudinal central axis of the screen capture image
  • the suspicious black image area belongs to the black image area of the screen shot image. The following part will further explain the method for identifying the black image area provided by the embodiment in conjunction with FIG. 2c and FIG. 2d.
  • FIG. 2c is a schematic diagram of a geometric envelope diagram for acquiring a suspicious black image in a screen capture image according to an embodiment of the present invention.
  • the five shaded areas in Fig. 2c are suspect black image areas
  • the geometric envelope Fig. 1 - geometric envelope Fig. 5 are the geometric envelope diagrams corresponding to the suspect black image areas in Fig. 2c, respectively.
  • the four apex angles of the geometric envelope 1 coincide with the apex angle of the screen image
  • the longitudinal center axis of the geometric envelope 1 coincides with the longitudinal center axis of the screen image. Therefore, it can be considered that the suspicious black image area corresponding to the geometric envelope diagram 1 is the black image area of the screen shot image.
  • Geometric Envelope Figure 2 - Geometry Envelope Figure 5 does not coincide with the apex angle of the screen image, and the geometric envelope diagram 2 - the longitudinal center axis of the geometric envelope diagram 5 does not correspond to the longitudinal center axis of the screen image coincide. Therefore, it can be considered that the suspicious black image area corresponding to the geometric envelope diagram 1 belongs to the content image area of the screen capture image.
  • FIG. 2d is another schematic diagram of acquiring a geometric envelope diagram of a suspicious black image area in a screen capture image according to an embodiment of the present invention.
  • the degree of distortion of the content image area is large, and the boundary of the content image area is tangent to the boundary of the screen image.
  • the geometric envelope diagram corresponding to A1-A4 has a apex angle coincident with the apex angle of the screen image, and the suspect black image area A1-A4 may be considered to belong to the black image area of the screen capture image.
  • the longitudinal central axes of A5 and A6 coincide with the longitudinal central axis of the screen image, and the suspect black image areas A5 and A6 may be considered to belong to the black image area of the screen image.
  • the apex angle of the A7-A10 does not coincide with the apex angle of the screen image, and any longitudinal central axis does not coincide with the longitudinal center axis of the screen image. Therefore, the suspicious black image area A7-A10 can be considered to belong to the content image area of the screen shot image.
  • the black image area is divided into two left and right sub-image areas along the longitudinal center axis.
  • the application to be tested is installed on the VR device or installed on the mobile phone embedded in the VR device for the user to view with both eyes. Therefore, the longer side of the captured image of the application to be tested is the side parallel to the direction in which the left and right eyes of the user are connected.
  • the longitudinal center axis is a central axis perpendicular to the longer side of the screen image, and the longitudinal center axis is capable of dividing the screen image into two equal parts. That is to say, if the lengths of the screen images are w and h, respectively, the longitudinal center axis is along the line direction of (w/2, 0) and (w/2, h).
  • the black image area is divided into two parts, the horizontal central axis of the screen image is the horizontal axis x, and the longitudinal central axis of the screen image is the vertical axis y.
  • pixels having the same ordinate and opposite abscissa are acquired as symmetric pixel points, such as pixel points A (-x1, y1) and pixel points B in FIG. 2e ( X1, y1).
  • the number of symmetric pixel points having the same gray value is counted and the average of the total number of pixel points included in the two sub-image areas is obtained.
  • the similarity ratio P2 of the two sub-image regions may be determined according to a ratio of the number of symmetric pixel points having the same gray value to the average of the total number of pixel points.
  • the calculation formula of the similarity rate can be as follows:
  • M is the number of symmetric pixel points with the same gray value
  • Ci is the number of pixel points of the i-th black region.
  • n is the number of black image regions contained in the two sub-image regions.
  • the similarity rate is greater than a set similarity threshold, it is determined that the black image area is symmetrical along a longitudinal center axis of the screen shot image.
  • the set similarity threshold may be 99%, that is, when P2 is greater than 99%, it is determined that the black image area is symmetrical along the longitudinal central axis of the screen image.
  • the application to be identified is a VR application.
  • This method is not limited by the package name or name of the application, and has high recognition accuracy and high efficiency for the VR application.
  • the non-VR application can be quickly identified and the user is promptly reminded to enhance the user experience.
  • the electronic device includes a memory 301 and a processor 302.
  • the memory 301 is configured to: store one or more instructions.
  • the processor 302 is configured to invoke to execute the one or more instructions for: acquiring, from the four corners of the interface image of the application to be identified, at least four reference image blocks of a specified size; according to the at least four references a gray value of a pixel included in the image block, determining whether the at least four reference image blocks are black image blocks; if the at least four image blocks are black image blocks, according to the pixels included in the interface image a gray value of the point, identifying a black image area in the interface image; determining, according to a gray value of the pixel point included in the black image area, whether the left and right portions of the black image area correspond; if the black image The two parts of the area correspond to each other, and then the application to be identified is determined to be a VR application.
  • the processor 302 is specifically configured to: acquire, in the at least four reference image blocks, a number of pixels whose gray value is smaller than a specified gray threshold; and calculate the gray value to be smaller than a specified gray threshold.
  • the processor 302 is specifically configured to: select, by using four vertices of the interface image, a starting point of an image, and select an image area of a specified size on the interface image to obtain the at least four As the reference image block.
  • the processor 302 is specifically configured to: in the interface image, obtain an area where a pixel point whose gray value is smaller than the specified gray level threshold is used as a suspicious black image area; according to the suspect black image The coordinates of the pixel points included in the region, and the geometry of the suspect black image region is obtained.
  • An envelope map if the geometric envelope map has an apex angle coincident with a vertex angle of the interface image or a longitudinal central axis of the geometric envelope map coincides with a longitudinal central axis of the interface image, determining the The suspicious black image area belongs to the black image area of the interface image.
  • determining whether the left and right portions of the black image area correspond to each other according to the gray value of the pixel point included in the black image area comprises: according to the gray value of the pixel point included in the black image area, It is determined whether the black image area is symmetrical along a longitudinal center axis of the interface image.
  • the processor 302 is specifically configured to: divide the black image area into two left and right sub-image areas along a longitudinal central axis of the interface image; and total pixels according to the two sub-image areas Calculating a similarity rate of the two sub-image regions by the number of symmetric pixel points having the same number and gray value; and determining the black image region along the longitudinal direction of the interface image if the similarity ratio is greater than a set similarity threshold
  • the central axis is symmetrical.
  • the processor 302 is specifically configured to: establish a coordinate system by using a horizontal central axis of the interface image as an axis of abscissa and a longitudinal axis of the interface image as an ordinate axis; In the sub-image area, obtain pixel points with the same ordinate and opposite abscissa as symmetric pixel points; count the number of symmetric pixel points with the same gray value and obtain the average of the total number of pixels included in the two sub-image areas a value; determining a similarity ratio of the two sub-image regions according to a ratio of the number of symmetric pixel points having the same gray value to the average of the total number of pixel points.
  • the application to be identified is determined to be a VR application. This method is not limited by the package name or name of the application, and the recognition efficiency of the VR application is high.
  • the electronic device may be an external head mounted display device or an integrated head mounted display device, wherein the external head mounted display device needs to be used in conjunction with an external processing system (eg, a computer processing system).
  • an external processing system eg, a computer processing system
  • FIG. 4 shows a schematic diagram of the internal configuration of the head mounted display device 400 in some embodiments.
  • the display unit 401 may include a display panel that is disposed on the head mounted display device 400
  • the side surface facing the user's face may be a whole panel or a left panel and a right panel corresponding to the left and right eyes of the user, respectively.
  • the display panel may be an electroluminescence (EL) element, a liquid crystal display or a microdisplay having a similar structure, or a laser-scanned display in which the retina may be directly displayed or similar.
  • EL electroluminescence
  • the virtual image optical unit 402 photographs the image displayed by the display unit 401 in an enlarged manner and allows the user to observe the displayed image in the enlarged virtual image.
  • the display image outputted to the display unit 401 it may be an image of a virtual scene supplied from a content reproduction device (a Blu-ray disc or a DVD player) or a streaming server, or an image of a real scene photographed using an external camera 410.
  • virtual image optical unit 402 can include a lens unit, such as a spherical lens, an aspheric lens, a Fresnel lens, and the like.
  • the input operation unit 403 includes at least one operation member for performing an input operation, such as a button, a button, a switch, or other similarly functioned component, receives a user instruction through the operation member, and outputs an instruction to the control unit 407.
  • an input operation such as a button, a button, a switch, or other similarly functioned component
  • the status information acquisition unit 404 is configured to acquire status information of the user wearing the head mounted display device 400.
  • the status information acquisition unit 404 may include various types of sensors for detecting status information by itself, and may acquire status information from an external device such as a smartphone, a wristwatch, and other multi-function terminals worn by the user through the communication unit 405.
  • the status information acquisition unit 404 can acquire location information and/or posture information of the user's head.
  • the status information acquisition unit 404 may include one or more of a gyro sensor, an acceleration sensor, a global positioning system (GPS) sensor, a geomagnetic sensor, a Doppler effect sensor, an infrared sensor, and a radio frequency field intensity sensor.
  • GPS global positioning system
  • the state information acquisition unit 404 acquires state information of the user wearing the head-mounted display device 400, for example, acquires, for example, an operation state of the user (whether the user wears the head-mounted display device 400), an action state of the user (such as standing, walking, running) And the state of movement such as the state of the hand or fingertip, the open or closed state of the eye, the direction of the line of sight, the size of the pupil, the mental state (whether the user is immersed in observing the displayed image, and the like), or even the physiological state.
  • an operation state of the user whether the user wears the head-mounted display device 400
  • an action state of the user such as standing, walking, running
  • the state of movement such as the state of the hand or fingertip, the open or closed state of the eye, the direction of the line of sight, the size of the pupil, the mental state (whether the user is immersed in observing the displayed image, and the like), or even the physiological state.
  • the communication unit 405 performs communication processing, modulation and demodulation processing with an external device, and encoding and decoding processing of the communication signal.
  • the control unit 407 can be outward from the communication unit 405
  • the device transmits transmission data.
  • the communication method may be wired or wireless, such as mobile high-definition link (MHL) or universal serial bus (USB), high-definition multimedia interface (HDMI), wireless fidelity (Wi-Fi), Bluetooth communication, or low-power Bluetooth communication. And the mesh network of the IEEE802.11s standard.
  • communication unit 405 can be a cellular wireless transceiver that operates in accordance with Wideband Code Division Multiple Access (W-CDMA), Long Term Evolution (LTE), and the like.
  • W-CDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • the head mounted display device 400 can also include a storage unit, which is a mass storage device configured to have a solid state drive (SSD) or the like.
  • storage unit 406 can store applications or various types of data. For example, content viewed by the user using the head mounted display device 400 may be stored in the storage unit 406.
  • the head mounted display device 400 can also include a control unit, and the control unit 407 can include a computer processing unit (CPU) or other device having similar functionality.
  • control unit 407 can be used to execute an application stored by storage unit 406, or control unit 407 can also be used to perform the methods, functions, and operations disclosed in some embodiments of the present application.
  • the image processing unit 408 is for performing signal processing such as image quality correction related to the image signal output from the control unit 407, and converting its resolution into a resolution according to the screen of the display unit 401. Then, the display driving unit 409 sequentially selects each row of pixels of the display unit 401, and sequentially scans each row of pixels of the display unit 401 line by line, thereby providing pixel signals based on the signal-processed image signals.
  • the head mounted display device 400 can also include an external camera.
  • the external camera 410 may be disposed on the front surface of the body of the head mounted display device 400, and the external camera 410 may be one or more.
  • the external camera 410 can acquire three-dimensional information and can also be used as a distance sensor.
  • a position sensitive detector (PSD) or other type of distance sensor that detects reflected signals from the object can be used with the external camera 410.
  • PSD position sensitive detector
  • the external camera 410 and the distance sensor can be used to detect the body position, posture, and shape of the user wearing the head mounted display device 400. In addition, under certain conditions, the user can directly view or preview the real scene through the external camera 410.
  • the head mounted display device 400 may further include a sound processing unit, the sound portion
  • the processing unit 411 can perform sound quality correction or sound amplification of the sound signal output from the control unit 407, signal processing of the input sound signal, and the like. Then, the sound input/output unit 412 outputs the sound to the outside and the sound from the microphone after the sound processing.
  • the structure or component illustrated by the dashed line in FIG. 4 may be independent of the head mounted display device 400, for example, may be disposed in an external processing system (eg, a computer system) for use with the head mounted display device 400; or The structure or components shown by the dashed box may be disposed inside or on the surface of the head mounted display device 400.
  • an external processing system eg, a computer system
  • the embodiments of the electronic device described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, ie Located in one place, or distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.

Abstract

Provided are a method for recognizing a VR application program, and an electronic device. The method comprises: acquiring, from four corners of an interface image of an application program to be recognized, at least four reference image blocks of appointed sizes; determining, according to grayscale values of pixel points included in the at least four reference image blocks, whether the at least four reference image blocks are all black image blocks; if the at least four image blocks are all black image blocks, recognizing, according to grayscale values of pixel points included in the interface image, a black image area in the interface image; determining, according to grayscale values of pixel points included in the black image area, whether left and right parts of the black image area correspond to each other; and if the left and right parts of the black image area correspond to each other, determining that the application program to be recognized is a VR application program. By means of the technical solution provided in the present invention, a VR application program can be efficiently recognized from a large number of application programs.

Description

一种VR应用程序的识别方法及电子设备Method for identifying VR application and electronic device
交叉引用cross reference
本申请引用于2017年8月16日递交的名称为“一种VR应用程序的识别方法及电子设备”的第201710703519.X号中国专利申请,其通过引用被全部并入本申请。The present application is hereby incorporated by reference in its entirety in its entirety in its entirety in its entirety in its entirety in the the the the the the the the the the the
技术领域Technical field
本发明涉及虚拟现实技术领域,尤其涉及一种VR应用程序的识别方法及电子设备。The present invention relates to the field of virtual reality technologies, and in particular, to a method and an electronic device for identifying a VR application.
背景技术Background technique
VR(Virtual Reality,虚拟现实)技术是一种可以创建和体验虚拟世界的计算机仿真系统,它利用计算机生成一种模拟环境,并通过多源信息融合的、交互式的三维动态视景和实体行为的系统仿真使用户沉浸到该模拟环境中。VR (Virtual Reality) technology is a computer simulation system that can create and experience virtual worlds. It uses a computer to generate a simulation environment, and through interactive multi-source information, interactive 3D dynamic vision and physical behavior. The system simulation immerses the user in the simulation environment.
随着VR技术的日趋成熟,应用在VR模式下的应用程序不断涌现。如何从大量的应用程序中高效地识别出VR应用程序,成为一个亟待解决的技术问题。With the maturity of VR technology, applications that are applied in VR mode continue to emerge. How to efficiently identify VR applications from a large number of applications becomes a technical problem that needs to be solved urgently.
发明内容Summary of the invention
本发明提供一种VR应用程序的识别方法及电子设备,用以从大量的应用程序中,高效地识别出VR应用程序。The invention provides a method for identifying a VR application and an electronic device for efficiently identifying a VR application from a large number of applications.
本发明提供一种VR应用程序的识别方法,包括:The invention provides a method for identifying a VR application, comprising:
从待识别应用程序的界面图像的四角上,获取至少四个指定尺寸的参考图像块;Obtaining at least four reference image blocks of a specified size from four corners of the interface image of the application to be identified;
根据所述至少四个参考图像块包含的像素点的灰度值,判断所述至少四 个参考图像块是否均为黑色图像块;Determining the at least four according to a gray value of a pixel point included in the at least four reference image blocks Whether the reference image blocks are black image blocks;
若所述至少四个图像块均为黑色图像块,则根据所述界面图像包含的像素点的灰度值,识别所述界面图像中的黑色图像区;If the at least four image blocks are black image blocks, identifying a black image region in the interface image according to a gray value of a pixel point included in the interface image;
根据所述黑色图像区包含的像素点的灰度值,判断所述黑色图像区的左右两部分是否对应;Determining, according to the gray value of the pixel point included in the black image area, whether the left and right portions of the black image area correspond to each other;
若所述黑色图像区的左右两部分对应,则确定所述待识别应用程序为VR应用程序。If the left and right portions of the black image area correspond, it is determined that the to-be-identified application is a VR application.
进一步可选地,根据所述至少四个参考图像块包含的像素点的灰度值,判断所述至少四个参考图像块是否均为黑色图像块,包括:获取所述至少四个参考图像块中,灰度值小于指定灰度阈值的像素点的数量;计算所述灰度值小于指定灰度阈值的像素点的数量与所述至少四个参考图像块包含的像素点总数的比值;若所述比值大于或等于设定的比例阈值,则确定所述至少四个图像块均为黑色图像块。Further, determining whether the at least four reference image blocks are all black image blocks according to the gray value of the pixel points included in the at least four reference image blocks comprises: acquiring the at least four reference image blocks The number of pixels whose gray value is smaller than the specified gray threshold; the ratio of the number of pixels whose gray value is smaller than the specified gray threshold to the total number of pixels included in the at least four reference image blocks; The ratio is greater than or equal to the set ratio threshold, and then determining that the at least four image blocks are black image blocks.
进一步可选地,还包括:若所述至少四个参考图像块不都是黑色图像块,则确定所述待识别应用程序为非VR应用程序。Further optionally, the method further includes: if the at least four reference image blocks are not all black image blocks, determining that the to-be-identified application is a non-VR application.
进一步可选地,从待识别应用程序的界面图像的四角上,获取至少四个指定尺寸的参考图像块,包括:以所述界面图像的四个顶点分别为图像选取的起始点,在所述界面图像上选取指定尺寸的图像区域,以获得所述至少四个作为所述参考图像块。Further optionally, acquiring, from the four corners of the interface image of the application to be recognized, at least four reference image blocks of a specified size, including: starting points selected by the four vertices of the interface image as images, An image area of a specified size is selected on the interface image to obtain the at least four as the reference image block.
进一步可选地,根据所述界面图像包含的像素点的灰度值,识别所述界面图像中的黑色图像区,包括:在所述界面图像中,获取灰度值小于所述指定灰度阈值的像素点所在的区域;根据所述可疑黑色图像区包含的像素点的坐标,获取所述可疑黑色图像区的几何包络图;若所述几何包络图存在与所述界面图像的顶角重合的顶角或所述几何包络图的纵向中轴线与所述界面图像的纵向中轴线重合,则确定所述可疑黑色图像区属于所述界面图像的黑色图像区。Further, optionally, identifying the black image area in the interface image according to the gray value of the pixel point included in the interface image, comprising: acquiring, in the interface image, that the gray value is less than the specified gray threshold An area in which the pixel point is located; acquiring a geometric envelope map of the suspect black image area according to the coordinates of the pixel point included in the suspect black image area; if the geometric envelope image exists and the top angle of the interface image The coincident apex angle or the longitudinal center axis of the geometric envelope map coincides with the longitudinal center axis of the interface image, and it is determined that the suspect black image region belongs to the black image region of the interface image.
进一步可选的地,根据所述黑色图像区包含的像素点的灰度值,判断所 述黑色图像区的左右两部分是否对应,包括:根据所述黑色图像区包含的像素点的灰度值,判断所述黑色图像区是否沿所述界面图像的纵向中轴线对称。Further optionally, judging the gray value according to the pixel points included in the black image area Whether the left and right portions of the black image area correspond to each other includes: determining whether the black image area is symmetrical along a longitudinal central axis of the interface image according to a gray value of a pixel point included in the black image area.
进一步可选地,根据所述黑色图像区包含的像素点的灰度值,判断所述黑色图像区是否沿所述界面图像的纵向中轴线对称,包括:沿所述界面图像的纵向中轴线将所述黑色图像区划分为左右两个子图像区;根据所述两个子图像区包含的像素点的总数量以及灰度值相同的对称像素点的数量,计算所述两个子图像区的相似率;若所述相似率大于设定的相似度阈值,确定所述黑色图像区沿所述界面图像的纵向中轴线对称。Further optionally, determining whether the black image area is symmetrical along a longitudinal central axis of the interface image according to a gray value of a pixel point included in the black image area comprises: along a longitudinal central axis of the interface image The black image area is divided into two sub-image areas; the similarity rate of the two sub-image areas is calculated according to the total number of pixels included in the two sub-image areas and the number of symmetric pixel points having the same gray value; If the similarity ratio is greater than the set similarity threshold, it is determined that the black image area is symmetrical along a longitudinal center axis of the interface image.
进一步可选地,根据所述两个子图像区包含的像素点的总数量以及所述两个子图像区中灰度值相同的对称像素点的数量,计算所述两个子图像区的相似率,包括:以所述界面图像的横向中轴线为横坐标轴,以所述界面图像的纵向中轴线为纵坐标轴,建立坐标系;在所述两个子图像区中,获取纵坐标相同、横坐标相反的像素点,作为对称像素点;统计灰度值相同的对称像素点的数量,并获取所述两个子图像区包含的像素点的总数量的平均值;根据所述灰度值相同的对称像素点的数量与平均值的比值,确定所述两个子图像区的相似率。Further optionally, calculating a similarity ratio of the two sub-image regions according to a total number of pixels included in the two sub-image regions and a number of symmetric pixel points having the same gray value in the two sub-image regions, including : establishing a coordinate system with the horizontal central axis of the interface image as an abscissa axis and the longitudinal central axis of the interface image as an ordinate axis; in the two sub-image regions, obtaining the same ordinate and opposite the abscissa a pixel as a symmetric pixel; counting the number of symmetric pixel points having the same gray value, and obtaining an average of the total number of pixels included in the two sub-image regions; symmetric pixels having the same gray value The ratio of the number of points to the average value determines the similarity rate of the two sub-image areas.
本发明还提供一种VR应用程序识别电子设备,包括:存储器以及处理器;The present invention also provides a VR application identification electronic device, including: a memory and a processor;
所述存储器用于:存储一条或多条指令;所述处理器用于执行所述一条或多条计算机指令,以用于:从待识别应用程序的界面图像的四角上,获取至少四个指定尺寸的参考图像块;The memory is configured to: store one or more instructions; the processor is configured to execute the one or more computer instructions for: obtaining at least four specified sizes from four corners of an interface image of an application to be identified Reference image block;
根据所述至少四个参考图像块包含的像素点的灰度值,判断所述至少四个参考图像块是否均为黑色图像块;Determining, according to the gray value of the pixel point included in the at least four reference image blocks, whether the at least four reference image blocks are black image blocks;
若所述至少四个图像块均为黑色图像块,则根据所述界面图像包含的像素点的灰度值,识别所述界面图像中的黑色图像区;If the at least four image blocks are black image blocks, identifying a black image region in the interface image according to a gray value of a pixel point included in the interface image;
根据所述黑色图像区包含的像素点的灰度值,判断所述黑色图像区的左右两部分是否对应;Determining, according to the gray value of the pixel point included in the black image area, whether the left and right portions of the black image area correspond to each other;
若所述黑色图像区的左右两部分对应,则确定所述待识别应用程序为VR 应用程序。If the left and right parts of the black image area correspond, determining that the application to be identified is a VR application.
进一步可选地,所述处理器具体用于:获取所述至少四个参考图像块中,灰度值小于指定灰度阈值的像素点的数量;计算所述灰度值小于指定灰度阈值的像素点的数量与所述至少四个参考图像块包含的像素点总数的比值;若所述比值大于或等于设定的比例阈值,则确定所述至少四个图像块均为黑色图像块。Further, the processor is specifically configured to: acquire, in the at least four reference image blocks, a number of pixels whose gray value is smaller than a specified gray threshold; and calculate that the gray value is smaller than a specified gray threshold. a ratio of the number of pixels to the total number of pixels included in the at least four reference image blocks; if the ratio is greater than or equal to the set ratio threshold, determining that the at least four image blocks are black image blocks.
进一步可选地,所述处理器具体用于:在所述界面图像中,获取灰度值小于所述指定灰度阈值的像素点所在的区域作为可疑黑色图像区;根据所述可疑黑色图像区包含的像素点的坐标,获取所述可疑黑色图像区的几何包络图;若所述几何包络图存在与所述界面图像的顶角重合的顶角或所述几何包络图的纵向中轴线与所述界面图像的纵向中轴线重合,则确定所述可疑黑色图像区属于所述界面图像的黑色图像区。Further, the processor is specifically configured to: obtain, in the interface image, an area where a pixel point whose gray value is smaller than the specified gray level threshold is used as a suspicious black image area; according to the suspect black image area a coordinate of the included pixel, acquiring a geometric envelope of the suspect black image region; if the geometric envelope has an apex angle coincident with a vertex of the interface image or a longitudinal direction of the geometric envelope The axis coincides with the longitudinal center axis of the interface image, and it is determined that the suspect black image area belongs to the black image area of the interface image.
本发明提供的VR应用程序的识别方法及电子设备,通过判断待识别应用程序的界面图像四角上是否均为黑色图像块以初步筛选非VR应用程序,再进一步判断界面图像的左右两部分是否对应。进而可在判定界面图像的左右部分对应时,确定待识别应用程序为VR应用程序。该方法不受应用程序的包名或名称的限制,对VR应用的识别效率高。The VR application identification method and the electronic device provided by the present invention determine whether the left and right parts of the interface image correspond to each other by judging whether the black image block is a black image block at the four corners of the interface image of the application to be identified. . Further, when it is determined that the left and right portions of the interface image correspond, the application to be identified is determined to be a VR application. This method is not limited by the package name or name of the application, and the recognition efficiency of the VR application is high.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief description of the drawings used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any creative work.
图1a是本发明实施例提供的一VR应用程序的识别方法的流程示意图;1a is a schematic flowchart of a method for identifying a VR application according to an embodiment of the present invention;
图1b是VR应用程序的一界面图像的示意图;Figure 1b is a schematic diagram of an interface image of a VR application;
图2a是本发明实施例提供的另一VR应用程序的识别方法的流程示意 图;FIG. 2 is a schematic flowchart of another method for identifying a VR application according to an embodiment of the present invention; Figure
图2b是是本发明实施例提供的在界面图像四角上选取参考图像块的示意图;2b is a schematic diagram of selecting a reference image block at four corners of an interface image according to an embodiment of the present invention;
图2c是本发明实施例提供的在界面图像获取可疑黑色图像区的几何包络图的一示意图;2c is a schematic diagram of a geometric envelope diagram for acquiring a suspicious black image region in an interface image according to an embodiment of the present invention;
图2d是本发明实施例提供的在界面图像获取可疑黑色图像区的几何包络图的另一示意图;2d is another schematic diagram of acquiring a geometric envelope diagram of a suspicious black image area in an interface image according to an embodiment of the present invention;
图2e是本发明实施例提供的在界面图像上建立坐标系的示意图;2e is a schematic diagram of establishing a coordinate system on an interface image according to an embodiment of the present invention;
图3是本发明实施例提供的电子设备的结构示意图;3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
图4是本发明提供的一些实施例中头戴显示设备400的内部配置结构示意图。FIG. 4 is a schematic diagram showing the internal configuration of the head mounted display device 400 in some embodiments provided by the present invention.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. It is a partial embodiment of the invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
图1a是本发明实施例提供的一VR应用程序的识别方法的流程示意图,结合图1a,该方法包括:FIG. 1 is a schematic flowchart of a method for identifying a VR application according to an embodiment of the present invention. Referring to FIG. 1a, the method includes:
步骤101、从待识别应用程序的界面图像的四角上,获取至少四个指定尺寸的参考图像块。Step 101: Acquire at least four reference image blocks of a specified size from four corners of the interface image of the application to be identified.
步骤102、根据所述至少四个参考图像块包含的像素点的灰度值,判断所述至少四个参考图像块是否均为黑色图像块;若为是,执行步骤103;若为否,执行步骤106。 Step 102: Determine, according to the gray value of the pixel points included in the at least four reference image blocks, whether the at least four reference image blocks are black image blocks; if yes, perform step 103; if not, execute Step 106.
步骤103、根据所述界面图像包含的像素点的灰度值,识别所述界面图像中的黑色图像区。Step 103: Identify a black image area in the interface image according to a gray value of a pixel point included in the interface image.
步骤104、根据所述黑色图像区包含的像素点的灰度值,判断所述黑色图像区的左右两部分是否对应;若为是,执行步骤105;若为否,执行步骤106。Step 104: Determine whether the left and right portions of the black image region correspond according to the gray value of the pixel included in the black image region; if yes, execute step 105; if no, execute step 106.
步骤105、确定所述待识别应用程序为VR应用程序。Step 105: Determine that the to-be-identified application is a VR application.
步骤106、确定所述待识别应用程序为非VR应用程序。Step 106: Determine that the to-be-identified application is a non-VR application.
针对步骤101,待识别应用程序,可以是安装于VR设备上或手机等终端设备上的任一应用程序。界面图像,是待识别应用程序的任一界面的对应图像,包含待识别应用程序的界面样式以及界面元素等。针对VR设备,可进入应用商店或应用场景找到待识别应用程序,打开该待识别应用程序并获取待识别应用程序任一界面的界面图像。针对手机等终端设备,可在桌面上或者应用程序列表中找到待识别应用程序,打开该待识别应用程序并获取待识别应用程序任一界面的界面图像。通常,界面图像的形状为矩形,界面图像的四角,为界面图像的四个顶点附近的区域。本步骤中,可在界面图像的每一个角上,分别获取至少一个参考图像块。其中,参考图像块的尺寸是指定的,该指定尺寸与界面图像的尺寸相关联。For step 101, the application to be identified may be any application installed on a VR device or a terminal device such as a mobile phone. The interface image is a corresponding image of any interface of the application to be recognized, and includes an interface style and an interface element of the application to be recognized. For the VR device, the application store or the application scenario can be accessed to find the application to be identified, the application to be recognized is opened, and the interface image of any interface of the application to be recognized is obtained. For a terminal device such as a mobile phone, the application to be identified can be found on the desktop or in the application list, and the application to be recognized is opened and an interface image of any interface of the application to be recognized is obtained. Generally, the shape of the interface image is a rectangle, and the four corners of the interface image are the areas near the four vertices of the interface image. In this step, at least one reference image block may be acquired at each corner of the interface image. Wherein, the size of the reference image block is specified, and the specified size is associated with the size of the interface image.
针对步骤102,通常,VR应用程序的显示界面包含内容图像区和黑色图像区。内容图像区用于展示VR内容或VR应用程序的界面信息,黑色图像区为非内容图像区。为了让用户观看时产生立体纵深感,VR应用程序的显示界面包含与用户左右眼连线方向平行的两个内容图像区。可以认为,在VR应用程序的矩形的界面图像中,除去两个内容图像区,剩余的部分即为黑色图像区。图2b为VR应用程序的一界面图像的示意图,在图1b中,网格部分为内容图像区,网格之外的部分为黑色图像区。For step 102, typically, the display interface of the VR application includes a content image area and a black image area. The content image area is used to display interface information of the VR content or the VR application, and the black image area is a non-content image area. In order to allow the user to have a stereoscopic sense of depth when viewed, the display interface of the VR application includes two content image areas that are parallel to the direction in which the user's left and right eyes are connected. It can be considered that in the rectangular interface image of the VR application, the two content image areas are removed, and the remaining part is the black image area. 2b is a schematic diagram of an interface image of the VR application. In FIG. 1b, the mesh portion is a content image area, and the portion outside the mesh is a black image area.
如图1b所示,为了让用户观看时产生真实的沉浸感,两个内容图像区均存在一定程度上的桶形畸变。进而,这种桶形畸变导致VR应用程序的界面图像的四个角一定是黑色。非VR应用程序的界面图像中,图像的四个角不一定是黑色的。因此,本实施例可通过判断界面图像的四个角上的参考图像块是 否均为黑色,来初步筛选出非VR应用程序。As shown in FIG. 1b, in order to make the user feel a real immersion when viewing, both content image areas have a certain degree of barrel distortion. Furthermore, this barrel distortion causes the four corners of the interface image of the VR application to be black. In the interface image of a non-VR application, the four corners of the image are not necessarily black. Therefore, the embodiment can determine that the reference image block on the four corners of the interface image is No black, to initially screen out non-VR applications.
黑色图像包含的像素点的灰度值通常较小,通常在0-10之间。因此,可选的,在获取至少四个参考图像块之后,可根据每一个参考图像块包含的像素点的灰度值,判断该参考图像块是不是黑色图像块以实现非VR应用的初步筛选。The black image contains pixels with a gray value that is usually small, usually between 0-10. Therefore, optionally, after acquiring at least four reference image blocks, determining, according to the gray value of the pixel points included in each reference image block, whether the reference image block is a black image block to implement preliminary screening of non-VR applications .
针对步骤103,在一种可能的情形下,非VR应用程序的界面图像也可能存在四角全是黑色的情况。因此,如果步骤101获取到的至少四个参考图像块不均为黑色图像块,可认为该界面图像为非VR应用程序的界面图像。如果步骤101获取到的至少四个参考图像块均为黑色图像块,则可认为该界面图像有可能是VR应用程序的界面图像。但还需要进一步确定该界面图像确实为VR应用程序的界面图像。For step 103, in one possible scenario, the interface image of the non-VR application may also have a case where all four corners are black. Therefore, if at least four reference image blocks acquired in step 101 are not all black image blocks, the interface image may be considered as an interface image of a non-VR application. If at least four reference image blocks acquired in step 101 are black image blocks, the interface image may be considered to be an interface image of the VR application. However, it is necessary to further determine that the interface image is indeed an interface image of the VR application.
可选的,本实施例中,可结合界面图像中的黑色图像区左右两个部分相对应的特征,进一步确定该界面图像确实为VR应用程序的界面图像。在对黑色图像区的左右部分进行对应性判断之前,可先根据界面图像包含的像素点的灰度值,识别界面图像中的黑色图像区。Optionally, in this embodiment, the interface image is determined to be an interface image of the VR application according to the corresponding features of the left and right portions of the black image area in the interface image. Before performing the correspondence determination on the left and right portions of the black image area, the black image area in the interface image may be identified according to the gray value of the pixel points included in the interface image.
针对步骤104,针对VR应用程序而言,VR应用程序展示的界面为双屏界面,左右屏分别对应用户左眼和右眼的位置。进而,在同一时刻,用户左眼和右眼看到的显示内容不同以产生强烈的立体纵深感。进而,可认为:若一界面图像为VR应用的界面图像,则该界面图像中的黑色图像区的左右部分一定是对应的。For step 1024, for the VR application, the interface displayed by the VR application is a dual screen interface, and the left and right screens respectively correspond to the positions of the left eye and the right eye of the user. Further, at the same time, the display contents seen by the left and right eyes of the user are different to produce a strong stereoscopic depth. Furthermore, it can be considered that if an interface image is an interface image of a VR application, the left and right portions of the black image area in the interface image must correspond.
若一图像区的左右部分对应,则该图像区的左右两部分中,位置对应的像素点的灰度值一定相同。因此,可选的,本步骤可通过界面图像的黑色图像区包含的像素点的灰度值,判断该界面图像的左右两部分是否对应。若对应,则可确定该待识别应用程序为VR应用程序,否则为非VR应用程序。If the left and right parts of an image area correspond, the gray values of the corresponding pixel points in the left and right parts of the image area must be the same. Therefore, optionally, this step can determine whether the left and right portions of the interface image correspond to each other by the gray value of the pixel point included in the black image area of the interface image. If so, it can be determined that the application to be identified is a VR application, otherwise it is a non-VR application.
本实施例中,通过判断待识别应用程序的界面图像四角上是否均为黑色图像块以初步筛选非VR应用程序,再进一步判断界面图像的左右两部分是否对应。进而可在判定界面图像的左右部分对应时,确定待识别应用程 序为VR应用程序。该方法不受应用程序的包名或名称的限制,对VR应用的识别效率高。In this embodiment, by determining whether the four corners of the interface image of the application to be identified are all black image blocks to initially screen the non-VR application program, it is further determined whether the left and right portions of the interface image correspond. Further, when determining the corresponding left and right portions of the interface image, the application to be identified is determined. The order is a VR application. This method is not limited by the package name or name of the application, and the recognition efficiency of the VR application is high.
需要说明的是,在本发明的上述或下述实施例中,界面图像,可以是针对待识别应用程序任一界面进行截屏得到的截屏图像,也可以是针对待识别应用程序任一界面的进行拍摄得到的拍摄图像。以下部分将以待识别对象界面的截屏图像为例,对本发明实施例的技术方案进行进一步阐述。It should be noted that, in the foregoing or the following embodiments of the present invention, the interface image may be a screen capture image obtained by taking a screen shot for any interface of the application to be identified, or may be performed on any interface of the application to be identified. Take the captured image. The technical solution of the embodiment of the present invention is further described in the following section by taking a screen shot image of the object to be identified as an example.
图2a是本发明实施例提供的另一VR应用程序的识别方法的流程示意图,结合图2a,该方法包括:FIG. 2 is a schematic flowchart of another method for identifying a VR application according to an embodiment of the present invention. Referring to FIG. 2a, the method includes:
步骤201、从待识别应用程序的截屏图像的四角上,获取至少四个指定尺寸的参考图像块;Step 201: Obtain at least four reference image blocks of a specified size from four corners of the screen capture image of the application to be identified;
步骤202、获取所述至少四个参考图像块中,灰度值小于指定灰度阈值的像素点的数量;Step 202: Acquire, in the at least four reference image blocks, a number of pixels whose gray value is smaller than a specified gray threshold;
步骤203、计算所述灰度值小于指定灰度阈值的像素点的数量与所述至少四个参考图像块包含的像素点总数的比值。Step 203: Calculate a ratio of a number of pixel points whose gray value is smaller than a specified gray level threshold to a total number of pixel points included in the at least four reference image blocks.
步骤204、判断所述比值是否小于设定的比例阈值,若为是,执行步骤210;若为否,执行步骤205。Step 204: Determine whether the ratio is less than a set proportional threshold. If yes, go to step 210; if no, go to step 205.
步骤205、根据所述截屏图像包含的像素点的灰度值,识别所述截屏图像中的黑色图像区。Step 205: Identify a black image area in the screen capture image according to a gray value of a pixel point included in the screen capture image.
步骤206、沿所述截屏图像的纵向中轴线将所述黑色图像区划分为左右两个子图像区; Step 206, dividing the black image area into two left and right sub-image areas along a longitudinal central axis of the screen capture image;
步骤207、根据所述两个子图像区包含的像素点的总数量以及灰度值相同的对称像素点的数量,计算所述两个子图像区的相似率;Step 207: Calculate a similarity ratio of the two sub-image regions according to a total number of pixels included in the two sub-image regions and a number of symmetric pixel points with the same gray value.
步骤208、根据所述两个子图像区的相似率,判断所述黑色图像区是否沿所述截屏图像的纵向中轴线对称;若为是,执行步骤209;若为否,执行步骤210。Step 208: Determine, according to the similarity ratio of the two sub-image regions, whether the black image region is symmetric along a longitudinal central axis of the screen capture image; if yes, perform step 209; if no, perform step 210.
步骤209、确定所述待识别应用程序为VR应用程序。 Step 209: Determine that the to-be-identified application is a VR application.
步骤210、确定所述待识别应用程序为非VR应用程序。Step 210: Determine that the to-be-identified application is a non-VR application.
针对步骤201,从待识别应用程序的截屏图像的四角上,获取至少四个指定尺寸的参考图像块时,可以将截屏图像的四个顶点作为图像选取的起始点,在截屏图像上选取指定尺寸的图像区域,获得所述至少四个参考图像块。For step 201, when at least four reference image blocks of a specified size are acquired from the four corners of the screen capture image of the application to be identified, the four vertices of the screen capture image may be used as a starting point for image selection, and the specified size is selected on the screen capture image. The image area obtains the at least four reference image blocks.
可选的,在本实施例中,为提升识别效率,减少识别过程中的计算量,可在截屏图像的每一个角上只取一个正方形的参考图像块。如图2b所示,在截屏图像上选取四个参考图像块rect1、rect2、rect3以及rect4,每个参考图像块的顶点均与截屏图像的顶点重合。Optionally, in this embodiment, in order to improve the recognition efficiency and reduce the calculation amount in the recognition process, only one square reference image block may be taken at each corner of the screen capture image. As shown in FIG. 2b, four reference image blocks rect1, rect2, rect3, and rect4 are selected on the screen image, and the vertices of each reference image block coincide with the vertices of the screen image.
本步骤中,以截屏图像的顶点为图像选取起始点的优势在于,针对内容图像区畸变程度不同的截屏图像,能够减小取到的参考图像块中包含内容图像的可能性,进一步提升黑色图像块的识别准确性。In this step, the advantage of selecting the starting point of the vertices of the screen image as the image is that, for the screen image with different degrees of distortion of the content image area, the possibility of including the content image in the reference image block can be reduced, and the black image is further improved. The accuracy of the block identification.
例如,一VR应用程序界面上的内容图像区畸变程度较大,导致VR应用程序的界面上四个角的黑色图像区较小。此时,以截屏图像的顶点为图像选取的起始点可以避免选取到内容图像区的像素点。For example, the content image area on a VR application interface is highly distorted, resulting in a smaller black image area at the four corners of the VR application interface. At this time, the starting point selected by the vertex of the screen image as the image can avoid the pixel points selected to the content image area.
可选的,指定尺寸与截屏图像的尺寸相关联。经反复试验,当指定尺寸为截屏图像尺寸的十分之一时,选取到的参考图像块的有效性较高,但本发明实施例并不限制指定尺寸的大小。Optionally, the specified size is associated with the size of the screenshot image. After trial and error, when the specified size is one tenth of the size of the screen image, the selected reference image block is more effective, but the embodiment of the present invention does not limit the size of the specified size.
针对步骤202,获取到至少四个参考图像块之后,可获取该至少四个参考图像块中,灰度值小于指定灰度阈值的像素点的数量C。其中,指定的灰度值阈值很小,通常为个位数。For step 202, after acquiring at least four reference image blocks, the number C of pixels of the at least four reference image blocks whose gray value is smaller than the specified gray threshold may be acquired. Among them, the specified gray value threshold is small, usually a single digit.
当截屏图像为RGB色彩格式的图像时,判断参考图像块中的像素点的灰度值是否小于指定灰度阈值时,可先获取该像素点的灰度值。When the screen image is an image in the RGB color format, if it is determined whether the gray value of the pixel in the reference image block is less than the specified gray threshold, the gray value of the pixel may be acquired first.
可选的,获取参考图像块包含的像素点的灰度值可采用下列可选方法:Optionally, obtaining the gray value of the pixel included in the reference image block may adopt the following optional methods:
1、浮点算法:Gray=R*0.3+G*0.59+B*0.11;1, floating point algorithm: Gray = R * 0.3 + G * 0.59 + B * 0.11;
2、整数方法:Gray=(R*30+G*59+B*11)/100;2. Integer method: Gray=(R*30+G*59+B*11)/100;
3、移位方法:Gray=(R*28+G*151+B*77)>>8;3. Shift method: Gray=(R*28+G*151+B*77)>>8;
4、平均值法:Gray=(R+G+B)/3; 4. Average method: Gray=(R+G+B)/3;
5、仅取绿色法:Gray=G。5. Take only the green method: Gray=G.
其中,R、G、B分别为参考图像块上任一像素点在红、绿、蓝三个颜色分量上的取值,Gray为计算得到的该像素点灰度值。Where R, G, and B are the values of any pixel on the reference image block on the three color components of red, green, and blue, respectively, and Gray is the calculated gray value of the pixel.
针对步骤203,计算灰度值小于指定灰度阈值的像素点的数量C与参考图像块包含的像素点总数的比值P1,可采用如下公式:For step 203, the ratio P1 of the number of pixel points whose gray value is smaller than the specified gray level threshold to the total number of pixel points included in the reference image block is calculated, and the following formula can be used:
Figure PCTCN2017103193-appb-000001
Figure PCTCN2017103193-appb-000001
其中,a为参考图像块的长度方向包含的像素点数,b为参考图像块的高度方向包含的像素点数,N为参考图像块的总个数,N≥4。Where a is the number of pixels included in the longitudinal direction of the reference image block, b is the number of pixels included in the height direction of the reference image block, and N is the total number of reference image blocks, N ≥ 4.
针对步骤204,在本实施例中,优选的,设定的比例阈值为99%时,黑色图像块的识别效率以及准确率较高。也就是说,若P1大于99%,则可确定步骤201中获取到的至少四个参考图像块均为黑色图像块。For step 204, in the present embodiment, preferably, when the set proportional threshold is 99%, the recognition efficiency and accuracy of the black image block are high. That is, if P1 is greater than 99%, it may be determined that at least four reference image blocks acquired in step 201 are black image blocks.
针对步骤205、截屏图像中的黑色图像区,指的是截屏图像中除内容图像区之外的部分。若要识别出该部分,可先从截屏图像中,识别出灰度值小于所述指定灰度阈值的像素点所在的可疑黑色图像区,再从可疑黑色图像区中区分出黑色图像区。For the step 205, the black image area in the screen shot image refers to a portion of the screen shot image other than the content image area. To identify the portion, the suspicious black image region in which the grayscale value is smaller than the specified grayscale threshold is identified from the screen capture image, and the black image region is distinguished from the suspect black image region.
在一种可能的情形下,截屏图像的内容图像区中展示的图像内容存在黑色部分,这些黑色部分包含的像素点的灰度值也小于指定灰度阈值。因而,所述可疑黑色图像区,可能包含内容图像区中的黑色部分。可选的,为提升VR应用程序识别的准确性,在本实施例中,可以采用如下的方法从可疑黑色图像区中,识别截屏图像的黑色图像区:In one possible case, the image content displayed in the content image area of the screen shot image has black portions, and the black portion contains pixel points whose gray value is also smaller than the specified gray scale threshold. Thus, the suspect black image area may contain black portions in the content image area. Optionally, in order to improve the accuracy of the VR application identification, in the embodiment, the black image area of the screen capture image may be identified from the suspect black image area by using the following method:
首先,针对每一个可疑黑色图像区,可采用规则的几何图形,画出该可疑黑色图像区的最大轮廓,作为该可疑黑色图像区的几何包络图。可选的,在画可疑黑色图像区的几何包络图时,可先计算可疑黑色图像区中,像素点的横坐标的最大值、横坐标的最小值、纵坐标的最大值以及纵坐标的最小值,并由这四个最值确定可疑黑色图像区的几何包络图。First, for each suspicious black image area, a regular geometric figure can be used to draw the maximum contour of the suspect black image area as a geometric envelope of the suspect black image area. Optionally, when drawing the geometric envelope diagram of the suspect black image area, the maximum value of the abscissa of the pixel, the minimum value of the abscissa, the maximum value of the ordinate, and the ordinate of the pixel in the suspect black image area may be calculated first. The minimum value, and the geometric envelope diagram of the suspect black image area is determined by these four maximum values.
其次,在确定可疑黑色图像区的几何包络图后,判断所述几何包络图是 否存在与所述截屏图像的顶角重合的顶角,或判断所述几何包络图的纵向中轴线是否与所述截屏图像的纵向中轴线重合。若判定所述几何包络图存在与所述截屏图像的顶角重合的顶角,或判定所述几何包络图的纵向中轴线与所述截屏图像的纵向中轴线重合,则可确定所述可疑黑色图像区属于所述截屏图像的黑色图像区。以下部分将结合图2c以及图2d进一步阐述本实施例提供的黑色图像区的识别方法。Secondly, after determining the geometric envelope map of the suspect black image area, determining that the geometric envelope map is There is an apex angle that coincides with the apex angle of the screen shot image, or whether the longitudinal center axis of the geometric envelope map coincides with the longitudinal center axis of the screen shot image. Determining that if the geometric envelope map has an apex angle that coincides with a vertex angle of the screen shot image, or determines that a longitudinal central axis of the geometric envelope map coincides with a longitudinal central axis of the screen capture image The suspicious black image area belongs to the black image area of the screen shot image. The following part will further explain the method for identifying the black image area provided by the embodiment in conjunction with FIG. 2c and FIG. 2d.
图2c是本发明实施例提供的在截屏图像获取可疑黑色图像的几何包络图的一示意图。图2c中的5个阴影区域为可疑黑色图像区,几何包络图1-几何包络图5分别是图2c中的可疑黑色图像区对应的几何包络图。在图2c中,几何包络图1的四个顶角均与截屏图像的顶角重合,且几何包络图1的纵向中轴线与截屏图像的纵向中轴线重合。因此,可认为几何包络图1对应的可疑黑色图像区是截屏图像的黑色图像区。几何包络图2-几何包络图5的任意顶角均不与截屏图像的顶角重合,且几何包络图2-几何包络图5的纵向中轴线均不与截屏图像的纵向中轴线重合。因此,可认为几何包络图1对应的可疑黑色图像区属于截屏图像的内容图像区。2c is a schematic diagram of a geometric envelope diagram for acquiring a suspicious black image in a screen capture image according to an embodiment of the present invention. The five shaded areas in Fig. 2c are suspect black image areas, and the geometric envelope Fig. 1 - geometric envelope Fig. 5 are the geometric envelope diagrams corresponding to the suspect black image areas in Fig. 2c, respectively. In Figure 2c, the four apex angles of the geometric envelope 1 coincide with the apex angle of the screen image, and the longitudinal center axis of the geometric envelope 1 coincides with the longitudinal center axis of the screen image. Therefore, it can be considered that the suspicious black image area corresponding to the geometric envelope diagram 1 is the black image area of the screen shot image. Geometric Envelope Figure 2 - Geometry Envelope Figure 5 does not coincide with the apex angle of the screen image, and the geometric envelope diagram 2 - the longitudinal center axis of the geometric envelope diagram 5 does not correspond to the longitudinal center axis of the screen image coincide. Therefore, it can be considered that the suspicious black image area corresponding to the geometric envelope diagram 1 belongs to the content image area of the screen capture image.
图2d是本发明实施例提供的在截屏图像获取可疑黑色图像区的几何包络图的另一示意图。图2d所示的情形下,内容图像区的畸变程度较大,内容图像区的边界与截屏图像的边界相切。在图2d中,共有A1-A10共10个可疑黑色图像区。在图2d中,A1-A4对应的几何包络图,均存在一顶角与截屏图像的顶角重合,则可认为可疑黑色图像区A1-A4属于截屏图像的黑色图像区。图2d中,A5和A6的纵向中轴线均与截屏图像的纵向中轴线重合,则可认为可疑黑色图像区A5和A6属于截屏图像的黑色图像区。而A7-A10的任意顶角均不与截屏图像的顶角重合,且任意纵向中轴线均不与截屏图像的纵向中轴线重合。因此,可认为可疑黑色图像区A7-A10属于截屏图像的内容图像区。FIG. 2d is another schematic diagram of acquiring a geometric envelope diagram of a suspicious black image area in a screen capture image according to an embodiment of the present invention. In the case shown in Fig. 2d, the degree of distortion of the content image area is large, and the boundary of the content image area is tangent to the boundary of the screen image. In Fig. 2d, there are a total of 10 suspect black image areas of A1-A10. In FIG. 2d, the geometric envelope diagram corresponding to A1-A4 has a apex angle coincident with the apex angle of the screen image, and the suspect black image area A1-A4 may be considered to belong to the black image area of the screen capture image. In Fig. 2d, the longitudinal central axes of A5 and A6 coincide with the longitudinal central axis of the screen image, and the suspect black image areas A5 and A6 may be considered to belong to the black image area of the screen image. The apex angle of the A7-A10 does not coincide with the apex angle of the screen image, and any longitudinal central axis does not coincide with the longitudinal center axis of the screen image. Therefore, the suspicious black image area A7-A10 can be considered to belong to the content image area of the screen shot image.
针对步骤206,识别出黑色图像区后,沿纵向中轴线将所述黑色图像区划分为左右两个子图像区。 For step 206, after the black image area is identified, the black image area is divided into two left and right sub-image areas along the longitudinal center axis.
待测应用程序安装在VR设备上,或安装在内嵌于VR设备内的手机上以供用户双眼观看。故,获取到的待测应用程序的截屏图像的较长边为与用户左右眼连线方向平行的边。纵向中轴线是与截屏图像较长边垂直的中轴线,该纵向中轴线能够将截屏图像分为左右均等的两部分。也就是说,若截屏图像的长高分别为w、h,则纵向中轴线沿(w/2,0)以及(w/2,h)的连线方向。The application to be tested is installed on the VR device or installed on the mobile phone embedded in the VR device for the user to view with both eyes. Therefore, the longer side of the captured image of the application to be tested is the side parallel to the direction in which the left and right eyes of the user are connected. The longitudinal center axis is a central axis perpendicular to the longer side of the screen image, and the longitudinal center axis is capable of dividing the screen image into two equal parts. That is to say, if the lengths of the screen images are w and h, respectively, the longitudinal center axis is along the line direction of (w/2, 0) and (w/2, h).
针对步骤207、将所述黑色图像区划分为左右两部分后,可以所述截屏图像的横向中轴线为横坐标轴x,以所述截屏图像的纵向中轴线为纵坐标轴y,建立如图2e所示的坐标系x0y。After step 207, the black image area is divided into two parts, the horizontal central axis of the screen image is the horizontal axis x, and the longitudinal central axis of the screen image is the vertical axis y. The coordinate system x0y shown in 2e.
基于该坐标系,在所述两个子图像区中,获取纵坐标相同、横坐标相反的像素点,作为对称像素点,例如图2e中的像素点A(-x1,y1)以及像素点B(x1,y1)。Based on the coordinate system, in the two sub-image regions, pixels having the same ordinate and opposite abscissa are acquired as symmetric pixel points, such as pixel points A (-x1, y1) and pixel points B in FIG. 2e ( X1, y1).
统计灰度值相同的对称像素点的数量并获取所述两个子图像区包含的像素点的总数量的平均值。The number of symmetric pixel points having the same gray value is counted and the average of the total number of pixel points included in the two sub-image areas is obtained.
根据所述灰度值相同的对称像素点的数量与所述像素点总数量的平均值的比值,可确定所述两个子图像区的相似率P2。其中,相似率的计算公式可如下所示:The similarity ratio P2 of the two sub-image regions may be determined according to a ratio of the number of symmetric pixel points having the same gray value to the average of the total number of pixel points. Among them, the calculation formula of the similarity rate can be as follows:
Figure PCTCN2017103193-appb-000002
Figure PCTCN2017103193-appb-000002
其中,M为灰度值相同的对称像素点的数量,Ci为第i个黑色区域的像素点数量,
Figure PCTCN2017103193-appb-000003
为所述两个子图像区包含的像素点的总数量,n为所述两个子图像区包含的黑色图像区的数量。
Where M is the number of symmetric pixel points with the same gray value, and Ci is the number of pixel points of the i-th black region.
Figure PCTCN2017103193-appb-000003
For the total number of pixels included in the two sub-image regions, n is the number of black image regions contained in the two sub-image regions.
若所述相似率大于设定的相似度阈值,确定所述黑色图像区沿所述截屏图像的纵向中轴线对称。其中,设定的相似度阈值可以为99%,即在P2大于99%时,确定所述黑色图像区沿所述截屏图像的纵向中轴线对称。If the similarity rate is greater than a set similarity threshold, it is determined that the black image area is symmetrical along a longitudinal center axis of the screen shot image. Wherein, the set similarity threshold may be 99%, that is, when P2 is greater than 99%, it is determined that the black image area is symmetrical along the longitudinal central axis of the screen image.
本实施例中,首先判断待识别应用程序的截屏图像四角上是否均为黑色图像块,再进一步判断截屏图像的对称性,进而可确定截屏图像上是否包含双屏的桶形畸变。基于对截屏图像上是否包含双屏的桶形畸变的判断 结果,可确定待识别应用程序是否为VR应用程序。该方法不受应用程序的包名或名称的限制,对VR应用的识别准确率高且效率高。进而,当用户在VR设备上使用非VR应用程序时,可快速识别出非VR应用程序并及时提醒用户以提升用户体验。In this embodiment, it is first determined whether the four corners of the screen image of the application to be identified are black image blocks, and then the symmetry of the screen image is further determined, thereby determining whether the screen image includes a double-screen barrel distortion. Judging based on the barrel distortion of a double screen on a screen capture image As a result, it can be determined whether the application to be identified is a VR application. This method is not limited by the package name or name of the application, and has high recognition accuracy and high efficiency for the VR application. Furthermore, when the user uses a non-VR application on the VR device, the non-VR application can be quickly identified and the user is promptly reminded to enhance the user experience.
图3是本发明实施例提供的电子设备的结构示意图,结合图3,该电子设备包括:存储器301以及处理器302。3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. Referring to FIG. 3, the electronic device includes a memory 301 and a processor 302.
其中,所述存储器301用于:存储一条或多条指令。The memory 301 is configured to: store one or more instructions.
所述处理器302用于调用执行所述一条或多条指令以用于:从待识别应用程序的界面图像的四角上,获取至少四个指定尺寸的参考图像块;根据所述至少四个参考图像块包含的像素点的灰度值,判断所述至少四个参考图像块是否均为黑色图像块;若所述至少四个图像块均为黑色图像块,则根据所述界面图像包含的像素点的灰度值,识别所述界面图像中的黑色图像区;根据所述黑色图像区包含的像素点的灰度值,判断所述黑色图像区的左右两部分是否对应;若所述黑色图像区的左右两部分对应,则确定所述待识别应用程序为VR应用程序。The processor 302 is configured to invoke to execute the one or more instructions for: acquiring, from the four corners of the interface image of the application to be identified, at least four reference image blocks of a specified size; according to the at least four references a gray value of a pixel included in the image block, determining whether the at least four reference image blocks are black image blocks; if the at least four image blocks are black image blocks, according to the pixels included in the interface image a gray value of the point, identifying a black image area in the interface image; determining, according to a gray value of the pixel point included in the black image area, whether the left and right portions of the black image area correspond; if the black image The two parts of the area correspond to each other, and then the application to be identified is determined to be a VR application.
进一步可选地,所述处理器302具体用于:获取所述至少四个参考图像块中,灰度值小于指定灰度阈值的像素点的数量;计算所述灰度值小于指定灰度阈值的像素点的数量与所述至少四个参考图像块包含的像素点总数的比值;若所述比值大于或等于设定的比例阈值,则确定所述至少四个图像块均为黑色图像块。Further, the processor 302 is specifically configured to: acquire, in the at least four reference image blocks, a number of pixels whose gray value is smaller than a specified gray threshold; and calculate the gray value to be smaller than a specified gray threshold. The ratio of the number of pixels to the total number of pixels included in the at least four reference image blocks; if the ratio is greater than or equal to the set ratio threshold, determining that the at least four image blocks are all black image blocks.
进一步可选地,所述处理器302具体用于:以所述界面图像的四个顶点分别为图像选取的起始点,在所述界面图像上选取指定尺寸的图像区域,以获得所述至少四个作为所述参考图像块。Further, the processor 302 is specifically configured to: select, by using four vertices of the interface image, a starting point of an image, and select an image area of a specified size on the interface image to obtain the at least four As the reference image block.
进一步可选地,所述处理器302具体用于:在所述界面图像中,获取灰度值小于所述指定灰度阈值的像素点所在的区域作为可疑黑色图像区;根据所述可疑黑色图像区包含的像素点的坐标,获取所述可疑黑色图像区的几何 包络图;若所述几何包络图存在与所述界面图像的顶角重合的顶角或所述几何包络图的纵向中轴线与所述界面图像的纵向中轴线重合,则确定所述可疑黑色图像区属于所述界面图像的黑色图像区。Further, the processor 302 is specifically configured to: in the interface image, obtain an area where a pixel point whose gray value is smaller than the specified gray level threshold is used as a suspicious black image area; according to the suspect black image The coordinates of the pixel points included in the region, and the geometry of the suspect black image region is obtained. An envelope map; if the geometric envelope map has an apex angle coincident with a vertex angle of the interface image or a longitudinal central axis of the geometric envelope map coincides with a longitudinal central axis of the interface image, determining the The suspicious black image area belongs to the black image area of the interface image.
进一步可选地,根据所述黑色图像区包含的像素点的灰度值,判断所述黑色图像区的左右两部分是否对应,包括:根据所述黑色图像区包含的像素点的灰度值,判断所述黑色图像区是否沿所述界面图像的纵向中轴线对称。Further, determining whether the left and right portions of the black image area correspond to each other according to the gray value of the pixel point included in the black image area comprises: according to the gray value of the pixel point included in the black image area, It is determined whether the black image area is symmetrical along a longitudinal center axis of the interface image.
进一步可选地,所述处理器302具体用于:沿所述界面图像的纵向中轴线将所述黑色图像区划分为左右两个子图像区;根据所述两个子图像区包含的像素点的总数量以及灰度值相同的对称像素点的数量,计算所述两个子图像区的相似率;若所述相似率大于设定的相似度阈值,确定所述黑色图像区沿所述界面图像的纵向中轴线对称。Further optionally, the processor 302 is specifically configured to: divide the black image area into two left and right sub-image areas along a longitudinal central axis of the interface image; and total pixels according to the two sub-image areas Calculating a similarity rate of the two sub-image regions by the number of symmetric pixel points having the same number and gray value; and determining the black image region along the longitudinal direction of the interface image if the similarity ratio is greater than a set similarity threshold The central axis is symmetrical.
进一步可选地,所述处理器302具体用于:以所述界面图像的横向中轴线为横坐标轴,以所述界面图像的纵向中轴线为纵坐标轴,建立坐标系;在所述两个子图像区中,获取纵坐标相同、横坐标相反的像素点,作为对称像素点;统计灰度值相同的对称像素点的数量并获取所述两个子图像区包含的像素点的总数量的平均值;根据所述灰度值相同的对称像素点的数量与所述像素点总数量的平均值的比值,确定所述两个子图像区的相似率。Further, the processor 302 is specifically configured to: establish a coordinate system by using a horizontal central axis of the interface image as an axis of abscissa and a longitudinal axis of the interface image as an ordinate axis; In the sub-image area, obtain pixel points with the same ordinate and opposite abscissa as symmetric pixel points; count the number of symmetric pixel points with the same gray value and obtain the average of the total number of pixels included in the two sub-image areas a value; determining a similarity ratio of the two sub-image regions according to a ratio of the number of symmetric pixel points having the same gray value to the average of the total number of pixel points.
本实施例中,通过判断待识别应用程序的界面图像四角上是否均为黑色图像块以初步筛选非VR应用程序,再进一步判断界面图像的左右两部分是否对应。进而可在判定界面图像的左右部分对应时,确定待识别应用程序为VR应用程序。该方法不受应用程序的包名或名称的限制,对VR应用的识别效率高。In this embodiment, by determining whether the four corners of the interface image of the application to be identified are all black image blocks to initially screen the non-VR application program, it is further determined whether the left and right portions of the interface image correspond. Further, when it is determined that the left and right portions of the interface image correspond, the application to be identified is determined to be a VR application. This method is not limited by the package name or name of the application, and the recognition efficiency of the VR application is high.
本发明一些实施例提供的电子设备可以为外接式头戴显示设备或者一体式头戴显示设备,其中外接式头戴显示设备需要与外部处理系统(例如计算机处理系统)配合使用。The electronic device provided by some embodiments of the present invention may be an external head mounted display device or an integrated head mounted display device, wherein the external head mounted display device needs to be used in conjunction with an external processing system (eg, a computer processing system).
图4示出了一些实施例中头戴显示设备400的内部配置结构示意图。FIG. 4 shows a schematic diagram of the internal configuration of the head mounted display device 400 in some embodiments.
显示单元401可以包括显示面板,显示面板设置在头戴显示设备400 上面向用户面部的侧表面,可以为一整块面板、或者为分别对应用户左眼和右眼的左面板和右面板。显示面板可以为电致发光(EL)元件、液晶显示器或具有类似结构的微型显示器、或者视网膜可直接显示或类似的激光扫描式显示器。The display unit 401 may include a display panel that is disposed on the head mounted display device 400 The side surface facing the user's face may be a whole panel or a left panel and a right panel corresponding to the left and right eyes of the user, respectively. The display panel may be an electroluminescence (EL) element, a liquid crystal display or a microdisplay having a similar structure, or a laser-scanned display in which the retina may be directly displayed or similar.
虚拟图像光学单元402以放大方式拍摄显示单元401所显示的图像,并允许用户按放大的虚拟图像观察所显示的图像。作为输出到显示单元401上的显示图像,可以是从内容再现设备(蓝光光碟或DVD播放器)或流媒体服务器提供的虚拟场景的图像、或者使用外部相机410拍摄的现实场景的图像。一些实施例中,虚拟图像光学单元402可以包括透镜单元,例如球面透镜、非球面透镜、菲涅尔透镜等。The virtual image optical unit 402 photographs the image displayed by the display unit 401 in an enlarged manner and allows the user to observe the displayed image in the enlarged virtual image. As the display image outputted to the display unit 401, it may be an image of a virtual scene supplied from a content reproduction device (a Blu-ray disc or a DVD player) or a streaming server, or an image of a real scene photographed using an external camera 410. In some embodiments, virtual image optical unit 402 can include a lens unit, such as a spherical lens, an aspheric lens, a Fresnel lens, and the like.
输入操作单元403包括至少一个用来执行输入操作的操作部件,例如按键、按钮、开关或者其他具有类似功能的部件,通过操作部件接收用户指令,并且向控制单元407输出指令。The input operation unit 403 includes at least one operation member for performing an input operation, such as a button, a button, a switch, or other similarly functioned component, receives a user instruction through the operation member, and outputs an instruction to the control unit 407.
状态信息获取单元404用于获取穿戴头戴显示设备400的用户的状态信息。状态信息获取单元404可以包括各种类型的传感器,用于自身检测状态信息,并可以通过通信单元405从外部设备(例如智能手机、腕表和用户穿戴的其它多功能终端)获取状态信息。状态信息获取单元404可以获取用户的头部的位置信息和/或姿态信息。状态信息获取单元404可以包括陀螺仪传感器、加速度传感器、全球定位系统(GPS)传感器、地磁传感器、多普勒效应传感器、红外传感器、射频场强度传感器中的一个或者多个。此外,状态信息获取单元404获取穿戴头戴显示设备400的用户的状态信息,例如获取例如用户的操作状态(用户是否穿戴头戴显示设备400)、用户的动作状态(诸如静止、行走、跑动和诸如此类的移动状态,手或指尖的姿势、眼睛的开或闭状态、视线方向、瞳孔尺寸)、精神状态(用户是否沉浸在观察所显示的图像以及诸如此类的),甚至生理状态。The status information acquisition unit 404 is configured to acquire status information of the user wearing the head mounted display device 400. The status information acquisition unit 404 may include various types of sensors for detecting status information by itself, and may acquire status information from an external device such as a smartphone, a wristwatch, and other multi-function terminals worn by the user through the communication unit 405. The status information acquisition unit 404 can acquire location information and/or posture information of the user's head. The status information acquisition unit 404 may include one or more of a gyro sensor, an acceleration sensor, a global positioning system (GPS) sensor, a geomagnetic sensor, a Doppler effect sensor, an infrared sensor, and a radio frequency field intensity sensor. Further, the state information acquisition unit 404 acquires state information of the user wearing the head-mounted display device 400, for example, acquires, for example, an operation state of the user (whether the user wears the head-mounted display device 400), an action state of the user (such as standing, walking, running) And the state of movement such as the state of the hand or fingertip, the open or closed state of the eye, the direction of the line of sight, the size of the pupil, the mental state (whether the user is immersed in observing the displayed image, and the like), or even the physiological state.
通信单元405执行与外部装置的通信处理、调制和解调处理、以及通信信号的编码和解码处理。另外,控制单元407可以从通信单元405向外 部装置发送传输数据。通信方式可以是有线或者无线形式,例如移动高清链接(MHL)或通用串行总线(USB)、高清多媒体接口(HDMI)、无线保真(Wi-Fi)、蓝牙通信或低功耗蓝牙通信,以及IEEE802.11s标准的网状网络等。另外,通信单元405可以是根据宽带码分多址(W-CDMA)、长期演进(LTE)和类似标准操作的蜂窝无线收发器。The communication unit 405 performs communication processing, modulation and demodulation processing with an external device, and encoding and decoding processing of the communication signal. In addition, the control unit 407 can be outward from the communication unit 405 The device transmits transmission data. The communication method may be wired or wireless, such as mobile high-definition link (MHL) or universal serial bus (USB), high-definition multimedia interface (HDMI), wireless fidelity (Wi-Fi), Bluetooth communication, or low-power Bluetooth communication. And the mesh network of the IEEE802.11s standard. Additionally, communication unit 405 can be a cellular wireless transceiver that operates in accordance with Wideband Code Division Multiple Access (W-CDMA), Long Term Evolution (LTE), and the like.
一些实施例中,头戴显示设备400还可以包括存储单元,存储单元406是配置为具有固态驱动器(SSD)等的大容量存储设备。一些实施例中,存储单元406可以存储应用程序或各种类型的数据。例如,用户使用头戴显示设备400观看的内容可以存储在存储单元406中。In some embodiments, the head mounted display device 400 can also include a storage unit, which is a mass storage device configured to have a solid state drive (SSD) or the like. In some embodiments, storage unit 406 can store applications or various types of data. For example, content viewed by the user using the head mounted display device 400 may be stored in the storage unit 406.
一些实施例中,头戴显示设备400还可以包括控制单元,控制单元407可以包括计算机处理单元(CPU)或者其他具有类似功能的设备。一些实施例中,控制单元407可以用于执行存储单元406存储的应用程序,或者控制单元407还可以用于执行本申请一些实施例公开的方法、功能和操作的电路。In some embodiments, the head mounted display device 400 can also include a control unit, and the control unit 407 can include a computer processing unit (CPU) or other device having similar functionality. In some embodiments, control unit 407 can be used to execute an application stored by storage unit 406, or control unit 407 can also be used to perform the methods, functions, and operations disclosed in some embodiments of the present application.
图像处理单元408用于执行信号处理,比如与从控制单元407输出的图像信号相关的图像质量校正,以及将其分辨率转换为根据显示单元401的屏幕的分辨率。然后,显示驱动单元409依次选择显示单元401的每行像素,并逐行依次扫描显示单元401的每行像素,因而提供基于经信号处理的图像信号的像素信号。The image processing unit 408 is for performing signal processing such as image quality correction related to the image signal output from the control unit 407, and converting its resolution into a resolution according to the screen of the display unit 401. Then, the display driving unit 409 sequentially selects each row of pixels of the display unit 401, and sequentially scans each row of pixels of the display unit 401 line by line, thereby providing pixel signals based on the signal-processed image signals.
一些实施例中,头戴显示设备400还可以包括外部相机。外部相机410可以设置在头戴显示设备400主体前表面,外部相机410可以为一个或者多个。外部相机410可以获取三维信息,并且也可以用作距离传感器。另外,探测来自物体的反射信号的位置灵敏探测器(PSD)或者其他类型的距离传感器可以与外部相机410一起使用。外部相机410和距离传感器可以用于检测穿戴头戴显示设备400的用户的身体位置、姿态和形状。另外,一定条件下用户可以通过外部相机410直接观看或者预览现实场景。In some embodiments, the head mounted display device 400 can also include an external camera. The external camera 410 may be disposed on the front surface of the body of the head mounted display device 400, and the external camera 410 may be one or more. The external camera 410 can acquire three-dimensional information and can also be used as a distance sensor. Additionally, a position sensitive detector (PSD) or other type of distance sensor that detects reflected signals from the object can be used with the external camera 410. The external camera 410 and the distance sensor can be used to detect the body position, posture, and shape of the user wearing the head mounted display device 400. In addition, under certain conditions, the user can directly view or preview the real scene through the external camera 410.
一些实施例中,头戴显示设备400还可以包括声音处理单元,声音处 理单元411可以执行从控制单元407输出的声音信号的声音质量校正或声音放大,以及输入声音信号的信号处理等。然后,声音输入/输出单元412在声音处理后向外部输出声音以及输入来自麦克风的声音。In some embodiments, the head mounted display device 400 may further include a sound processing unit, the sound portion The processing unit 411 can perform sound quality correction or sound amplification of the sound signal output from the control unit 407, signal processing of the input sound signal, and the like. Then, the sound input/output unit 412 outputs the sound to the outside and the sound from the microphone after the sound processing.
需要说明的是,图4中虚线框示出的结构或部件可以独立于头戴显示设备400之外,例如可以设置在外部处理系统(例如计算机系统)中与头戴显示设备400配合使用;或者,虚线框示出的结构或部件可以设置在头戴显示设备400内部或者表面上。It should be noted that the structure or component illustrated by the dashed line in FIG. 4 may be independent of the head mounted display device 400, for example, may be disposed in an external processing system (eg, a computer system) for use with the head mounted display device 400; or The structure or components shown by the dashed box may be disposed inside or on the surface of the head mounted display device 400.
以上所描述的电子设备实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The embodiments of the electronic device described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, ie Located in one place, or distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the various embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware. Based on such understanding, the above-described technical solutions may be embodied in the form of software products in essence or in the form of software products, which may be stored in a computer readable storage medium such as ROM/RAM, magnetic Discs, optical discs, etc., include instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments or portions of the embodiments.
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。 It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not limited thereto; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that The technical solutions described in the foregoing embodiments are modified, or the equivalents of the technical features are replaced. The modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (12)

  1. 一种VR应用程序的识别方法,其特征在于,包括:A method for identifying a VR application, comprising:
    从待识别应用程序的界面图像的四角上,获取至少四个指定尺寸的参考图像块;Obtaining at least four reference image blocks of a specified size from four corners of the interface image of the application to be identified;
    根据所述至少四个参考图像块包含的像素点的灰度值,判断所述至少四个参考图像块是否均为黑色图像块;Determining, according to the gray value of the pixel point included in the at least four reference image blocks, whether the at least four reference image blocks are black image blocks;
    若所述至少四个图像块均为黑色图像块,则根据所述界面图像包含的像素点的灰度值,识别所述界面图像中的黑色图像区;If the at least four image blocks are black image blocks, identifying a black image region in the interface image according to a gray value of a pixel point included in the interface image;
    根据所述黑色图像区包含的像素点的灰度值,判断所述黑色图像区的左右两部分是否对应;Determining, according to the gray value of the pixel point included in the black image area, whether the left and right portions of the black image area correspond to each other;
    若所述黑色图像区的左右两部分对应,则确定所述待识别应用程序为VR应用程序。If the left and right portions of the black image area correspond, it is determined that the to-be-identified application is a VR application.
  2. 根据权利要求1所述的方法,其特征在于,根据所述至少四个参考图像块包含的像素点的灰度值,判断所述至少四个参考图像块是否均为黑色图像块,包括:The method according to claim 1, wherein determining whether the at least four reference image blocks are black image blocks according to the gray value of the pixel points included in the at least four reference image blocks comprises:
    获取所述至少四个参考图像块中,灰度值小于指定灰度阈值的像素点的数量;Obtaining, in the at least four reference image blocks, a number of pixel points whose gray value is smaller than a specified gray threshold;
    计算所述灰度值小于指定灰度阈值的像素点的数量与所述至少四个参考图像块包含的像素点总数的比值;Calculating a ratio of a number of pixel points whose gray value is less than a specified gray level threshold to a total number of pixel points included in the at least four reference image blocks;
    若所述比值大于或等于设定的比例阈值,则确定所述至少四个图像块均为黑色图像块。If the ratio is greater than or equal to the set ratio threshold, it is determined that the at least four image blocks are black image blocks.
  3. 根据权利要求2所述的方法,其特征在于,从待识别应用程序的界面图像的四角上,获取至少四个指定尺寸的参考图像块,包括:The method according to claim 2, wherein acquiring at least four reference image blocks of a specified size from the four corners of the interface image of the application to be identified comprises:
    以所述界面图像的四个顶点分别为图像选取的起始点,在所述界面图像上选取指定尺寸的图像区域,以获得所述至少四个参考图像块。The four vertices of the interface image are respectively selected starting points of the image, and the image regions of the specified size are selected on the interface image to obtain the at least four reference image blocks.
  4. 根据权利要求3所述的方法,其特征在于,所述指定尺寸为所述界面 图像的尺寸的十分之一。The method of claim 3 wherein said specified size is said interface One tenth of the size of the image.
  5. 根据权利要求1所述的方法,其特征在于,根据所述界面图像包含的像素点的灰度值,识别所述界面图像中的黑色图像区,包括:The method according to claim 1, wherein the identifying the black image area in the interface image according to the gray value of the pixel point included in the interface image comprises:
    在所述界面图像中,获取灰度值小于所述指定灰度阈值的像素点所在的区域作为可疑黑色图像区;In the interface image, an area where a pixel point whose gradation value is smaller than the specified gradation threshold is obtained as a suspicious black image area;
    根据所述可疑黑色图像区包含的像素点的坐标,获取所述可疑黑色图像区的几何包络图;Obtaining a geometric envelope map of the suspect black image region according to coordinates of the pixel points included in the suspect black image region;
    根据所述几何包络图,判断所述可疑黑色图像区是否属于所述界面图像的黑色图像区。Determining, according to the geometric envelope map, whether the suspect black image area belongs to a black image area of the interface image.
  6. 根据权利要求5所述的方法,其特征在于,根据所述几何包络图,判断所述可疑黑色图像区是否属于所述界面图像的黑色图像区,包括:The method according to claim 5, wherein determining whether the suspicious black image area belongs to the black image area of the interface image according to the geometric envelope map comprises:
    若所述几何包络图存在与所述界面图像的顶角重合的顶角或所述几何包络图的纵向中轴线与所述界面图像的纵向中轴线重合,则确定所述可疑黑色图像区属于所述界面图像的黑色图像区。Determining the suspect black image area if the geometric envelope map has an apex angle coincident with a vertex angle of the interface image or a longitudinal central axis of the geometric envelope image coincides with a longitudinal central axis of the interface image A black image area belonging to the interface image.
  7. 根据权利要求1-6中任一项所述的方法,其特征在于,根据所述黑色图像区包含的像素点的灰度值,判断所述黑色图像区的左右两部分是否对应,包括:The method according to any one of claims 1 to 6, wherein determining whether the left and right portions of the black image area correspond to each other according to a gray value of a pixel point included in the black image area comprises:
    根据所述黑色图像区包含的像素点的灰度值,判断所述黑色图像区是否沿所述界面图像的纵向中轴线对称。And determining whether the black image area is symmetrical along a longitudinal central axis of the interface image according to a gray value of a pixel point included in the black image area.
  8. 根据权利要求7所述的方法,其特征在于,根据所述黑色图像区包含的像素点的灰度值,判断所述黑色图像区是否沿所述界面图像的纵向中轴线对称,包括:The method according to claim 7, wherein determining whether the black image area is symmetrical along a longitudinal central axis of the interface image according to a gray value of a pixel point included in the black image area comprises:
    沿所述界面图像的纵向中轴线将所述黑色图像区划分为左右两个子图像区;Dividing the black image area into two left and right sub-image areas along a longitudinal central axis of the interface image;
    根据所述两个子图像区包含的像素点的总数量以及所述两个子图像区中灰度值相同的对称像素点的数量,计算所述两个子图像区的相似率;Calculating a similarity ratio of the two sub-image regions according to a total number of pixels included in the two sub-image regions and a number of symmetric pixel points having the same gray value in the two sub-image regions;
    若所述相似率大于设定的相似度阈值,确定所述黑色图像区沿所述界面 图像的纵向中轴线对称。Determining the black image area along the interface if the similarity rate is greater than a set similarity threshold The longitudinal center axis of the image is symmetrical.
  9. 根据权利要求8所述的方法,其特征在于,根据所述两个子图像区包含的像素点的总数量以及所述两个子图像区中灰度值相同的对称像素点的数量,计算所述两个子图像区的相似率,包括:The method according to claim 8, wherein the two are calculated according to the total number of pixels included in the two sub-image regions and the number of symmetric pixel points having the same gray value in the two sub-image regions. The similarity rate of sub-image areas, including:
    以所述界面图像的横向中轴线为横坐标轴,以所述界面图像的纵向中轴线为纵坐标轴,建立坐标系;Taking a horizontal central axis of the interface image as an abscissa axis, and a longitudinal central axis of the interface image as a ordinate axis, establishing a coordinate system;
    在所述两个子图像区中,获取纵坐标相同、横坐标相反的像素点,作为对称像素点;Obtaining, in the two sub-image regions, pixel points having the same ordinate and opposite abscissa as symmetric pixel points;
    统计灰度值相同的对称像素点的数量,并获取所述两个子图像区包含的像素点的总数量的平均值;Counting the number of symmetric pixel points having the same gray value, and obtaining an average of the total number of pixel points included in the two sub-image areas;
    根据所述灰度值相同的对称像素点的数量与所述平均值的比值,确定所述两个子图像区的相似率。And determining a similarity ratio of the two sub-image regions according to a ratio of the number of symmetric pixel points having the same gray value to the average value.
  10. 一种电子设备,其特征在于,包括存储器以及处理器;An electronic device, comprising: a memory and a processor;
    所述存储器用于:存储一条或多条计算机指令;The memory is configured to: store one or more computer instructions;
    所述处理器用于执行所述一条或多条计算机指令,以用于:The processor is configured to execute the one or more computer instructions for:
    从待识别应用程序的界面图像的四角上,获取至少四个指定尺寸的参考图像块;Obtaining at least four reference image blocks of a specified size from four corners of the interface image of the application to be identified;
    根据所述至少四个参考图像块包含的像素点的灰度值,判断所述至少四个参考图像块是否均为黑色图像块;Determining, according to the gray value of the pixel point included in the at least four reference image blocks, whether the at least four reference image blocks are black image blocks;
    若所述至少四个图像块均为黑色图像块,则根据所述界面图像包含的像素点的灰度值,识别所述界面图像中的黑色图像区;If the at least four image blocks are black image blocks, identifying a black image region in the interface image according to a gray value of a pixel point included in the interface image;
    根据所述黑色图像区包含的像素点的灰度值,判断所述黑色图像区的左右两部分是否对应;Determining, according to the gray value of the pixel point included in the black image area, whether the left and right portions of the black image area correspond to each other;
    若所述黑色图像区的左右两部分对应,则确定所述待识别应用程序为VR应用程序。If the left and right portions of the black image area correspond, it is determined that the to-be-identified application is a VR application.
  11. 根据权利要求10所述的电子设备,其特征在于,所述处理器具体用于: The electronic device according to claim 10, wherein the processor is specifically configured to:
    获取所述至少四个参考图像块中,灰度值小于指定灰度阈值的像素点的数量;Obtaining, in the at least four reference image blocks, a number of pixel points whose gray value is smaller than a specified gray threshold;
    计算所述灰度值小于指定灰度阈值的像素点的数量与所述至少四个参考图像块包含的像素点总数的比值;Calculating a ratio of a number of pixel points whose gray value is less than a specified gray level threshold to a total number of pixel points included in the at least four reference image blocks;
    若所述比值大于或等于设定的比例阈值,则确定所述至少四个图像块均为黑色图像块。If the ratio is greater than or equal to the set ratio threshold, it is determined that the at least four image blocks are black image blocks.
  12. 根据权利要求10所述的电子设备,其特征在于,所述处理器具体用于:The electronic device according to claim 10, wherein the processor is specifically configured to:
    在所述界面图像中,获取灰度值小于所述指定灰度阈值的像素点所在的区域作为可疑黑色图像区;In the interface image, an area where a pixel point whose gradation value is smaller than the specified gradation threshold is obtained as a suspicious black image area;
    根据所述可疑黑色图像区包含的像素点的坐标,获取所述可疑黑色图像区的几何包络图;Obtaining a geometric envelope map of the suspect black image region according to coordinates of the pixel points included in the suspect black image region;
    若所述几何包络图存在与所述界面图像的顶角重合的顶角或所述几何包络图的纵向中轴线与所述界面图像的纵向中轴线重合,则确定所述可疑黑色图像区属于所述界面图像的黑色图像区。 Determining the suspect black image area if the geometric envelope map has an apex angle coincident with a vertex angle of the interface image or a longitudinal central axis of the geometric envelope image coincides with a longitudinal central axis of the interface image A black image area belonging to the interface image.
PCT/CN2017/103193 2017-08-16 2017-09-25 Method for recognizing vr application program, and electronic device WO2019033510A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710703519.XA CN107506031B (en) 2017-08-16 2017-08-16 VR application program identification method and electronic equipment
CN201710703519.X 2017-08-16

Publications (1)

Publication Number Publication Date
WO2019033510A1 true WO2019033510A1 (en) 2019-02-21

Family

ID=60692124

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/103193 WO2019033510A1 (en) 2017-08-16 2017-09-25 Method for recognizing vr application program, and electronic device

Country Status (2)

Country Link
CN (1) CN107506031B (en)
WO (1) WO2019033510A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11189054B2 (en) * 2018-09-28 2021-11-30 Apple Inc. Localization and mapping using images from multiple devices

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101025789A (en) * 2007-03-29 2007-08-29 上海大学 Digital identification method for extracting digital image selective bone area features based on computation
US20140214921A1 (en) * 2013-01-31 2014-07-31 Onavo Mobile Ltd. System and method for identification of an application executed on a mobile device
CN104317574A (en) * 2014-09-30 2015-01-28 北京金山安全软件有限公司 Method and device for identifying application program type
CN106095432A (en) * 2016-06-07 2016-11-09 北京小鸟看看科技有限公司 A kind of method identifying application type

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102821298B (en) * 2012-08-27 2015-06-17 深圳市维尚视界立体显示技术有限公司 Method, device and equipment for 3D (Three-Dimensional) playing adjustment and self adaptation
EP3356912A1 (en) * 2015-09-28 2018-08-08 Microsoft Technology Licensing, LLC Unified virtual reality platform
CN105892639A (en) * 2015-12-01 2016-08-24 乐视致新电子科技(天津)有限公司 Method and device for controlling virtual reality (VR) device
CN106780521B (en) * 2016-12-08 2020-01-07 广州视源电子科技股份有限公司 Screen light leakage detection method, system and device
CN106982389B (en) * 2017-03-17 2022-01-07 腾讯科技(深圳)有限公司 Video type identification method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101025789A (en) * 2007-03-29 2007-08-29 上海大学 Digital identification method for extracting digital image selective bone area features based on computation
US20140214921A1 (en) * 2013-01-31 2014-07-31 Onavo Mobile Ltd. System and method for identification of an application executed on a mobile device
CN104317574A (en) * 2014-09-30 2015-01-28 北京金山安全软件有限公司 Method and device for identifying application program type
CN106095432A (en) * 2016-06-07 2016-11-09 北京小鸟看看科技有限公司 A kind of method identifying application type

Also Published As

Publication number Publication date
CN107506031B (en) 2020-03-31
CN107506031A (en) 2017-12-22

Similar Documents

Publication Publication Date Title
US11893689B2 (en) Automated three dimensional model generation
US9406137B2 (en) Robust tracking using point and line features
US20150262412A1 (en) Augmented reality lighting with dynamic geometry
CN115699114B (en) Method and apparatus for image augmentation for analysis
US20220122326A1 (en) Detecting object surfaces in extended reality environments
KR20210071015A (en) Motion smoothing for reprojected frames
US9355436B2 (en) Method, system and computer program product for enhancing a depth map
JP2018537748A (en) Light field rendering of images with variable computational complexity
CN107704397B (en) Application program testing method and device and electronic equipment
WO2022087846A1 (en) Image processing method and apparatus, device, and storage medium
US11726320B2 (en) Information processing apparatus, information processing method, and program
WO2024055531A1 (en) Illuminometer value identification method, electronic device, and storage medium
WO2019033510A1 (en) Method for recognizing vr application program, and electronic device
US9282317B2 (en) Method and apparatus for processing an image and generating information representing the degree of stereoscopic effects
WO2018214492A1 (en) Method and apparatus for processing user experience data, electronic device, and computer storage medium
US11847784B2 (en) Image processing apparatus, head-mounted display, and method for acquiring space information
CN107545595A (en) A kind of VR scene process method and VR equipment
TW201430767A (en) Method of auto-determination a three-dimensional image format
US20160217559A1 (en) Two-dimensional image processing based on third dimension data
CN107705311B (en) Method and equipment for identifying inside and outside of image contour
CN107958478B (en) Rendering method of object in virtual reality scene and virtual reality head-mounted equipment
CN108965859B (en) Projection mode identification method, video playing method and device and electronic equipment
US11361511B2 (en) Method, mixed reality system and recording medium for detecting real-world light source in mixed reality
US11782666B1 (en) Aggregate view of image information on display devices
US11323682B2 (en) Electronic device, content processing device, content processing system, image data output method, and image processing method

Legal Events

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

Ref document number: 17921986

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17921986

Country of ref document: EP

Kind code of ref document: A1