CN104899880A - Method for automatically detecting open and closed states of vehicle door of public traffic vehicle - Google Patents

Method for automatically detecting open and closed states of vehicle door of public traffic vehicle Download PDF

Info

Publication number
CN104899880A
CN104899880A CN201510271385.XA CN201510271385A CN104899880A CN 104899880 A CN104899880 A CN 104899880A CN 201510271385 A CN201510271385 A CN 201510271385A CN 104899880 A CN104899880 A CN 104899880A
Authority
CN
China
Prior art keywords
background
car door
frame
opening
gray
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.)
Granted
Application number
CN201510271385.XA
Other languages
Chinese (zh)
Other versions
CN104899880B (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

Abstract

The present invention discloses a method for automatically detecting open and closed states of a vehicle door of a public traffic vehicle. According to the method, image data of the vehicle door is acquired by a video acquisition device; an image frame of the vehicle before departure is stored as a background image; a detection area is calibrated; an acquired real-time image frame and the background image are subjected to comparison analysis in the calibrated area; when both gray level difference and comparison difference of the image frame and the background image are large, the vehicle door is considered to be in the open state; and otherwise the vehicle door is judged to be in the closed state. In the specific operation process, a camera is mounted at the position of a vehicle roof above a driver, and a shooting angle and a focal length of the camera are regulated, such that the vehicle door is enabled to be positioned at the center of a shot image and occupy the integral shot image to the greatest extent.

Description

A kind of public transit vehicle opening/closing door of vehicle state automatic testing method
Technical field:
The present invention relates to a kind of expanded application of bus camera monitoring system, particularly relate to a kind of public transit vehicle opening/closing door of vehicle state automatic testing method based on image processing techniques.
Background technology:
Information due to video capture device collection has the information such as abundant color, structure, texture and time, is usually widely used in traffic and transport field, as supervisory system in bus.Monitoring camera installed by current most bus, and has corresponding storage facilities and transmission interface.In bus, supervisory system is by installing multiple camera in bus, in vehicle operation, records the inside and outside abnormal conditions of car at any time, for the operation of public transport, management and optimization provide investigational data, the driving of specification public transit vehicle and operation.But at present also not for public transit vehicle opening/closing door of vehicle state automatic testing method.
Summary of the invention:
The object of the present invention is to provide a kind of public transit vehicle opening/closing door of vehicle state automatic testing method based on image processing techniques.
For achieving the above object, the present invention adopts following technical scheme to be achieved:
A kind of public transit vehicle opening/closing door of vehicle state automatic testing method, comprises the steps:
Step 0: gather bus and to dispatch a car the video background picture frame F of front door t;
Step 1: video background image frame F before the bus of collection is dispatched a car tgray processing, obtains background grey-level image frame f t;
Step 2: obtain Background Bg by averaging method in background grey-level image frame;
Step 3: binaryzation is carried out to the Background Bg that step 2 obtains, obtains background binary figure MG;
Step 4: carry out closing operation of mathematical morphology to the background binary figure MG that step 3 obtains, obtains gradient connection layout OG;
Step 5: morphology opening operation is carried out to the gradient connection layout OG that step 4 obtains, obtains gradient map CG;
Step 6: carry out negate and star process of zero-suppressing to the gradient map CG that step 5 obtains, add up the pixel count in each connection district, extracts the maximum connected region of pixel count as car door Prototype drawing MB;
Step 7: the Background Bg that car door Prototype drawing MB step 6 obtained and step 2 obtain carries out dot product, obtain background detection figure ej, computing formula is as follows:
ej=MB·×Bg (6)
Wherein, × represent point multiplication operation symbol;
Step 8: the average gray value eb calculating background detection figure ej;
Step 9: the car door picture frame E after Real-time Collection vehicle sends k;
Step 10: to the car door picture frame E gathered in step 9 kaccording to the method for step 1, gray processing process is carried out to it, obtain the car door gray-scale map of kth frame, be designated as Eh k;
Step 11: the car door gray-scale map Eh that car door Prototype drawing MB step 6 obtained and step 10 obtain kcarry out dot product, obtain kth frame car door detection figure e k, computing formula is as follows:
e k=MB·×Eh k(8)
Step 12: the kth frame car door detection figure e obtained in calculation procedure 11 kaverage gray value eh k;
Step 13: calculate car door and detect figure e kwith the gray difference degree ed of background detection figure ej k, its calculating formula is as follows:
ed k=|eh k-eb| (10)
Step 14: calculate car door and detect figure e kwith contrast difference's degree r of background detection figure ej k;
Step 15: opening/closing door of vehicle state judges; Opening/closing door of vehicle state through type (12) judges;
Wherein, fl kfor the mark of opening/closing door of vehicle state, fl k=0 represents that car door is closed condition, fl k=1 represents that car door is opening; T 1for gray difference degree threshold value, T 1span be: 3 ~ 10; T 2for contrast difference's degree threshold value, its span is-0.5 ~ 0.
The present invention further improves and is, also comprises the steps:
Step 16: the opening/closing door of vehicle state storing kth frame car door picture frame;
Step 17: whether public transit vehicle reaches home; No, proceed to step 18; Then proceed to step 19;
Step 18: gather next frame, proceed to step 9.
The present invention further improves and is, in step 0: the video background picture frame of 5s before collection bus sets out, wherein, sample frequency is 0.5s/ frame, gathers 10 two field pictures altogether, is designated as F t, wherein, t is frame number, t=1,2 ..., 10; The image size collected is M capable and N row, and set the coordinate of certain pixel as (x, y), x and y represents the row and column of pixel (x, y), satisfied: x and y is integer, and 1≤x≤M, 1≤y≤N, then t frame background image frame F tthe RGB color value symbolically of middle pixel (x, y) is (R t(x, y), G t(x, y), B t(x, y)).
The present invention further improves and is, in step 1: step 0 is processed the t frame background image frame F obtained tcarry out gray processing process, obtain background grey-level image frame and be designated as f t, its calculating formula is as follows:
f t(x,y)=0.3×R t(x,y)+0.59×G t(x,y)+0.11×B t(x,y) (1)
Wherein, R t(x, y) represents background image frame F tthe R component value of middle pixel (x, y); G t(x, y) represents background image frame F tthe G component value of middle pixel (x, y); B t(x, y) represents background image frame F tthe B component value of middle pixel (x, y); f t(x, y) represents background grey-level image frame f tthe gray-scale value of middle pixel (x, y).
The present invention further improves and is, in step 2: the computing formula of Background Bg is shown below:
Bg ( x , y ) = 1 10 Σ t = 1 10 f t ( x , y ) - - - ( 2 )
Wherein, Bg (x, y) represents the gray-scale value of pixel (x, y) in Background Bg;
In step 3: carry out binaryzation to Background Bg and obtain background binary figure MG, its calculating formula is as follows:
Wherein, T is binary-state threshold, and its value is: 110 ~ 140; MG (x, y) represents the value of pixel (x, y) in background binary figure MG, MG (x, y)=0 represents that pixel (x, y) is possible car door region, MG (x, y)=1 represents that pixel (x, y) is non-car door region.
The present invention further improves and is, in step 4: closed operation background binary figure MG being carried out to mathematical morphology, and obtain gradient connection layout OG, its calculating formula is as follows:
Wherein, Se is structural element, gets the square structure element of 3 × 3 ~ 10 × 10; MG ο Se represents that background binary figure MG is carried out closed operation operation by construction operator Se; ο represents closing operation of mathematical morphology; ⊕ represents dilation operation; represent erosion operation.
The present invention further improves and is, in step 5: carry out mathematical morphology open operator to gradient connection layout OG, obtain gradient map CG, and to eliminate the burr in gradient connection layout OG, its calculating formula is as follows:
CG = OG · Se = ( OG ⊗ Se ) ⊕ Se - - - ( 5 )
Wherein, represent morphology opening operation, OGSe represents that gradient connection layout OG is carried out opening operation operation by construction operator Se.
The present invention further improves and is, in step 8: the calculating formula of average gray value eb is as follows:
eb = 1 MN Σ x = 1 M Σ y = 1 N ej ( x , y ) - - - ( 7 )
Wherein, ej (x, y) represents the gray-scale value of pixel (x, y) in background detection figure ej.
The present invention further improves and is, in step 12: average gray value eh kcalculating formula as follows:
eh k = 1 MN Σ x = 1 M Σ y = 1 N e k ( x , y ) - - - ( 9 )
Wherein, e k(x, y) represents kth frame car door detection figure e kthe gray-scale value of middle pixel (x, y).
The present invention further improves and is, in step 14: contrast difference's degree r kcalculating formula as follows:
r k = Σ x = 1 M Σ y = 1 N Σ ( e k ( x , y ) - eh k ) ( ej ( x , y ) - eb ) ( Σ x = 1 M Σ y = 1 N ( e k ( x , y ) - eh k ) 2 ) ( Σ x = 1 M Σ y = 1 N ( ej ( x , y ) - eb ) 2 ) - - - ( 11 )
Wherein, r kfor contrast difference's degree, its value is larger then illustrates that car door detects figure e klarger with the diversity factor of background detection figure ej, on the contrary also anti-.
Relative to prior art, the present invention has following advantage:
The car door view data that the present invention utilizes video capture device to gather, the picture frame of vehicle before dispatching a car is saved as Background, and demarcate surveyed area, in demarcation region, the realtime graphic frame of collection and Background are analyzed, when the gray difference degree of picture frame and Background and contrast difference's degree all larger time, think that car door is in opening; Otherwise judge that car door is closed condition.Camera is installed on roof location above driver, regulates the shooting angle of camera and focal length: make car door be in the central authorities of shooting picture, and take whole shooting picture as far as possible.
Further, the open and-shut mode that the present invention detects public transit vehicle car door automatically has important practical significance: one is trigger data acquisition.In vehicle traveling with when stopping, the region paid close attention in bus is different, and the data that corresponding sensor gathers also are not quite similar, and the open and-shut mode by detection car door carrys out the opening and closing of trigger data acquisition sensor; Two is the abnormal conditions monitoring car door.By the open and-shut mode of bus door and driver, the operation to car door contrasts, and whether normally can monitor car door duty, the abnormality of Timeliness coverage opening/closing door of vehicle, ensure the safety of people, car, thing.Three is realizations of following unmanned public transit vehicle, first needs the open and-shut mode detecting car door in real time, could travel subsequently to vehicle, the manipulation such as stop.Given this, the present invention proposes a kind of detection method of public transit vehicle opening/closing door of vehicle state.The advantages such as the method has simple, economic, and real result is reliable.
Accompanying drawing illustrates:
Fig. 1 is Background Bg.
Fig. 2 is background binary figure MG.
Fig. 3 is gradient connection layout 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 E k.
Fig. 8 is car door gray-scale map Eh k.
Fig. 9 is car door detection figure e k.
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 of the present invention state automatic testing method, comprises the steps:
Step S0: bus dispatch a car before the collection of video background image frame.The video background picture frame of 5s before collection bus sets out, sample frequency is 0.5s/ frame, gathers 10 two field pictures altogether, is designated as F t, wherein, t is frame number, t=1,2 ..., 10.The image size collected is 180 × 250, i.e. M=180, N=250, assuming that the coordinate of certain pixel is (x, y), x and y represents the row and column of pixel (x, y), meets: x and y is integer, and 1≤x≤180,1≤y≤250.T frame background image frame F tthe RGB color value symbolically of middle pixel (x, y) is (R t(x, y), G t(x, y), B t(x, y)).
Proceed to step S1.
Step S1: video background picture frame gray processing.By the background image frame F that step S0 process obtains tcarry out gray processing process, obtain background grey-level image frame and be designated as f t, its calculating formula is as follows:
f t(x,y)=0.3×R t(x,y)+0.59×G t(x,y)+0.11×B t(x,y),t=1,2,……10 (1)
Wherein, R t(x, y) represents background image frame F tthe R component value of middle pixel (x, y); G t(x, y) represents background image frame F tthe G component value of middle pixel (x, y); B t(x, y) represents background image frame F tthe B component value of middle pixel (x, y); f t(x, y) represents background grey-level image frame f tthe gray-scale value of middle pixel (x, y).
Proceed to step S2.
Step S2: obtain Background by averaging method.Background Bg represents (as shown in Figure 1), and its computing formula is shown below:
Bg ( x , y ) = 1 10 Σ t = 1 10 f t ( x , y ) - - - ( 2 )
Wherein, Bg (x, y) represents the gray-scale value of pixel (x, y) in Background Bg.
Proceed to step S3.
Step S3: binaryzation is carried out to the Background Bg that step S2 obtains.Carry out binary conversion treatment to Background Bg, obtain background binary figure MG (as shown in Figure 2), its calculating formula is as follows:
Wherein, T is binary-state threshold, and in the present embodiment, T value is 128; MG (x, y) represents the value of pixel (x, y) in background binary figure MG, MG (x, y)=0 represents that pixel (x, y) is possible car door region, MG (x, y)=1 represents that pixel (x, y) is non-car door region.
Proceed to step S4.
Step S4: closing operation of mathematical morphology is carried out to the background binary figure MG that step S3 obtains.Background binary figure MG is carried out to the closed operation of mathematical morphology, obtain gradient connection layout OG (as shown in Figure 3), its calculating formula is as follows:
Wherein, Se is structural element, gets the square structure element of 8 × 8 in the present embodiment; MG ο Se represents that background binary figure MG is carried out closed operation operation by construction operator Se; ο represents closing operation of mathematical morphology; ⊕ represents dilation operation; represent erosion operation.
Proceed to step S5.
Step S5: morphology opening operation is carried out to the gradient connection layout OG that step S4 obtains.Carry out mathematical morphology open operator to gradient connection layout OG, obtain gradient map CG (as shown in Figure 4), to eliminate the burr in gradient connection layout OG, its calculating formula is as follows:
CG = OG · Se = ( OG ⊗ Se ) ⊕ Se - - - ( 5 )
Wherein, represent morphology opening operation, OGSe represents that gradient connection layout OG is carried out opening operation operation by construction operator Se.
Proceed to step S6.
Step S6: carry out negate and star process of zero-suppressing to the gradient map CG that step S5 obtains, add up the pixel count in each connection district, extracts the maximum connected region of pixel count as car door Prototype drawing MB (as shown in Figure 5).
Proceed to step S7.
Step S7: the Background Bg that the car door Prototype drawing MB obtained by step S6 and step S2 obtains carries out dot product, obtain background detection figure ej (as shown in Figure 6), computing formula is as follows:
ej=MB·×Bg (6)
Wherein, × represent point multiplication operation symbol; MB × Bg represents that car door Prototype drawing MB and Background Bg carries out point multiplication operation.
Proceed to step S8.
Step S8: the average gray value eb calculating background detection figure ej, its calculating formula is as follows:
eb = 1 45000 Σ x = 1 180 Σ y = 1 250 ej ( x , y ) - - - ( 7 )
Wherein, ej (x, y) represents the gray-scale value of pixel (x, y) in background detection figure ej.
In the present embodiment, the average gray value eb=17.710 of the background detection figure ej calculated.
Proceed to step S9.
Step S9: the car door image after Real-time Collection vehicle sends, sample frequency is 0.5S/ frame, and the RBG picture frame (as shown in Figure 7) of the kth frame of collection, uses E krepresent.In embodiment, get k=1.
Proceed to step S10.
Step S10: to the car door picture frame E gathered in step S9 kaccording to the method for step S1, gray processing process is carried out to it, obtain the car door gray-scale map (as shown in Figure 8) of kth frame, be designated as Eh k.
Proceed to step S11.
Step S11: the car door gray-scale map Eh that the car door Prototype drawing MB obtained by step S6 and step S10 obtains kcarry out dot product, obtain car door detection figure e k(as shown in Figure 9), computing formula is as follows:
e k=MB·×Eh k(8)
Wherein, MB × Eh krepresent car door Prototype drawing MB and car door gray-scale map Eh kcarry out point multiplication operation.
Proceed to step S12.
Step S12: the calculation procedure S11 kth frame car door detection figure e obtained kaverage gray value eh k, its calculating formula is as follows:
eh k = 1 45000 Σ x = 1 180 Σ y = 1 250 e k ( x , y ) - - - ( 9 )
Wherein, e k(x, y) represents car door detection figure e kthe gray-scale value of middle pixel (x, y).
In the present embodiment, kth frame car door detection figure e is calculated kaverage gray value eh k=31.284.
Proceed to step S13.
Step S13: calculate car door and detect figure e kwith the gray difference degree ed of background detection figure ej k, its calculating formula is as follows:
ed k=|eh k-eb| (10)
In the present embodiment, car door detection figure e is calculated kwith the gray difference degree ed of background detection figure ej k=13.574.
Proceed to step S14.
Step S14: calculate car door and detect figure e kwith contrast difference's degree r of background detection figure ej k, its calculating formula is as follows:
r k = Σ x = 1 180 Σ y = 1 250 ( e k ( x , y ) - 31.3 ) ( ej ( x , y ) - 17.71 ) ( Σ x = 1 180 Σ y = 1 250 ( e k ( x , y ) - 31.3 ) 2 ) ( Σ x = 1 180 Σ y = 1 250 ( ej ( x , y ) - 17.71 ) 2 ) - - - ( 11 )
Wherein, r kfor contrast difference's degree, its value is larger then illustrates that car door detects figure e klarger with the diversity factor of background detection figure ej, on the contrary also anti-.
In the present embodiment, car door detection figure e is calculated kwith contrast difference's degree r of background detection figure ej k=0.4179.
Proceed to step S15.
Step S15: through type 12 judges opening/closing door of vehicle state.
Wherein, fl kfor the mark of opening/closing door of vehicle state, fl k=0 represents that car door is closed condition, fl k=1 represents that car door is opening.In the present embodiment, gray difference degree threshold value T 1value is 5; Contrast difference's degree threshold value T 2value is-0.25.
In the present embodiment, due to ed k=13.574>=5, and r k=0.4179>=-0.25, can fl be obtained k=1, thus judge that car door is now as opening.
Proceed to step S16.
Step S16: the opening/closing door of vehicle state storing the car door picture frame of kth frame.
Proceed to step S17.
Step S17: judge whether public transit vehicle reaches home.No, proceed to step S18; Then proceed to step S19.
Step S18: gather next frame, now k=k+1, proceed to step S9.
According to above technical scheme of the present invention, from working time and cost analysis two aspect, the relative merits of contrast the present invention program and traditional manual measurement method.
(1) working time.Be 15 minutes with a duration, totalframes be 21076 video file be example, common manual detection roughly needs to be approximately 15 minutes.Simulation process platform of the present invention is: Intel I3M350 processor, and the computing machine of 2GB internal memory utilizes MATLAB software to emulate, and measures the 281MB video file collected, the time used be 3 points 25 seconds.Visible, the processing speed of the method proposed in the present invention has obvious advantage.
(2) cost analysis.Manual measurement method needs the opening/closing door of vehicle situation in long-time continuous observation video, needs the manual work cost of at substantial, and easily causes the visual fatigue of personnel.And the method that the present invention proposes, can realize hyperchannel detects simultaneously, improves work efficiency while reducing cost of labor.In addition, because video capture device all installed by current most bus, the method that the present invention proposes can install video capture device additional, directly can also utilize existing video monitoring equipment acquisition of image data, can save the cost of invention.

Claims (10)

1. a public transit vehicle opening/closing door of vehicle state automatic testing method, is characterized in that, comprise the steps:
Step 0: gather bus and to dispatch a car the video background picture frame F of front door t;
Step 1: video background image frame F before the bus of collection is dispatched a car tgray processing, obtains background grey-level image frame f t;
Step 2: obtain Background Bg by averaging method in background grey-level image frame;
Step 3: binaryzation is carried out to the Background Bg that step 2 obtains, obtains background binary figure MG;
Step 4: carry out closing operation of mathematical morphology to the background binary figure MG that step 3 obtains, obtains gradient connection layout OG;
Step 5: morphology opening operation is carried out to the gradient connection layout OG that step 4 obtains, obtains gradient map CG;
Step 6: carry out negate and star process of zero-suppressing to the gradient map CG that step 5 obtains, add up the pixel count in each connection district, extracts the maximum connected region of pixel count as car door Prototype drawing MB;
Step 7: the Background Bg that car door Prototype drawing MB step 6 obtained and step 2 obtain carries out dot product, obtain background detection figure ej, computing formula is as follows:
ej=MB·×Bg (6)
Wherein, × represent point multiplication operation symbol;
Step 8: the average gray value eb calculating background detection figure ej;
Step 9: the car door picture frame E after Real-time Collection vehicle sends k;
Step 10: to the car door picture frame E gathered in step 9 kaccording to the method for step 1, gray processing process is carried out to it, obtain the car door gray-scale map of kth frame, be designated as Eh k;
Step 11: the car door gray-scale map Eh that car door Prototype drawing MB step 6 obtained and step 10 obtain kcarry out dot product, obtain kth frame car door detection figure e k, computing formula is as follows:
e k=MB·×Eh k(8)
Step 12: the kth frame car door detection figure e obtained in calculation procedure 11 kaverage gray value eh k;
Step 13: calculate car door and detect figure e kwith the gray difference degree ed of background detection figure ej k, its calculating formula is as follows:
ed k=|eh k-eb| (10)
Step 14: calculate car door and detect figure e kwith contrast difference's degree r of background detection figure ej k;
Step 15: opening/closing door of vehicle state judges; Opening/closing door of vehicle state through type (12) judges;
Wherein, fl kfor the mark of opening/closing door of vehicle state, fl k=0 represents that car door is closed condition, fl k=1 represents that car door is opening; T 1for gray difference degree threshold value, T 1span be: 3 ~ 10; T 2for contrast difference's degree threshold value, its span is-0.5 ~ 0.
2. a kind of public transit vehicle opening/closing door of vehicle state automatic testing method according to claim 1, is characterized in that, also comprise the steps:
Step 16: the opening/closing door of vehicle state storing kth frame car door picture frame;
Step 17: whether public transit vehicle reaches home; No, proceed to step 18; Then proceed to step 19;
Step 18: gather next frame, proceed to step 9.
3. a kind of public transit vehicle opening/closing door of vehicle state automatic testing method according to claim 1 and 2, is characterized in that, in step 0: the video background picture frame of 5s before collection bus sets out, wherein, sample frequency is 0.5s/ frame, gathers 10 two field pictures altogether, is designated as F t, wherein, t is frame number, t=1,2 ..., 10; The image size collected is M capable and N row, and set the coordinate of certain pixel as (x, y), x and y represents the row and column of pixel (x, y), satisfied: x and y is integer, and 1≤x≤M, 1≤y≤N, then t frame background image frame F tthe RGB color value symbolically of middle pixel (x, y) is (R t(x, y), G t(x, y), B t(x, y)).
4. a kind of public transit vehicle opening/closing door of vehicle state automatic testing method according to claim 3, is characterized in that, in step 1: step 0 is processed the t frame background image frame F obtained tcarry out gray processing process, obtain background grey-level image frame and be designated as f t, its calculating formula is as follows:
f t(x,y)=0.3×R t(x,y)+0.59×G t(x,y)+0.11×B t(x,y) (1)
Wherein, R t(x, y) represents background image frame F tthe R component value of middle pixel (x, y); G t(x, y) represents background image frame F tthe G component value of middle pixel (x, y); B t(x, y) represents background image frame F tthe B component value of middle pixel (x, y); f t(x, y) represents background grey-level image frame f tthe gray-scale value of middle pixel (x, y).
5. a kind of public transit vehicle opening/closing door of vehicle state automatic testing method according to claim 4, is characterized in that, in step 2: the computing formula of Background Bg is shown below:
Bg ( x , y ) = 1 10 Σ t = 1 10 f t ( x , y ) - - - ( 2 )
Wherein, Bg (x, y) represents the gray-scale value of pixel (x, y) in Background Bg;
In step 3: carry out binaryzation to Background Bg and obtain background binary figure MG, its calculating formula is as follows:
Wherein, T is binary-state threshold, and its value is: 110 ~ 140; MG (x, y) represents the value of pixel (x, y) in background binary figure MG, MG (x, y)=0 represents that pixel (x, y) is possible car door region, MG (x, y)=1 represents that pixel (x, y) is non-car door region.
6. a kind of public transit vehicle opening/closing door of vehicle state automatic testing method according to claim 5, it is characterized in that, in step 4: closed operation background binary figure MG being carried out to mathematical morphology, obtain gradient connection layout OG, its calculating formula is as follows:
Wherein, Se is structural element, gets the square structure element of 3 × 3 ~ 10 × 10; MG o Se represents that background binary figure MG is carried out closed operation operation by construction operator Se; o represents closing operation of mathematical morphology; ⊕ represents dilation operation; represent erosion operation.
7. a kind of public transit vehicle opening/closing door of vehicle state automatic testing method according to claim 6, it is characterized in that, in step 5: mathematical morphology open operator is carried out to gradient connection layout OG, obtains gradient map CG, to eliminate the burr in gradient connection layout OG, its calculating formula is as follows:
CG = OG · Se = ( OG ⊗ Se ) ⊕ Se - - - ( 5 )
Wherein, represent morphology opening operation, OGSe represents that gradient connection layout OG is carried out opening operation operation by construction operator Se.
8. a kind of public transit vehicle opening/closing door of vehicle state automatic testing method according to claim 3, is characterized in that, in step 8: the calculating formula of average gray value eb is as follows:
eb = 1 MN Σ x = 1 M Σ y = 1 N ej ( x , y ) - - - ( 7 )
Wherein, ej (x, y) represents the gray-scale value of pixel (x, y) in background detection figure ej.
9. a kind of public transit vehicle opening/closing door of vehicle state automatic testing method according to claim 3, is characterized in that, in step 12: average gray value eh kcalculating formula as follows:
eh k = 1 MN Σ x = 1 M Σ y = 1 N e k ( x , y ) - - - ( 9 )
Wherein, e k(x, y) represents kth frame car door detection figure e kthe gray-scale value of middle pixel (x, y).
10. a kind of public transit vehicle opening/closing door of vehicle state automatic testing method according to claim 3, is characterized in that, in step 14: contrast difference's degree r kcalculating formula as follows:
r k = Σ x = 1 M Σ y = 1 N ( e k ( x , y ) - eh k ) ( ej ( x , y ) - eb ) ( Σ x = 1 M Σ y = 1 N ( e k , ( x , y ) - eh k ) 2 ) ( Σ x = 1 M Σ y = 1 N ( ej ( x , y ) - rb ) 2 ) - - - ( 11 )
Wherein, r kfor contrast difference's degree, its value is larger then illustrates that car door detects figure e klarger with the diversity factor of background detection figure ej, on the contrary also anti-.
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 true CN104899880A (en) 2015-09-09
CN104899880B 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)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105654586A (en) * 2015-12-29 2016-06-08 福建星网锐捷通讯股份有限公司 Method, device, and system for judging door opening
CN106559647A (en) * 2015-09-28 2017-04-05 株式会社日立制作所 Enabling is closed the door detection means and method, artificial abortion's detecting system and the vehicles
CN106920230A (en) * 2017-01-23 2017-07-04 长安大学 A kind of opening/closing door of vehicle automatic testing method of door closing area similar gray value
CN108492279A (en) * 2018-02-11 2018-09-04 杭州鸿泉物联网技术股份有限公司 A kind of vehicle tarpaulin on off state detection method and system
CN108520531A (en) * 2018-05-23 2018-09-11 安徽富煌科技股份有限公司 A kind of vehicle door status self-adapting detecting system based on video analysis
CN108804987A (en) * 2017-05-04 2018-11-13 株式会社日立制作所 Door open and-shut mode detection method and device and stream of people's detecting system
CN108973853A (en) * 2018-06-15 2018-12-11 威马智慧出行科技(上海)有限公司 A kind of vehicle warning device and Warning for vehicle 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
CN112580437A (en) * 2020-11-26 2021-03-30 复旦大学附属中山医院 Method and device for measuring size of target

Citations (3)

* 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
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

Patent Citations (3)

* 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
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
严柏军等: "基于数学形态学的货车车门状态的检测", 《计算机工程》 *
杨顺辽等: "基于图像处理的棚车车门状态自动检测", 《计算机测量与控制》 *
陈旺东: "铁路货车装载运输状态竞全监测系统自动到断敞车车门状态方法肋研究", 《上海铁道科技》 *

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106559647A (en) * 2015-09-28 2017-04-05 株式会社日立制作所 Enabling is closed the door detection means and method, artificial abortion's detecting system and the vehicles
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
CN106920230A (en) * 2017-01-23 2017-07-04 长安大学 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
CN108804987A (en) * 2017-05-04 2018-11-13 株式会社日立制作所 Door open and-shut mode detection method and device and stream of people's detecting system
CN108492279B (en) * 2018-02-11 2020-05-05 杭州鸿泉物联网技术股份有限公司 Method and system for detecting on-off state of vehicle tarpaulin
CN108492279A (en) * 2018-02-11 2018-09-04 杭州鸿泉物联网技术股份有限公司 A kind of vehicle tarpaulin on off state detection method and system
CN108520531A (en) * 2018-05-23 2018-09-11 安徽富煌科技股份有限公司 A kind of vehicle door status self-adapting detecting system based on video analysis
CN108973853A (en) * 2018-06-15 2018-12-11 威马智慧出行科技(上海)有限公司 A kind of vehicle warning device and Warning for vehicle 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
CN112580437A (en) * 2020-11-26 2021-03-30 复旦大学附属中山医院 Method and device for measuring size of target

Also Published As

Publication number Publication date
CN104899880B (en) 2018-06-05

Similar Documents

Publication Publication Date Title
CN104899880A (en) Method for automatically detecting open and closed states of vehicle door of public traffic vehicle
CN103770733B (en) Method and device for detecting safety driving states of driver
CN101577812B (en) Method and system for post monitoring
CN103770780B (en) A kind of active safety systems of vehicles alarm shield device
CN103914688B (en) A kind of urban road differentiating obstacle
CN103767715B (en) A kind of driver safety driving state detection device
CN103714363B (en) A kind of motor vehicle exhaust smoke video identification system
CN109064495A (en) A kind of bridge floor vehicle space time information acquisition methods based on Faster R-CNN and video technique
CN104847211B (en) Auxiliary system for safety of platform safety doors and train door sections and implementation method thereof
CN106056968B (en) A kind of method for detecting parking stalls based on optical imagery
CN106373426A (en) Computer vision-based parking space and illegal lane occupying parking monitoring method
CN105512720A (en) Public transport vehicle passenger flow statistical method and system
CN105512623A (en) Foggy-day driving visual enhancement and visibility early warning system and method based on multiple sensors
CN100454355C (en) Video method for collecting information of vehicle flowrate on road in real time
CN103208190B (en) Traffic flow detection method based on object detection
CN105184274B (en) A kind of based on depth image acquisition passenger flow speed and the method for density parameter
CN103985182A (en) Automatic public transport passenger flow counting method and system
CN109190444A (en) A kind of implementation method of the lane in which the drivers should pay fees vehicle feature recognition system based on video
CN103359020A (en) Motorcycle driving training or examination monitoring method and system
CN104200673B (en) A kind of road surface slippery situation detection method based on road image
CN107844783A (en) A kind of commerial vehicle abnormal driving behavioral value method and system
CN103164958B (en) Method and system for vehicle monitoring
CN201037962Y (en) Electronic pile examining system
CN109919066A (en) The method and apparatus of passenger's density anomaly in a kind of detection rail transit cars
CN103886745A (en) Automobile-dedicated lane early warning system

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