CN108133210B - Image format identification method and device - Google Patents

Image format identification method and device Download PDF

Info

Publication number
CN108133210B
CN108133210B CN201711318144.1A CN201711318144A CN108133210B CN 108133210 B CN108133210 B CN 108133210B CN 201711318144 A CN201711318144 A CN 201711318144A CN 108133210 B CN108133210 B CN 108133210B
Authority
CN
China
Prior art keywords
image
region
recognized
format
machine learning
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
CN201711318144.1A
Other languages
Chinese (zh)
Other versions
CN108133210A (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.)
Zhangjiagang Kangdexin Optronics Material Co Ltd
Original Assignee
Zhangjiagang Kangdexin Optronics Material 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 Zhangjiagang Kangdexin Optronics Material Co Ltd filed Critical Zhangjiagang Kangdexin Optronics Material Co Ltd
Priority to CN201711318144.1A priority Critical patent/CN108133210B/en
Publication of CN108133210A publication Critical patent/CN108133210A/en
Application granted granted Critical
Publication of CN108133210B publication Critical patent/CN108133210B/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/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/24Aligning, centring, orientation detection or correction of the image
    • G06V10/245Aligning, centring, orientation detection or correction of the image by locating a pattern; Special marks for positioning

Landscapes

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

Abstract

The embodiment of the invention discloses an image format identification method and device. The method comprises the following steps: acquiring an image to be identified, and acquiring at least three preset interest areas of the image to be identified, wherein the preset interest areas comprise an image central area and at least two corresponding areas, and the position information of the at least two corresponding areas is matched based on the image central area; extracting characteristic parameters of the preset interest region; and inputting the characteristic parameters into at least one machine learning model with an image recognition function, and determining the format type of the image to be recognized according to the output result of the machine learning model. The embodiment of the invention solves the problem that manual input of the format type consumes labor and time, realizes automatic identification of the image format type according to the image parameters, and improves the identification efficiency and accuracy of the image format type.

Description

Image format identification method and device
Technical Field
The embodiment of the invention relates to image technology, in particular to an image format identification method and device.
Background
With the continuous development of 3D devices, more and more 3D devices are further simultaneously realizing the display of 2D images and 3D images. The display of the 3D image is realized by image interleaving of left and right format images, wherein the left and right format images include left and right format (LR format) images and left 2D image right depth map format (2D + Z format) images.
Currently, the three formats are generally identified as follows: after the image format is manually identified, the image format is manually input, the identification speed is low, the error is large, and a large amount of human resources are consumed; secondly, the image format is determined by identifying the file header, but the 2D/3D image or video is not uniformly specified in the current market, so that different file header identifications cannot be uniformly identified, and the image format identification rate is poor.
Disclosure of Invention
The embodiment of the invention provides an image format identification method and device, which aim to realize an automatically identified image format.
In a first aspect, an embodiment of the present invention provides an image format identification method, where the method includes:
acquiring at least three preset interest areas of an image to be identified, wherein the preset interest areas comprise an image central area and at least two corresponding areas, and the position information of the at least two corresponding areas is matched based on the image central area;
extracting characteristic parameters of the preset interest region;
and inputting the characteristic parameters into at least one machine learning model with an image recognition function, and determining the format type of the image to be recognized according to the output result of the machine learning model.
Further, the characteristic parameter includes at least one of: the system comprises a region key characteristic, a region color difference characteristic, a region key difference characteristic and a region consistency characteristic.
Further, the number of the machine learning models is two, wherein the feature parameters are input into at least one machine learning model, and the determining of the format type of the image to be recognized according to the output result of the machine learning model includes:
determining whether the image to be identified comprises a depth map according to the characteristic parameters;
determining whether the image to be identified is an independent two-dimensional image according to the characteristic parameters;
and determining the format type of the image to be recognized according to the recognition result of the depth map and/or the recognition result of the two-dimensional image.
Further, determining the format type of the image to be recognized according to the recognition result of the depth map and/or the recognition result of the two-dimensional image includes:
if the image to be recognized comprises the depth map, determining that the format type of the image to be recognized is a two-dimensional map and depth map combined format;
if the image to be recognized is an independent two-dimensional image, determining that the format type of the image to be recognized is a two-dimensional image format;
and if the image to be recognized does not comprise the depth map and is not an independent two-dimensional image, determining that the format type of the image to be recognized is a left-right image format.
Further, before acquiring the image to be recognized, the method further includes:
establishing at least one machine learning model to be trained;
and training the machine learning model to be trained according to a preset training sample set, and optimizing the machine learning model to be trained according to a training result to generate the machine learning model.
In a second aspect, an embodiment of the present invention further provides an image format recognition apparatus, where the apparatus includes:
the device comprises an interest area acquisition module, a recognition module and a recognition module, wherein the interest area acquisition module is used for acquiring at least three preset interest areas of an image to be recognized, the preset interest areas comprise an image central area and at least two corresponding areas, and the position information of the at least two corresponding areas is matched based on the image central area;
the characteristic parameter extraction module is used for extracting the characteristic parameters of the preset interest region;
and the image format identification module is used for inputting the characteristic parameters into at least one machine learning model with an image identification function and determining the format type of the image to be identified according to the output result of the machine learning model.
Further, the characteristic parameter includes at least one of: the method comprises the following steps of region key characteristics, region color difference characteristics, region key difference characteristics and region consistency characteristics.
Further, the number of the machine learning models is two, and the image format recognition module includes:
the first identification model is used for determining whether the image to be identified comprises a depth map or not according to the characteristic parameters;
the second identification model is used for determining whether the image to be identified is an independent two-dimensional image or not according to the characteristic parameters;
and the identification result determining unit is used for determining the format type of the image to be identified according to the identification result of the first identification model and/or the second identification model.
Further, the identification result determining unit is specifically configured to:
if the image to be recognized comprises the depth map, determining that the format type of the image to be recognized is a two-dimensional map and depth map combined format;
if the image to be recognized is an independent two-dimensional image, determining that the format type of the image to be recognized is a two-dimensional image format;
and if the image to be recognized does not comprise the depth map and is not an independent two-dimensional image, determining that the format type of the image to be recognized is a left-right image format.
Further, the apparatus further comprises:
the model establishing module is used for establishing at least one machine learning model to be trained before the image to be recognized is obtained;
and the model training module is used for training the machine learning model to be trained according to a preset training sample set, optimizing the machine learning model to be trained according to a training result and generating the machine learning model.
According to the embodiment of the invention, the characteristic parameters of the central area and at least two corresponding areas of the image are extracted by acquiring the plurality of preset interest areas of the image to be recognized, the characteristic parameters are input into at least one machine learning model, and the format type of the image to be recognized is determined according to the output result of the machine learning model, so that the problems that manual input of the format type consumes manpower and time, or file header identification is not uniform, and the image format can not be recognized accurately are solved, the automatic recognition of the image format type according to the image parameters is realized, and the recognition efficiency and accuracy of the image format type are improved.
Drawings
Fig. 1 is a flowchart of an image format recognition method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a preset region of interest according to an embodiment of the present invention;
fig. 3A is a flowchart of an image format recognition method according to a second embodiment of the present invention;
fig. 3B is a flowchart of an image format recognition method according to a second embodiment of the present invention;
fig. 4 is a flowchart of an image format recognition method according to a third embodiment of the present invention;
fig. 5 is a schematic diagram illustrating progressive reduction of an Adaboost training recognition error provided by the third embodiment of the present invention;
fig. 6 is a schematic diagram illustrating progressive reduction of an Adaboost verification identification error according to a third embodiment of the present invention;
fig. 7 is a schematic structural diagram of an image format recognition apparatus according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of an image format recognition method according to an embodiment of the present invention, where this embodiment is applicable to a case of automatically recognizing an image format, and the method can be executed by an image format recognition apparatus according to an embodiment of the present invention, and the apparatus can be implemented in software and/or hardware. Referring to fig. 1, the method specifically includes:
s110, at least three preset interest areas of the image to be recognized are obtained, wherein the preset interest areas comprise an image center area and at least two corresponding areas, and the position information of the at least two corresponding areas is matched based on the image center area.
In this embodiment, the image to be recognized may be an image of any format, for example, the image to be recognized may be an independent two-dimensional image, or an image of SBS (Side-By-Side) format capable of performing image interleaving, where the image of SBS format may include a left-right format (LR format) image and a left-2D-right depth map format (2D + Z format) image, and display strategies of images of different formats are different.
In this embodiment, at least three preset interest regions are selected from the image to be identified, where the preset interest regions include an image center region and at least two corresponding regions, and the position information of the at least two corresponding regions is matched based on the image center region. The image center area is a regular area with the center line of the image to be recognized as the axis, and exemplarily, the image center area is a rectangular area. The central line divides the area to be identified into two partial images, and at least two corresponding areas are respectively positioned at the corresponding positions of the two partial images. The graphs of the two corresponding areas at the matched positions are consistent and the sizes are the same, so that the accuracy of the format type of the image to be recognized is improved. The corresponding region may be a regular region or an irregular region.
Exemplarily, referring to fig. 2, fig. 2 is a schematic diagram of a preset region of interest according to an embodiment of the present invention. In fig. 2, the position of the central area C of the image is set with the central line of the image to be detected as the axis, the central line divides the image to be detected into a left image and a right image, the two partial images include three sets of corresponding areas with matched positions, the shapes and the sizes of the corresponding areas are the same, and the positions of the corresponding areas relative to the images of each part are the same. It should be noted that fig. 2 is only an example of selecting a preset region of interest, and in this embodiment, the number and the position of the preset regions of interest may be randomly selected, or may be set according to the size of the image to be recognized, or the like.
In this embodiment, the preset interest region includes multiple groups of corresponding regions, so that the problems of single data and large identification error caused by single corresponding region detection image are avoided. The preset interest area comprises an image center area, and the image center areas with different format types have obvious difference and are an important factor for identifying the image type. The central area of the 2D image is a continuous image, and the pixel value change difference of the central area of the image is small; the central area of the image in the SBS format is a combination of two image edges, and the difference of the pixel value change of the central area of the image is large. In the embodiment, the image center area is determined as the preset interest area, so that the basis of only image format identification is increased, and the accuracy and reliability of the image format identification are improved.
And S120, extracting the characteristic parameters of the preset interest region.
The characteristic parameters are used for representing the image characteristics of the preset interest area. Optionally, the characteristic parameter includes at least one of: the system comprises a region key characteristic, a region color difference characteristic, a region key difference characteristic and a region consistency characteristic.
Optionally, the feature parameters are calculated based on YUV channels.
The region key feature is represented by a pixel average value of each preset interest region, for example, referring to fig. 2, the region key feature of each preset interest region may be implemented according to the following formula (1):
Figure BDA0001504215030000071
wherein, Il、IrAnd IcThe pixel values of the pixels corresponding to the preset interest region in fig. 2 are respectively represented by l, r, c, and # to indicate the number of the pixels corresponding to the preset interest region.
The region key difference feature can be determined according to the absolute value of the difference between the pixel average values of the corresponding regions matched in position, wherein the corresponding regions can be left and right corresponding regions or upper and lower corresponding regions. In one embodiment, the region key difference feature may be a left and right region key difference feature, for example, referring to fig. 2, the key difference feature of the corresponding region may be implemented according to the following formula (2):
|mean(Il)-mean(Ir)| (2)
the region color difference feature is represented by the absolute value of the difference between the histograms of any two preset regions of interest. For example, referring to fig. 2, the color difference characteristic of each preset interest region may be implemented according to the following formula (3):
∑|hist(Il)-hist(Ir)|,∑|hist(Il)-hist(Ic)|,∑|hist(Ir)-hist(Ic)| (3)
where hist () is an image histogram calculation function.
The region consistency feature may be represented by an average of absolute values of gradients of the preset regions of interest. For example, referring to fig. 2, the consistency characteristic of each preset interest region may be implemented according to the following formula (4):
mean(|grad(Il)|),mean(|grad(Ir)|),mean(|grad(Ic)|) (4)
in the embodiment, various feature parameters of the preset interest region are extracted, so that the problem of large identification error caused by identifying the image according to a single feature is solved.
S130, inputting the characteristic parameters into at least one machine learning model with an image recognition function, and determining the format type of the image to be recognized according to the output result of the machine learning model.
The machine learning model can identify the format type of the image according to the image characteristic parameters, and the machine learning model can be one or more. For example, the machine learning model may be a trained classifier or a neural network, and optionally, the machine learning model is a cascaded machine learning model. Exemplary machine learning models include, but are not limited to, Adaboost and Random Forest. In the embodiment, the image format type is automatically identified according to the image parameters, and the identification efficiency and accuracy of the image format type are improved.
It should be noted that the SBS format image may also include an upper and lower format image or an upper 2D lower depth map format image, which may be identified according to the image format identification method provided by the embodiment of the present invention.
Optionally, after step S130, the image to be recognized may be displayed according to the format type and the corresponding display policy.
According to the technical scheme, the characteristic parameters of the image center area and the characteristic parameters of the at least two corresponding areas are extracted by obtaining the plurality of preset interest areas of the image to be recognized, the characteristic parameters are input into the at least one machine learning model, and the format type of the image to be recognized is determined according to the output result of the machine learning model, so that the problems that manual input of the format type consumes manpower and time, or the file header identification is not uniform, and the image format can not be recognized accurately are solved, the image format type can be recognized automatically according to the image parameters, and the recognition efficiency and accuracy of the image format type are improved.
Example two
Fig. 3A is a flowchart of an image format recognition method according to a second embodiment of the present invention, and on the basis of the first embodiment, a method for inputting feature parameters into at least one machine learning model and determining a format type of an image to be recognized according to an output result of the machine learning model is further provided. Correspondingly, the method specifically comprises the following steps:
s210, acquiring at least three preset interest areas of the image to be recognized.
The preset interest area comprises an image center area and at least two corresponding areas, and the position information of the at least two corresponding areas is matched based on the image center area.
And S220, extracting the characteristic parameters of the preset interest region.
And S230, determining whether the image to be recognized comprises a depth map or not according to the characteristic parameters.
In this embodiment, the machine learning model includes a first recognition model and a second recognition model. The first identification model identifies whether the image comprises the depth map or not based on the pixel gray value feature of the depth map. The depth map is a gray scale image, and the output values of the U channel and the V channel are both close to 128. Optionally, whether a difference value between a maximum value and a minimum value of a U channel and a V channel in a right region of the image to be recognized is smaller than a first preset value is detected, and if yes, it is determined that the image to be recognized contains the depth map. Optionally, whether the region consistency characteristics of the U channel and the V channel in the right region of the image to be recognized are smaller than a second preset parameter is detected, and if yes, it is determined that the image to be recognized contains the depth map. Optionally, whether the absolute value of the difference between the maximum value and the minimum value of the U channel and the V channel in the right area of the image to be recognized and the value 128 is smaller than a third preset value or not is detected, and if yes, it is determined that the image to be recognized contains a depth map, so that the situation that the image to be recognized contains a large number of pure-color non-gray level images and recognition errors are caused is avoided. The first preset value, the second preset value and the third preset value can be determined according to the image recognition precision requirement or a historical recognition result.
In this embodiment, the first recognition model may be a decision tree or an Adaboost classifier, where the number of stages of the Adaboost classifier may be determined according to the recognition accuracy and the calculation speed of the first recognition model.
And S240, determining whether the image to be identified is an independent two-dimensional image according to the characteristic parameters.
In this embodiment, the second recognition model may be, for example, an Adaboost classifier, and optionally, a single-layer decision tree is used as the weak classifier. Wherein, the stage number of the Adaboost classifier can be determined according to the recognition precision and the calculation speed of the second recognition model.
The single two-dimensional image means that the image to be recognized is a complete 2D image, rather than being formed by combining two images.
And S250, determining the format type of the image to be recognized according to the recognition result of the depth map and/or the recognition result of the two-dimensional image.
In this embodiment, the format type of the image to be recognized is determined according to the classification results of the two machine learning models. In this embodiment, the characteristic parameters are input into the two machine learning models, and the format type of the image to be recognized is determined comprehensively according to the output results of the two machine learning models. Optionally, the step of comprehensively determining the format type of the image to be recognized according to the output results of the two machine learning models includes: if the image to be recognized comprises the depth map, determining that the format type of the image to be recognized is a two-dimensional map and depth map combined format; if the image to be recognized is an independent two-dimensional image, determining that the format type of the image to be recognized is a two-dimensional image format; and if the image to be recognized does not comprise the depth map and is not an independent two-dimensional image, determining that the format type of the image to be recognized is a left-right image format.
In the embodiment, the format type of the image to be recognized is determined through the two machine learning models, so that the complexity of the machine learning models is simplified, the cost of the machine learning models is reduced, and the image format recognition speed is increased compared with one machine learning model.
According to the technical scheme of the embodiment, whether the image to be recognized comprises the depth map is determined according to the characteristic parameters through the first recognition model, whether the image to be recognized is the independent two-dimensional image is determined according to the characteristic parameters through the second recognition model, the format type of the image to be recognized is determined according to the output results of the two machine learning models, the complexity of the machine learning models is simplified, and the rapid automatic recognition of the image format is realized.
In addition to the above embodiments, it should be noted that the execution order of step S240 and step S230 is not limited, and may be synchronous execution, or may be any one of step S240 and step S230 executed first. For example, whether the image to be recognized includes a depth map is judged, and whether the image to be recognized is an independent two-dimensional image is further determined according to a recognition result of the depth map. Referring to fig. 3B, fig. 3B is a flowchart of an image format recognition method according to a second embodiment of the present invention.
S310, acquiring at least three preset interest areas of the image to be recognized.
And S320, extracting the characteristic parameters of the preset interest region.
S330, determining whether the image to be recognized comprises a depth map or not according to the characteristic parameters, if so, executing a step S340, and if not, executing a step S350.
S340, determining the format of the image to be recognized as the combined format of the two-dimensional map and the depth map, and stopping recognizing the image to be recognized.
And S350, determining whether the image to be recognized is an independent two-dimensional image or not according to the characteristic parameters, if so, executing the step S360, and if not, executing the step S370.
And S360, determining the format of the image to be identified as a two-dimensional image format.
And S370, determining the image to be recognized as a left image format and a right image format.
EXAMPLE III
Fig. 4 is a flowchart of an image format recognition method according to a third embodiment of the present invention, and a training method of a machine learning model is further added on the basis of the third embodiment. Correspondingly, the method specifically comprises the following steps:
and S410, establishing at least one machine learning model to be trained.
And S420, training the machine learning model to be trained according to a preset training sample set, and optimizing the machine learning model to be trained according to a training result to generate the machine learning model.
For example, if there is one machine learning model, the presetting of the training sample set includes: the two-dimensional image and depth map group qualified image, the two-dimensional image format image and the left and right image format image; if the number of the machine learning models is two, the preset training sample set of the first recognition model comprises a two-dimensional image and a depth map group qualified image, and the preset training sample set of the second recognition model comprises a two-dimensional image format image and a left-right image format image.
In this embodiment, the machine learning model may be a classifier, and for example, an Adaboost classifier is taken as an example to describe a training process of the machine learning model. It should be noted that the Adaboost classifier is only one selectable example, and different classifiers can be selected according to different user requirements.
The machine learning model is an M-level Adaboost classifier, and a sample space S with the number of samples N is set to be { (x)1,y1),...,(xn,yn) In which xiIs a vector of eigenvalues of the ith sample, yiIs the classification result of the ith sample, in this embodiment, yiMay be +1 and-1, wiIs the weight of the ith sample.
Setting the K (K is less than or equal to M) order weak classifier as hk(X), and setting K-order weak classifiers to be combined to obtain a strong classifier
Figure BDA0001504215030000121
Sample initial weight is wi=1/N,i=1...N。
For each Adaboost classifier, if the error of the classifier is:
Figure BDA0001504215030000122
or
Figure BDA0001504215030000123
Wherein the content of the first and second substances,
Figure BDA0001504215030000124
epsilon is a small value.
And updating the weight of each sample in the Adaboost classifier according to the error:
Figure BDA0001504215030000125
and normalizing the sample weight to make Σ wi (K+1)1. In this embodiment, optionally, a single-layer decision tree or a decision tree is used as the classifier of the Adaboost classifier.
Optionally, the machine learning model is a cascade machine learning model. For example, the machine learning model may be 30 stages, where the higher the number of stages in the machine learning model, the higher the accuracy of the output result, and the 30 stages are only an example of the machine learning model in one embodiment and are not limited thereto. Exemplarily, referring to fig. 5 and fig. 6, fig. 5 is a schematic diagram of progressive reduction of an Adaboost training recognition error provided by a third embodiment of the present invention, and fig. 6 is a schematic diagram of progressive reduction of an Adaboost verification recognition error provided by the third embodiment of the present invention.
And S430, acquiring at least three preset interest areas of the image to be recognized.
The preset interest area comprises an image center area and at least two corresponding areas, and the position information of the at least two corresponding areas is matched based on the image center area.
And S440, extracting the characteristic parameters of the preset interest region.
S450, inputting the characteristic parameters into at least one machine learning model with an image recognition function, and determining the format type of the image to be recognized according to the output result of the machine learning model.
According to the technical scheme, the machine learning model has the capability of recognizing the image format through establishing at least one machine learning model and learning training, the format type of the input image to be recognized can be automatically recognized, the problem of manual intervention of image format recognition is solved, automation and intellectualization of image format recognition are realized, and the recognition accuracy and efficiency are improved.
Example four
Fig. 7 is a schematic structural diagram of an image format recognition apparatus according to a fourth embodiment of the present invention, where the apparatus specifically includes:
the interest region acquiring module 510 is configured to acquire at least three preset interest regions of an image to be identified, where the preset interest regions include an image center region and at least two corresponding regions, and location information of the at least two corresponding regions is matched based on the image center region.
The feature parameter extracting module 520 is configured to extract feature parameters of a preset region of interest.
And the image format identification module 530 is used for inputting the characteristic parameters into at least one machine learning model with an image identification function, and determining the format type of the image to be identified according to the output result of the machine learning model.
Optionally, the preset interest region includes an image center region and at least two corresponding regions, and the position information of the at least two corresponding regions is matched based on the image center region.
Optionally, the characteristic parameter includes at least one of: the system comprises a region key characteristic, a region color difference characteristic, a region key difference characteristic and a region consistency characteristic.
Optionally, the number of the machine learning models is two, and the image format identifying module 530 includes:
the first recognition model is used for determining whether the image to be recognized comprises a depth map or not according to the characteristic parameters;
the second identification model is used for determining whether the image to be identified is an independent two-dimensional image or not according to the characteristic parameters;
and the recognition result determining unit is used for determining the format type of the image to be recognized according to the recognition result of the first recognition model and/or the second recognition model.
Optionally, the identification result determining unit is specifically configured to:
if the image to be recognized comprises the depth map, determining that the format type of the image to be recognized is a two-dimensional map and depth map combined format;
if the image to be recognized is an independent two-dimensional image, determining that the format type of the image to be recognized is a two-dimensional image format;
and if the image to be recognized does not comprise the depth map and is not an independent two-dimensional image, determining that the format type of the image to be recognized is a left-right image format.
Optionally, the apparatus further comprises:
the model establishing module is used for establishing at least one machine learning model to be trained before the image to be recognized is obtained;
and the model training module is used for training the machine learning model to be trained according to a preset training sample set, optimizing the machine learning model to be trained according to a training result and generating the machine learning model.
The image format recognition device provided by the embodiment of the invention can execute the image format recognition method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the image format recognition method.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (8)

1. An image format recognition method, comprising:
acquiring at least three preset interest areas of an image to be identified, wherein the preset interest areas comprise an image central area and at least two corresponding areas, and the position information of the at least two corresponding areas is matched based on the image central area;
extracting characteristic parameters of the preset interest region;
inputting the characteristic parameters into at least one machine learning model with an image recognition function, and determining the format type of the image to be recognized according to the output result of the machine learning model;
the characteristic parameters comprise the following: the method comprises the following steps of (1) region key features, region color difference features, region key difference features and region consistency features;
the region key feature is represented by a pixel average value of each of the preset interest regions, and the region key feature of each of the preset interest regions can be implemented according to the following formula (1):
Figure FDA0003413312500000011
wherein, Il、IrAnd IcRespectively representing the pixel value of each pixel point of each preset interest region, wherein l represents a left region, r represents a right region, c represents an image center region, and # is used for representing the number of each pixel point of each corresponding preset interest region;
the region key difference feature may be determined according to an absolute value of a difference between pixel averages of corresponding regions of position matching, and the key difference feature of the corresponding regions may be implemented according to the following formula (2):
|mean(Il)-mean(Ir)| (2)
the region color difference feature is represented by an absolute value of a difference between histograms of any two of the preset regions of interest, and the color difference feature of each of the preset regions of interest can be implemented according to the following formula (3):
∑|hist(Il)-hist(Ir)|,∑|hist(Il)-hist(Ic)|,∑|hist(Ir)-hist(Ic)| (3)
wherein hist () is an image histogram calculation function;
the region consistency characteristic is represented by an average value of absolute values of gradients of the preset interest regions, and the consistency characteristic of each preset interest region can be realized according to the following formula (4):
mean(|grad(Il)|),mean(|grad(Ir)|),mean(|grad(Ic)|) (4)。
2. the method of claim 1, wherein determining the format type of the image to be recognized according to the output result of the machine learning model comprises:
determining whether the image to be identified comprises a depth map according to the characteristic parameters;
determining whether the image to be identified is an independent two-dimensional image according to the characteristic parameters;
and determining the format type of the image to be recognized according to the recognition result of the depth map and/or the recognition result of the two-dimensional image.
3. The method according to claim 2, wherein determining the format type of the image to be recognized according to the recognition result of the depth map and/or the recognition result of the two-dimensional image comprises:
if the image to be recognized comprises the depth map, determining that the format type of the image to be recognized is a two-dimensional map and depth map combined format;
if the image to be recognized is an independent two-dimensional image, determining that the format type of the image to be recognized is a two-dimensional image format;
and if the image to be recognized does not comprise the depth map and is not an independent two-dimensional image, determining that the format type of the image to be recognized is a left-right image format.
4. The method of claim 1, further comprising, prior to acquiring the image to be identified:
establishing at least one machine learning model to be trained;
and training the machine learning model to be trained according to a preset training sample set, and optimizing the machine learning model to be trained according to a training result to generate the machine learning model.
5. An image format recognition apparatus, comprising:
the device comprises an interest area acquisition module, a recognition module and a recognition module, wherein the interest area acquisition module is used for acquiring at least three preset interest areas of an image to be recognized, the preset interest areas comprise an image central area and at least two corresponding areas, and the position information of the at least two corresponding areas is matched based on the image central area;
the characteristic parameter extraction module is used for extracting the characteristic parameters of the preset interest region;
the image format recognition module is used for inputting the characteristic parameters into at least one machine learning model with an image recognition function and determining the format type of the image to be recognized according to the output result of the machine learning model;
the characteristic parameters comprise the following: the method comprises the following steps of (1) region key features, region color difference features, region key difference features and region consistency features;
the region key feature is represented by a pixel average value of each of the preset interest regions, and the region key feature of each of the preset interest regions can be implemented according to the following formula (1):
Figure FDA0003413312500000031
wherein, Il、IrAnd IcRespectively representing the pixel value of each pixel point of each preset interest region, wherein l represents a left region, r represents a right region, c represents an image center region, and # is used for representing the number of each pixel point of each corresponding preset interest region;
the region key difference feature may be determined according to an absolute value of a difference between pixel averages of corresponding regions of position matching, and the key difference feature of the corresponding regions may be implemented according to the following formula (2):
|mean(Il)-mean(Ir)| (2)
the region color difference feature is represented by an absolute value of a difference between histograms of any two of the preset regions of interest, and the color difference feature of each of the preset regions of interest can be implemented according to the following formula (3):
∑|hist(Il)-hist(Ir)|,∑|hist(Il)-hist(Ic)|,∑|hist(Ir)-hist(Ic)| (3)
wherein hist () is an image histogram calculation function;
the region consistency characteristic is represented by an average value of absolute values of gradients of the preset interest regions, and the consistency characteristic of each preset interest region can be realized according to the following formula (4):
mean(|grad(Il)|),mean(|grad(Ir)|),mean(|grad(Ic)|) (4)。
6. the apparatus of claim 5, wherein the machine learning models are two, and wherein the image format recognition module comprises:
the first identification model is used for determining whether the image to be identified comprises a depth map or not according to the characteristic parameters;
the second identification model is used for determining whether the image to be identified is an independent two-dimensional image or not according to the characteristic parameters;
and the identification result determining unit is used for determining the format type of the image to be identified according to the identification result of the first identification model and/or the second identification model.
7. The apparatus according to claim 5, wherein the recognition result determining unit is specifically configured to:
if the image to be recognized comprises the depth map, determining that the format type of the image to be recognized is a two-dimensional map and depth map combined format;
if the image to be recognized is an independent two-dimensional image, determining that the format type of the image to be recognized is a two-dimensional image format;
and if the image to be recognized does not comprise the depth map and is not an independent two-dimensional image, determining that the format type of the image to be recognized is a left-right image format.
8. The apparatus of claim 5, further comprising:
the model establishing module is used for establishing at least one machine learning model to be trained before the image to be recognized is obtained;
and the model training module is used for training the machine learning model to be trained according to a preset training sample set, optimizing the machine learning model to be trained according to a training result and generating the machine learning model.
CN201711318144.1A 2017-12-12 2017-12-12 Image format identification method and device Active CN108133210B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711318144.1A CN108133210B (en) 2017-12-12 2017-12-12 Image format identification method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711318144.1A CN108133210B (en) 2017-12-12 2017-12-12 Image format identification method and device

Publications (2)

Publication Number Publication Date
CN108133210A CN108133210A (en) 2018-06-08
CN108133210B true CN108133210B (en) 2022-04-01

Family

ID=62389325

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711318144.1A Active CN108133210B (en) 2017-12-12 2017-12-12 Image format identification method and device

Country Status (1)

Country Link
CN (1) CN108133210B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110674831B (en) * 2018-06-14 2023-01-06 佛山市顺德区美的电热电器制造有限公司 Data processing method and device and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102710953A (en) * 2012-05-08 2012-10-03 深圳Tcl新技术有限公司 Method and device for automatically identifying 3D (three-dimentional) video playing mode
CN102742283A (en) * 2010-02-09 2012-10-17 皇家飞利浦电子股份有限公司 3d video format detection
CN102970555A (en) * 2012-11-30 2013-03-13 深圳Tcl新技术有限公司 Method and device for regulating 3D (Three-Dimensional) video play mode
CN104185023A (en) * 2014-09-16 2014-12-03 上海通途半导体科技有限公司 Automatic detecting method and device for three-dimensional video format
CN104994374A (en) * 2015-07-03 2015-10-21 宁波易维视显示技术有限公司 Method for automatically detecting three-dimensional format of video
CN105550706A (en) * 2015-12-13 2016-05-04 大巨龙立体科技有限公司 Method of recognizing 2D image and 3D image

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102742283A (en) * 2010-02-09 2012-10-17 皇家飞利浦电子股份有限公司 3d video format detection
CN102710953A (en) * 2012-05-08 2012-10-03 深圳Tcl新技术有限公司 Method and device for automatically identifying 3D (three-dimentional) video playing mode
CN102970555A (en) * 2012-11-30 2013-03-13 深圳Tcl新技术有限公司 Method and device for regulating 3D (Three-Dimensional) video play mode
CN104185023A (en) * 2014-09-16 2014-12-03 上海通途半导体科技有限公司 Automatic detecting method and device for three-dimensional video format
CN104994374A (en) * 2015-07-03 2015-10-21 宁波易维视显示技术有限公司 Method for automatically detecting three-dimensional format of video
CN105550706A (en) * 2015-12-13 2016-05-04 大巨龙立体科技有限公司 Method of recognizing 2D image and 3D image

Also Published As

Publication number Publication date
CN108133210A (en) 2018-06-08

Similar Documents

Publication Publication Date Title
CN108229526B (en) Network training method, network training device, image processing method, image processing device, storage medium and electronic equipment
CN110163033B (en) Positive sample acquisition method, pedestrian detection model generation method and pedestrian detection method
WO2020107717A1 (en) Visual saliency region detection method and apparatus
EP3101594A1 (en) Saliency information acquisition device and saliency information acquisition method
CN112052186B (en) Target detection method, device, equipment and storage medium
CN105608441B (en) Vehicle type recognition method and system
JP2021532434A (en) Face feature extraction model Training method, face feature extraction method, device, equipment and storage medium
JP2015176169A (en) Image processor, image processing method and program
CN111783505A (en) Method and device for identifying forged faces and computer-readable storage medium
WO2019197021A1 (en) Device and method for instance-level segmentation of an image
CN108256454B (en) Training method based on CNN model, and face posture estimation method and device
CN110827312A (en) Learning method based on cooperative visual attention neural network
TW201541364A (en) Image processing apparatus and processing method thereof
CN104408728A (en) Method for detecting forged images based on noise estimation
CN111935479A (en) Target image determination method and device, computer equipment and storage medium
CN112633221A (en) Face direction detection method and related device
CN111340831A (en) Point cloud edge detection method and device
CN113706472A (en) Method, device and equipment for detecting road surface diseases and storage medium
CN108133210B (en) Image format identification method and device
CN107145892B (en) A kind of image significance object detection method based on adaptive syncretizing mechanism
WO2018189962A1 (en) Object recognition device, object recognition system, and object recognition method
JP2013003686A (en) Recognizing apparatus and method, program, and recording medium
JP4967045B2 (en) Background discriminating apparatus, method and program
CN108256578B (en) Gray level image identification method, device, equipment and readable storage medium
CN111582278A (en) Portrait segmentation method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200408

Address after: 215634 north side of Chengang road and west side of Ganghua Road, Jiangsu environmental protection new material industrial park, Zhangjiagang City, Suzhou City, Jiangsu Province

Applicant after: ZHANGJIAGANG KANGDE XIN OPTRONICS MATERIAL Co.,Ltd.

Address before: 201203, room 5, building 690, No. 202 blue wave road, Zhangjiang hi tech park, Shanghai, Pudong New Area

Applicant before: WZ TECHNOLOGY Inc.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant