CN104899880B - A kind of public transit vehicle opening/closing door of vehicle state automatic testing method - Google Patents

A kind of public transit vehicle opening/closing door of vehicle state automatic testing method Download PDF

Info

Publication number
CN104899880B
CN104899880B CN201510271385.XA CN201510271385A CN104899880B CN 104899880 B CN104899880 B CN 104899880B CN 201510271385 A CN201510271385 A CN 201510271385A CN 104899880 B CN104899880 B CN 104899880B
Authority
CN
China
Prior art keywords
mrow
background
car door
munderover
msub
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201510271385.XA
Other languages
Chinese (zh)
Other versions
CN104899880A (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.)
Changan University
Original Assignee
Changan University
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 Changan University filed Critical Changan University
Priority to CN201510271385.XA priority Critical patent/CN104899880B/en
Publication of CN104899880A publication Critical patent/CN104899880A/en
Application granted granted Critical
Publication of CN104899880B publication Critical patent/CN104899880B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30248Vehicle exterior or interior

Landscapes

  • Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a kind of public transit vehicle opening/closing door of vehicle state automatic testing methods, this method utilizes the car door image data of video capture device acquisition, picture frame of the vehicle before dispatching a car is saved as into Background, and demarcate detection zone, the realtime graphic frame and Background of acquisition are compared and analyzed in calibration region, when picture frame and the gray difference degree of Background and larger contrast difference's degree, it is believed that car door is in opening;Otherwise judge that car door is in off state.During concrete operations, camera is installed on roof location above driver, adjusts the shooting angle and focal length of camera:Car door is made to be in the center of shooting picture, and takes entire shooting picture as far as possible.

Description

A kind of public transit vehicle opening/closing door of vehicle state automatic testing method
Technical field:
Expanded application more particularly to one kind the present invention relates to a kind of bus camera monitoring system are based on image procossing The public transit vehicle opening/closing door of vehicle state automatic testing method of technology.
Background technology:
Since the information of video capture device acquisition has the information such as abundant color, structure, texture and time, usually by It is widely used in traffic and transport field, such as monitoring system in bus.Majority bus has installed monitoring camera at present Head, and have corresponding storage facilities and coffret.Monitoring system is by installing multiple take the photograph in bus in bus As head, in vehicle operation, the inside and outside abnormal conditions of vehicle are recorded at any time, tune is provided for the operation, management and optimization of public transport Grind data, the driving and operation of specification public transit vehicle.But there is presently no examined automatically for public transit vehicle opening/closing door of vehicle state Survey method.
The content of the invention:
It is an object of the invention to provide a kind of public transit vehicle opening/closing door of vehicle states based on image processing techniques to examine automatically Survey method.
In order to achieve the above objectives, the present invention, which adopts the following technical scheme that, is achieved:
A kind of public transit vehicle opening/closing door of vehicle state automatic testing method, includes the following steps:
Step 0:Acquisition bus is dispatched a car the video background picture frame F of front doort
Step 1:Video background image frame F before the bus of acquisition is dispatched a cartGray processing obtains background grey-level image frame ft
Step 2:Background Bg is obtained in background grey-level image frame by averaging method;
Step 3:Binaryzation is carried out to the Background Bg that step 2 obtains, obtains background binary figure MG;
Step 4:Closing operation of mathematical morphology is carried out to the background binary figure MG that step 3 obtains, obtains gradient connection figure OG;
Step 5:Morphology opening operation is carried out to the gradient connection figure OG that step 4 obtains, obtains gradient map CG;
Step 6:The gradient map CG that step 5 obtains is negated and is gone sporadicly to handle, counts the pixel number of each connected region, The most connected region of pixel number is extracted as car door Prototype drawing MB;
Step 7:The car door Prototype drawing MB that step 6 the obtains Background Bg obtained with step 2 are subjected to dot product, obtain background Detection figure ej, calculation formula are as follows:
Ej=MB × Bg (6)
Wherein, × represent that point multiplication operation accords with;
Step 8:Calculate the average gray value eb of background detection figure ej;
Step 9:Car door picture frame E after collection vehicle is sent in real timek
Step 10:To the car door picture frame E gathered in step 9kGray processing processing is carried out to it according to the method for step 1, The car door gray-scale map of kth frame is obtained, is denoted as Ehk
Step 11:The car door gray-scale map Eh that the car door Prototype drawing MB that step 6 obtains is obtained with step 10kCarry out dot product, Obtain kth frame car door detection figure ek, calculation formula is as follows:
ek=MB × Ehk (8)
Step 12:The kth frame car door detection figure e obtained in calculation procedure 11kAverage gray value ehk
Step 13:Calculate car door detection figure ekWith the gray difference degree ed of background detection figure ejk, calculating formula is as follows:
edk=| ehk-eb| (10)
Step 14:Calculate car door detection figure ekWith contrast difference's degree r of background detection figure ejk
Step 15:Opening/closing door of vehicle state judges;Opening/closing door of vehicle state is judged by formula (12);
Wherein, flkFor the mark of opening/closing door of vehicle state, flk=0 expression car door is in off state, flk=1 represents that car door is Opening;T1For gray difference degree threshold value, T1Value range be:3~10;T2For contrast difference's degree threshold value, value range For -0.5~0.
Further improve of the invention is, further includes following steps:
Step 16:Store the opening/closing door of vehicle state of kth frame car door picture frame;
Step 17:Whether public transit vehicle has arrived at terminal;It is no, it is transferred to step 18;It is then to be transferred to step 19;
Step 18:Next frame is gathered, is transferred to step 9.
Further improve of the invention is, in step 0:The video background picture frame of 5s before acquisition bus sets out, In, sample frequency is 0.5s/ frames, gathers 10 two field pictures altogether, is denoted as Ft, wherein, t is frame number, t=1,2 ..., 10;Acquisition The image size arrived arranges for M rows and N, sets the coordinate of certain pixel as (x, y), the row and column of x and y expression pixels (x, y), full Foot:X and y is integer, and 1≤x≤M, 1≤y≤N, then t frames background image frame FtThe RGB color value of middle pixel (x, y) is used Symbolic indication is (Rt(x,y),Gt(x,y),Bt(x,y))。
Further improve of the invention is, in step 1:The t frame background image frames F that step 0 processing is obtainedtIt carries out Gray processing processing, obtains background grey-level image frame and is denoted as ft, calculating formula is as follows:
ft(x, y)=0.3 × Rt(x,y)+0.59×Gt(x,y)+0.11×Bt(x,y) (1)
Wherein, Rt(x, y) represents background image frame FtThe R component value of middle pixel (x, y);Gt(x, y) represents background image frame FtThe G component values of middle pixel (x, y);Bt(x, y) represents background image frame FtThe B component value of middle pixel (x, y);ft(x, y) is represented Background grey-level image frame ftThe gray value of middle pixel (x, y).
Further improve of the invention is, in step 2:The calculation formula of Background Bg is shown below:
Wherein, Bg (x, y) represents the gray value of pixel (x, y) in Background Bg;
In step 3:Binaryzation is carried out to Background Bg and obtains background binary figure MG, calculating formula is as follows:
Wherein, T is binary-state threshold, and value is:110~140;MG (x, y) represent pixel in background binary figure MG (x, Y) value, MG (x, y)=0 represent that pixel (x, y) is possible car door region, and MG (x, y)=1 represents that pixel (x, y) is non-vehicle Door region.
Further improve of the invention is, in step 4:The closed operation of mathematical morphology is carried out to background binary figure MG, Gradient connection figure OG is obtained, calculating formula is as follows:
Wherein, Se is structural element, takes 3 × 3~10 × 10 square structure element;Represent background binary Scheme MG and closed operation operation is carried out by construction operator Se;Represent closing operation of mathematical morphology;Represent dilation operation;Represent corrosion fortune It calculates.
Further improve of the invention is, in step 5:Mathematical morphology open operator is carried out to gradient connection figure OG, is obtained To gradient map CG, to eliminate the burr in gradient connection figure OG, calculating formula is as follows:
Wherein, morphology opening operation is represented, OGSe represents that gradient connection figure OG carries out opening operation by construction operator Se Operation.
Further improve of the invention is, in step 8:The calculating formula of average gray value eb is as follows:
Wherein, ej (x, y) represents the gray value of pixel (x, y) in background detection figure ej.
Further improve of the invention is, in step 12:Average gray value ehkCalculating formula it is as follows:
Wherein, ek(x, y) represents kth frame car door detection figure ekThe gray value of middle pixel (x, y).
Further improve of the invention is, in step 14:Contrast difference's degree rkCalculating formula it is as follows:
Wherein, rkFor contrast difference's degree, value is more big, illustrates car door detection figure ekIt is got over the diversity factor of background detection figure ej Greatly, vice versa.
Compared with the prior art, the present invention has the advantage that:
The present invention is saved as picture frame of the vehicle before dispatching a car using the car door image data of video capture device acquisition Background, and detection zone is demarcated, the realtime graphic frame and Background of acquisition are compared and analyzed in calibration region, work as figure During as frame and the gray difference degree of Background and larger contrast difference's degree, it is believed that car door is in opening;Otherwise vehicle is judged Door is in off state.Camera is installed on roof location above driver, adjusts the shooting angle and focal length of camera:Make vehicle Door is in the center of shooting picture, and takes entire shooting picture as far as possible.
Further, the open and-shut mode of the automatic detection public transit vehicle car door of the present invention has important practical significance:When Trigger data acquisition.When vehicle is travelled and stopped, the region of concern is different in bus, the number that corresponding sensor is gathered It, can be by detecting the open and-shut mode of car door come the opening and closing of trigger data acquisition sensor according to being also not quite similar;Second is that prison Control the abnormal conditions of car door.The open and-shut mode of bus door and driver compare the operation of car door, vehicle can be monitored Whether door working condition is normal, finds the abnormality of opening/closing door of vehicle in time, ensures people, vehicle, the safety of object.Third, following nothing People drives the realization of public transit vehicle, it is necessary first to which the open and-shut mode of detection car door in real time could then travel vehicle, stop It is manipulated by waiting.In consideration of it, the present invention proposes a kind of detection method of public transit vehicle opening/closing door of vehicle state.This method has letter The advantages that single, economy, real result is reliable.
Description of the drawings:
Fig. 1 is Background Bg.
Fig. 2 is background binary figure MG.
Fig. 3 is gradient connection figure OG.
Fig. 4 is gradient map CG.
Fig. 5 is car door Prototype drawing MB.
Fig. 6 is background detection figure ej.
Fig. 7 is car door picture frame Ek
Fig. 8 is car door gray-scale map Ehk
Fig. 9 is car door detection figure ek
Specific embodiment:
Below in conjunction with drawings and examples, the present invention is described in further detail.
A kind of public transit vehicle opening/closing door of vehicle state automatic testing method of the present invention, includes the following steps:
Step S0:Video background image frame gathers before bus is dispatched a car.The video background figure of 5s before acquisition bus sets out As frame, sample frequency is 0.5s/ frames, gathers 10 two field pictures altogether, is denoted as Ft, wherein, t is frame number, t=1,2 ..., 10.It adopts The image size collected is 180 × 250, i.e. M=180, N=250, it is assumed that the coordinate of certain pixel is (x, y), and x and y represent picture The row and column of plain (x, y) meets:X and y is integer, and 1≤x≤180,1≤y≤250.T frame background image frames FtMiddle picture The RGB color value symbolically of plain (x, y) is (Rt(x,y),Gt(x,y),Bt(x,y))。
It is transferred to step S1.
Step S1:Video background picture frame gray processing.The background image frame F that step S0 processing is obtainedtCarry out gray processing Processing, obtains background grey-level image frame and is denoted as ft, calculating formula is as follows:
ft(x, y)=0.3 × Rt(x,y)+0.59×Gt(x,y)+0.11×Bt(x, y), t=1,2 ... ... 10 (1)
Wherein, Rt(x, y) represents background image frame FtThe R component value of middle pixel (x, y);Gt(x, y) represents background image frame FtThe G component values of middle pixel (x, y);Bt(x, y) represents background image frame FtThe B component value of middle pixel (x, y);ft(x, y) is represented Background grey-level image frame ftThe gray value of middle pixel (x, y).
It is transferred to step S2.
Step S2:Background is obtained by averaging method.Background represents (as shown in Figure 1) with Bg, and calculation formula is as follows Shown in formula:
Wherein, Bg (x, y) represents the gray value of pixel (x, y) in Background Bg.
It is transferred to step S3.
Step S3:Binaryzation is carried out to the Background Bg that step S2 is obtained.Binary conversion treatment is carried out to Background Bg, is obtained Background binary figure MG (as shown in Figure 2), calculating formula is as follows:
Wherein, T is binary-state threshold, and in the present embodiment, T values are 128;MG (x, y) represents picture in background binary figure MG The value of plain (x, y), MG (x, y)=0 represent that pixel (x, y) is possible car door region, and MG (x, y)=1 represents that pixel (x, y) is Non- car door region.
It is transferred to step S4.
Step S4:Closing operation of mathematical morphology is carried out to the background binary figure MG that step S3 is obtained.Background binary figure MG is carried out The closed operation of mathematical morphology obtains gradient connection figure OG (as shown in Figure 3), and calculating formula is as follows:
Wherein, Se is structural element, and 8 × 8 square structure element is taken in the present embodiment;Represent background two Value figure MG carries out closed operation operation by construction operator Se;Represent closing operation of mathematical morphology;Represent dilation operation;Represent corrosion Computing.
It is transferred to step S5.
Step S5:Morphology opening operation is carried out to the gradient connection figure OG that step S4 is obtained.Gradient connection figure OG is carried out Mathematical morphology open operator obtains gradient map CG (as shown in Figure 4), to eliminate the burr in gradient connection figure OG, calculating formula It is as follows:
Wherein, morphology opening operation is represented, OGSe represents that gradient connection figure OG carries out opening operation by construction operator Se Operation.
It is transferred to step S6.
Step S6:The gradient map CG that step S5 is obtained is negated and gone sporadicly to handle, counts the pixel of each connected region Number, the most connected region of extraction pixel number is as car door Prototype drawing MB (as shown in Figure 5).
It is transferred to step S7.
Step S7:The obtained Background Bg of the car door Prototype drawing MB and step S2 that step S6 is obtained are subjected to dot product, are obtained Background detection figure ej (as shown in Figure 6), calculation formula is as follows:
Ej=MB × Bg (6)
Wherein, × represent that point multiplication operation accords with;MB × Bg represents that car door Prototype drawing MB and Background Bg carries out dot product fortune It calculates.
It is transferred to step S8.
Step S8:The average gray value eb of background detection figure ej is calculated, calculating formula is as follows:
Wherein, ej (x, y) represents the gray value of pixel (x, y) in background detection figure ej.
In the present embodiment, the average gray value eb=17.710 for the background detection figure ej being calculated.
It is transferred to step S9.
Step S9:Car door image after collection vehicle is sent in real time, sample frequency are 0.5S/ frames, the kth frame of acquisition RBG picture frames (as shown in Figure 7), use EkIt represents.In embodiment, k=1 is taken.
It is transferred to step S10.
Step S10:To the car door picture frame E gathered in step S9kIt is carried out at gray processing according to the method for step S1 Reason, obtains the car door gray-scale map (as shown in Figure 8) of kth frame, is denoted as Ehk
It is transferred to step S11.
Step S11:The car door gray-scale map Eh that the car door Prototype drawing MB and step S10 that step S6 is obtained is obtainedkIt carries out a little Multiply, obtain car door detection figure ek(as shown in Figure 9), calculation formula is as follows:
ek=MB × Ehk (8)
Wherein, MB × EhkRepresent car door Prototype drawing MB and car door gray-scale map EhkCarry out point multiplication operation.
It is transferred to step S12.
Step S12:The kth frame car door detection figure e that calculation procedure S11 is obtainedkAverage gray value ehk, calculating formula is as follows It is shown:
Wherein, ek(x, y) represents car door detection figure ekThe gray value of middle pixel (x, y).
In the present embodiment, kth frame car door detection figure e is calculatedkAverage gray value ehk=31.284.
It is transferred to step S13.
Step S13:Calculate car door detection figure ekWith the gray difference degree ed of background detection figure ejk, the following institute of calculating formula Show:
edk=| ehk-eb| (10)
In the present embodiment, car door detection figure e is calculatedkWith the gray difference degree ed of background detection figure ejk= 13.574。
It is transferred to step S14.
Step S14:Calculate car door detection figure ekWith contrast difference's degree r of background detection figure ejk, calculating formula is as follows:
Wherein, rkFor contrast difference's degree, value is more big, illustrates car door detection figure ekIt is got over the diversity factor of background detection figure ej Greatly, vice versa.
In the present embodiment, car door detection figure e is calculated to obtainkWith contrast difference's degree r of background detection figure ejk=0.4179.
It is transferred to step S15.
Step S15:Opening/closing door of vehicle state is judged by formula 12.
Wherein, flkFor the mark of opening/closing door of vehicle state, flk=0 expression car door is in off state, flk=1 represents that car door is Opening.In the present embodiment, gray difference degree threshold value T1Value is 5;Contrast difference's degree threshold value T2Value is -0.25.
In the present embodiment, due to edk=13.574 >=5, and rk=0.4179 >=-0.25, fl can be obtainedk=1, thus sentence Fixed car door at this time is opening.
It is transferred to step S16.
Step S16:Store the opening/closing door of vehicle state of the car door picture frame of kth frame.
It is transferred to step S17.
Step S17:Judge whether public transit vehicle has arrived at terminal.It is no, it is transferred to step S18;It is then to be transferred to step S9.
Step S18:Next frame is gathered, k=k+1, is transferred to step S9 at this time.
According to more than technical scheme, in terms of run time and cost analysis two, comparison the present invention program and The advantage and disadvantage of traditional manual measurement method.
(1) run time.It is common artificial exemplified by totalframes is 21076 video file a length of 15 minutes during with one Detection substantially needs about 15 minutes.The present invention simulation process platform be:Intel I3M350 processors, 2GB memories Computer is emulated using MATLAB softwares, and the 281MB video files collected are measured, and the time used is 3 points 25 seconds.As it can be seen that the processing speed of the method proposed in the present invention has apparent advantage.
(2) cost analysis.Manual measurement method is needed long lasting for the opening/closing door of vehicle situation in observation video, it is necessary to expend Substantial amounts of manual work cost, and easily cause the visual fatigue of personnel.And method proposed by the present invention, it can realize that multichannel is same When detect, reduce cost of labor while improve work efficiency.Further, since most bus has been installed at present Video capture device, method proposed by the present invention can install video capture device additional, can also directly utilize existing video Monitoring device gathers image data, can save the cost of invention.

Claims (5)

1. a kind of public transit vehicle opening/closing door of vehicle state automatic testing method, which is characterized in that include the following steps:
Step 0:Acquisition bus is dispatched a car the video background picture frame F of front doort;Specially:5s's regards before acquisition bus sets out Frequency background image frame, wherein, sample frequency is 0.5s/ frames, gathers 10 two field pictures altogether, is denoted as Ft, wherein, t is frame number, t=1, 2,......,10;The image collected size arranges for M rows and N, sets the coordinate of certain pixel as (x, y), and x and y represent pixel The row and column of (x, y) meets:X and y is integer, and 1≤x≤M, 1≤y≤N, then t frames background image frame FtMiddle pixel The RGB color value symbolically of (x, y) is (Rt(x,y),Gt(x,y),Bt(x,y));
Step 1:Video background image frame F before the bus of acquisition is dispatched a cartGray processing obtains background grey-level image frame ft
Step 2:Background Bg is obtained in background grey-level image frame by averaging method;
Step 3:Binaryzation is carried out to the Background Bg that step 2 obtains, obtains background binary figure MG;
Step 4:Closing operation of mathematical morphology is carried out to the background binary figure MG that step 3 obtains, obtains gradient connection figure OG;
Step 5:Morphology opening operation is carried out to the gradient connection figure OG that step 4 obtains, obtains gradient map CG;
Step 6:The gradient map CG that step 5 obtains is negated and gone sporadicly to handle, counts the pixel number of each connected region, is extracted The most connected region of pixel number is as car door Prototype drawing MB;
Step 7:The car door Prototype drawing MB that step 6 the obtains Background Bg obtained with step 2 are subjected to dot product, obtain background detection Scheme ej, calculation formula is as follows:
Ej=MB × Bg (6)
Wherein, × represent that point multiplication operation accords with;
Step 8:Calculate the average gray value eb of background detection figure ej;Calculating formula is as follows:
<mrow> <mi>e</mi> <mi>b</mi> <mo>=</mo> <mfrac> <mn>1</mn> <mrow> <mi>M</mi> <mi>N</mi> </mrow> </mfrac> <munderover> <mo>&amp;Sigma;</mo> <mrow> <mi>x</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>M</mi> </munderover> <munderover> <mo>&amp;Sigma;</mo> <mrow> <mi>y</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>N</mi> </munderover> <mi>e</mi> <mi>j</mi> <mrow> <mo>(</mo> <mi>x</mi> <mo>,</mo> <mi>y</mi> <mo>)</mo> </mrow> <mo>-</mo> <mo>-</mo> <mo>-</mo> <mrow> <mo>(</mo> <mn>7</mn> <mo>)</mo> </mrow> </mrow>
Wherein, ej (x, y) represents the gray value of pixel (x, y) in background detection figure ej;
Step 9:Car door picture frame E after collection vehicle is sent in real timek
Step 10:To the car door picture frame E gathered in step 9kGray processing processing is carried out to it according to the method for step 1, obtains The car door gray-scale map of k frames, is denoted as Ehk
Step 11:The car door gray-scale map Eh that the car door Prototype drawing MB that step 6 obtains is obtained with step 10kDot product is carried out, obtains the K frames car door detection figure ek, calculation formula is as follows:
ek=MB × Ehk (8)
Step 12:The kth frame car door detection figure e obtained in calculation procedure 11kAverage gray value ehk;Calculating formula is as follows:
<mrow> <msub> <mi>eh</mi> <mi>k</mi> </msub> <mo>=</mo> <mfrac> <mn>1</mn> <mrow> <mi>M</mi> <mi>N</mi> </mrow> </mfrac> <munderover> <mo>&amp;Sigma;</mo> <mrow> <mi>x</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>M</mi> </munderover> <munderover> <mo>&amp;Sigma;</mo> <mrow> <mi>y</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>N</mi> </munderover> <msub> <mi>e</mi> <mi>k</mi> </msub> <mrow> <mo>(</mo> <mi>x</mi> <mo>,</mo> <mi>y</mi> <mo>)</mo> </mrow> <mo>-</mo> <mo>-</mo> <mo>-</mo> <mrow> <mo>(</mo> <mn>9</mn> <mo>)</mo> </mrow> </mrow>
Wherein, ek(x, y) represents kth frame car door detection figure ekThe gray value of middle pixel (x, y);
Step 13:Calculate car door detection figure ekWith the gray difference degree ed of background detection figure ejk, calculating formula is as follows:
edk=| ehk-eb| (10)
Step 14:Calculate car door detection figure ekWith contrast difference's degree r of background detection figure ejk;Calculating formula is as follows:
<mrow> <msub> <mi>r</mi> <mi>k</mi> </msub> <mo>=</mo> <mfrac> <mrow> <munderover> <mo>&amp;Sigma;</mo> <mrow> <mi>x</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>M</mi> </munderover> <munderover> <mo>&amp;Sigma;</mo> <mrow> <mi>y</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>N</mi> </munderover> <mrow> <mo>(</mo> <msub> <mi>e</mi> <mi>k</mi> </msub> <mo>(</mo> <mrow> <mi>x</mi> <mo>,</mo> <mi>y</mi> </mrow> <mo>)</mo> <mo>-</mo> <msub> <mi>eh</mi> <mi>k</mi> </msub> <mo>)</mo> </mrow> <mrow> <mo>(</mo> <mi>e</mi> <mi>j</mi> <mo>(</mo> <mrow> <mi>x</mi> <mo>,</mo> <mi>y</mi> </mrow> <mo>)</mo> <mo>-</mo> <mi>e</mi> <mi>b</mi> <mo>)</mo> </mrow> </mrow> <msqrt> <mrow> <mo>(</mo> <munderover> <mo>&amp;Sigma;</mo> <mrow> <mi>x</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>M</mi> </munderover> <munderover> <mo>&amp;Sigma;</mo> <mrow> <mi>y</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>N</mi> </munderover> <msup> <mrow> <mo>(</mo> <mrow> <msub> <mi>e</mi> <mi>k</mi> </msub> <mrow> <mo>(</mo> <mrow> <mi>x</mi> <mo>,</mo> <mi>y</mi> </mrow> <mo>)</mo> </mrow> <mo>-</mo> <msub> <mi>eh</mi> <mi>k</mi> </msub> </mrow> <mo>)</mo> </mrow> <mn>2</mn> </msup> <mo>)</mo> <mo>(</mo> <munderover> <mo>&amp;Sigma;</mo> <mrow> <mi>x</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>M</mi> </munderover> <munderover> <mo>&amp;Sigma;</mo> <mrow> <mi>y</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>N</mi> </munderover> <msup> <mrow> <mo>(</mo> <mrow> <mi>e</mi> <mi>j</mi> <mrow> <mo>(</mo> <mrow> <mi>x</mi> <mo>,</mo> <mi>y</mi> </mrow> <mo>)</mo> </mrow> <mo>-</mo> <mi>e</mi> <mi>b</mi> </mrow> <mo>)</mo> </mrow> <mn>2</mn> </msup> <mo>)</mo> </mrow> </msqrt> </mfrac> <mo>-</mo> <mo>-</mo> <mo>-</mo> <mrow> <mo>(</mo> <mn>11</mn> <mo>)</mo> </mrow> </mrow>
Wherein, rkFor contrast difference's degree, value is more big, illustrates car door detection figure ekIt is bigger with the diversity factor of background detection figure ej, Vice versa;
Step 15:Opening/closing door of vehicle state judges;Opening/closing door of vehicle state is judged by formula (12);
Wherein, flkFor the mark of opening/closing door of vehicle state, flk=0 expression car door is in off state, flk=1 represents car door to open State;T1For gray difference degree threshold value, T1Value range be:3~10;T2For contrast difference's degree threshold value, value range for- 0.5~0.
A kind of 2. public transit vehicle opening/closing door of vehicle state automatic testing method according to claim 1, which is characterized in that step In 1:The t frame background image frames F that step 0 processing is obtainedtGray processing processing is carried out, background grey-level image frame is obtained and is denoted as ft, Its calculating formula is as follows:
ft(x, y)=0.3 × Rt(x,y)+0.59×Gt(x,y)+0.11×Bt(x,y) (1)
Wherein, Rt(x, y) represents background image frame FtThe R component value of middle pixel (x, y);Gt(x, y) represents background image frame FtIn The G component values of pixel (x, y);Bt(x, y) represents background image frame FtThe B component value of middle pixel (x, y);ft(x, y) represents background Grey-level image frame ftThe gray value of middle pixel (x, y).
A kind of 3. public transit vehicle opening/closing door of vehicle state automatic testing method according to claim 2, which is characterized in that step In 2:The calculation formula of Background Bg is shown below:
<mrow> <mi>B</mi> <mi>g</mi> <mrow> <mo>(</mo> <mi>x</mi> <mo>,</mo> <mi>y</mi> <mo>)</mo> </mrow> <mo>=</mo> <mfrac> <mn>1</mn> <mn>10</mn> </mfrac> <munderover> <mo>&amp;Sigma;</mo> <mrow> <mi>t</mi> <mo>=</mo> <mn>1</mn> </mrow> <mn>10</mn> </munderover> <msub> <mi>f</mi> <mi>t</mi> </msub> <mrow> <mo>(</mo> <mi>x</mi> <mo>,</mo> <mi>y</mi> <mo>)</mo> </mrow> <mo>-</mo> <mo>-</mo> <mo>-</mo> <mrow> <mo>(</mo> <mn>2</mn> <mo>)</mo> </mrow> </mrow>
Wherein, Bg (x, y) represents the gray value of pixel (x, y) in Background Bg;
In step 3:Binaryzation is carried out to Background Bg and obtains background binary figure MG, calculating formula is as follows:
Wherein, T is binary-state threshold, and value is:110~140;MG (x, y) represents pixel (x, y) in background binary figure MG Value, MG (x, y)=0 represent that pixel (x, y) is possible car door region, and MG (x, y)=1 represents that pixel (x, y) is non-car door area Domain.
A kind of 4. public transit vehicle opening/closing door of vehicle state automatic testing method according to claim 3, which is characterized in that step In 4:The closed operation of mathematical morphology is carried out to background binary figure MG, obtains gradient connection figure OG, calculating formula is as follows:
Wherein, Se is structural element, takes 3 × 3~10 × 10 square structure element;Represent background binary figure MG quilts Construction operator Se carries out closed operation operation;Represent closing operation of mathematical morphology;Represent dilation operation;Represent erosion operation.
A kind of 5. public transit vehicle opening/closing door of vehicle state automatic testing method according to claim 4, which is characterized in that step In 5:Mathematical morphology open operator is carried out to gradient connection figure OG, gradient map CG is obtained, to eliminate the hair in gradient connection figure OG Thorn, calculating formula are as follows:
<mrow> <mi>C</mi> <mi>G</mi> <mo>=</mo> <mi>O</mi> <mi>G</mi> <mo>&amp;CenterDot;</mo> <mi>S</mi> <mi>e</mi> <mo>=</mo> <mrow> <mo>(</mo> <mi>O</mi> <mi>G</mi> <mo>&amp;CircleTimes;</mo> <mi>S</mi> <mi>e</mi> <mo>)</mo> </mrow> <mo>&amp;CirclePlus;</mo> <mi>S</mi> <mi>e</mi> <mo>-</mo> <mo>-</mo> <mo>-</mo> <mrow> <mo>(</mo> <mn>5</mn> <mo>)</mo> </mrow> </mrow>
Wherein, morphology opening operation is represented, OGSe represents that gradient connection figure OG carries out opening operation operation by construction operator Se.
CN201510271385.XA 2015-05-25 2015-05-25 A kind of public transit vehicle opening/closing door of vehicle state automatic testing method Expired - Fee Related CN104899880B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510271385.XA CN104899880B (en) 2015-05-25 2015-05-25 A kind of public transit vehicle opening/closing door of vehicle state automatic testing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510271385.XA CN104899880B (en) 2015-05-25 2015-05-25 A kind of public transit vehicle opening/closing door of vehicle state automatic testing method

Publications (2)

Publication Number Publication Date
CN104899880A CN104899880A (en) 2015-09-09
CN104899880B true CN104899880B (en) 2018-06-05

Family

ID=54032525

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510271385.XA Expired - Fee Related CN104899880B (en) 2015-05-25 2015-05-25 A kind of public transit vehicle opening/closing door of vehicle state automatic testing method

Country Status (1)

Country Link
CN (1) CN104899880B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106559647B (en) * 2015-09-28 2020-09-29 株式会社日立制作所 Door opening and closing detection device and method, people flow detection system and vehicle
CN105654586A (en) * 2015-12-29 2016-06-08 福建星网锐捷通讯股份有限公司 Method, device, and system for judging door opening
CN106920230B (en) * 2017-01-23 2019-07-02 长安大学 A kind of opening/closing door of vehicle automatic testing method of door closing area similar gray value
CN108804987B (en) * 2017-05-04 2023-03-10 株式会社日立制作所 Door opening and closing state detection method and device and people flow detection system
CN108492279B (en) * 2018-02-11 2020-05-05 杭州鸿泉物联网技术股份有限公司 Method and system for detecting on-off state of vehicle tarpaulin
CN108520531A (en) * 2018-05-23 2018-09-11 安徽富煌科技股份有限公司 A kind of vehicle door status self-adapting detecting system based on video analysis
CN108973853B (en) * 2018-06-15 2021-01-15 威马智慧出行科技(上海)有限公司 Vehicle warning device and vehicle warning method
CN109614940A (en) * 2018-12-14 2019-04-12 长沙致天信息科技有限责任公司 A kind of the switch state monitoring method and relevant apparatus of deck lid
CN111121705A (en) * 2019-05-07 2020-05-08 浙江利尔达客思智能科技有限公司 System and method for detecting door opening state based on six-axis detection
CN112016423B (en) * 2020-08-20 2024-06-18 浙江大华技术股份有限公司 Method, device and equipment for identifying vehicle door state and computer storage medium
CN112580437A (en) * 2020-11-26 2021-03-30 复旦大学附属中山医院 Method and device for measuring size of target

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101105097A (en) * 2007-08-23 2008-01-16 上海交通大学 Platform shield door intelligent control method
CN102941864A (en) * 2012-11-09 2013-02-27 武汉翔翼科技有限公司 Train loading state high-definition monitoring and overloading detection method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000073657A (en) * 1998-09-01 2000-03-07 Mitsubishi Electric Corp Power door system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101105097A (en) * 2007-08-23 2008-01-16 上海交通大学 Platform shield door intelligent control method
CN102941864A (en) * 2012-11-09 2013-02-27 武汉翔翼科技有限公司 Train loading state high-definition monitoring and overloading detection method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
基于图像处理的棚车车门状态自动检测;杨顺辽等;《计算机测量与控制》;20121231;第20卷(第10期);参见第2606-2608页 *
基于数学形态学的货车车门状态的检测;严柏军等;《计算机工程》;20020430;第28卷(第4期);参见第118-119页 *
铁路货车装载运输状态竞全监测***自动到断敞车车门状态方法肋研究;陈旺东;《上海铁道科技》;20051231(第6期);参见第5-6页 *

Also Published As

Publication number Publication date
CN104899880A (en) 2015-09-09

Similar Documents

Publication Publication Date Title
CN104899880B (en) A kind of public transit vehicle opening/closing door of vehicle state automatic testing method
CN110929566B (en) Human face living body detection method based on visible light and near infrared binocular camera
CN109064495A (en) A kind of bridge floor vehicle space time information acquisition methods based on Faster R-CNN and video technique
CN106056968B (en) A kind of method for detecting parking stalls based on optical imagery
CN110335294B (en) Mine water pump house water leakage detection method based on frame difference method and 3D convolutional neural network
CN104200673B (en) A kind of road surface slippery situation detection method based on road image
CN105404867B (en) A kind of substation isolating-switch state identification method of view-based access control model
CN107220603A (en) Vehicle checking method and device based on deep learning
CN103605967A (en) Subway fare evasion prevention system and working method thereof based on image recognition
CN102332094B (en) Semi-supervised online study face detection method
CN104573680B (en) Image detecting method, image detection device and traffic offence detecting system
CN102073846A (en) Method for acquiring traffic information based on aerial images
CN104318588A (en) Multi-video-camera target tracking method based on position perception and distinguish appearance model
CN107038411A (en) A kind of Roadside Parking behavior precise recognition method based on vehicle movement track in video
CN104766071A (en) Rapid traffic light detection algorithm applied to pilotless automobile
CN104574351A (en) Parking space detection method based on video processing
CN109460787A (en) IDS Framework method for building up, device and data processing equipment
CN104318559A (en) Quick feature point detecting method for video image matching
CN111723656B (en) Smog detection method and device based on YOLO v3 and self-optimization
CN104268548B (en) A kind of accumulated snow detection method based on road image
CN104182729A (en) Pedestrian detection method based on ARM embedded platform
CN103514460B (en) Video monitoring multi-view-angle vehicle detecting method and device
CN103324951A (en) Multiple isomerous water environment monitoring data evaluating and early-warning method
CN107622237A (en) Mesh object detection method in a kind of elevator
CN105404866B (en) A kind of implementation method of multi-mode automatic implementation body state perception

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Xiao Mei

Inventor after: Chen Yixin

Inventor after: Huang Ying

Inventor after: Zhang Lei

Inventor after: Liu Long

Inventor after: Wang Xing

Inventor before: Xiao Mei

Inventor before: Huang Ying

Inventor before: Zhang Lei

Inventor before: Liu Long

Inventor before: Wang Xing

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

Granted publication date: 20180605

Termination date: 20190525