CN108475341B - Three-dimensional image recognition method and terminal - Google Patents

Three-dimensional image recognition method and terminal Download PDF

Info

Publication number
CN108475341B
CN108475341B CN201780004639.9A CN201780004639A CN108475341B CN 108475341 B CN108475341 B CN 108475341B CN 201780004639 A CN201780004639 A CN 201780004639A CN 108475341 B CN108475341 B CN 108475341B
Authority
CN
China
Prior art keywords
area
image
region
unit
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201780004639.9A
Other languages
Chinese (zh)
Other versions
CN108475341A (en
Inventor
谢俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Royole Technologies Co Ltd
Original Assignee
Shenzhen Royole Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Royole Technologies Co Ltd filed Critical Shenzhen Royole Technologies Co Ltd
Publication of CN108475341A publication Critical patent/CN108475341A/en
Application granted granted Critical
Publication of CN108475341B publication Critical patent/CN108475341B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

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

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

The embodiment of the application discloses a method and a terminal for identifying a three-dimensional image, wherein the method comprises the following steps: determining a first area in an image area of a frame of image in a video file; comparing the image similarity in the first area to obtain a first comparison result; comparing the image similarity in the image area to obtain a second comparison result; and identifying the image according to the first comparison result and the second comparison result, and identifying that the image is not a three-dimensional image if the first comparison result is inconsistent with the second comparison result. According to the embodiment of the application, the identification accuracy of the three-dimensional image can be improved.

Description

Three-dimensional image recognition method and terminal
Technical Field
The application relates to the technical field of image recognition, in particular to a three-dimensional image recognition method and a terminal.
Background
With the development of Virtual Reality (VR) technology, VR devices provide more intuitive human-computer interaction experience for users. For example, the VR device may be a VR head mounted display device (abbreviated VR headset). By playing a three-dimensional (3D) video file, the VR equipment enables a video image watched by a user to be more three-dimensional, and user experience is improved. Meanwhile, the VR equipment can also be compatible with playing two-dimensional video files. Each frame of image in the three-dimensional video file is synthesized by two similar images, and the principle is that the two images are respectively provided for two eyes, and the images observed by the two eyes can be synthesized into a three-dimensional image according to the change of the light angle. Because the three-dimensional video image and the two-dimensional video image are different, in order to enable a user to obtain better sensory experience, when the VR device obtains a video file, it needs to detect whether the video file is a three-dimensional video file or a two-dimensional video file. For video files of different dimensions, the VR may provide different play modes.
In a conventional manner, similarity comparison may be performed on each part in an image in a video file, for example, similarity comparison may be performed on a left half part and a right half part in the image, or similarity comparison may be performed on an upper half part or a lower half part in the image, and if the similarity is found to be high, it may be determined that the image is a three-dimensional image, and the video file to which the image belongs is a three-dimensional video file. However, the conventional method for identifying a three-dimensional image has a high false judgment probability, and if the number of invalid pixels included in the image is large, the non-three-dimensional image is easily determined as a three-dimensional image in the conventional method. Therefore, the accuracy of recognition of the three-dimensional image in this manner is low.
Disclosure of Invention
The embodiment of the application discloses a three-dimensional image identification method and a terminal, which can improve the identification accuracy of three-dimensional images.
In a first aspect, an embodiment of the present application discloses a method for identifying a three-dimensional image, including:
determining a first area in an image area of a frame of image in a video file;
comparing the image similarity in the first area to obtain a first comparison result;
comparing the image similarity in the image area to obtain a second comparison result;
and identifying the image according to the first comparison result and the second comparison result, and identifying that the image is not a three-dimensional image if the first comparison result is inconsistent with the second comparison result.
In a second aspect, an embodiment of the present application discloses a terminal, which includes a functional unit, where the functional unit is configured to execute part or all of the steps of the method shown in the first aspect.
In a third aspect, an embodiment of the present application discloses a terminal, which includes a processor and a memory; the memory stores executable program code; the processor is configured to support the terminal to perform corresponding functions in the method provided by the first aspect. The memory is used for storing program instructions and data necessary for the terminal.
In a fourth aspect, an embodiment of the present application discloses a computer storage medium for storing computer software instructions for the terminal provided in the third aspect, which contains a program designed to execute the method in the first aspect.
In the embodiment of the application, after a first area is determined in an image area of one frame of image in a video file, image similarity comparison can be performed in the first area to obtain a first comparison result; or comparing the image similarity in the image area to obtain a second comparison result. Thus, the image can be identified based on the first comparison result and the second comparison result. The method can more accurately identify whether the image is a three-dimensional image.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flowchart of a three-dimensional image recognition method disclosed in an embodiment of the present application;
fig. 2A to 2C are schematic diagrams illustrating a determination manner of a middle area of some images disclosed in an embodiment of the present application;
fig. 3 is a schematic flowchart of an image similarity comparison method disclosed in an embodiment of the present application;
FIG. 4 is a schematic diagram of a small region divided from a middle region of an image according to an embodiment of the present disclosure;
FIGS. 5A-5B are schematic diagrams of some three-dimensional images disclosed in embodiments of the present application;
fig. 6A to 6E are schematic diagrams illustrating a positional relationship between some large areas and some small areas disclosed in the embodiments of the present application;
fig. 7 is a schematic diagram of elements 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.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," "third," and "fourth," etc. in the description and claims of this application and the accompanying drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. First, embodiments of the method of the present application will be described.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating a method for recognizing a three-dimensional image according to an embodiment of the present disclosure. As shown in fig. 1, the method includes at least the following steps.
In step S101, a first area is determined in an image area of one frame of image in a video file.
In some possible implementations, after the terminal acquires the video file, several frames of images may be captured from the video file. And identifying whether each frame of image is a three-dimensional image, if the number of the three-dimensional images in the plurality of frames of images reaches a preset threshold value, determining that the video file is the three-dimensional video file, and playing the video file in a playing mode matched with the three-dimensional video file.
In some possible implementations, before identifying whether a frame of image is a three-dimensional image, the image may be processed and converted into a grayscale image, where each pixel corresponds to a grayscale value, which may also be expressed as a pixel value. And the image is reduced while reducing it to an image of size 128 × 128 pixels. 128 × 128 denotes the width and height of an image, respectively, and in this application, pixels are taken as a unit of image size. It should be noted that the above dimensions are merely exemplary, the size of the image after reduction is not specifically limited in the present application, and the order of the steps of image conversion to the gray scale and reduction processing is not specifically limited.
Here, a unit area, which is a minimum image area on the processed image, may be determined for the processed image. For example, it is determined that the unit area on the image is an area including 8 × 8 pixels. It can be determined that one image having a size of 128 × 128 includes 16 × 16 unit areas. It should be noted that the unit area may be determined according to the image size, and the unit area does not require the same number of width pixels and 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 a unit area are different.
In the embodiment of the present application, the first region of the image may be determined by at least one of the following manners, where the first region of the image refers to a region of the image region that does not include an invalid pixel, and the invalid pixel refers to a pixel that affects accuracy of an average value of pixels of the image region, for example, in fig. 5A, a black pixel included in upper and lower frame regions in the image region is an invalid pixel.
1. The middle region of the image may be determined to be the first region of the image. Wherein the center point of the middle region of the image coincides with the center point of the image. The length and width of the middle region of the image may be predefined, or may be determined according to the size of the target object in the image, which is not limited herein. Taking the size of the image as 128 × 128 as an example, when the image is square, the middle area of the image is also square, and for example, the middle area of the image may be predefined to include 12 × 12 unit areas. Fig. 2A is a schematic diagram of determining the positional relationship between the intermediate region and the image region of the image in the above manner, and fig. 2A illustrates an exemplary positional relationship between the image region and the intermediate region.
2. It may also be determined whether the second region of the image is valid first, and thus the first region of the image. In a specific implementation, the second region of the image may be predefined. For example, the second area is a bezel area. Second region of the predefined image can be seen in fig. 2B, which fig. 2B illustrates an exemplary positional relationship of the second region to the image region. Alternatively, the second area may be determined according to the size and position of the target object in the image, and all the target objects in the image may not be included in the second area. The target object described in the embodiment of the present application refers to a graphic element with a certain feature in an 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.
The determination of whether the second region of the image is valid may be determined by pixel identification of a unit region included in the second region. The pixel identification 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 here can also be understood as the pixel gray level average value. In a specific implementation, the average pixel value of the unit area is calculated, where the average pixel value of the image area may be used as a reference value, and the average pixel value of a partial area in the image area may also be used as a reference value. If the average value of the pixels of the unit area is greater than the reference value, the pixel identification of the unit area can be set to 1; if the average value of the pixels of the unit area is less than the reference value, the pixel flag of the unit area may be set to 0.
In the above manner, the pixel identification of the unit area in the second area is determined, and whether the second area satisfies the invalidation condition is determined according to the pixel identification of the unit area in the second area by:
(1) the pixel identifications of a plurality of continuous unit areas in the second area are the same, and the number of the continuous unit areas reaches a first threshold value.
In some possible implementation manners, the pixel identifiers of the unit areas may be sequentially detected according to a preset route, and if the pixel identifiers of the unit areas are sequentially detected according to the preset route, it is detected that the pixel identifiers of a plurality of consecutive unit areas are the same. The continuous plurality of unit regions may also be understood as continuous coordinate values of the positions of the plurality of unit regions, where the continuous coordinate values may include continuous x-coordinate values and/or continuous y-coordinate values. If the number of areas in which the continuously detected pixels identify the same unit area reaches the first threshold, it may be determined that the second area satisfies the invalidity condition.
(2) The ratio of the area number of the plurality of unit areas with the same pixel identification in the second area to the area data of all the unit areas in the second area reaches a second threshold value.
In some possible implementations, the number of unit areas with the same pixel identification in all the unit areas in the second area may also be counted. For example, if the ratio of the number of unit areas having pixels identified as 1 or 0 to the number of all unit areas in the second area reaches a second threshold, it is determined that the second area satisfies the invalidation condition, that is, only invalid information in the image is included in the second area. The second threshold may be 99%, 99.5%, etc., and the value of the second threshold is not particularly limited.
In the above manner, if the second area satisfies the invalidation condition, the middle area of the image is determined within the non-second area of the image. In a specific implementation, if the size of the non-second area does not satisfy the size of the predefined intermediate area, for example, the size of the non-second area is larger than the size of the predefined intermediate area, the intermediate area satisfying the predefined size may be cut out from the non-second area.
3. The first region of the image may also be determined by determining the size and location of the target object in the image.
In some possible implementations, the first region of the image may be determined by determining a size and a location of a target object in the image. The determined first region may include all target objects in the image, or may include part of the target objects in the image, for example, the target objects to be included in the middle region are determined according to the important identifiers of the target objects. The size of the intermediate region may be determined according to the size of the target object. Fig. 2C exemplarily shows a positional relationship between the image area and the intermediate area. As shown in fig. 2C, the middle area is determined based on the target object included in the image.
It should be noted that the center point of the first region determined by the method 2 or the method 3 does not necessarily coincide with the center point of the image region. Here, the embodiments of the present application are not particularly limited.
And S102, comparing the image similarity in the first area to obtain a first comparison result.
And step S103, comparing the image similarity in the image area to obtain a second comparison result.
Step S104, identifying the image according to the first comparison result and the second comparison result, and identifying that the image is not a three-dimensional image if the first comparison result is inconsistent with the second comparison result.
In the embodiment of the present application, the execution order of step S102 and step S103 is not limited. Step S102 may also be performed after step S103, or in parallel with step S103.
In some possible implementations, the implementation manner of performing the image similarity comparison in the first region may be the same as or different from the implementation manner of performing the image similarity comparison in the image region.
In some possible implementations, whether the image is a three-dimensional image may be identified according to whether the first comparison result and the second comparison result are consistent. And if the first comparison result is consistent with the second comparison result, identifying whether the image is a three-dimensional image according to one of the comparison results. If the first comparison result is inconsistent with the second comparison result, the image can be identified to be not a three-dimensional image, and further the influence of invalid pixels on image identification is avoided.
In the embodiment of the application, after a first area is determined in an image area of one frame of image in a video file, image similarity comparison can be performed in the first area to obtain a first comparison result; or comparing the image similarity in the image area to obtain a second comparison result. Thus, the image can be identified based on the first comparison result and the second comparison result. The method can more accurately identify whether the image is a three-dimensional image.
The following method embodiment describes an implementation of comparing image similarity in the first region.
Referring to fig. 3, fig. 3 is a schematic flowchart illustrating an image similarity comparison method according to an embodiment of the present disclosure. 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, comparing image similarity between a first small region and an adjacent small region of at least four small regions included in the middle region of the image to obtain a first comparison result.
In some possible implementations, the middle region of the image may be divided into at least four small regions. The embodiment of the present application describes the manner of comparing image similarity by taking an example of dividing the middle area of an image into four small areas, and the manner of comparing image similarity is the same for the case of dividing the middle area of an image into four or more small areas. A small region as referred to herein may also be understood as a sub-region of the first region. In the following description, a sub-region of an image region may be expressed as a large region. In order to realize image comparison, the sizes of the divided four small regions are the same.
The relationship between the four small regions and the middle region can be seen in fig. 4. And sets a region identifier for each small region, and the four small regions are sequentially identified as region a, region B, region C, and region D. Assuming that the middle area includes 12 × 12 unit areas, the areas a to D include 6 × 6 unit areas, respectively.
After four small regions of the middle region are determined, image similarity comparison can be performed. The neighboring small region to the first small region described in the embodiments of the present application refers to a small region that shares a region boundary with the first small region. Assuming that the first small region is region a, the neighboring small regions of region a are referred to as region B or region C. The region a may be compared with the region B and the region C for image similarity, respectively. The image similarity comparison sequence between the area a and the area B, and between the area a and the area C is not specifically limited in the embodiments of the present application.
Taking the image similarity comparison between the area a and the area B as an example, determining the pixel identifiers of the unit areas included in the area a and the area B, respectively, where it should be noted that the pixel identifier of one unit area included in the area a may be determined based on the pixel average value of the unit area and the pixel average value of the middle area, or may be determined based on the pixel average value of the unit area and the pixel average value of the area a; the manner of determination of the pixel identification of the unit area in the area a corresponds to the unit area in the area B, C, D. After the pixel identifiers of the unit areas included in the area a and the area B are determined, the pixel identifiers of the corresponding unit areas may be compared, and the correspondence between the unit areas in the area a and the unit areas in the area B is determined based on the positions of the unit areas in the cell. As shown in fig. 4, the cell region a1 in the region a and the cell region B1 in the region B correspond, and they are both in the upper left corner of the region to which they belong. When comparing the pixel identifications of the corresponding unit areas in the area a and the area B, if the pixel identifications of one unit area in the area a and the corresponding unit area in the area B are not the same, adding the unit area to the first unit area set. Here, the number of unit areas in the first unit area set in the statistical area a is identified as q 1.
In the above manner, the pixel identifications of the corresponding unit areas in the area a and the area C may also be compared. When comparing the pixel identifications of the corresponding unit areas in the area a and the area C, if the pixel identifications of one unit in the area a and the corresponding unit area in the area C are not the same, adding the unit area to the second unit area set. Here, the number of unit areas in the second unit area combination in the statistical area a is identified as q 2.
A third threshold is set for q1 and a fourth threshold is set for q 2. The third threshold and the fourth threshold may be the same or different. The third threshold value and the fourth threshold value are determined based on the number of unit regions included in the small region. The image similarity alignment result of the middle region can be determined according to q1 and q2 and corresponding thresholds. The comparison result comprises: q1 is greater than the third threshold and q2 is greater than the fourth threshold; q1 is greater than the third threshold, q2 is not greater than the fourth threshold; q1 is not greater than the third threshold, q2 is greater than the fourth threshold; q1 is not greater than the third threshold and q2 is not greater than the fourth threshold.
In some possible implementations, if the comparison result is that q1 is greater than the third threshold and q2 is greater than the fourth threshold, indicating that region a is neither similar to region B nor similar to region C, the image may be identified as not being a three-dimensional image according to the comparison result. If the comparison result is that q1 is greater than the third threshold value and q2 is not greater than the fourth threshold value, it indicates that the area a and the area C are similar, then the image can be identified as an upper and lower three-dimensional image according to the comparison result, and a schematic representation of the upper and lower three-dimensional image can be seen in fig. 5A. If the comparison result q1 is not greater than the third threshold value and q2 is greater than the fourth threshold value, it indicates that the region a and the region B are similar, then the image can be identified as left and right three-dimensional images according to the comparison result, and a representation diagram of the left and right three-dimensional images can be seen in fig. 5B. If the comparison result is that q1 is not greater than the third threshold value and q2 is not greater than the fourth threshold value, it indicates that the region a is similar to both the region B and the region C, and it is not possible to identify whether the image is a three-dimensional image.
It should be noted that, in step S302, image similarity comparison may be performed on each small region in the middle region and the adjacent small regions in sequence, so as to obtain four sets of comparison results, or image similarity comparison may be performed on two small regions or three small regions in the middle region and the adjacent small regions in sequence, so as to obtain two sets or three sets of comparison results. The images may be identified by combining at least two sets of comparison results obtained in step S302.
It should be noted that, if it is not possible to identify whether the image is a three-dimensional image according to the comparison result, another frame of image may be obtained from the video file for identification.
In some possible implementations, the comparison method of the image similarity in the image region may refer to the comparison method of the image similarity in the first region. Specifically, the image area may be divided into four large areas, and the image similarity between the first large area and the adjacent large area in the four large areas may be compared.
The relationship of the large area and the small area of the middle area is described herein with reference to fig. 6A to 6E. The image area is divided into four large areas, and the areas of the four large areas are marked as area A ', area B', area C 'and area D', respectively. The middle area is divided into four small areas, and the area identifications of the four small areas are area A, area B, area C and area D respectively.
As shown in fig. 6A, the center point of the middle area coincides with the center point of the image area, and at this time, 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. 6B-6C, the center point of the middle region is to the left or right of the center point of the image region; as shown in fig. 6D-6E, the center point of the middle region is on the upper or lower side of the image region's mid-west point. Of course, the positional relationship between the large area and the small area may be other relationships, and is not exhaustive here.
The following describes in detail an embodiment of the apparatus in the present application with reference to the above method embodiment and system embodiment.
Referring to fig. 7, fig. 7 is a block diagram of a terminal according to an embodiment of the present disclosure. The terminal may comprise 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 region in an image region of one frame of image in a video file;
a first comparing unit 702, configured to perform image similarity comparison in the first region to obtain a first comparison result;
a second comparing unit 703, configured to perform image similarity comparison in the image region to obtain a second comparison result;
an identifying unit 704, 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 that the image is not a three-dimensional image.
Optionally, the first comparing unit 702 includes:
a second determination unit configured to determine a pixel identification of a unit area within the first area;
a counting unit, configured to count a first number of unit regions in which pixel identifiers in a first sub-region and a second sub-region in the first region are inconsistent and a second number of unit regions in which pixel identifiers in the first sub-region and a third sub-region are inconsistent, where the first sub-region is adjacent to the second sub-region and the third sub-region, respectively;
and the result unit is used for obtaining a first comparison result according to the first quantity and the second quantity.
Optionally, the second determining unit is configured to:
determining the pixel identification of the unit area according to the pixel average value of the unit area in the first area and the pixel average value of the first area; or,
and determining the pixel identification of the unit area according to the pixel average value of the unit area in the first area and the pixel average value of the sub-area to which the unit area belongs.
Optionally, the first determining unit 701 is configured to:
detecting whether a second area in the image area meets an invalid condition;
determining a first region from non-second regions within the image region if the second region satisfies an invalid condition.
Optionally, the invalid condition includes:
the pixel identifications of a plurality of continuous unit areas in the second area are the same, and the area number of the continuous unit areas reaches a first threshold value; or,
the ratio of the number of the plurality of unit areas with the same pixel identification in the second area to the number of all the unit areas in the second area reaches a second threshold value.
Optionally, the first determining unit 701 is configured to:
in an image area of one frame of image in a video file, determining an area including a target object in the image as a first area.
Referring to the above embodiments, the terminal is presented in the form of a unit. An "element" may refer to an application-specific integrated circuit (ASIC), a processor and memory that execute one or more software or firmware programs, an integrated logic circuit, and/or other devices that may provide the described functionality.
In one embodiment, those skilled in the art will appreciate that the terminal shown in fig. 7 may take the form shown in fig. 8 below. The terminal described in the embodiment of the application may include a mobile phone, a tablet computer, a VR terminal, and other terminals capable of supporting playing of a three-dimensional video file. Here, the VR terminal may refer to a VR-worn device, such as a VR head-mounted display device or the like.
As shown in fig. 8, the terminal may be implemented in the configuration of fig. 8, and may include a processor 801, a memory 802, and a display 803, the processor 801, the memory 802 and the display 803 being coupled. The display 803 is capable of supporting playback of both three-dimensional video files and two-dimensional video files. The display 803 may be made of a flexible material.
In the embodiment of the present application, the processor 801 may be a general purpose Central Processing Unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the above programs. The processor 801 may also be used to perform the methods in the method embodiments of fig. 1 or fig. 6, and may also be used to perform the functions of the functional units in the apparatus shown in fig. 8.
Specifically, the processor 801 calls the executable program code stored in the memory 802 to execute the following steps:
determining a first area in an image area of a frame of image in a video file;
comparing the image similarity in the first area to obtain a first comparison result;
comparing the image similarity in the image area to obtain a second comparison result;
and identifying the image according to the first comparison result and the second comparison result, and identifying that the image is not a three-dimensional image if the first comparison result is inconsistent with the second comparison result.
Optionally, the processor performs image similarity comparison in the first region, and obtaining a first comparison result includes:
determining pixel identification of a unit area in the first area;
respectively counting a first number of unit areas with inconsistent pixel identifications in a first sub-area and a second sub-area in the first area and a second number of unit areas with inconsistent pixel identifications in the first sub-area and a third sub-area, wherein the first sub-area, the second sub-area and the third sub-area are respectively adjacent;
and obtaining a first comparison result according to the first quantity and the second quantity.
Optionally, the determining, by the processor, the pixel identifier of the unit area in the first area includes:
determining the pixel identification of the unit area according to the pixel average value of the unit area in the first area and the pixel average value of the first area; or,
and determining the pixel identification of the unit area according to the pixel average value of the unit area in the first area and the pixel average value of the sub-area to which the unit area belongs.
Optionally, the determining, by the processor, a first region in an image region of one frame of image in the video file includes:
detecting whether a second area in the image area meets an invalid condition;
determining a first region from non-second regions within the image region if the second region satisfies an invalid condition.
Optionally, the invalid condition includes:
the pixel identifications of a plurality of continuous unit areas in the second area are the same, and the area number of the continuous unit areas reaches a first threshold value; or,
the ratio of the number of the plurality of unit areas with the same pixel identification in the second area to the number of all the unit areas in the second area reaches a second threshold value.
Optionally, the determining, by the processor, a first region in an image region of one frame of image in the video file includes:
determining an area including a target object in an image as a first area in an image area of one frame of the image in a video file
The Memory 802 may 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 of dynamic storage device that can store information and instructions, an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to these. The memory 802 may be separate and coupled to the processor 801 via a bus. The memory 802 may also be integrated with the processor 801.
In the embodiment of the application, by determining the middle area of one frame of image in a video file and comparing the image similarity between the first small area and the adjacent small area in at least four small areas included in the middle area of the image, a first comparison result is obtained, and whether the image is a three-dimensional image can be identified according to the comparison result. By means of the method, the influence of the invalid region in the image on the comparison of the image similarity can be avoided, and the accuracy of three-dimensional image recognition is improved.
The embodiment of the present application further provides a computer storage medium, configured to store computer software instructions for the terminal, which includes a computer program for executing the method according to the embodiment of the present application.
While the present application has been described in connection with various embodiments, other variations to the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed application, from a review of the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other elements or steps, and the word "a" or "an" does not exclude a plurality. A single processor or other unit may fulfill the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, apparatus (device), or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may 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, and the like) having computer-usable program code embodied therein. A computer program stored/distributed on a suitable medium supplied together with or as part of other hardware, may also take other distributed forms, such as via the Internet or other wired or wireless telecommunication systems.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Although the present application has been described in conjunction with specific features and embodiments thereof, it will be evident that various modifications and combinations can be made thereto without departing from the spirit and scope of the application. Accordingly, the specification and figures are merely exemplary of the present application as defined in the appended claims and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of the present application. It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (15)

1. A method for recognizing a three-dimensional image, comprising:
determining a first area in an image area of one frame of image in a video file, wherein the first area is an area which does not comprise invalid pixels in the image area, and the invalid pixels are pixels which influence the accuracy of the average value of the pixels of the image area;
performing image similarity comparison in the first region to obtain a first comparison result, including:
determining pixel identification of a unit area in the first area;
respectively counting a first number of unit areas with inconsistent pixel identifications in a first sub-area and a second sub-area in the first area and a second number of unit areas with inconsistent pixel identifications in the first sub-area and a third sub-area, wherein the first sub-area, the second sub-area and the third sub-area are respectively adjacent;
obtaining a first comparison result according to the first quantity and the second quantity;
comparing the image similarity in the image area to obtain a second comparison result;
and identifying the image according to the first comparison result and the second comparison result, and identifying that the image is not a three-dimensional image if the first comparison result is inconsistent with the second comparison result.
2. The method of claim 1, wherein determining the pixel identity of the unit area within the first area comprises:
determining the pixel identification of the unit area according to the pixel average value of the unit area in the first area and the pixel average value of the first area; or,
and determining the pixel identification of the unit area according to the pixel average value of the unit area in the first area and the pixel average value of the sub-area to which the unit area belongs.
3. The method of any of claims 1-2, wherein determining the first region within an image region of a frame of an image in a video file comprises:
detecting whether a second area in the image area meets an invalid condition;
determining a first region from non-second regions within the image region if the second region satisfies an invalid condition.
4. The method of claim 3, wherein the invalid condition comprises:
the pixel identifications of a plurality of continuous unit areas in the second area are the same, and the area number of the continuous unit areas reaches a first threshold value; or,
the ratio of the number of the plurality of unit areas with the same pixel identification in the second area to the number of all the unit areas in the second area reaches a second threshold value.
5. The method of any of claims 1-2, wherein determining the first region within an image region of a frame of an image in a video file comprises:
in an image area of one frame of image in a video file, determining an area including a target object in the image as a first area.
6. A terminal, comprising:
a first determining unit, configured to determine a first region in an image region of one frame of image in a video file, where the first region is a region in the image region that does not include invalid pixels, and the invalid pixels are pixels that affect accuracy of an average value of pixels of the image region;
the first comparison unit is used for comparing the image similarity in the first area to obtain a first comparison result, and comprises:
a second determination unit configured to determine a pixel identification of a unit area within the first area;
a counting unit, configured to count a first number of unit regions in which pixel identifiers in a first sub-region and a second sub-region in the first region are inconsistent and a second number of unit regions in which pixel identifiers in the first sub-region and a third sub-region are inconsistent, where the first sub-region is adjacent to the second sub-region and the third sub-region, respectively;
a result unit, configured to obtain a first comparison result according to the first number and the second number;
the second comparison unit is used for comparing the image similarity in the image area to obtain a second comparison result;
and the identification unit is used for identifying the image according to the first comparison result and the second comparison result, and identifying that the image is not a three-dimensional image if the first comparison result is inconsistent with the second comparison result.
7. The terminal of claim 6, wherein the second determining unit is configured to:
determining the pixel identification of the unit area according to the pixel average value of the unit area in the first area and the pixel average value of the first area; or,
and determining the pixel identification of the unit area according to the pixel average value of the unit area in the first area and the pixel average value of the sub-area to which the unit area belongs.
8. The terminal according to any of claims 6-7, wherein the first determining unit is configured to:
detecting whether a second area in the image area meets an invalid condition;
determining a first region from non-second regions within the image region if the second region satisfies an invalid condition.
9. The terminal of claim 8, wherein the invalid condition comprises:
the pixel identifications of a plurality of continuous unit areas in the second area are the same, and the area number of the continuous unit areas reaches a first threshold value; or,
the ratio of the number of the plurality of unit areas with the same pixel identification in the second area to the number of all the unit areas in the second area reaches a second threshold value.
10. The terminal according to any of claims 6-7, wherein the first determining unit is configured to:
in an image area of one frame of image in a video file, determining an area including a target object in the image as a first area.
11. A terminal, comprising:
a memory storing executable program code;
a processor coupled with the memory;
the processor calls the executable program code stored in the memory to execute the following steps:
determining a first area in an image area of one frame of image in a video file, wherein the first area is an area which does not comprise invalid pixels in the image area, and the invalid pixels are pixels which influence the accuracy of the average value of the pixels of the image area;
performing image similarity comparison in the first region to obtain a first comparison result, including:
determining pixel identification of a unit area in the first area;
respectively counting a first number of unit areas with inconsistent pixel identifications in a first sub-area and a second sub-area in the first area and a second number of unit areas with inconsistent pixel identifications in the first sub-area and a third sub-area, wherein the first sub-area, the second sub-area and the third sub-area are respectively adjacent;
obtaining a first comparison result according to the first quantity and the second quantity;
comparing the image similarity in the image area to obtain a second comparison result;
and identifying the image according to the first comparison result and the second comparison result, and identifying that the image is not a three-dimensional image if the first comparison result is inconsistent with the second comparison result.
12. The terminal of claim 11, wherein the processor determines pixel identifications of unit areas within the first area, comprising:
determining the pixel identification of the unit area according to the pixel average value of the unit area in the first area and the pixel average value of the first area; or,
and determining the pixel identification of the unit area according to the pixel average value of the unit area in the first area and the pixel average value of the sub-area to which the unit area belongs.
13. The terminal of any of claims 11-12, wherein the processor determines the first region within an image region of a frame of an image in a video file, comprising:
detecting whether a second area in the image area meets an invalid condition;
determining a first region from non-second regions within the image region if the second region satisfies an invalid condition.
14. The terminal of claim 13, wherein the invalid condition comprises:
the pixel identifications of a plurality of continuous unit areas in the second area are the same, and the area number of the continuous unit areas reaches a first threshold value; or,
the ratio of the number of the plurality of unit areas with the same pixel identification in the second area to the number of all the unit areas in the second area reaches a second threshold value.
15. The terminal of any of claims 11-12, wherein the processor determines the first region within an image region of a frame of an image in a video file, comprising:
in an image area of one frame of image in a video file, determining an area including a target object in the image as a first area.
CN201780004639.9A 2017-04-11 2017-04-11 Three-dimensional image recognition method and terminal Expired - Fee Related CN108475341B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/080104 WO2018187939A1 (en) 2017-04-11 2017-04-11 Method for identifying three-dimensional image, and terminal

Publications (2)

Publication Number Publication Date
CN108475341A CN108475341A (en) 2018-08-31
CN108475341B true CN108475341B (en) 2021-08-17

Family

ID=63266492

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201780004639.9A Expired - Fee Related CN108475341B (en) 2017-04-11 2017-04-11 Three-dimensional image recognition method and terminal

Country Status (2)

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

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110222235A (en) * 2019-06-11 2019-09-10 百度在线网络技术(北京)有限公司 3 D stereo content display method, device, equipment and storage medium
KR20210149542A (en) 2020-06-02 2021-12-09 삼성에스디에스 주식회사 Method for photographing and reading an image, and apparatus therefor

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051913A (en) * 2013-01-05 2013-04-17 北京暴风科技股份有限公司 Automatic 3D (three-dimensional) film source identification method
WO2015043301A1 (en) * 2013-09-26 2015-04-02 深圳市亿思达科技集团有限公司 Method and apparatus for recognizing 3d image
CN104767985A (en) * 2014-01-07 2015-07-08 冠捷投资有限公司 Method of using region distribution analysis to automatically detect 3D image format
WO2015170557A1 (en) * 2014-05-08 2015-11-12 オリンパス株式会社 Video processor and method for operating video processor
CN105898269A (en) * 2015-12-27 2016-08-24 乐视致新电子科技(天津)有限公司 Video play method and device
CN106559680A (en) * 2016-11-25 2017-04-05 北京小米移动软件有限公司 Video type recognition methodss, device and electronic equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101323905B1 (en) * 2012-02-14 2013-10-30 케이디씨 주식회사 Automatic recognition device for the three-dimensional images and method
CN102685539B (en) * 2012-04-24 2015-08-05 Tcl集团股份有限公司 A kind of recognition methods of stereoscopic video images form, system and stereoscopic player
CN105049824A (en) * 2015-07-03 2015-11-11 无锡易维视显示技术有限公司 Method for automatically detecting three-dimensional video format
CN106231294B (en) * 2015-10-30 2017-11-21 深圳超多维光电子有限公司 A kind of detection method and device of Stereogram source format
CN106131528B (en) * 2016-06-23 2018-07-10 福建天泉教育科技有限公司 The recognition methods of 3D video formats and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051913A (en) * 2013-01-05 2013-04-17 北京暴风科技股份有限公司 Automatic 3D (three-dimensional) film source identification method
WO2015043301A1 (en) * 2013-09-26 2015-04-02 深圳市亿思达科技集团有限公司 Method and apparatus for recognizing 3d image
CN104767985A (en) * 2014-01-07 2015-07-08 冠捷投资有限公司 Method of using region distribution analysis to automatically detect 3D image format
WO2015170557A1 (en) * 2014-05-08 2015-11-12 オリンパス株式会社 Video processor and method for operating video processor
CN105898269A (en) * 2015-12-27 2016-08-24 乐视致新电子科技(天津)有限公司 Video play method and device
CN106559680A (en) * 2016-11-25 2017-04-05 北京小米移动软件有限公司 Video type recognition methodss, device and electronic equipment

Also Published As

Publication number Publication date
CN108475341A (en) 2018-08-31
WO2018187939A1 (en) 2018-10-18

Similar Documents

Publication Publication Date Title
WO2021012837A1 (en) Method and apparatus for determining recommendation information implantation position, device and storage medium
US10127471B2 (en) Method, device, and computer-readable storage medium for area extraction
JP6240199B2 (en) Method and apparatus for identifying object in image
CN107392958B (en) Method and device for determining object volume based on binocular stereo camera
US20140079321A1 (en) Device and method for detecting the presence of a logo in a picture
CN106560840B (en) A kind of image information identifying processing method and device
CN108875531B (en) Face detection method, device and system and computer storage medium
JP6592132B2 (en) Skin condition detection method and electronic device
JP5765026B2 (en) Image processing apparatus and program
CN110619656B (en) Face detection tracking method and device based on binocular camera and electronic equipment
CN108037830B (en) Method for realizing augmented reality
JP2011076255A (en) Gesture recognizing device, gesture recognizing method and gesture recognizing program
CN108475341B (en) Three-dimensional image recognition method and terminal
CN111401238A (en) Method and device for detecting character close-up segments in video
CN107450840B (en) Method and device for determining finger touch connected domain and electronic equipment
US20130251202A1 (en) Facial Features Detection
CN110618751B (en) Virtual object display method and device, terminal equipment and storage medium
CN113490009B (en) Content information implantation method, device, server and storage medium
CN108475430B (en) Picture quality evaluation method and device
US9070015B2 (en) System and method for iris detection in digital images
CN106651751B (en) Image processing method and terminal
CN112016609B (en) Image clustering method, device, equipment and computer storage medium
CN114842228A (en) Speckle pattern partitioning method, device, equipment and medium
JP5593884B2 (en) Feature point determination device, feature point determination method, and feature point determination program
CN106028140A (en) Terminal user identity login method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: A4-1501, Kexing Science Park, 15 Keyuan Road, Science Park, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: Shenzhen Ruoyu Technology Co.,Ltd.

Address before: A4-1501, Kexing Science Park, 15 Keyuan Road, Science Park, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: SHENZHEN ROYOLE TECHNOLOGIES Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210817