WO2018187939A1 - 三维图像的识别方法和终端 - Google Patents

三维图像的识别方法和终端 Download PDF

Info

Publication number
WO2018187939A1
WO2018187939A1 PCT/CN2017/080104 CN2017080104W WO2018187939A1 WO 2018187939 A1 WO2018187939 A1 WO 2018187939A1 CN 2017080104 W CN2017080104 W CN 2017080104W WO 2018187939 A1 WO2018187939 A1 WO 2018187939A1
Authority
WO
WIPO (PCT)
Prior art keywords
area
image
region
unit
pixel
Prior art date
Application number
PCT/CN2017/080104
Other languages
English (en)
French (fr)
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 深圳市柔宇科技有限公司
Priority to CN201780004639.9A priority Critical patent/CN108475341B/zh
Priority to PCT/CN2017/080104 priority patent/WO2018187939A1/zh
Publication of WO2018187939A1 publication Critical patent/WO2018187939A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • G06T2207/10021Stereoscopic video; Stereoscopic image sequence

Definitions

  • the present application relates to the field of image recognition technologies, and in particular, to a method and a terminal for identifying a three-dimensional image.
  • VR devices provide users with a more intuitive human-computer interaction experience.
  • the VR device may be a VR head mounted display device (referred to as VR head display).
  • the VR device plays a three-dimensional (3D) video file to make the video image viewed by the user more realistic and enhance the user experience.
  • VR devices can also be compatible with playing 2D video files.
  • Each frame of the three-dimensional video file is synthesized by two similar images. The principle is that two images are respectively provided to two eyes, and the images observed by the two eyes can be combined into one stereo image according to the change of the light angle.
  • the VR device Since the three-dimensional video image is different from the two-dimensional video image, in order to obtain a better sensory experience for the user, the VR device needs to detect whether the video file is a three-dimensional video file or a two-dimensional video file when acquiring the video file. VR provides different playback modes for video files of different dimensions.
  • the similarity comparison may be performed by using each part in the image in the video file, such as comparing the left half and the right half of the image to similarity, or The upper part or the lower part performs the similarity comparison. If the similarity is high, the image can be determined to be a three-dimensional image, and the video file to which the image belongs is a three-dimensional video file.
  • the probability of misjudging using the conventional method to recognize the three-dimensional image mode is large, and if there are many invalid pixels included in the image, it is easy to determine the non-three-dimensional image as a three-dimensional image in the conventional manner. Therefore, the accuracy of recognition of the three-dimensional image in this way is low.
  • the embodiment of the present application discloses a method and a terminal for identifying a three-dimensional image, which can improve the recognition accuracy of the three-dimensional image.
  • the embodiment of the present application discloses a method for identifying a three-dimensional image, including:
  • an embodiment of the present application discloses a terminal, including a functional unit, where the functional unit is configured to perform some or all of the steps of the method shown in the first aspect.
  • an embodiment of the present application discloses a terminal, where the terminal includes a processor and a memory, where the memory stores executable program code, and the processor is configured to support the terminal to perform the method provided by the first aspect. The corresponding function.
  • the memory is used to store the necessary program instructions and data for the terminal.
  • the embodiment of the present application discloses a computer storage medium for storing computer software instructions used by the terminal provided in the foregoing third aspect, which includes a program designed to execute the method in the first aspect.
  • the image similarity comparison may be performed in the first area to obtain the first comparison result; or may be performed in the image area.
  • the image similarity is compared to obtain a second alignment result. Thereby, the image can be identified based on the first comparison result and the second comparison result.
  • the above method can more accurately recognize whether the image is a three-dimensional image.
  • FIG. 1 is a schematic flow chart of a method for identifying a three-dimensional image disclosed in an embodiment of the present application
  • FIGS. 2A to 2C are schematic diagrams showing the manner of determining an intermediate region of some images disclosed in the embodiment of the present application.
  • FIG. 3 is a schematic flow chart of an image similarity comparison method disclosed in an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a small area divided by an intermediate area of an image disclosed in an embodiment of the present application.
  • 5A-5B are schematic diagrams of some three-dimensional images disclosed in the embodiments of the present application.
  • 6A to 6E are schematic diagrams showing positional relationships of some large areas and small areas disclosed in the embodiments of the present application.
  • FIG. 7 is a schematic diagram of a unit of a terminal disclosed in an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a terminal disclosed in an embodiment of the present application.
  • references to "an embodiment” herein mean that a particular feature, structure, or characteristic described in connection with the embodiments can be included in at least one embodiment of the present application.
  • the appearances of the phrases in various places in the specification are not necessarily referring to the same embodiments, and are not exclusive or alternative embodiments that are mutually exclusive. Those skilled in the art will understand and implicitly understand that the embodiments described herein can be combined with other embodiments.
  • FIG. 1 is a schematic flowchart diagram of a method for identifying a three-dimensional image disclosed in an embodiment of the present application. As shown in FIG. 1, the method includes at least the following steps.
  • Step S101 determining a first area in an image area of one frame of images in the video file.
  • the terminal acquires the video file
  • several frame images may be intercepted from the video file. And identify whether each frame image is a three-dimensional image, if three frames of images are determined If the number of the dimensional images reaches a preset threshold, the video file can be determined to be a three-dimensional video file, and then the video file is played by a playing mode that matches the three-dimensional video file.
  • the image before identifying whether a frame of an image is a three-dimensional image, the image may be processed, and may be converted into a grayscale image, where each pixel corresponds to a gray value, and the gray value is It can also be expressed as a pixel value.
  • the image is reduced and, at the same time, reduced to an image having a size of 128 x 128 pixels. 128 ⁇ 128 represents the width and height of the image, respectively.
  • pixels are used as the unit of the image size. It should be noted that the above-mentioned dimensions are merely exemplary. The present application does not specifically limit the reduced image size, and the order of the steps of the image conversion gradation and reduction processing is not specifically limited.
  • a unit area can be determined for the processed image, which is the smallest image area on the processed image. For example, it is determined that the unit area on the image is an area including 8 ⁇ 8 pixels. It can then be determined that an image having a size of 128 x 128 includes 16 x 16 unit areas. It should be noted that the cell area can be determined according to the image size, and the cell area does not require the same number of width pixels and the same number of height pixels. For example, if the number of width pixels and the number of length pixels of an image are different, the number of width pixels and the number of length pixels of the unit area are different.
  • the first area of the image may be determined by at least one of the following manners, where the first area of the image refers to an area that does not include invalid pixels in the image area, and the invalid pixel refers to an image area that affects the image.
  • the pixel of the pixel average is accurate, for example, in FIG. 5A, the black pixel included in the upper and lower bezel areas in the image area is an invalid pixel.
  • the middle area of the image is the first area of the image. Wherein, the center point of the middle portion of the image coincides with the center point of the image.
  • the length and width of the middle portion of the image may be predefined or determined according to the size of the target object in the image, which is not limited herein. Taking the image size as 128 ⁇ 128 as an example. When the image is square, the middle area of the image is also square. For example, the middle area of the image can be predefined to include 12 ⁇ 12 unit areas.
  • FIG. 2A A schematic diagram of determining the positional relationship between the intermediate portion of the image and the image region in the above manner can be seen in FIG. 2A, which exemplarily shows the positional relationship between an image region and an intermediate region.
  • the second region of the image may be predefined.
  • the second area is a border area.
  • a second area of the predefined image can be seen in FIG. 2B, and FIG. 2B exemplarily shows a second area and an image area.
  • the second region may be determined according to the size and position of the target object in the image, and all target objects in the image are not included in the second region.
  • the target object described in the embodiment of the present application refers to a graphic element having certain features in the image, and the graphic element can specifically represent an object, for example, the graphic element represents a cloud, a flower, a portrait, and the like.
  • Determining whether the second region of the image is valid may be determined by the pixel identification of the unit region included in the second region.
  • the pixel identifier of the unit area is determined based on the pixel average value of the unit area and the pixel average value of the image, and the pixel average value herein is also understood as the pixel gray level average value.
  • the pixel average value of the unit area is calculated.
  • the pixel average value of the image area may be used as a reference value, or the pixel average value of the partial area in the image area may be used as a reference value, for example, the image area is used.
  • the pixel identifier of the unit area may be set to 1; if the pixel average of the unit area is less than the reference value, the pixel identifier of the unit area may be set to 0.
  • the pixel identifier of the unit area in the second area may be determined in the foregoing manner, and according to the pixel identifier of the unit area in the second area, whether the second area meets the invalid condition is determined by:
  • the pixel identifiers of the plurality of unit regions that are consecutive in the second region are the same, and the number of regions of the continuous unit regions reaches the first threshold.
  • the pixel identifiers of the unit regions may be sequentially detected according to the preset route. If the pixel identifiers of the unit regions are sequentially detected according to the preset route, the pixel identifiers of the consecutive plurality of unit regions are detected to be the same.
  • a plurality of consecutive unit regions can also be understood as continuous values of coordinate positions of a plurality of unit regions, where the coordinate values may continuously include x coordinate values consecutively and/or y coordinate values consecutively. If the number of consecutively detected pixels identifying the same unit area reaches a first threshold, it may be determined that the second area satisfies the invalid condition.
  • the proportion of the number of unit regions in which the pixel identifiers are the same in all the unit regions in the second region may also be counted. For example, if the ratio of the number of regions of the cell region whose pixel identifier is 1 or 0 in the second region to the total number of regions of the cell region reaches a second threshold, it is determined that the second region satisfies an invalid condition, that is, only the second region is included. Invalid information in the image.
  • the second threshold can It is 99%, 99.5%, etc., and the value of the second threshold is not specifically limited herein.
  • the intermediate region of the image is determined in the non-second region of the image.
  • the pre-preparation may be cut out from the non-second region. Define the middle area of the dimension.
  • the first region of the image can also be determined by determining the size and location of the target object in the image.
  • the first region of the image may be determined by determining the size and location of the target object in the image.
  • the determined first region may include all target objects in the image, and may also include a partial target object in the image, for example, determining a target object to be included in the intermediate region according to the important identifier of the target object.
  • the size of the intermediate area can be determined according to the size of the target object.
  • Fig. 2C exemplarily shows the positional relationship of an image area and an intermediate area. As shown in FIG. 2C, the intermediate area is determined based on the target object included in the image.
  • center point of the first region confirmed by the mode 2 or the mode 3 does not have to coincide with the center point of the image region.
  • the embodiment of the present application is not specifically limited.
  • Step S102 performing image similarity comparison in the first area to obtain a first comparison result.
  • Step S103 performing image similarity comparison in the image region to obtain a second comparison result.
  • Step S104 identifying the image according to the first comparison result and the second comparison result, if the first comparison result and the second comparison result are inconsistent, identifying that the image is not a three-dimensional image .
  • step S102 may also be performed after step S103 or in parallel with step S103.
  • the implementation of the image similarity comparison in the first region may be the same as or different from the image similarity comparison in the image region.
  • whether the image is a three-dimensional image may be identified according to whether the first alignment result and the second alignment result are consistent. If the first alignment result and the second alignment result are consistent, whether the image is a three-dimensional image is identified based on one of the comparison results. If the first alignment result and the second alignment result are inconsistent, it can be recognized that the image is not a three-dimensional image, thereby avoiding the influence of invalid pixels on image recognition.
  • the image similarity comparison may be performed in the first area to obtain the first comparison result; or may be performed in the image area.
  • the image similarity is compared to obtain a second alignment result. Thereby, the image can be identified based on the first comparison result and the second comparison result.
  • the above method can more accurately recognize whether the image is a three-dimensional image.
  • FIG. 3 is a schematic flowchart diagram of an image similarity comparison method according to an embodiment of the present application. As shown in FIG. 3, the method includes the following steps.
  • step S301 the first area is divided into at least four small areas.
  • Step S302 Perform image similarity comparison on the first small area and the adjacent small area of the at least four small areas included in the middle area of the image to obtain a first comparison result.
  • the intermediate region of the image can be divided into at least four small regions.
  • the method of comparing image intermediate degrees into four small areas is taken as an example to describe the image similarity comparison.
  • the middle area of the image is divided into four or more small areas, the image similarity ratio is implemented.
  • the way is the same.
  • the small area referred to herein can also be understood as a sub-area of the first area.
  • a sub-area of an image area may be expressed as a large area.
  • the four small areas of the division are the same size.
  • FIG. 4 An area identifier is set for each small area, and the four small areas are sequentially identified as area A, area B, area C, and area D. Assuming that the intermediate area includes 12 ⁇ 12 unit areas, the areas A to D respectively include 6 ⁇ 6 unit areas.
  • the adjacent small area with the first small area described in the embodiment of the present application refers to a small area that shares the area boundary with the first small area. Assuming that the first small area is area A, the adjacent small area of area A means area B or area C.
  • the area A can perform image similarity comparison with the area B and the area C, respectively.
  • the image similarity comparison sequence of the area A and the area B and the area A and the area C are not specifically limited in the embodiment of the present application.
  • the pixel identifiers of the unit areas included in the area A and the area B are respectively determined.
  • the pixel identifier of one unit area included in the area A It may be determined based on the pixel average value of the unit region and the pixel average value of the intermediate region, or may be determined based on the pixel average value of the unit region and the pixel average value of the region A;
  • the manner of determining the pixel identification of the unit area in the area A corresponds to the unit area in the areas B, C, and D.
  • the pixel identifiers of the corresponding unit areas may be aligned, and the correspondence between the unit areas in the area A and the unit areas in the area B is based on the unit area in a small area.
  • the location in the location is determined. As shown in FIG. 4, the unit area A1 in the area A and the unit area B1 in the area B correspond to each other, and they are all in the upper left corner of the belonging area.
  • the unit area is added to the first Unit area collection.
  • the number of unit areas in the first unit area set in the statistical area A is identified as q1.
  • the pixel identification of the corresponding unit area in the area A and the area C can also be aligned.
  • the unit area is added to the second unit.
  • the number of unit areas in the second unit area combination in the statistical area A is identified as q2.
  • a third threshold is set for q1 and a fourth threshold is set for q2.
  • the third threshold and the fourth threshold may be the same or different.
  • the third threshold and the fourth threshold are determined based on the number of unit areas included in the small area.
  • the image similarity comparison result of the intermediate region can be determined according to q1 and q2 and the corresponding threshold.
  • the comparison result includes: q1 is greater than a third threshold and q2 is greater than a fourth threshold; q1 is greater than a third threshold, q2 is not greater than a fourth threshold; q1 is not greater than a third threshold, q2 is greater than a fourth threshold; q1 is not greater than a third threshold, Q2 is not greater than the fourth threshold.
  • the comparison result is that q1 is greater than the third threshold and q2 is greater than the fourth threshold, it indicates that the region A is neither similar to the region B nor similar to the region C, and may be identified according to the comparison result.
  • This image is not a three-dimensional image. If the comparison result is that q1 is greater than the third threshold, and q2 is not greater than the fourth threshold, indicating that the area A and the area C are similar, the image may be identified as an upper and lower three-dimensional image according to the comparison result, and a representation of the upper and lower three-dimensional images may be referred to. Figure 5A.
  • the image may be identified as a left and right three-dimensional image according to the comparison result, and a representation of the left and right three-dimensional images may be referred to.
  • Figure 5B shows. If the comparison result is that q1 is not greater than the third threshold and q2 is not greater than the fourth threshold, indicating that region A is similar to region B and similar to region C, it is not possible to identify whether the image is a three-dimensional image.
  • each small area in the intermediate area may be sequentially compared with the adjacent small area, and four pairs of comparison results may be obtained, or the intermediate area may be obtained.
  • the two small areas or the three small areas in the order are compared with the adjacent small areas for image similarity, and two or three sets of comparison results are obtained.
  • the image may be identified by synthesizing at least two sets of comparison results obtained in step S302.
  • the image similarity comparison method in the image region may refer to the method for comparing image similarities in the first region described above.
  • the image area may be divided into four large areas, and the first large area and the adjacent large area of the four large areas are compared by image similarity.
  • the image area is divided into four large areas, and the area identifiers of the four large areas are area A', area B', area C', and area D', respectively.
  • the middle area is divided into four small areas, and the area identifiers of the four small areas are area A, area B, area C, and area D, respectively.
  • the center point of the intermediate area coincides with the center point of the image area.
  • the set of unit areas included in the small area is a subset of the set of unit areas included in the corresponding large area.
  • the center point of the intermediate region is on the left or right side of the center point of the image region; as shown in FIGS. 6D-6E, the center point of the intermediate region is above or below the center point of the image region. side.
  • the location relationship between large areas and small areas can also be other relationships, and it is not exhaustive here.
  • FIG. 7 is a block diagram of a terminal disclosed in an embodiment of the present application.
  • the terminal may include a first determining unit 701, a first comparing unit 702, a second comparing unit 703, and an identifying unit 704.
  • the first determining unit 701 is configured to determine a first area in an image area of a frame image in the video file.
  • the first comparison unit 702 is configured to perform image similarity comparison in the first area to obtain a first comparison result
  • a second comparison unit 703 configured to perform image similarity comparison in the image region, to obtain a Two comparison results
  • the identifying unit 704 is configured to identify the image according to the first comparison result and the second comparison result, and if the first comparison result and the second comparison result are inconsistent, identify the image Not a three-dimensional image.
  • the first comparison unit 702 includes:
  • a second determining unit configured to determine a pixel identifier of the unit area in the first area
  • a statistical unit configured to separately count a first number of unit areas in which the first sub-area in the first area is inconsistent with a pixel identifier in the second sub-area, and a pixel identifier in the first sub-area and the third sub-area a second number of inconsistencies, the first sub-area being adjacent to the second sub-area and the third sub-area, respectively;
  • a result unit configured to obtain a first comparison result according to the first quantity and the second quantity.
  • the second determining unit is configured to:
  • the first determining unit 701 is configured to:
  • the first region is determined from a non-second region within the image region.
  • the invalid condition includes:
  • the pixel identifiers of the plurality of consecutive cell regions in the second region are the same, and the number of regions of the consecutive cell regions reaches a first threshold; or
  • the ratio of the number of regions of the plurality of unit regions in which the pixels are identified in the second region to the number of regions of all the cell regions in the second region reaches a second threshold.
  • the first determining unit 701 is configured to:
  • the area including the target object in the image is determined to be the first area.
  • the terminal is presented in the form of a unit.
  • the "unit” here can refer to special An application-specific integrated circuit (ASIC), a processor and memory that executes one or more software or firmware programs, integrated logic circuits, and/or other devices that provide the functionality described above.
  • ASIC application-specific integrated circuit
  • the terminal shown in FIG. 8 can take the form shown in FIG. 9 below.
  • the terminal described in the embodiment of the present application may include a mobile phone, a tablet computer, a VR terminal, and the like that can support playing a three-dimensional video file.
  • the VR terminal may refer to a VR wearable device, such as a VR head mounted display device or the like.
  • the terminal can be implemented in the structure of FIG. 8.
  • the terminal can include a processor 801, a memory 802, and a display screen 803.
  • the processor 801 and the memory 802 are coupled to the display screen 803.
  • the display screen 803 is capable of supporting playback of three-dimensional video files and two-dimensional video files.
  • Display 804 can be fabricated from a flexible material.
  • the processor 801 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more for controlling the execution of the above program. integrated circuit.
  • the processor 801 can also be used to perform the method in the method embodiment of FIG. 1 or FIG. 6, and can also be used to perform the functions of the functional unit in the apparatus shown in FIG.
  • the processor 801 calls the executable program code stored in the memory 802, and performs the following steps:
  • the processor performs image similarity comparison in the first area, and the first comparison result includes:
  • first sub-area is adjacent to the second sub-area and the third sub-area, respectively;
  • the determining, by the processor, the pixel identifier of the unit area in the first area including:
  • the processor determines the first area in an image area of one frame of the video file, including:
  • the first region is determined from a non-second region within the image region.
  • the invalid condition includes:
  • the pixel identifiers of the plurality of consecutive cell regions in the second region are the same, and the number of regions of the consecutive cell regions reaches a first threshold; or
  • the ratio of the number of regions of the plurality of unit regions in which the pixels are identified in the second region to the number of regions of all the cell regions in the second region reaches a second threshold.
  • the processor determines the first area in an image area of one frame of the video file, including:
  • the memory 802 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type that can store information and instructions.
  • the dynamic storage device can also be an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical disc storage, and a disc storage device. (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can be Any other media accessed, but not limited to this.
  • the memory 802 can exist independently and be coupled to the processor 801 via a bus. Memory 802 can also be integrated with processor 801.
  • the image similarity by determining an intermediate region of a frame image in a video file, and using the image
  • the first small area and the adjacent small area of the at least four small areas included in the intermediate area of the image are compared by the image similarity to obtain a first comparison result, and whether the image is three-dimensionally recognized according to the comparison result image.
  • the embodiment of the present application further provides a computer storage medium for storing computer software instructions used by the terminal, which includes a computer program for performing the foregoing method embodiments.
  • embodiments of the present application can be provided as a method, apparatus (device), or computer program product.
  • the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment in combination of software and hardware.
  • the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • the computer program is stored/distributed in a suitable medium, provided with other hardware or as part of the hardware, or in other distributed forms, such as over the Internet or other wired or wireless telecommunication systems.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that it is stored in the computer readable memory.
  • the instructions produce an article of manufacture comprising an instruction device that implements the functions specified in a block or blocks of a flow or a flow and/or a block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)

Abstract

本申请实施例公开了一种三维图像的识别方法和终端,该方法包括:在视频文件中的一帧图像的图像区域内确定第一区域;在所述第一区域内进行图像相似度比对,得到第一比对结果;在所述图像区域内进行图像相似度比对,得到第二比对结果;根据所述第一比对结果和所述第二比对结果,识别所述图像,如果所述第一比对结果和所述第二比对结果不一致,识别所述图像不是三维图像。本申请实施例能够提高对三维图像的识别精准度。

Description

三维图像的识别方法和终端 技术领域
本申请涉及图像识别技术领域,具体涉及一种三维图像的识别方法和终端。
背景技术
随着虚拟现实(Virtual Reality,VR)技术的发展,VR设备为用户提供了更直观的人机交互体验。例如,VR设备可以是VR头戴式显示设备(简称VR头显)。VR设备通过播放三维(three-dimentional,3D)视频文件,使用户观看到的视频图像更加立体现实,提升用户体验度。同时,VR设备也可以兼容播放二维视频文件。三维视频文件中的每帧图像是由两个相似的图像合成的,其原理是两个图像分别提供给两个眼睛,根据光线角度变化,能够使两个眼睛观察到的图像合成一个立体图像。由于三维视频图像和二维视频图像不同,为了使用户获取更好的感官体验,VR设备在获取到视频文件时,需要检测该视频文件是三维视频文件或是二维视频文件。针对不同维度的视频文件,VR会提供不同的播放方式。
其中,在传统方式中,可以通过将视频文件中的图像中的每个部分进行相似度比对,如将图像中的左半部分和右半部分进行相似度比对,或者,将图像中的上半部分或下半部分进行相似度比对,如果比对出相似度高,则可确定该图像为三维图像,该图像所属的视频文件为三维视频文件。然而,利用传统方式来识别三维图像方式的误判概率大,如果图像中包括的无效像素较多,传统方式下容易将非三维图像确定为三维图像。因此,这种方式对三维图像的识别的精确度低。
发明内容
本申请实施例公开了一种三维图像的识别方法和终端,能够提高对三维图像的识别精准度。
第一方面,本申请实施例公开了一种三维图像的识别方法,包括:
在视频文件中的一帧图像的图像区域内确定第一区域;
在所述第一区域内进行图像相似度比对,得到第一比对结果;
在所述图像区域内进行图像相似度比对,得到第二比对结果;
根据所述第一比对结果和所述第二比对结果,识别所述图像,如果所述第一比对结果和所述第二比对结果不一致,识别所述图像不是三维图像。
第二方面,本申请实施例公开了一种终端,包括功能单元,所述功能单元用于执行第一方面所示方法的部分或全部步骤。
第三方面,本申请实施例公开了一种终端,该终端包括包括处理器、存储器;所述存储器存储有可执行程序代码;所述处理器被配置为支持该终端执行第一方面提供的方法中相应的功能。存储器用于保存该终端必要的程序指令和数据。
第四方面,本申请实施例公开一种计算机存储介质,用于储存为上述第三方面提供的终端所用的计算机软件指令,其包含用于执行第一方面中方法所设计的程序。
本申请实施例中,在视频文件中的一帧图像的图像区域内确定第一区域后,可以在第一区域进行图像相似度比对,得到第一比对结果;也可以在图像区域内进行图像相似度比对,得到第二比对结果。从而,能够根据第一比对结果和第二比对结果,识别图像。上述方法能够更加准确的识别图像是否为三维图像。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例公开的一种三维图像的识别方法的流程示意图;
图2A至图2C是本申请实施例公开的一些图像的中间区域的确定方式示意图;
图3是本申请实施例公开的一种图像相似度比对方法的流程示意图;
图4是本申请实施例公开的一种图像的中间区域划分的小区域的示意图;
图5A至图5B是本申请实施例公开的一些三维图像的示意图;
图6A至图6E是本申请实施例公开的一些大区域和小区域的位置关系示意图;
图7是本申请实施例公开的一种终端的单元示意图;
图8是本申请实施例公开的一种终端的结构示意图。
具体实施方式
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。
本申请的说明书和权利要求书及附图中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。首先对本申请方法实施例进行描述。
请参阅图1,图1是本申请实施例公开的一种三维图像的识别方法的流程示意图。如图1所示,该方法至少包括以下步骤。
步骤S101,在视频文件中的一帧图像的图像区域内确定第一区域。
在一些可能的实现方式中,当终端获取到视频文件后,可从视频文件中截取若干帧图像。并识别每一帧图像是否为三维图像,如果确定若干帧图像中三 维图像的数量达到预设阈值,则可确定该视频文件为三维视频文件,进而通过与三维视频文件匹配的播放方式对该视频文件进行播放。
在一些可能的实现方式中,在识别一帧图像是否为三维图像之前,可以对该图像进行处理,可以将其转换为灰度图像,其中,每个像素对应一个灰度值,该灰度值也可表示为像素值。并将该图像缩小,同时,将其缩小成尺寸为128×128个像素的图像。128×128分别表示图像的宽度和高度,本申请中,以像素作为图像尺寸的单位。需要说明的是,上述尺寸仅是举例性的,本申请对缩小后的图像尺寸不作具体限定,并对图像转换灰度和缩小处理的步骤的先后顺序不作具体限定。
在此,可以为处理后的图像确定一个单元区域,该单元区域是处理后的图像上的最小图像区域。例如,确定图像上的单元区域是包括8×8个像素的区域。则可以确定一个尺寸为128×128的图像包括了16×16个单元区域。需要说明的是,单元区域可以根据图像尺寸确定,单元区域不要求宽度像素数量和高度像素数量相同。例如,如果图像的宽度像素数量和长度像素数量不同,则单元区域的宽度像素数量和长度像素数量不同。
本申请实施例中,可以通过以下方式中的至少一种来确定图像的第一区域,在此,图像的第一区域是指图像区域中不包括无效像素的区域,无效像素是指影响图像区域的像素平均值的准确性的像素,例如,图5A中,图像区域中上下边框区域包括的黑色像素即为无效像素。
1、可以确定图像的中间区域即为图像的第一区域。其中,图像的中间区域的中心点与图像的中心点重合。图像的中间区域的长度和宽度可以是预定义的,也可以是根据图像中的目标对象的大小确定的,在此不作限定。以图像的尺寸为128×128为例,此时图像为正方形,则图像的中间区域也为正方形,例如,可以预定义图像的中间区域包括12×12个单元区域。在上述方式下确定图像的中间区域与图像区域的位置关系的示意图可以参见图2A,图2A举例性的示出了一种图像区域和中间区域的位置关系。
2、还可以首先确定图像的第二区域是否有效,进而确定图像的第一区域。具体实现中,可以预定义图像的第二区域。例如,第二区域为边框区域。预定义图像的第二区域可以参见图2B,图2B举例性的示出了一种第二区域与图像区 域的位置关系。或者,也可以根据图像中的目标对象的大小和位置确定第二区域,在第二区域内不包括图像中的全部目标对象。本申请实施例所描述的目标对象是指图像中具备一定特征的图形元素,该图形元素能够具体代表一种物体,例如图形元素代表云、花、人像等。
确定图像的第二区域是否有效可以通过第二区域包括的单元区域的像素标识确定。其中,单元区域的像素标识是基于单元区域的像素平均值和图像的像素平均值确定的,这里所说的像素平均值也可理解为像素灰度平均值。具体实现中,计算出单元区域的像素平均值,在此,可以将图像区域的像素平均值作为参考值,也可以将图像区域中的部分区域的像素平均值作为参考值,例如,将图像区域划分为若干个区域,每个区域的大小相同,则将单元区域所属区域的像素平均值作为参考值。如果单元区域的像素平均值大于参考值,则可以设置该单元区域的像素标识为1;如果单元区域的像素平均值小于参考值,则可以设置该单元区域的像素标识为0。
可以通过上述方式,确定第二区域内的单元区域的像素标识,并根据第二区域内的单元区域的像素标识,通过以下方式确定第二区域是否满足无效条件:
(1)第二区域中存在连续的多个单元区域的像素标识相同,且连续的单元区域的区域数量达到第一阈值。
在一些可能的实现方式中,可以按照预设路线依次检测单元区域的像素标识,如果按照预设路线依次检测单元区域的像素标识时,检测到连续多个单元区域的像素标识相同。连续多个单元区域也可以理解为多个单元区域的所在位置的坐标值连续,这里,坐标值连续可以包括x坐标值连续和/或y坐标值连续。如果连续检测的像素标识相同的单元区域的区域数量达到第一阈值,则可确定第二区域满足无效条件。
(2)第二区域中像素标识相同的多个单元区域的区域数量占第二区域中全部单元区域的区域数据的比值达到第二阈值。
在一些可能的实现方式中,也可以统计第二区域中全部单元区域中像素标识相同的单元区域的数量占比。例如,在第二区域中像素标识为1或0的单元区域的区域数量占全部单元区域的区域数量的比值达到第二阈值,则确定该第二区域满足无效条件,即第二区域中仅包括图像中的无效信息。第二阈值可以 是99%,99.5%等,在此对第二阈值的取值不做具体限定。
通过上述方式,如果第二区域满足无效条件,则在图像的非第二区域内确定图像的中间区域。具体实现中,如果非第二区域的尺寸不满足预定义的中间区域的尺寸,例如,非第二区域的尺寸大于预定义的中间区域的尺寸,则可以从非第二区域中裁剪出满足预定义尺寸的中间区域。
3、还可以通过确定图像中的目标对象的大小和所在位置,来确定图像的第一区域。
在一些可能的实现方式中,可以通过确定图像中的目标对象的大小和所在位置,来确定图像的第一区域。其中,确定的第一区域可以包括图像中全部的目标对象,也可以包括图像中部分目标对象,例如,根据目标对象的重要标识,确定中间区域所要包括的目标对象。可以根据目标对象的大小来确定中间区域的尺寸。图2C举例性的示出了一种图像区域和中间区域的位置关系。如图2C所示,中间区域是基于图像中包括的目标对象确定的。
需要说明的是,通过方式2或方式3确认出的第一区域的中心点不一定要与图像区域的中心点重合。在此,本申请实施例不做具体限定。
步骤S102,在所述第一区域内进行图像相似度比对,得到第一比对结果。
步骤S103,在所述图像区域内进行图像相似度比对,得到第二比对结果。
步骤S104,根据所述第一比对结果和所述第二比对结果,识别所述图像,如果所述第一比对结果和所述第二比对结果不一致,识别所述图像不是三维图像。
需要说明的是,本申请实施例中对步骤S102和步骤S103的执行顺序不作限定。步骤S102也可以在步骤S103后执行,或者与步骤S103并行执行。
在一些可能的实现方式中,在第一区域进行图像相似度比对的实现方式可以与在图像区域进行图像相似度比对的实现方式相同,也可以不同。
在一些可能的实现方式中,可以根据第一比对结果和第二比对结果是否一致,来识别图像是否为三维图像。如果第一比对结果和第二比对结果一致,则根据其中一个比对结果,来识别图像是否为三维图像。如果第一比对结果和第二比对结果不一致,能够识别出该图像不是三维图像,进而避免了无效像素对图像识别的影响。
本申请实施例中,在视频文件中的一帧图像的图像区域内确定第一区域后,可以在第一区域进行图像相似度比对,得到第一比对结果;也可以在图像区域内进行图像相似度比对,得到第二比对结果。从而,能够根据第一比对结果和第二比对结果,识别图像。上述方法能够更加准确的识别图像是否为三维图像。
下面通过以下方法实施例来介绍在第一区域进行图像相似度比对的实现方式。
请参阅图3,图3是本申请实施例提供的一种图像相似度比对方法的流程示意图。如图3所示,该方法包括以下步骤。
步骤S301,将第一区域划分为至少四个小区域。
步骤S302,将所述图像的中间区域所包括的至少四个小区域中的第一小区域和相邻小区域进行图像相似度比对,得到第一比对结果。
在一些可能的实现方式中,可以将图像的中间区域划分为至少四个小区域。本申请实施例以将图像的中间区域划分为四个小区域为例,来说明图像相似度比对的方式,对于将图像的中间区域划分为四个以上小区域的情况,实施图像相似度比对的方式相同。这里所说的小区域也可以理解为是第一区域的子区域。在下面描述中,图像区域的子区域可以表述为大区域。为了实现图像比对,划分的四个小区域的尺寸相同。
其中,四个小区域和中间区域的关系可参见图4所示。并为每个小区域设置一个区域标识,四个小区域依次被标识为区域A,区域B,区域C和区域D。假设中间区域包括12×12个单元区域,则区域A至区域D分别包括6×6个单元区域。
当确定中间区域的四个小区域后,则可以进行图像相似度比对。本申请实施例所描述的与第一小区域的相邻小区域是指与第一小区域共享区域边界的小区域。假设第一小区域为区域A,则区域A的相邻小区域是指区域B或区域C。区域A可以分别与区域B和区域C进行图像相似度比对。对于区域A和区域B以及区域A和区域C的图像相似度比对顺序,本申请实施例不做具体限定。
以区域A和区域B进行图像相似度比对为例,分别确定区域A和区域B包括的单元区域的像素标识,在此,需要说明的是,区域A中包括的一个单元区域的像素标识,可以是基于该单元区域的像素平均值和中间区域的像素平均值确定的,也可以是基于该单元区域的像素平均值和区域A的像素平均值确定的;对 于区域A中单元区域的像素标识的确定方式对应作用于区域B、C、D中的单元区域。在确定出区域A和区域B包括的单元区域的像素标识后,可比对对应的单元区域的像素标识,区域A中的单元区域与区域B中的单元区域的对应关系是基于单元区域在小区域中的位置确定的。如图4所示,区域A中的单元区域A1和区域B中的单元区域B1成对应关系,他们都在所属区域的左上角。在比对区域A和区域B中的对应的单元区域的像素标识时,如果区域A中的一个单元区域和区域B中的对应单元区域的像素标识不相同,则将该单元区域添加至第一单元区域集合。在此,将统计的区域A中的第一单元区域集合中的单元区域的数量标识为q1。
通过上述方式,也可以比对区域A和区域C中的对应的单元区域的像素标识。在比对区域A和区域C中的对应的单元区域的像素标识时,如果区域A中的一个单元和区域C中的对应单元区域的像素标识不相同,则将该单元区域添加至第二单元区域集合。在此,将统计的区域A中的第二单元区域结合中的单元区域的数量标识为q2。
为q1设置第三阈值,并为q2设置第四阈值。其中,第三阈值和第四阈值可以相同,也可以不同。第三阈值和第四阈值是基于小区域所包括的单元区域的数量确定的。可以根据q1和q2以及对应的阈值确定中间区域的图像相似度比对结果。比对结果包括:q1大于第三阈值且q2大于第四阈值;q1大于第三阈值,q2不大于第四阈值;q1不大于第三阈值,q2大于第四阈值;q1不大于第三阈值,q2不大于第四阈值。
在一些可能的实现方式中,如果比对结果为q1大于第三阈值且q2大于第四阈值,则表示区域A既不与区域B相似,也不予区域C相似,则可根据比对结果识别该图像不是三维图像。如果比对结果为q1大于第三阈值,q2不大于第四阈值,表示区域A和区域C相似,则可根据比对结果识别该图像为上下三维图像,上下三维图像的一种表示示意图可参见图5A。如果比对结果为q1不大于第三阈值,q2大于第四阈值,表示区域A和区域B相似,则可根据比对结果识别该图像为左右三维图像,左右三维图像的一种表示示意图可参见图5B所示。如果比对结果为q1不大于第三阈值,q2不大于第四阈值,表示区域A既与区域B相似,也与区域C相似,则无法识别该图像是否为三维图像。
需要说明的是,在步骤S302中,可以实现将中间区域中的每个小区域依次与其相邻的小区域进行图像相似度比对,可以得到四组比对结果,或者,也可以将中间区域中的两个小区域或三个小区域依次与其相邻的小区域进行图像相似度比对,得到两组或三组比对结果。可以综合步骤S302中得到的至少二组比对结果,对该图像进行识别。
需要说明的是,如果根据比对结果无法识别该图像是否为三维图像,还可以在视频文件中获取另一帧图像进行识别。
在一些可能的实现方式中,图像区域内的图像相似度比对方法可以参见上述第一区域内的图像相似度的比对方法。具体的,可以将图像区域划分出四个大区域,并将四个大区域中的第一大区域和相邻大区域进行图像相似度比对。
在此结合图6A至图6E介绍大区域和中间区域的小区域的关系。将图像区域划分出四个大区域,这四个大区域的区域标识分别为区域A’,区域B’,区域C’,区域D’。中间区域划分出四个小区域,这四个小区域的区域标识分别为区域A,区域B,区域C,区域D。
如图6A所示,中间区域的中心点和图像区域的中心点重合,此时,小区域包括的单元区域的集合是对应大区域包括的单元区域的集合的子集。如图6B-6C所示,中间区域的中心点在图像区域的中心点的左侧或右侧;如图6D-6E所示,中间区域的中心点在图像区域的中西点的上侧或下侧。当然,大区域和小区域的位置关系还可以为其他关系,在此不作穷举。
下面结合上述方法实施例及系统实施例,对本申请实施例中的装置实施例进行详细说明。
请参阅图7,图7是本申请实施例公开的一种终端的单元组成图。该终端可包括第一确定单元701、第一比对单元702、第二比对单元703和识别单元704。
其中,第一确定单元701,用于在视频文件中的一帧图像的图像区域内确定第一区域;
第一比对单元702,用于在所述第一区域内进行图像相似度比对,得到第一比对结果;
第二比对单元703,用于在所述图像区域内进行图像相似度比对,得到第 二比对结果;
识别单元704,用于根据所述第一比对结果和所述第二比对结果,识别所述图像,如果所述第一比对结果和所述第二比对结果不一致,识别所述图像不是三维图像。
可选的,所述第一比对单元702包括:
第二确定单元,用于确定所述第一区域内的单元区域的像素标识;
统计单元,用于分别统计所述第一区域中的第一子区域与第二子区域中像素标识不一致的单元区域的第一数量,以及所述第一子区域与第三子区域中像素标识不一致的第二数量,所述第一子区域与所述第二子区域和所述第三子区域分别相邻;
结果单元,用于根据所述第一数量和所述第二数量,得到第一比对结果。
可选的,所述第二确定单元用于:
根据所述第一区域内的单元区域的像素平均值和所述第一区域的像素平均值,确定所述单元区域的像素标识;或者,
根据所述第一区域内的单元区域的像素平均值和所述单元区域所属的子区域的像素平均值,确定所述单元区域的像素标识。
可选的,所述第一确定单元701用于:
检测所述图像区域中的第二区域是否满足无效条件;
如果所述第二区域满足无效条件,从所述图像区域内的非第二区域中确定第一区域。
可选的,所述无效条件包括:
所述第二区域中存在连续的多个单元区域的像素标识相同,且所述连续的单元区域的区域数量达到第一阈值;或者,
所述第二区域中像素标识相同的多个单元区域的区域数量占所述第二区域中全部单元区域的区域数量的比值达到第二阈值。
可选的,所述第一确定单元701用于:
在视频文件中的一帧图像的图像区域内,确定包括所述图像中的目标对象的区域为第一区域。
参照以上实施例,终端是以单元的形式来呈现。这里的“单元”可以指特 定应用集成电路(application-specific integrated circuit,ASIC),执行一个或多个软件或固件程序的处理器和存储器,集成逻辑电路,和/或其他可以提供上述功能的器件。
在一个实施例中,本领域的技术人员可以想到图8所示的终端可以采用以下图9所示的形式。本申请实施例中所描述的终端可以包括手机、平板电脑、VR终端等能够支持播放三维视频文件的终端。这里,VR终端可以是指VR穿戴设备,例如VR头戴式显示设备等。
如图8所示,终端可以图8中的结构来实现,终端可包括处理器801、存储器802和显示屏803,处理器801、存储器802与显示屏803耦合。显示屏803能够支持播放三维视频文件和二维视频文件。显示屏804可以采用柔性材料制作。
本申请实施例中,处理器801可以是通用中央处理器(CPU),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制以上方案程序执行的集成电路。处理器801还可用于执行图1或图6方法实施例中的方法,也可用于执行图8所示装置中功能单元的功能。
具体的,处理器801调用存储器802中存储的可执行程序代码,执行如下步骤:
在视频文件中的一帧图像的图像区域内确定第一区域;
在所述第一区域内进行图像相似度比对,得到第一比对结果;
在所述图像区域内进行图像相似度比对,得到第二比对结果;
根据所述第一比对结果和所述第二比对结果,识别所述图像,如果所述第一比对结果和所述第二比对结果不一致,识别所述图像不是三维图像。
可选的,所述处理器在所述第一区域内进行图像相似度比对,得到第一比对结果包括:
确定所述第一区域内的单元区域的像素标识;
分别统计所述第一区域中的第一子区域与第二子区域中像素标识不一致的单元区域的第一数量,以及所述第一子区域与第三子区域中像素标识不一致的第二数量,所述第一子区域与所述第二子区域和所述第三子区域分别相邻;
根据所述第一数量和所述第二数量,得到第一比对结果。
可选的,所述处理器确定所述第一区域内的单元区域的像素标识,包括:
根据所述第一区域内的单元区域的像素平均值和所述第一区域的像素平均值,确定所述单元区域的像素标识;或者,
根据所述第一区域内的单元区域的像素平均值和所述单元区域所属的子区域的像素平均值,确定所述单元区域的像素标识。
可选的,所述处理器在视频文件中的一帧图像的图像区域内确定第一区域,包括:
检测所述图像区域中的第二区域是否满足无效条件;
如果所述第二区域满足无效条件,从所述图像区域内的非第二区域中确定第一区域。
可选的,所述无效条件包括:
所述第二区域中存在连续的多个单元区域的像素标识相同,且所述连续的单元区域的区域数量达到第一阈值;或者,
所述第二区域中像素标识相同的多个单元区域的区域数量占所述第二区域中全部单元区域的区域数量的比值达到第二阈值。
可选的,所述处理器在视频文件中的一帧图像的图像区域内确定第一区域,包括:
在视频文件中的一帧图像的图像区域内,确定包括所述图像中的目标对象的区域为第一区域
存储器802可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器802可以是独立存在,通过总线与处理器801相连接。存储器802也可以和处理器801集成在一起。
本申请实施例中,通过确定视频文件中的一帧图像的中间区域,并将该图 像的中间区域所包括的至少四个小区域中的第一小区域和相邻小区域进行图像相似度比对,以得到第一比对结果,能够根据该比对结果识别出图像是否为三维图像。通过上述方式,能够避免图像中的无效区域对图像相似度比对产生的影响,进而提升三维图像识别的精准度。
本申请实施例还提供了一种计算机存储介质,用于储存为上述终端所用的计算机软件指令,其包含用于执行上述方法实施例所涉及的计算机程序。
尽管在此结合各实施例对本申请进行了描述,然而,在实施所要求保护的本申请过程中,本领域技术人员通过查看附图、公开内容、以及所附权利要求书,可理解并实现公开实施例的其他变化。在权利要求中,“包括”(comprising)一词不排除其他组成部分或步骤,“一”或“一个”不排除多个的情况。单个处理器或其他单元可以实现权利要求中列举的若干项功能。相互不同的从属权利要求中记载了某些措施,但这并不表示这些措施不能组合起来产生良好的效果。
本领域技术人员应明白,本申请的实施例可提供为方法、装置(设备)、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。计算机程序存储/分布在合适的介质中,与其它硬件一起提供或作为硬件的一部分,也可以采用其他分布形式,如通过Internet或其它有线或无线电信系统。
本申请是参照本申请实施例的方法、装置(设备)和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中 的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管结合具体特征及其实施例对本申请进行了描述,显而易见的,在不脱离本申请的精神和范围的情况下,可对其进行各种修改和组合。相应地,本说明书和附图仅仅是所附权利要求所界定的本申请的示例性说明,且视为已覆盖本申请范围内的任意和所有修改、变化、组合或等同物。显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (18)

  1. 一种三维图像的识别方法,其特征在于,包括:
    在视频文件中的一帧图像的图像区域内确定第一区域;
    在所述第一区域内进行图像相似度比对,得到第一比对结果;
    在所述图像区域内进行图像相似度比对,得到第二比对结果;
    根据所述第一比对结果和所述第二比对结果,识别所述图像,如果所述第一比对结果和所述第二比对结果不一致,识别所述图像不是三维图像。
  2. 如权利要求1所述方法,其特征在于,所述在所述第一区域内进行图像相似度比对,得到第一比对结果,包括:
    确定所述第一区域内的单元区域的像素标识;
    分别统计所述第一区域中的第一子区域与第二子区域中像素标识不一致的单元区域的第一数量,以及所述第一子区域与第三子区域中像素标识不一致的第二数量,所述第一子区域与所述第二子区域和所述第三子区域分别相邻;
    根据所述第一数量和所述第二数量,得到第一比对结果。
  3. 如权利要求2所述方法,其特征在于,所述确定所述第一区域内的单元区域的像素标识,包括:
    根据所述第一区域内的单元区域的像素平均值和所述第一区域的像素平均值,确定所述单元区域的像素标识;或者,
    根据所述第一区域内的单元区域的像素平均值和所述单元区域所属的子区域的像素平均值,确定所述单元区域的像素标识。
  4. 如权利要求1-3任一项所述方法,其特征在于,所述在视频文件中的一帧图像的图像区域内确定第一区域,包括:
    检测所述图像区域中的第二区域是否满足无效条件;
    如果所述第二区域满足无效条件,从所述图像区域内的非第二区域中确定第一区域。
  5. 如权利要求4所述方法,其特征在于,所述无效条件包括:
    所述第二区域中存在连续的多个单元区域的像素标识相同,且所述连续的单元区域的区域数量达到第一阈值;或者,
    所述第二区域中像素标识相同的多个单元区域的区域数量占所述第二区 域中全部单元区域的区域数量的比值达到第二阈值。
  6. 如权利要求1-3任一项所述方法,其特征在于,所述在视频文件中的一帧图像的图像区域内确定第一区域,包括:
    在视频文件中的一帧图像的图像区域内,确定包括所述图像中的目标对象的区域为第一区域。
  7. 一种终端,其特征在于,包括:
    第一确定单元,用于在视频文件中的一帧图像的图像区域内确定第一区域;
    第一比对单元,用于在所述第一区域内进行图像相似度比对,得到第一比对结果;
    第二比对单元,用于在所述图像区域内进行图像相似度比对,得到第二比对结果;
    识别单元,用于根据所述第一比对结果和所述第二比对结果,识别所述图像,如果所述第一比对结果和所述第二比对结果不一致,识别所述图像不是三维图像。
  8. 如权利要求7所述终端,其特征在于,所述第一比对单元包括:
    第二确定单元,用于确定所述第一区域内的单元区域的像素标识;
    统计单元,用于分别统计所述第一区域中的第一子区域与第二子区域中像素标识不一致的单元区域的第一数量,以及所述第一子区域与第三子区域中像素标识不一致的第二数量,所述第一子区域与所述第二子区域和所述第三子区域分别相邻;
    结果单元,用于根据所述第一数量和所述第二数量,得到第一比对结果。
  9. 如权利要求8所述终端,其特征在于,所述第二确定单元用于:
    根据所述第一区域内的单元区域的像素平均值和所述第一区域的像素平均值,确定所述单元区域的像素标识;或者,
    根据所述第一区域内的单元区域的像素平均值和所述单元区域所属的子区域的像素平均值,确定所述单元区域的像素标识。
  10. 如权利要求7-9任一项所述终端,其特征在于,所述第一确定单元用于:
    检测所述图像区域中的第二区域是否满足无效条件;
    如果所述第二区域满足无效条件,从所述图像区域内的非第二区域中确定第一区域。
  11. 如权利要求10所述终端,其特征在于,所述无效条件包括:
    所述第二区域中存在连续的多个单元区域的像素标识相同,且所述连续的单元区域的区域数量达到第一阈值;或者,
    所述第二区域中像素标识相同的多个单元区域的区域数量占所述第二区域中全部单元区域的区域数量的比值达到第二阈值。
  12. 如权利要求7-9任一项所述终端,其特征在于,所述第一确定单元用于:
    在视频文件中的一帧图像的图像区域内,确定包括所述图像中的目标对象的区域为第一区域。
  13. 一种终端,其特征在于,包括:
    存储有可执行程序代码的存储器;
    与所述存储器耦合的处理器;
    所述处理器调用所述存储器中存储的所述可执行程序代码,执行如下步骤:
    在视频文件中的一帧图像的图像区域内确定第一区域;
    在所述第一区域内进行图像相似度比对,得到第一比对结果;
    在所述图像区域内进行图像相似度比对,得到第二比对结果;
    根据所述第一比对结果和所述第二比对结果,识别所述图像,如果所述第一比对结果和所述第二比对结果不一致,识别所述图像不是三维图像。
  14. 如权利要求13所述终端,其特征在于,所述处理器在所述第一区域内进行图像相似度比对,得到第一比对结果包括:
    确定所述第一区域内的单元区域的像素标识;
    分别统计所述第一区域中的第一子区域与第二子区域中像素标识不一致的单元区域的第一数量,以及所述第一子区域与第三子区域中像素标识不一致的第二数量,所述第一子区域与所述第二子区域和所述第三子区域分别相邻;
    根据所述第一数量和所述第二数量,得到第一比对结果。
  15. 如权利要求14所述终端,其特征在于,所述处理器确定所述第一区域内的单元区域的像素标识,包括:
    根据所述第一区域内的单元区域的像素平均值和所述第一区域的像素平均值,确定所述单元区域的像素标识;或者,
    根据所述第一区域内的单元区域的像素平均值和所述单元区域所属的子区域的像素平均值,确定所述单元区域的像素标识。
  16. 如权利要求13-15任一项所述终端,其特征在于,所述处理器在视频文件中的一帧图像的图像区域内确定第一区域,包括:
    检测所述图像区域中的第二区域是否满足无效条件;
    如果所述第二区域满足无效条件,从所述图像区域内的非第二区域中确定第一区域。
  17. 如权利要求16所述终端,其特征在于,所述无效条件包括:
    所述第二区域中存在连续的多个单元区域的像素标识相同,且所述连续的单元区域的区域数量达到第一阈值;或者,
    所述第二区域中像素标识相同的多个单元区域的区域数量占所述第二区域中全部单元区域的区域数量的比值达到第二阈值。
  18. 如权利要求13-15任一项所述终端,其特征在于,所述处理器在视频文件中的一帧图像的图像区域内确定第一区域,包括:
    在视频文件中的一帧图像的图像区域内,确定包括所述图像中的目标对象的区域为第一区域。
PCT/CN2017/080104 2017-04-11 2017-04-11 三维图像的识别方法和终端 WO2018187939A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201780004639.9A CN108475341B (zh) 2017-04-11 2017-04-11 三维图像的识别方法和终端
PCT/CN2017/080104 WO2018187939A1 (zh) 2017-04-11 2017-04-11 三维图像的识别方法和终端

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/080104 WO2018187939A1 (zh) 2017-04-11 2017-04-11 三维图像的识别方法和终端

Publications (1)

Publication Number Publication Date
WO2018187939A1 true WO2018187939A1 (zh) 2018-10-18

Family

ID=63266492

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/080104 WO2018187939A1 (zh) 2017-04-11 2017-04-11 三维图像的识别方法和终端

Country Status (2)

Country Link
CN (1) CN108475341B (zh)
WO (1) WO2018187939A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110222235A (zh) * 2019-06-11 2019-09-10 百度在线网络技术(北京)有限公司 三维立体内容显示方法、装置、设备及存储介质
KR20210149542A (ko) 2020-06-02 2021-12-09 삼성에스디에스 주식회사 이미지 촬영 및 판독 방법, 이를 위한 장치

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102685539A (zh) * 2012-04-24 2012-09-19 Tcl集团股份有限公司 一种立体视频图像格式的识别方法、系统及立体播放器
CN103051913A (zh) * 2013-01-05 2013-04-17 北京暴风科技股份有限公司 一种3d片源格式自动识别的方法
KR20130093295A (ko) * 2012-02-14 2013-08-22 케이디씨 주식회사 입체 영상 자동 판별 장치 및 방법
CN105049824A (zh) * 2015-07-03 2015-11-11 无锡易维视显示技术有限公司 自动检测三维视频格式的方法
CN105898269A (zh) * 2015-12-27 2016-08-24 乐视致新电子科技(天津)有限公司 一种视频播放方法及装置
CN106131528A (zh) * 2016-06-23 2016-11-16 福建天泉教育科技有限公司 3d视频格式识别方法及系统
CN106231294A (zh) * 2015-10-30 2016-12-14 深圳超多维光电子有限公司 一种立体片源格式的检测方法及装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103996015B (zh) * 2013-09-26 2016-09-07 深圳市云立方信息科技有限公司 一种对3d图像识别的方法及装置
CN104767985A (zh) * 2014-01-07 2015-07-08 冠捷投资有限公司 使用区域分布分析以自动检测三维图像格式的方法
WO2015170557A1 (ja) * 2014-05-08 2015-11-12 オリンパス株式会社 ビデオプロセッサ、ビデオプロセッサの作動方法
CN106559680A (zh) * 2016-11-25 2017-04-05 北京小米移动软件有限公司 视频类型识别方法、装置及电子设备

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130093295A (ko) * 2012-02-14 2013-08-22 케이디씨 주식회사 입체 영상 자동 판별 장치 및 방법
CN102685539A (zh) * 2012-04-24 2012-09-19 Tcl集团股份有限公司 一种立体视频图像格式的识别方法、系统及立体播放器
CN103051913A (zh) * 2013-01-05 2013-04-17 北京暴风科技股份有限公司 一种3d片源格式自动识别的方法
CN105049824A (zh) * 2015-07-03 2015-11-11 无锡易维视显示技术有限公司 自动检测三维视频格式的方法
CN106231294A (zh) * 2015-10-30 2016-12-14 深圳超多维光电子有限公司 一种立体片源格式的检测方法及装置
CN105898269A (zh) * 2015-12-27 2016-08-24 乐视致新电子科技(天津)有限公司 一种视频播放方法及装置
CN106131528A (zh) * 2016-06-23 2016-11-16 福建天泉教育科技有限公司 3d视频格式识别方法及系统

Also Published As

Publication number Publication date
CN108475341B (zh) 2021-08-17
CN108475341A (zh) 2018-08-31

Similar Documents

Publication Publication Date Title
US11842438B2 (en) Method and terminal device for determining occluded area of virtual object
CN109961406B (zh) 一种图像处理的方法、装置及终端设备
WO2021012837A1 (zh) 推荐信息植入位置的确定方法、装置、设备及存储介质
CN108780357B (zh) 用于将物理环境的视觉图像集成到虚拟实境的空间关系
TWI683257B (zh) 識別二維碼位置的方法及其系統
US20150356770A1 (en) Street view map display method and system
CN108596944B (zh) 一种提取运动目标的方法、装置及终端设备
US20140085538A1 (en) Techniques and apparatus for audio isolation in video processing
WO2014044158A1 (zh) 一种图像中的目标物体识别方法及装置
US8442327B2 (en) Application of classifiers to sub-sampled integral images for detecting faces in images
CN113490050B (zh) 视频处理方法和装置、计算机可读存储介质及计算机设备
JP2022534262A (ja) パノラマ画像、ビデオ合成方法、コンピュータ読み取り可能な記録媒体及びパノラマカメラ
WO2019205945A1 (zh) 确定广告插入位置的方法、计算机设备和存储介质
JP6592132B2 (ja) 肌状態検出方法及び電子機器
CN110415237B (zh) 皮肤瑕疵检测方法、检测装置、终端设备及可读存储介质
JP2012221117A (ja) 画像処理装置及びプログラム
WO2018187939A1 (zh) 三维图像的识别方法和终端
US20150110414A1 (en) Image processing apparatus and method
CN112634235A (zh) 产品图像的边界检测方法和电子设备
WO2020001016A1 (zh) 运动图像生成方法、装置、电子设备及计算机可读存储介质
CN112529006B (zh) 全景图片的检测方法、装置、终端及存储介质
CN108156504B (zh) 一种视频显示方法及装置
CN113344957B (zh) 图像处理方法、图像处理装置和非瞬时性存储介质
CN114972702A (zh) 一种工业图像目标检测图像训练集的采样方法和存储介质
US20180144521A1 (en) Geometric Work Scheduling of Irregularly Shaped Work Items

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: 17905152

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 20.02.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 17905152

Country of ref document: EP

Kind code of ref document: A1