A kind of method and system carrying out parking stall water detection based on image processing techniques
Technical field
The present invention relates to field of automobile safety, specifically a kind of method and system carrying out parking stall water detection based on image processing techniques.
Background technology
Automotive engineering is maked rapid progress, and the concept such as unmanned, car networking, intelligent automobile has become hot issue instantly, and the technology such as big data related to this, artificial intelligence, image procossing increasingly becomes focus and the difficult point of this area research.
Based on the intelligent parking technology of video image, it is a kind of utilize image algorithm that acquired video flowing is carried out feature analysis, finally guides vehicle automatic stopping to enter the intellectual technology of position.This technology is significant to the research in unmanned field.These technology realize mainly through modes such as the detection of parking stall line and location at present, and the analysis of barrier relevant information in shorter mention parking stall is especially not directed to the detection analysis of parking stall internal water accumulation situation.
Summary of the invention
It is an object of the invention to provide a kind of method and system carrying out parking stall water detection based on image processing techniques, it is possible to identify parking stall hydrops quickly and efficiently, more can meet the intelligent demand of parking of user.
For achieving the above object, the present invention provides following technical scheme:
A kind of method carrying out parking stall water detection based on image processing techniques, comprises the following steps:
1) outdoor scene hydrops model training on daytime;
2) backsight fish eye lens is demarcated, and preserves internal reference matrix and distortion factor matrix;
3) obtain the video flowing that backsight fish eye lens gathers, image is made distortion correction;
4) set detection region, image in region is made color notation conversion space, analyze pixel color characteristics and saturation, retain and meet the pixel setting threshold value;
5) Morphological scale-space and connected component analysis, blob (binarylargeobject, the binary large object) image block meeting area threshold makes profile analysis of complexity;
6) the blob image block meeting complexity threshold carries out feature extraction and model comparison, obtains water detection result.
As the further scheme of the present invention: step 1) in, outdoor scene hydrops model training on daytime specifically includes: hydrops region picture in intercept network picture, sets up positive Sample Storehouse;Randomly select any non-hydrops region picture and set up negative example base;Positive and negative sample-size normalization;Extracting positive negative sample gradient information and texture information as feature, combining classification device is trained obtaining outdoor scene hydrops model on daytime.
As the further scheme of the present invention: hydrops region picture is parking stall hydrops picture.
As the further scheme of the present invention: step 4) in, analyze pixel color characteristics and saturation characteristic specifically includes: RGB image in region is transformed into respectively YCrCb space and HSV space, analyze each component value whether in setting threshold range.
As the further scheme of the present invention: step 5) in, profile analysis of complexity specifically includes: calculate elemental area and the circumference pixel girth of candidate's hydrops blob image block, whether the ratio analyzing elemental area and circumference pixel girth reaches to set threshold requirement, if reaching to set threshold requirement, thinking and meeting profile complexity requirement.
A kind of system carrying out parking stall water detection based on image processing techniques, is formed by with lower module:
Hydrops model training module: be used for carrying out outdoor scene hydrops model training on daytime;
Fish eye lens demarcating module: be used for carrying out backsight fish eye lens demarcation, preserves internal reference matrix and distortion factor matrix;
Image distortion correction module: for obtaining the video flowing that backsight fish eye lens gathers, image is made distortion correction;
Color characteristics analysis module: be used for setting detection region, image in region made color notation conversion space, analyzes pixel color characteristics and saturation, retain and meet the pixel setting threshold value;
Profile analysis of complexity module: be used for carrying out Morphological scale-space and connected component analysis, the blob image block meeting area threshold makes profile analysis of complexity;
Feature extraction and model comparing module: for the blob image block meeting complexity threshold being carried out feature extraction and model comparison, obtain water detection result.
As the further scheme of the present invention: described outdoor scene hydrops model training on daytime specifically includes: hydrops region picture in intercept network picture, sets up positive Sample Storehouse;Randomly select any non-hydrops region picture and set up negative example base;Positive and negative sample-size normalization;Extracting positive negative sample gradient information and texture information as feature, combining classification device is trained obtaining outdoor scene hydrops model on daytime.
As the further scheme of the present invention: hydrops region picture is parking stall hydrops picture.
As the further scheme of the present invention: described analysis pixel color characteristics and saturation characteristic specifically include: RGB image in region is transformed into YCrCb space and HSV space respectively, analyze each component value whether in setting threshold range.
As the further scheme of the present invention: described profile analysis of complexity specifically includes: calculate elemental area and the circumference pixel girth of candidate's hydrops blob image block, whether the ratio analyzing elemental area and circumference pixel girth reaches to set threshold requirement, if reaching to set threshold requirement, thinking and meeting profile complexity requirement.
Compared with prior art, the invention has the beneficial effects as follows:
A kind of method and system carrying out parking stall water detection based on image processing techniques that the present invention proposes, image sequence characteristic can be directly utilized and analyze parking stall internal water accumulation situation, in perfect further intelligent parking process, detection of obstacles problem in parking stall, provides auxiliary information for unmanned.The present invention is based upon the parking stall water detection technology on intelligent automobile concept fisheye camera Information base, it is possible to identify parking stall hydrops quickly and efficiently, more can meet the intelligent demand of parking of user.
Accompanying drawing explanation
Fig. 1 is the method flow diagram of the present invention;
Fig. 2 is the system block diagram of the present invention.
Detailed description of the invention
Below in conjunction with the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is only a part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain under not making creative work premise, broadly fall into the scope of protection of the invention.
Embodiment 1
In the embodiment of the present invention, as it is shown in figure 1, for the flow chart of a kind of method carrying out parking stall water detection based on image processing techniques, described method includes:
S101. outdoor scene hydrops model training on daytime;
S102. backsight fish eye lens is demarcated, and preserves internal reference matrix and distortion factor matrix;
S103. obtain the video flowing that backsight fish eye lens gathers, image is made distortion correction;
S104. set detection region, image in region is made color notation conversion space, analyze pixel color characteristics and saturation, retain and meet the pixel setting threshold value;
S105. Morphological scale-space and connected component analysis, the blob image block meeting area threshold makes profile analysis of complexity;
S106. the blob image block meeting complexity threshold carries out feature extraction and model comparison, obtains water detection result.
Hydrops region picture in intercept network picture, especially parking stall hydrops picture, set up positive Sample Storehouse;Randomly select any non-hydrops region picture and set up negative example base;Positive and negative sample-size normalization;
Utilize the histogramming algorithms such as EOH or HOG to extract positive negative sample gradient information, utilize Gabor or LBP scheduling algorithm to extract texture information, merge gradient and texture as this sample characteristics;Use the graders such as SVM or Adaboost to align negative sample to be trained, obtain outdoor scene hydrops model on daytime;
Making black and white gridiron pattern, width is 14 lattice, is highly 10 lattice, and grid length and width are 6cm;
Utilize the picture that backsight fish-eye camera shoots the 10 above different angles of width to carry out camera calibration, obtain internal reference and distortion factor matrix and preserve;
Park after startup, obtain the video flowing that backsight fish eye lens gathers in real time, call calibrating parameters and carry out image distortion correction;
Set detection region, RGB image in region is transformed into respectively YCrCb space and HSV space, whether analyze point value such as Cr, Cb, Cr-Cb and S setting in threshold range, if setting in threshold range, retaining, otherwise pixel value being set to zero.
Calculating elemental area and the circumference pixel girth of candidate's hydrops blob image block, whether the ratio of elemental area and circumference pixel girth of analyzing, more than setting threshold value, if reaching to set threshold requirement, retaining, otherwise pixel value being set to zero.
Also with gradient and texture operator the blob image block meeting complexity threshold carried out feature extraction and compare with the aspect of model, obtaining water detection result.
As in figure 2 it is shown, the embodiment of the present invention 1 also proposed a kind of system carrying out parking stall water detection based on image processing techniques, described system is achieved through the following technical solutions:
A kind of system carrying out parking stall water detection based on image processing techniques, described system includes:
Hydrops model training module: be used for carrying out outdoor scene hydrops model training on daytime;
Fish eye lens demarcating module: be used for carrying out backsight fish eye lens demarcation, preserves internal reference matrix and distortion factor matrix;
Image distortion correction module: for obtaining the video flowing that backsight fish eye lens gathers, image is made distortion correction;
Color characteristics analysis module: be used for setting detection region, image in region made color notation conversion space, analyzes pixel color characteristics and saturation, retain and meet the pixel setting threshold value;
Profile analysis of complexity module: be used for carrying out Morphological scale-space and connected component analysis, the blob image block meeting area threshold makes profile analysis of complexity;
Feature extraction and model comparing module: for the blob image block meeting complexity threshold being carried out feature extraction and model comparison, obtain water detection result.
A kind of method and system carrying out parking stall water detection based on image processing techniques that the embodiment of the present invention proposes, image sequence characteristic can be directly utilized and analyze parking stall internal water accumulation situation, in perfect further intelligent parking process, detection of obstacles problem in parking stall, provides auxiliary information for unmanned.Therefore, the embodiment of the present invention is based upon the parking stall water detection technology on intelligent automobile concept fisheye camera Information base, compares compared with method, it is possible to identify parking stall hydrops quickly and efficiently, more can meet the intelligent demand of parking of user.
It is obvious to a person skilled in the art that the invention is not restricted to the details of above-mentioned one exemplary embodiment, and when without departing substantially from the spirit of the present invention or basic feature, it is possible to realize the present invention in other specific forms.Therefore, no matter from which point, embodiment all should be regarded as exemplary, and be nonrestrictive, the scope of the invention rather than described above limits, it is intended that all changes in the implication of the equivalency dropping on claim and scope included in the present invention.
In addition, it is to be understood that, although this specification is been described by according to embodiment, but not each embodiment only comprises an independent technical scheme, this narrating mode of description is only for clarity sake, description should be made as a whole by those skilled in the art, and the technical scheme in each embodiment through appropriately combined, can also form other embodiments that it will be appreciated by those skilled in the art that.