CN106778762B - 360-degree panoramic picture feature vector extraction method, identification method and corresponding devices - Google Patents

360-degree panoramic picture feature vector extraction method, identification method and corresponding devices Download PDF

Info

Publication number
CN106778762B
CN106778762B CN201611267557.7A CN201611267557A CN106778762B CN 106778762 B CN106778762 B CN 106778762B CN 201611267557 A CN201611267557 A CN 201611267557A CN 106778762 B CN106778762 B CN 106778762B
Authority
CN
China
Prior art keywords
color difference
picture
vector
column
degree panoramic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611267557.7A
Other languages
Chinese (zh)
Other versions
CN106778762A (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.)
Goertek Techology Co Ltd
Original Assignee
Goertek Techology 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 Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN201611267557.7A priority Critical patent/CN106778762B/en
Publication of CN106778762A publication Critical patent/CN106778762A/en
Application granted granted Critical
Publication of CN106778762B publication Critical patent/CN106778762B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/32Normalisation of the pattern dimensions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour

Abstract

The invention discloses a method for extracting and identifying a characteristic vector of a 360-degree panoramic picture and a corresponding device. The method comprises the following steps: acquiring a 360-degree panoramic picture as a sample picture, and scaling the sample picture to a preset size W multiplied by H; extracting a plurality of groups of continuous two-column color difference vectors from the zoomed sample picture to obtain a plurality of positive sample characteristic vectors corresponding to the 360-degree panoramic picture; acquiring a plurality of groups of color difference vectors of two discontinuous columns from the zoomed sample picture to obtain a plurality of negative sample characteristic vectors corresponding to the non-360-degree panoramic picture; and carrying out sample training on the plurality of positive sample feature vectors and the plurality of negative sample feature vectors to obtain support vector data for distinguishing 360-degree panoramic picture features and non-360-degree panoramic picture features. Therefore, the invention can obtain a large amount of characteristic vectors of the 360-degree panoramic picture by using less 360-degree panoramic picture resources, thereby improving the recognition rate of the 360-degree panoramic picture.

Description

360-degree panoramic picture feature vector extraction method, identification method and corresponding devices
Technical Field
The invention relates to the technical field of picture identification, in particular to a method for extracting and identifying a characteristic vector of a 360-degree panoramic picture and a corresponding device.
Background
With the increasing maturity of Virtual Reality technology (VR), resources applied in the VR mode are continuously emerging, and particularly, various types of pictures, such as 2D pictures, panoramic pictures, and the like, suitable for being viewed in the VR mode are provided. When various types of pictures are viewed in the VR mode, the types of the pictures are different, and the picture viewing tools are also different. In order to realize automatic selection of a picture viewing tool, instead of manual selection by a user, the type of a picture needs to be automatically identified, particularly the identification of a 360-degree panoramic picture.
In the prior art, in the identification method of the 360-degree panoramic picture, the characteristics of the sample picture can be extracted, and the picture to be identified can be identified according to the extracted characteristics. One mode is to select the width and height ratio of an image as the characteristics, the method has larger error, can cause the misjudgment of a common panoramic image with larger width and height, and has low accuracy; the other is to take the color difference vector of the pixels of the first column and the last column of the image as the feature. Extracting a group of features from each picture in the aspect of obtaining the features of the 360-degree panoramic picture; however, at the present stage, the 360-degree panoramic resources are relatively few, and the acquisition of a large number of image sample features is relatively difficult, so that the feature sample acquisition is difficult by adopting the above method.
Disclosure of Invention
In view of the problem in the prior art that the acquisition of a large number of picture samples is relatively difficult due to relatively less 360-degree panoramic resources at the present stage, which may cause difficulty in acquiring feature samples, the present invention provides a method for extracting a feature vector of a 360-degree panoramic picture, a method for identifying a 360-degree panoramic picture, and a corresponding apparatus, so as to solve or at least partially solve the above problem.
According to an aspect of the present invention, there is provided a method for extracting a feature vector of a 360-degree panoramic picture, the method including:
acquiring a 360-degree panoramic picture as a sample picture, and zooming the sample picture to a preset size W multiplied by H, wherein W is the width and H is the height;
extracting a plurality of groups of continuous two-column color difference vectors from the zoomed sample picture to obtain a plurality of positive sample characteristic vectors corresponding to the 360-degree panoramic picture;
acquiring a plurality of groups of color difference vectors of two discontinuous columns from the zoomed sample picture to obtain a plurality of negative sample characteristic vectors corresponding to the non-360-degree panoramic picture;
and carrying out sample training on the plurality of positive sample feature vectors and the plurality of negative sample feature vectors to obtain support vector data for distinguishing 360-degree panoramic picture features and non-360-degree panoramic picture features.
According to another aspect of the present invention, there is provided a method for identifying a 360-degree panoramic picture, the method including:
acquiring support vector data for distinguishing 360-degree panoramic picture characteristics and non-360-degree panoramic picture characteristics by adopting the characteristic vector extraction method of the 360-degree panoramic picture;
zooming a picture to be recognized to a preset size W multiplied by H, obtaining a color difference vector v of a 1 st column and a W th column, a color difference vector v1 of the 1 st column and a 2 nd column and a color difference vector v2 of a W-th column and a W-1 st column of the zoomed picture to be recognized, and obtaining the zoomed picture according to a formula
Figure BDA0001200918130000021
Adjusting the color difference vector v, and forming a color difference vector by the adjusted vi to serve as a feature vector of the picture to be identified; wherein T is a number between (0.007, 0.1); vi is the ith color difference value in the color difference vector v, v1i is the ith color difference value in the color difference vector v1, and v2i is the ith color difference value in the color difference vector v 2;
judging whether the feature vector of the picture to be identified accords with the data feature of the support vector of the 360-degree panoramic picture; if the judgment result is yes, the picture to be identified is determined to be a 360-degree panoramic picture, and otherwise, the picture is a non-360-degree panoramic picture.
According to still another aspect of the present invention, there is provided a feature vector extraction apparatus for a 360-degree panorama picture, the apparatus including:
the system comprises a sample picture acquisition unit, a processing unit and a processing unit, wherein the sample picture acquisition unit is used for acquiring a 360-degree panoramic picture as a sample picture and zooming the sample picture to a preset size W multiplied by H, wherein W is the width and H is the height;
the positive sample characteristic vector acquisition unit is used for extracting a plurality of groups of color difference vectors of two continuous columns from the zoomed sample picture to obtain a plurality of positive sample characteristic vectors corresponding to the 360-degree panoramic picture;
the negative sample characteristic vector acquisition unit is used for acquiring a plurality of groups of color difference vectors of two discontinuous columns from the zoomed sample picture to obtain a plurality of negative sample characteristic vectors corresponding to the non-360-degree panoramic picture;
and the support vector acquisition unit is used for carrying out sample training on the plurality of positive sample feature vectors and the plurality of negative sample feature vectors to acquire support vector data for distinguishing 360-degree panoramic picture features and non-360-degree panoramic picture features.
According to still another aspect of the present invention, there is provided an apparatus for recognizing a 360-degree panorama picture, the apparatus comprising:
a support vector data obtaining unit, configured to obtain support vector data for distinguishing a 360-degree panorama image feature from a non-360-degree panorama image feature by using the above feature vector extraction apparatus for a 360-degree panorama image;
a to-be-identified picture feature vector obtaining unit, configured to scale the to-be-identified picture to a preset size W × H, obtain a color difference vector v of the 1 st and W-th columns, a color difference vector v1 of the 1 st and 2 nd columns, and a color difference vector v2 of the W-th and W-1 st columns of the scaled to-be-identified picture, and obtain a color difference vector v2 of the W-th and W-1 st columns according to a formula
Figure BDA0001200918130000031
Adjusting the color difference vector v to obtain the adjusted viForming a color difference vector as a feature vector of the picture to be identified; wherein T is a number between (0.007, 0.1); v. ofiIs the ith color difference value in the color difference vector v, v1iIs the ith color difference value in the color difference vector v1, v2iIs the ith color difference value in the color difference vector v 2;
the picture type judging unit is used for judging whether the feature vector of the picture to be identified accords with the support vector data feature of the 360-degree panoramic picture; if the judgment result is yes, the picture to be identified is determined to be a 360-degree panoramic picture, and otherwise, the picture is a non-360-degree panoramic picture.
In summary, the present invention extracts a plurality of groups of color difference vectors of two consecutive columns from a 360-degree panoramic picture to obtain a plurality of positive sample feature vectors corresponding to the 360-degree panoramic picture; acquiring a plurality of groups of color difference vectors of two discontinuous columns to obtain a plurality of negative sample characteristic vectors corresponding to the non-360-degree panoramic picture; and then carrying out sample training on the plurality of positive sample feature vectors and the plurality of negative sample feature vectors to obtain support vector data for distinguishing 360-degree panoramic picture features and non-360-degree panoramic picture features. Therefore, a plurality of positive sample characteristic vectors and a plurality of negative sample characteristic vectors can be obtained from one 360-degree panoramic picture, and the problem of difficulty in obtaining characteristic samples caused by less 360-degree panoramic picture resources is solved. Therefore, the invention can obtain a large amount of characteristic vectors of the 360-degree panoramic picture by using less 360-degree panoramic picture resources, thereby improving the recognition rate of the 360-degree panoramic picture.
Drawings
Fig. 1 is a flowchart of a feature vector extraction method for a 360-degree panoramic picture according to an embodiment of the present invention;
fig. 2 is a flowchart of a feature vector extraction method for a 360-degree panoramic picture according to another embodiment of the present invention;
fig. 3 is a flowchart of an identification method for a 360-degree panoramic picture according to an embodiment of the present invention;
fig. 4 is a schematic diagram of an apparatus for extracting feature vectors of a 360-degree panoramic picture according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an apparatus for recognizing a 360-degree panoramic picture according to an embodiment of the present invention.
Detailed Description
The design idea of the invention is as follows: in view of the fact that in the prior art, due to the fact that 360-degree panoramic resources are relatively few at the present stage, the acquisition of a large number of feature samples is relatively difficult, which may cause the problem of difficulty in acquiring the feature samples. In consideration of the above, in order to identify the picture type of the picture to be identified, 360-degree panoramic picture features and non-360-degree panoramic picture features may be obtained from a picture of a known picture type, and then support vector data for distinguishing the 360-degree panoramic picture features and the non-360-degree panoramic picture features is obtained through sample training. According to the method for acquiring the multiple groups of 360-degree panoramic features from the 360-degree panoramic picture, the color difference vectors of two continuous columns are used as the feature vectors of the positive samples, and the color difference vectors of two discontinuous columns are used as the feature vectors of the negative samples, so that the problem that a large number of feature samples are difficult to acquire is solved. In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Fig. 1 is a flowchart of a feature vector extraction method for a 360-degree panoramic picture according to an embodiment of the present invention. As shown in fig. 1, the method includes:
step S110, a 360-degree panoramic picture is obtained as a sample picture, and the sample picture is scaled to a preset size W × H, where W is a width and H is a height.
The method is only for extracting the feature vector of a 360-degree panoramic picture, in order to obtain a large number of feature vectors, the feature vectors of other sample pictures can be obtained through the method, and the step of scaling the sample pictures to the preset size W multiplied by H is also used for ensuring the consistency of all the feature vectors, so that the accuracy of picture identification is improved.
Step S120, extracting a plurality of groups of color difference vectors of two continuous columns from the zoomed sample picture to obtain a plurality of positive sample characteristic vectors corresponding to the 360-degree panoramic picture.
The 360-degree panoramic picture is spliced through the left side and the right side of the picture, and the 360-degree panoramic effect is achieved in a VR mode, so that three-dimensional space experience is brought to a user. This requires that, after the left and right sides of the 360-degree panoramic picture are spliced, the color transition is smooth, and there is no obvious splicing trace, that is, the color values of the pixels at the splicing position are close to or the same. Conversely, no matter where the 360-degree panoramic picture is separated, no splicing trace exists after the 360-degree panoramic picture is spliced, namely, the color values of the pixel points of two continuous columns of the 360-degree panoramic picture are close to or the same. Therefore, in order to obtain multiple groups of color difference vectors from one 360-degree panoramic picture, multiple groups of color difference vectors of two continuous columns can be extracted, and multiple positive sample feature vectors corresponding to the 360-degree panoramic picture are obtained.
The specific method proposed here to obtain the color difference vectors of two columns is:
(1) and respectively obtaining the color value of each pixel point of the two columns.
(2) And calculating the color difference value of each pair of pixel points.
Each pair of pixel points herein means that the number of rows of each pair of pixel points is the same. For example, color difference values of pixel points in a 1 st column and a 2 nd column are obtained, color values of the pixel points in the first column are obtained and recorded as C11, C12,. and C1H, and color values of the pixel points in the second column are obtained and recorded as C21, C22,. and C2H, wherein H is the height of the sample picture; then, the color difference value calculated by each pair of pixel points with the same number of rows is: C11-C21 (row 1), C12-C22 (row 2),.., C1H-C2H (row H).
(3) And forming the H color difference values into a color difference vector. The dimension of the color difference vector is the height H of the sample picture.
Step S130, a plurality of groups of color difference vectors of two discontinuous columns are obtained from the zoomed sample picture, and a plurality of negative sample characteristic vectors corresponding to the non-360-degree panoramic picture are obtained.
Now that the color values of the two continuous columns of pixel points of the 360-degree panoramic picture are close to or the same as each other, the color value difference of the pixel points of the non-360-degree panoramic picture is large, so that negative sample eigenvectors corresponding to the non-360-degree panoramic picture are acquired from one 360-degree panoramic picture, and then a plurality of groups of color difference vectors of the two non-continuous columns can be acquired from the sample picture, and the color difference of the color values is large.
The method for obtaining a plurality of sets of color difference vectors of two discontinuous columns in this step is the same as the method in step S120, except that the color difference vectors of two discontinuous columns are obtained.
Step S140, sample training is carried out on the plurality of positive sample feature vectors and the plurality of negative sample feature vectors, and support vector data for distinguishing 360-degree panoramic picture features and non-360-degree panoramic picture features is obtained.
Support vector data which is obtained by carrying out sample training according to a plurality of positive sample feature vectors and a plurality of negative sample feature vectors and distinguishes 360-degree panoramic picture features and non-360-degree panoramic picture features is obtained through a plurality of sample pictures with picture types, and the 360-degree panoramic picture and the non-360-degree panoramic picture can be distinguished more accurately.
The color difference value calculation error can be caused by noise points and the like in the picture, so that the extraction of the feature vector is inaccurate, and the recognition of the picture to be recognized is influenced. In order to obtain a more accurate feature vector, the color difference value is adjusted according to the color difference of surrounding pixels when calculating the color difference. Therefore, in an embodiment of the present invention, the obtaining multiple sets of color difference vectors of two consecutive columns from the scaled sample picture in step S120 to obtain multiple positive sample feature vectors corresponding to the 360-degree panorama picture includes:
calculating a color difference vector V between an X1 th column and an X2 th column, a color difference vector V1 between the X1 th column and an X1-1 th column, and a color difference vector V2 between the X2 th column and an X2+1 th column by setting X1 to N, X2 to N +1, wherein the value range of N is [2, W-2 ]; adjusting the color difference vector V according to the color difference vectors V1 and V2 of the surrounding pixels; and obtaining a positive sample feature vector corresponding to the 360-degree panoramic picture from the adjusted color difference vector V, enabling N to be N + a, and enabling a to be a fixed step length, and repeating the steps to obtain the next positive sample feature vector until a preset number of positive sample feature vectors are obtained.
For example, the color difference vectors of the 3 rd column and the 4 th column are obtained, and then the color difference value of the 3 rd column and the 4 th column can be adjusted by the color difference values of the 2 nd column and the 3 rd column and the color difference values of the 4 th column and the 5 th column when calculating the color difference value of each pixel point of the two columns.
In order to ensure that the extracted color difference vector can be adjusted, the value range of N is [2, W-2], so when the color difference vectors of the 2 nd and 3 rd columns are obtained, the adjustment can be performed by using the color difference vectors of the 1 st and 2 nd columns and the color difference vectors of the 3 rd and 4 th columns; when the color difference vectors of the W-2 th column and the W-1 st column are obtained, adjustment can be performed by using the color difference vectors of the W-1 th column and the W-3 rd column and the W-2 nd column.
It should be noted that, when obtaining color difference vectors of two consecutive columns, a fixed step length may be set, and it is ensured that the obtained color difference vectors of two consecutive columns have usability. For example, after the color difference vectors of the 2 nd and 3 rd columns, the color difference vectors of the 3 rd and 4 th columns are acquired, the difference between the two is not large, the usability of the 3 rd and 4 th columns is also not large, and the acquisition significance is not large, so that a fixed step size is set here, each acquired color difference vector is guaranteed to be meaningful, and the efficiency of acquiring the color difference vector is improved. Meanwhile, the set fixed step length is required to correspond to the preset number, and the obtained color difference vector can cover the whole sample picture when the preset number of positive sample feature vectors are obtained.
Therefore, the method and the device can obtain a large number of characteristic vectors of the 360-degree panoramic picture by using less 360-degree panoramic picture resources, and the recognition rate of the 360-degree panoramic picture can be improved after the support vector data is obtained by the large number of characteristic vectors through sample training.
To obtain a negative sample feature vector corresponding to a non-360-degree panoramic picture from a 360-degree panoramic picture, a plurality of groups of color difference vectors of two non-continuous columns can be obtained from the sample picture, and the color difference value of the color value is ensured to be large. In order to maximally ensure that the color difference values of the two columns obtained are large, in an embodiment of the present invention, the obtaining multiple sets of color difference vectors of two non-consecutive columns from the scaled sample picture in step S130 to obtain multiple negative sample feature vectors corresponding to the non-360 degree panorama picture includes:
calculating a color difference vector V between an X1 th column and an X2 th column, a color difference vector V1 between the X1 th column and an X1-1 th column, and a color difference vector V2 between the X2 th column and an X2+1 th column by setting X1 to N, X2 to N + W/2, wherein the value range of N is [2, W/2-1 ]; adjusting the color difference vector V according to the color difference vectors V1 and V2 of the surrounding pixels; and obtaining a negative sample feature vector corresponding to the non-360-degree panoramic picture from the adjusted color difference vector V, enabling N to be N + a and enabling a to be a fixed step length, and repeating the steps to obtain the next negative sample feature vector until a preset number of negative sample feature vectors are obtained.
Since the picture is scaled, where the scaled size is manually set, W here can be set to a number divisible by 2 when manually set.
For example, if W is 1000, when color difference vectors of two non-consecutive columns are obtained, color difference vectors of 2 nd and 502 nd columns, color difference vectors of 3 rd and 503 rd columns, …, and color difference vectors of 499 th and 999 th columns are obtained.
In order to obtain more accurate feature vectors, the color difference values may also be adjusted according to the color differences of surrounding pixels when calculating the color differences. In order to ensure that the extracted color difference vector can be adjusted, the value range of N is [2, W/2-1 ].
Fig. 2 is a flowchart of a feature vector extraction method for a 360-degree panoramic picture according to another embodiment of the present invention. As shown in fig. 2, the method includes:
after the feature vector starts to be extracted, step S210 obtains a sample picture, and scales the sample picture to the size of W × H;
in step S220, N is 2, X1 is 0, and X2 is 0.
In step S230, it is determined whether to obtain a positive sample feature vector.
If yes, in step S240, X1 is set to N, and X2 is set to N + 1. If no, step S241 sets X1 to N and X2 to N + W/2.
In step S250, it is determined whether X1 is less than W and both X2 are less than W. If one of the judgment results is negative, the acquisition of the feature vector is finished. If both are determined to be yes, step S260 is performed to calculate the color difference vector V between the X1 th column and the X2 th column, the color difference vector V1 between the X1 th column and the X1-1 st column, and the color difference vector V2 between the X2 th column and the X2+1 st column of the sample picture.
In step S270, V is adjusted according to V1 and V2.
In step S280, it is determined whether the obtained feature vector is a positive sample feature. If yes, step S290 stores the adjusted V as a positive sample feature vector, and if no, step S291 stores the adjusted V as a negative sample feature vector.
In order to control the number of sample feature vectors obtained from one sample picture, in step S200, N is equal to N + a, where a is a fixed step size. And then, obtaining the feature vector again until X1 is greater than or equal to W or X2 is greater than or equal to W.
It should be noted that, in the present invention, a 360-degree panoramic image is used as a sample image to obtain a positive sample feature vector and a negative sample feature vector. The negative sample feature vector can also select a common picture as a sample picture to extract the negative sample picture, and the extraction methods are the same.
The fixed step size and the predetermined number are the same as those described above and will not be described herein.
In one implementation of the present invention, the adjusting the color difference vector V according to the color difference vectors V1, V2 of the surrounding pixels comprises:
according to the formula
Figure BDA0001200918130000091
Adjusting the color difference vector V to obtain the adjusted ViForming a color difference vector as an adjusted color difference vector V; wherein T is a number between (0.007, 0.1); viIs the ith color difference value in the color difference vector V, V1iIs the ith color difference value in the color difference vector V1, V2iIs the ith color difference value in the color difference vector V2. For example, the color difference values of the pixel points in the color difference vector V of the 2 nd column and the 3 rd column are obtained as follows: C21-C31 (row 1), C22-C32 (row 2),.., C2H-C3H (row H); the color difference values of the pixel points in the obtained 1 st and 2 nd color difference vectors V1 are: C11-C21 (row 1), C12-C22 (row 2),.., C1H-C2H (row H); the color difference values of the pixel points in the obtained color difference vectors V2 of the 3 rd column and the 4 th column are: C31-C41 (row 1), C32-C42 (row 2),.., C3H-C4H (row H). When in adjustment, C21-C31 is adjusted by C11-C21 and C31-C41 according to a formula, and the like.
Fig. 3 is a flowchart of an identification method for a 360-degree panoramic picture according to an embodiment of the present invention. As shown in fig. 3, support vector data for distinguishing the 360-degree panorama image feature from the non-360-degree panorama image feature is obtained by using the feature vector extraction method for the 360-degree panorama image of fig. 1. The support vector data can be repeatedly used after being obtained, the support vector data does not need to be repeatedly obtained, namely, the support vector data value can be obtained once, and the support vector data value can be directly called when picture identification is carried out.
Therefore, the method comprises:
step S310, obtaining the picture to be recognized, zooming the picture to be recognized to the preset size W multiplied by H,
step S320, calculating a color difference vector v of the 1 st and W th columns, a color difference vector v1 of the 1 st and 2 nd columns, and a color difference vector v2 of the W-1 st column of the picture to be identified,
step S330, utilizing the color difference vector v1 and the color difference vector v2 according to the formula
Figure BDA0001200918130000101
Adjusting the color difference vector v, and adjusting the adjusted viForming a color difference vector as a feature vector of the picture to be identified; wherein T is a number between (0.007, 0.1); v. ofiIs the ith color difference value in the color difference vector v, v1iIs the ith color difference value in the color difference vector v1, v2iIs the ith color difference value in the color difference vector v 2. And taking the adjusted color difference vector v as a feature vector of the picture to be identified.
The picture to be recognized is also scaled to the preset size W multiplied by H, so as to ensure the correspondence with the support vector data, ensure the availability of the support vector data and improve the recognition accuracy.
The method for extracting the feature vector of the picture to be identified is the same as that of the sample picture, except that only the color difference vector v of the 1 st column and the W-th column needs to be extracted, and the adjustment is performed by using the color difference vector v1 of the 1 st column and the 2 nd column and the color difference vector v2 of the W-th column and the W-1 st column.
Step S340, judging whether the feature vector of the picture to be identified accords with the feature of the support vector data of the 360-degree panoramic picture by utilizing the support vector data; if the judgment result is yes, the picture to be identified is determined to be a 360-degree panoramic picture, and otherwise, the picture is a non-360-degree panoramic picture.
Fig. 4 is a schematic diagram of a feature vector extraction apparatus for identifying a 360-degree panorama according to an embodiment of the present invention. As shown in fig. 4, the feature vector extraction apparatus 400 for identifying a 360-degree panorama picture includes:
a sample picture obtaining unit 410, configured to obtain a 360-degree panoramic picture as a sample picture, and scale the sample picture to a preset size W × H, where W is a width and H is a height;
a positive sample feature vector obtaining unit 420, configured to extract multiple groups of color difference vectors of two consecutive columns from the scaled sample picture, so as to obtain multiple positive sample feature vectors corresponding to the 360-degree panoramic picture;
a negative sample feature vector obtaining unit 430, configured to obtain multiple sets of color difference vectors of two non-consecutive columns from the zoomed sample picture, to obtain multiple negative sample feature vectors corresponding to the non-360-degree panoramic picture;
a support vector obtaining unit 440, configured to perform sample training on the multiple positive sample feature vectors and the multiple negative sample feature vectors, and obtain support vector data for distinguishing 360-degree panorama picture features and non-360-degree panorama picture features.
In an embodiment of the present invention, the positive sample feature vector obtaining unit 420 is configured to:
calculating a color difference vector V between an X1 th column and an X2 th column, a color difference vector V1 between the X1 th column and an X1-1 th column, and a color difference vector V2 between the X2 th column and an X2+1 th column by setting X1 to N, X2 to N +1, wherein the value range of N is [2, W-2 ]; adjusting the color difference vector V according to the color difference vectors V1 and V2 of the surrounding pixels; and obtaining a positive sample feature vector corresponding to the 360-degree panoramic picture from the adjusted color difference vector V, enabling N to be N + a, and enabling a to be a fixed step length, and repeating the steps to obtain the next positive sample feature vector until a preset number of positive sample feature vectors are obtained.
In an embodiment of the present invention, the negative sample feature vector obtaining unit 430 is configured to:
calculating a color difference vector V between an X1 th column and an X2 th column, a color difference vector V1 between the X1 th column and an X1-1 th column, and a color difference vector V2 between the X2 th column and an X2+1 th column by setting X1 to N, X2 to N + W/2, wherein the value range of N is [2, W/2-1 ]; adjusting the color difference vector V according to the color difference vectors V1 and V2 of the surrounding pixels; and obtaining a negative sample feature vector corresponding to the non-360-degree panoramic picture from the adjusted color difference vector V, enabling N to be N + a and enabling a to be a fixed step length, and repeating the steps to obtain the next negative sample feature vector until a preset number of negative sample feature vectors are obtained.
In an embodiment of the present invention, the positive sample feature vector obtaining unit 420 or the negative sample feature vector obtaining unit 430 is specifically configured to:
according to the formula
Figure BDA0001200918130000111
Adjusting the color difference vector V to obtain the adjusted ViForming a color difference vector as an adjusted color difference vector V; wherein T is a number between (0.007, 0.1); viIs the ith color difference value in the color difference vector V, V1iIs the ith color difference value in the color difference vector V1, V2iIs the ith color difference value in the color difference vector V2.
Fig. 5 is a schematic diagram of an apparatus for recognizing a 360-degree panoramic picture according to an embodiment of the present invention. As shown in fig. 5, the apparatus 500 for recognizing a 360-degree panorama picture includes:
a support vector obtaining unit 510, configured to obtain support vector data for distinguishing a 360-degree panorama feature from a non-360-degree panorama feature by using the 360-degree panorama feature extraction apparatus shown in fig. 4;
a to-be-identified picture feature vector obtaining unit 520, configured to scale the to-be-identified picture to a preset size W × H, obtain a color difference vector v between the 1 st column and the W th column of the scaled to-be-identified picture, a color difference vector v1 between the 1 st column and the 2 nd column, and an original color difference vector v2 between the W th column and the W-1 st column, and obtain the original color difference vector v2 according to a formula
Figure BDA0001200918130000121
Adjusting the color difference vector v, and adjusting the adjusted viForming a color difference vector as a feature vector of the picture to be identified; wherein T is a number between (0.007, 0.1); v. ofiIs the ith color difference value in the color difference vector v, v1iIs the ith color difference value in the color difference vector v1, v2iIs the ith color difference value in the color difference vector v 2;
a picture type determining unit 530, configured to determine whether a feature vector of the picture to be identified conforms to a support vector data feature of the 360-degree panoramic picture; if the judgment result is yes, the picture to be identified is determined to be a 360-degree panoramic picture, and otherwise, the picture is a non-360-degree panoramic picture.
It should be noted that the embodiments of the method shown in fig. 3 and the apparatuses shown in fig. 4 and fig. 5 are the same as the embodiments of the method shown in fig. 1, and the detailed description is given above and will not be repeated here.
In summary, the present invention extracts a plurality of groups of color difference vectors of two consecutive columns from a 360-degree panoramic picture to obtain a plurality of positive sample feature vectors corresponding to the 360-degree panoramic picture; acquiring a plurality of groups of color difference vectors of two discontinuous columns to obtain a plurality of negative sample characteristic vectors corresponding to the non-360-degree panoramic picture; and then carrying out sample training on the plurality of positive sample feature vectors and the plurality of negative sample feature vectors to obtain support vector data for distinguishing 360-degree panoramic picture features and non-360-degree panoramic picture features. Therefore, a plurality of positive sample characteristic vectors and a plurality of negative sample characteristic vectors can be obtained from one 360-degree panoramic picture, and the problem of difficulty in obtaining characteristic samples caused by less 360-degree panoramic picture resources is solved. Therefore, the invention can obtain a large amount of characteristic vectors of the 360-degree panoramic picture by using less 360-degree panoramic picture resources, thereby improving the recognition rate of the 360-degree panoramic picture.
While the foregoing is directed to embodiments of the present invention, other modifications and variations of the present invention may be devised by those skilled in the art in light of the above teachings. It should be understood by those skilled in the art that the foregoing detailed description is for the purpose of better explaining the present invention, and the scope of the present invention should be determined by the scope of the appended claims.

Claims (6)

1. A method for extracting a feature vector of a 360-degree panoramic picture is characterized by comprising the following steps:
acquiring a 360-degree panoramic picture as a sample picture, and zooming the sample picture to a preset size W multiplied by H, wherein W is the width and H is the height;
extracting a plurality of groups of continuous two-column color difference vectors from the zoomed sample picture to obtain a plurality of positive sample characteristic vectors corresponding to the 360-degree panoramic picture; calculating a color difference vector V between an X1 th column and an X2 th column, a color difference vector V1 between the X1 th column and an X1-1 th column, and a color difference vector V2 between the X2 th column and an X2+1 th column by setting X1 to N, X2 to N +1, wherein the value range of N is [2, W-2 ]; adjusting the color difference vector V according to the color difference vectors V1 and V2 of the surrounding pixels; obtaining a positive sample feature vector corresponding to the 360-degree panoramic picture from the adjusted color difference vector V, enabling N to be N + a and a to be a fixed step length, and repeating the steps to obtain the next positive sample feature vector until a preset number of positive sample feature vectors are obtained;
acquiring a plurality of groups of color difference vectors of two discontinuous columns from the zoomed sample picture to obtain a plurality of negative sample characteristic vectors corresponding to the non-360-degree panoramic picture; calculating a color difference vector V between an X1 th column and an X2 th column, a color difference vector V1 between the X1 th column and an X1-1 th column, and a color difference vector V2 between the X2 th column and an X2+1 th column by making X1 be N, X2 be N + W/2, wherein the value range of N is [2, W/2-1 ]; adjusting the color difference vector V according to the color difference vectors V1 and V2 of the surrounding pixels; obtaining a negative sample feature vector corresponding to the non-360-degree panoramic picture from the adjusted color difference vector V, enabling N to be N + a and enabling a to be a fixed step length, and repeating the steps to obtain the next negative sample feature vector until a preset number of negative sample feature vectors are obtained;
and carrying out sample training on the plurality of positive sample feature vectors and the plurality of negative sample feature vectors to obtain support vector data for distinguishing 360-degree panoramic picture features and non-360-degree panoramic picture features.
2. The method of claim 1, wherein the adjusting the color difference vector V according to the color difference vectors V1, V2 of surrounding pixels comprises:
according to the formula
Figure FDA0002239237860000011
Adjusting the color difference vector V to obtain the adjusted ViForming a color difference vector as an adjusted color difference vector V;
wherein T is a number between (0.007, 0.1); viIs the ith color difference value in the color difference vector V, V1iIs the ith color difference value in the color difference vector V1, V2iIs the ith color difference value in the color difference vector V2.
3. A method for identifying a 360-degree panoramic picture, the method comprising:
acquiring support vector data for distinguishing 360-degree panoramic picture characteristics from non-360-degree panoramic picture characteristics by adopting the method for extracting the characteristic vector of the 360-degree panoramic picture according to claim 2;
zooming a picture to be recognized to a preset size W multiplied by H, obtaining a color difference vector v of a 1 st column and a W th column, a color difference vector v1 of the 1 st column and a 2 nd column and a color difference vector v2 of a W-th column and a W-1 st column of the zoomed picture to be recognized, and obtaining the zoomed picture according to a formula
Figure FDA0002239237860000021
Adjusting the color difference vector v to obtain the adjusted viForming a color difference vector as a feature vector of the picture to be identified; wherein T is a number between (0.007, 0.1); v. ofiIs the ith color difference value in the color difference vector v, v1iIs the ith color difference value in the color difference vector v1, v2iIs the ith color difference value in the color difference vector v 2;
judging whether the feature vector of the picture to be identified accords with the data feature of the support vector of the 360-degree panoramic picture; if the judgment result is yes, the picture to be identified is determined to be a 360-degree panoramic picture, and otherwise, the picture is a non-360-degree panoramic picture.
4. An apparatus for extracting feature vectors of a 360-degree panorama picture, the apparatus comprising:
the system comprises a sample picture acquisition unit, a processing unit and a processing unit, wherein the sample picture acquisition unit is used for acquiring a 360-degree panoramic picture as a sample picture and zooming the sample picture to a preset size W multiplied by H, wherein W is the width and H is the height;
the positive sample characteristic vector acquisition unit is used for extracting a plurality of groups of color difference vectors of two continuous columns from the zoomed sample picture to obtain a plurality of positive sample characteristic vectors corresponding to the 360-degree panoramic picture; calculating a color difference vector V between an X1 th column and an X2 th column, a color difference vector V1 between the X1 th column and an X1-1 th column, and a color difference vector V2 between the X2 th column and an X2+1 th column by setting X1 to N, X2 to N +1, wherein the value range of N is [2, W-2 ];
the negative sample characteristic vector acquisition unit is used for acquiring a plurality of groups of color difference vectors of two discontinuous columns from the zoomed sample picture to obtain a plurality of negative sample characteristic vectors corresponding to the non-360-degree panoramic picture; calculating a color difference vector V between an X1 th column and an X2 th column, a color difference vector V1 between the X1 th column and an X1-1 th column, and a color difference vector V2 between the X2 th column and an X2+1 th column by making X1 be N, X2 be N + W/2, wherein the value range of N is [2, W/2-1 ];
a support vector acquisition unit, configured to perform sample training on the multiple positive sample feature vectors and the multiple negative sample feature vectors, and acquire support vector data that distinguishes 360-degree panorama picture features and non-360-degree panorama picture features;
the positive sample feature vector acquisition unit is configured to:
adjusting the color difference vector V according to the color difference vectors V1 and V2 of the surrounding pixels;
obtaining a positive sample feature vector corresponding to the 360-degree panoramic picture from the adjusted color difference vector V, enabling N to be N + a and a to be a fixed step length, and repeating the steps to obtain the next positive sample feature vector until a preset number of positive sample feature vectors are obtained;
the negative sample feature vector acquisition unit is configured to:
adjusting the color difference vector V according to the color difference vectors V1 and V2 of the surrounding pixels;
and obtaining a negative sample feature vector corresponding to the non-360-degree panoramic picture from the adjusted color difference vector V, enabling N to be N + a and enabling a to be a fixed step length, and repeating the steps to obtain the next negative sample feature vector until a preset number of negative sample feature vectors are obtained.
5. The apparatus of claim 4, wherein the positive sample feature vector obtaining unit or the negative sample feature vector obtaining unit is specifically configured to:
according to the formula
Figure FDA0002239237860000031
Adjusting the color difference vector V to obtain the adjusted ViForming a color difference vector as an adjusted color difference vector V;
wherein T is a number between (0.007, 0.1); viIs the ith color difference value in the color difference vector V, V1iIs the ith color difference value in the color difference vector V1, V2iIs the ith color difference value in the color difference vector V2.
6. An apparatus for recognizing a 360-degree panorama picture, the apparatus comprising:
a support vector acquisition unit configured to acquire support vector data for distinguishing a 360-degree panorama picture feature from a non-360-degree panorama picture feature by using the 360-degree panorama picture feature vector extraction apparatus according to claim 5;
a to-be-identified picture feature vector obtaining unit, configured to scale the to-be-identified picture to a preset size W × H, obtain a color difference vector v of the 1 st and W-th columns, a color difference vector v1 of the 1 st and 2 nd columns, and a color difference vector v2 of the W-th and W-1 st columns of the scaled to-be-identified picture, and obtain a color difference vector v2 of the W-th and W-1 st columns according to a formula
Figure FDA0002239237860000041
Adjusting the color difference vector v to obtain the adjusted viForming a color difference vector as a feature vector of the picture to be identified; wherein T is a number between (0.007, 0.1); v. ofiIs the ith color difference value in the color difference vector v, v1iIs the ith color difference value in the color difference vector v1, v2iIs the ith color difference value in the color difference vector v 2;
the picture type judging unit is used for judging whether the feature vector of the picture to be identified accords with the support vector data feature of the 360-degree panoramic picture; if the judgment result is yes, the picture to be identified is determined to be a 360-degree panoramic picture, and otherwise, the picture is a non-360-degree panoramic picture.
CN201611267557.7A 2016-12-31 2016-12-31 360-degree panoramic picture feature vector extraction method, identification method and corresponding devices Active CN106778762B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611267557.7A CN106778762B (en) 2016-12-31 2016-12-31 360-degree panoramic picture feature vector extraction method, identification method and corresponding devices

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611267557.7A CN106778762B (en) 2016-12-31 2016-12-31 360-degree panoramic picture feature vector extraction method, identification method and corresponding devices

Publications (2)

Publication Number Publication Date
CN106778762A CN106778762A (en) 2017-05-31
CN106778762B true CN106778762B (en) 2020-06-05

Family

ID=58952427

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611267557.7A Active CN106778762B (en) 2016-12-31 2016-12-31 360-degree panoramic picture feature vector extraction method, identification method and corresponding devices

Country Status (1)

Country Link
CN (1) CN106778762B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107330944B (en) * 2017-06-27 2020-01-21 深圳市冠旭电子股份有限公司 Panoramic image identification method and device, terminal equipment and storage medium
CN108475338B (en) * 2017-07-14 2020-04-14 深圳市柔宇科技有限公司 Panoramic image and video identification method, classifier establishment method and electronic device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8023003B2 (en) * 2008-03-12 2011-09-20 Chung-Ang University Academy Cooperation Foundation Apparatus and method for generating panorama images and apparatus and method for object-tracking using the same
CN104881869A (en) * 2015-05-15 2015-09-02 浙江大学 Real time panorama tracing and splicing method for mobile platform
CN106162146A (en) * 2016-07-29 2016-11-23 暴风集团股份有限公司 Automatically identify and the method and system of playing panoramic video

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8023003B2 (en) * 2008-03-12 2011-09-20 Chung-Ang University Academy Cooperation Foundation Apparatus and method for generating panorama images and apparatus and method for object-tracking using the same
CN104881869A (en) * 2015-05-15 2015-09-02 浙江大学 Real time panorama tracing and splicing method for mobile platform
CN106162146A (en) * 2016-07-29 2016-11-23 暴风集团股份有限公司 Automatically identify and the method and system of playing panoramic video

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Classification of image registration problems using support vector machines;Steve Oldridge.etc;《2011 IEEE Workshop on Applications of Computer Vision 》;20110210;第360-366页 *
一种适于移动设备的全景图快速拼接方法;戴华阳;《计算机应用》;20140910;第34卷(第9期);第2673-2677页 *

Also Published As

Publication number Publication date
CN106778762A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
CN111028213B (en) Image defect detection method, device, electronic equipment and storage medium
JP4772839B2 (en) Image identification method and imaging apparatus
CN101673342B (en) Object detecting device, imaging apparatus, object detecting method, and program
US11748894B2 (en) Video stabilization method and apparatus and non-transitory computer-readable medium
CN110490936B (en) Calibration method, device and equipment of vehicle camera and readable storage medium
EP3413265A1 (en) Panoramic video processing method and device and non-transitory computer-readable medium
US20150138322A1 (en) Image processing device and its control method, imaging apparatus, and storage medium
US8855417B2 (en) Method and device for shape extraction, and size measuring device and distance measuring device
WO2013182873A1 (en) A multi-frame image calibrator
CN109525786B (en) Video processing method and device, terminal equipment and storage medium
US9183634B2 (en) Image processing apparatus and image processing method
US20140233803A1 (en) Increased Quality of Image Objects Based on Depth in Scene
CN104396231A (en) Image processing device and image processing method
CN104079929A (en) Mosaic detection method and device
CN111307039A (en) Object length identification method and device, terminal equipment and storage medium
CN102822621A (en) Calibration data selection device, method of selection, selection program, and three dimensional position measuring device
CN106778762B (en) 360-degree panoramic picture feature vector extraction method, identification method and corresponding devices
CN111695540A (en) Video frame identification method, video frame cutting device, electronic equipment and medium
CN110598795A (en) Image difference detection method and device, storage medium and terminal
US8164633B2 (en) Calibration apparatus and method for imaging devices and computer program
CN106815598B (en) 360-degree panoramic picture identification method and device
CN112949453A (en) Training method of smoke and fire detection model, smoke and fire detection method and smoke and fire detection equipment
CN110717452B (en) Image recognition method, device, terminal and computer readable storage medium
CN110533663B (en) Image parallax determining method, device, equipment and system
KR20110133677A (en) Method and apparatus for processing 3d image

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20201015

Address after: 261031 north of Yuqing street, east of Dongming Road, high tech Zone, Weifang City, Shandong Province (Room 502, Geer electronic office building)

Patentee after: GoerTek Optical Technology Co.,Ltd.

Address before: 266104 Laoshan Qingdao District North House Street investment service center room, Room 308, Shandong

Patentee before: GOERTEK TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221219

Address after: 266104 No. 500, Songling Road, Laoshan District, Qingdao, Shandong

Patentee after: GOERTEK TECHNOLOGY Co.,Ltd.

Address before: 261031 north of Yuqing street, east of Dongming Road, high tech Zone, Weifang City, Shandong Province (Room 502, Geer electronics office building)

Patentee before: GoerTek Optical Technology Co.,Ltd.

TR01 Transfer of patent right