[go: up one dir, main page]

CN114792306B - A method, device and equipment for testing the rise and fall time of electric barriers for toll collection - Google Patents

A method, device and equipment for testing the rise and fall time of electric barriers for toll collection Download PDF

Info

Publication number
CN114792306B
CN114792306B CN202210412514.2A CN202210412514A CN114792306B CN 114792306 B CN114792306 B CN 114792306B CN 202210412514 A CN202210412514 A CN 202210412514A CN 114792306 B CN114792306 B CN 114792306B
Authority
CN
China
Prior art keywords
frame
image
electric
included angle
electric railing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210412514.2A
Other languages
Chinese (zh)
Other versions
CN114792306A (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.)
China Merchants Chongqing Highway Engineering Testing Center Co ltd
Original Assignee
China Merchants Chongqing Highway Engineering Testing Center Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Merchants Chongqing Highway Engineering Testing Center Co ltd filed Critical China Merchants Chongqing Highway Engineering Testing Center Co ltd
Priority to CN202210412514.2A priority Critical patent/CN114792306B/en
Publication of CN114792306A publication Critical patent/CN114792306A/en
Application granted granted Critical
Publication of CN114792306B publication Critical patent/CN114792306B/en
Active 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
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/215Motion-based segmentation
    • 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

Landscapes

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

Abstract

本发明提供一种收费用电动栏杆起落时间测试方法、装置及设备,本方案通过对采集的起落视频进行分帧后,进行划分ROI区域、预处理后得到灰度图像,对灰度图像进行边缘提起、二值化处理,得到二值化边缘图像,对相邻两帧二值化边缘图像进行差分处理,在差分图像中的非零像素大于预设值时,对二值化边缘图像进行霍夫变换,并获取当前帧图像中满足预设要求的候选直线,进一步计算电动栏杆与水平方向的夹角,在当前帧为最后一帧图时,根据夹角获取起始帧号和停止帧号,最终计算电动栏杆的起落时间。本发明减少了人工的参与,从而提高了时间计算的精度,同时节约了人力和时间成本。

The present invention provides a method, device and equipment for testing the rise and fall time of electric barriers for charging. The scheme divides the collected rise and fall video into frames, divides the ROI area, obtains a grayscale image after preprocessing, performs edge lifting and binarization on the grayscale image to obtain a binary edge image, performs differential processing on two adjacent frames of binary edge images, and when the non-zero pixels in the differential image are greater than a preset value, performs Hough transform on the binary edge image, obtains candidate straight lines that meet preset requirements in the current frame image, further calculates the angle between the electric barrier and the horizontal direction, and when the current frame is the last frame, obtains the start frame number and the stop frame number according to the angle, and finally calculates the rise and fall time of the electric barrier. The present invention reduces manual participation, thereby improving the accuracy of time calculation, while saving manpower and time costs.

Description

Method, device and equipment for testing rise and fall time of electric railing for charging
Technical Field
The invention relates to the technical field of electric railing tests, in particular to a method, a device and equipment for testing rise and fall time of an electric railing for charging.
Background
In the current road engineering quality inspection and assessment, the second book of road engineering quality inspection and assessment standard electromechanical engineering requires that the rise/fall time of the electric railing for collecting fees is less than or equal to 1.0 second, and the existing detection method is divided into a stopwatch pinching method and a video frame reading method. When the stopwatch method is adopted for detection, the subjectivity of the judgment of the rise/fall time of the railing is too strong, and the time synchronization of the watch pinching action and the rise/fall time of the railing is difficult, so that the time measurement error is generally larger. When the video recording video frame-reading method is adopted for detection, the video of the movement process of the electric railing is required to be recorded on site, the video is copied into a computer, the video is read and displayed frame by using playing software, a plurality of detection personnel subjectively determine the lifting/falling image frames of the railing, and the lifting/falling time of the railing is measured according to the time interval of the image frames.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a method, a device and equipment for testing the rise and fall time of an electric railing for charging, which are used for solving the technical problems of large error, high labor and time cost in the measurement and calculation of the rise and fall time of the electric railing in the prior art.
A method for testing rising and falling time of an electric railing for charging comprises the steps of S1, carrying out framing treatment on an acquired rising and falling video according to a preset frame rate to obtain a total frame number Num, setting a variable C frame to represent the number of current image frames, enabling an initial value of the variable C frame to be 1, S2, starting from a first frame image, sequentially taking a rectangular area covering the maximum motion range of the electric railing in each frame image as an ROI area, S3, preprocessing an image of the ROI area to obtain a gray image, S4, extracting edges of the gray image according to an edge detection algorithm, carrying out binarization treatment to obtain a binary edge image, S5, carrying out differential operation on the binary edge image of a C frame frame and the binary edge image of a C frame -1 frame to obtain a differential image, S6 counting whether the number of non-zero pixels in the differential image is smaller than a preset threshold, if yes, taking the included angle solved by the previous frame as the current included angle, and entering a step S9, S7, carrying out binarization treatment on the binary edge image according to an edge detection algorithm to obtain a binary edge image, carrying out differential operation on the binary edge image and carrying out linear conversion on the obtained candidate image according to the C frame -1 frame, and setting a candidate straight line to meet the requirement of the linear conversion in the linear direction of the candidate frame according to the requirement of the S34S9, judging whether the C frame frame image is the last frame image, if so, entering a step S10, otherwise, acquiring the next frame image of the current image as a new C frame frame image, repeating the steps S3 to S9, and S10 according to the included angleS11 calculates a unit frame time interval according to the preset frame rate, and calculates the electric rail rise/fall time according to the unit frame time interval, the start frame number C frame_start and the stop frame number C frame_end and the start frame number C frame_start and the stop frame number C frame_end.
In one embodiment, the method further comprises the steps of installing an electric railing landing time testing device at the place where the electric railing to be tested is located, starting video acquisition in the electric railing landing time testing device, continuously acquiring real-time images of the electric railing, controlling the electric railing to start lifting rod movement/landing rod movement, identifying the lifting/landing movement state of the electric railing, and stopping video acquisition when the electric railing stops lifting/landing movement, so that a landing video is obtained.
In one embodiment, the preprocessing in step S3 includes graying processing and filtering denoising processing.
In one embodiment, the step S7 comprises taking m discrete values l 1、l2、…、lm of the length l of the electric railing at equal intervals within a set range [ l min,lmax ], taking n discrete values theta 1、θ2、…、θn of the horizontal included angle theta at equal intervals within the set range [ theta minmax ], defining a two-dimensional array S [ m ] [ n ], initializing all elements of the two-dimensional array S [ m ] [ n ] to be 0, traversing all non-zero pixels (i, j) of an ROI binary edge image, voting on all combinations of (l pq) satisfying the following, and storing the results in the elements S [ p ] [ q ] of the two-dimensional array S [ m ] [ n ]:
lp=i×cosθq+j×sinθq
And sequencing all elements of the two-dimensional array Sm [ n ] from large to small, and taking (L pq) combinations corresponding to k elements in the front sequence to represent k candidate straight lines in the C frame frame image, wherein the k candidate straight lines are marked as L 1、L2、…、Lk.
In one embodiment, the step S8 includes the steps of defining S81 that the movement of the lifting rod is θ (0) =0°, defining the falling movement as θ (0) =90°, defining the variable a=1, determining S82 that the combination of (L pq) of the straight line L a satisfies the following formula condition, if yes, determining θ q corresponding to the straight line L a as an included angle θ (C frame) between the electric railing and the horizontal direction, and proceeding to step S9, if no, increasing the variable a by 1:
The method comprises the steps of S83, S82 repeatedly executing the step S82 until the included angle theta (C frame) between the electric railing and the horizontal direction is solved or a=k+1 is established, S84, when the included angle theta (C frame) is not solved in the steps S81-S83, the included angle theta (C frame) is solved by adopting the previous frame image, namely the included angle theta (C frame)=θ(Cframe -1).
In one embodiment, the step S10 comprises forming a C frame -theta sequence from the frame numbers of the image frames and the included angles between the corresponding electric railings and the horizontal direction, moving the starting rod from the second frame image to the Num-1 frame image, searching the first frame image meeting the constraint condition of the following formula frame by frame, and taking the frame numbers as C frame_start:
Starting from the C frame_start frame image to the Num-1 frame image, searching the first frame image which meets the constraint adjustment of the following formula frame by frame for the starting rod motion, and taking the frame number as C frame_end:
And θ (C frame +1) is the included angle between the electric railing and the horizontal direction, which is obtained in the later frame of image.
In one embodiment, the frame numbers of the image frames and the included angles between the corresponding electric railings and the horizontal direction form a C frame -theta sequence, and for the falling rod motion, the first frame image meeting the constraint conditions of the following formula is searched for from the second frame image to the Num-1 frame image frame by frame, and the frame numbers are taken as C frame_start:
Starting from the C frame_start frame image to the Num-1 frame image, for the falling rod motion, searching the first frame image meeting the constraint condition of the following formula frame by frame, and taking the frame number as C frame_end:
And θ (C frame +1) is the included angle between the electric railing and the horizontal direction, which is obtained in the later frame of image.
In one embodiment, the formula for calculating the electric balustrade up/down time T in step S11 is as follows:
T=(Cframe_end-Cframe_start)×Δt
Where Δt is the unit frame time interval.
The electric railing rise and fall time testing device for the toll is characterized by comprising a high-speed video acquisition sensor, a main control unit and a special bracket, wherein the frame rate of the high-speed video acquisition sensor is at least 100 frames/second.
An apparatus comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor, when executing the computer program, performs the steps of a method for testing rise and fall time of a powered toll rail as described in the various embodiments above.
According to the technical scheme, the beneficial technical effects of the invention are as follows:
1. The whole process adopts the device to collect videos, and the rise and fall time of the electric railing is tested by the provided method for testing the rise and fall time of the electric railing for charging, so that the manual participation is reduced, the precision of time calculation is improved, and meanwhile, the labor and time cost are saved.
2. And the two adjacent frames of binarized edge images are subjected to differential processing, so that whether the railing is still moving or not can be rapidly judged, the testing efficiency is improved, and the time cost is further saved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. Like elements or portions are generally identified by like reference numerals throughout the several figures. In the drawings, elements or portions thereof are not necessarily drawn to scale.
FIG. 1 is a diagram of an application scenario of a device for testing rise and fall time of an electric toll rail according to one embodiment;
FIG. 2 is a flow chart of capturing a landing video of an electric balustrade in one embodiment;
FIG. 3 is a flow chart of a method for testing rise and fall time of an electric toll rail according to one embodiment;
FIG. 4 is a schematic diagram of the partitioning of the ROI area in one embodiment;
fig. 5 is an internal structural diagram of the apparatus in one embodiment.
Detailed Description
Embodiments of the technical scheme of the present invention will be described in detail below with reference to the accompanying drawings. The following examples are only for more clearly illustrating the technical aspects of the present invention, and thus are merely examples, and are not intended to limit the scope of the present invention.
It is noted that unless otherwise indicated, technical or scientific terms used herein should be given the ordinary meaning as understood by one of ordinary skill in the art to which this application belongs.
In one embodiment, as shown in fig. 1, there is provided a device for testing rise and fall time of an electric balustrade for charging, which comprises a high-speed video acquisition sensor, a main control unit and a special bracket, wherein the frame rate of the high-speed video acquisition sensor is at least 100 frames/second. Specifically, the main control unit comprises a man-machine interaction part, is arranged on one side of the electric railing through a special bracket, and the central optical axis of the sensor is perpendicular to the vertical surface where the railing is located. In practical application, an industrial camera with a frame rate of 200 frames/second and a resolution of 2592×1944 can be used as a high-speed video acquisition sensor and is arranged on an A-frame support with a distance of 10 meters and a height of 1.1 meters from an electric railing, and a main control unit adopts a portable computer. Meanwhile, a charging computer sends a rod lifting/falling instruction to the electric railing in the toll booth to start the electric railing to move, so that video collection is performed.
In one embodiment, as shown in fig. 2, a method for acquiring the lifting video of the electric railing is provided, which comprises the steps of installing an electric railing lifting time testing device at the place of the electric railing with lifting time to be tested, starting video acquisition in the electric railing lifting time testing device, continuously acquiring real-time images of the electric railing, controlling the electric railing to start lifting motion/lifting motion, identifying the lifting/lifting motion state of the electric railing, and stopping video acquisition when the electric railing stops lifting/lifting motion, so as to acquire the lifting video.
Specifically, the video acquisition method needs to be combined with an electric rail lifting time testing device (hereinafter referred to as a testing device) for charging in fig. 1, wherein when the testing device is arranged, if the rail image background acquired by the high-speed video acquisition sensor is complex, a pure color curtain is erected on the other side of the electric rail to simplify the acquired rail image background, the time interval between the acquired video image frames and the image frames should be kept constant, and the single on-site acquisition is only aimed at one lifting motion or one dropping motion, and in the video acquisition process, the high-speed video acquisition sensor should be kept in a static state.
In one embodiment, as shown in fig. 3, there is provided a method for testing rise and fall time of an electric balustrade for charging, comprising the steps of:
S1, carrying out framing treatment on the acquired landing video according to a preset frame rate to obtain a total frame number Num, and setting a variable C frame to represent the current image frame number, wherein the initial value of the variable C frame is 1.
Specifically, the current site video is opened, the total frame number Num of the video image is acquired, the variable C frame =1 is initialized, and the 0 th frame binary edge image with the pixel value of all 0 is constructed.
S2, starting from the first frame image, taking a rectangular area covering the maximum movement range of the electric railing in each frame image as an ROI area.
Specifically, the 1 st frame image is read, a rectangular region covering the maximum motion range of the electric railing is defined as a region of interest (ROI region) through man-machine interaction, as shown in fig. 4, and once the region is defined, the pixel coordinates of the ROI region are the same as those of the 1 st frame image in the subsequent image frames.
S3, preprocessing the image of the ROI area to obtain a gray level image.
Specifically, the preprocessing in step S3 includes graying processing and filtering denoising processing. During image preprocessing, a color ROI area image is converted into a Gray image through a calculation formula Gray=0.30R+0.59G+0.11B, wherein Gray is a pixel Gray value, R, G, B is a three-primary-color component, and the Gray image is processed through a mean value filtering algorithm to reduce interference of image noise points on a subsequent analysis process.
S4, extracting the edges of the gray level image according to an edge detection algorithm, and performing binarization processing to obtain a binary edge image;
specifically, a Laplacian second order differential operator is used for edge detection.
S5, carrying out differential operation on the binary edge image of the C frame frame and the binary edge image of the C frame -1 frame to obtain a differential image;
S6, counting the number of non-zero pixels in the differential image, judging whether the number of the non-zero pixels is smaller than a preset threshold value, if not, entering a step S7, if yes, taking the included angle solved by the previous frame as the current included angle, and entering a step S9;
s7, carrying out Hough transformation on the binary edge image to obtain a candidate straight line meeting the set requirement in the C frame frame image;
In one embodiment, step S7 includes equally spacing the electric rail length l within a set range [ l min,lmax ] by m discrete values l 1、l2、…、lm, equally spacing the horizontal included angle θ within a set range [ θ minmax ] by n discrete values θ 1、θ2、…、θn, defining a two-dimensional array S [ m ] [ n ], initializing all elements of the two-dimensional array S [ m ] [ n ] to 0, traversing all non-zero pixels (i, j) of the ROI binary edge image, voting on all combinations of (l pq) that satisfy equation (1), and saving the result in elements S [ p ] [ q ] of the two-dimensional array S [ m ] [ n ]:
lp=i×cosθq+j×sinθq (1)
Wherein, p is more than or equal to 1 and less than or equal to m, q is more than or equal to 1 and less than or equal to n, all elements of the two-dimensional array S [ m ] [ n ] are ordered from large to small, and k candidate straight lines in the C frame frame image are expressed by (L pq) combination corresponding to k elements which are ordered at the front, and are marked as L 1、L2、…、Lk.
S8, calculating the included angle between the electric railing and the horizontal direction according to the candidate straight line
In one embodiment, the step S8 includes S81 defining the rising stem motion as θ (0) =0°, defining the falling stem motion as θ (0) =90°, defining the variable a=1, S82 determining whether the combination of (L pq) of the straight line L a satisfies the condition of the formula (2), wherein "0+.θ q-θ(Cframe-1)≤θthed" in the combination formula (2) is to determine the rising stem motion, and "0+.θ (C frame-1)-θq≤θthed" is to determine the falling stem motion, if yes, θ q corresponding to the straight line L a is the angle θ (C frame) between the electric rail and the horizontal direction, and proceeding to the step S9, if no, increasing the variable a by 1:
Wherein θ (C frame -1) is the included angle between the electric railing and the horizontal direction obtained in the previous frame image, and θ thed is the preset threshold value of the angle change between the adjacent frame images;
S83 repeatedly executes step S82 until the included angle theta (C frame) between the electric railing and the horizontal direction is solved, or a=k+1 is established, wherein k is k candidate straight lines in the step S7, and when the included angle theta (C frame) is not solved in the steps S81-S83, theta (C frame) is the included angle theta (C frame)=θ(Cframe -1) solved by adopting the previous frame image.
S9, judging whether the C frame frame image is the last frame image, if so, entering a step S10, otherwise, acquiring the next frame image of the current image as a new C frame frame image, and repeating the steps S3 to S9.
Specifically, whether the image of the C frame th frame is the last frame is determined, if yes, whether C frame is less than or equal to Num is determined, if yes, the process proceeds to step S10 directly, if not, the variable C frame=Cframe +1 is made, and the processes of steps S3 to S9 are repeated iteratively until C frame is less than or equal to Num is determined.
S10 according to the included angleA start frame number C frame_start and a stop frame number C frame_end are acquired.
In one embodiment, for the rod lifting motion, the step S10 comprises the steps of forming a C frame -theta sequence by the frame numbers of the image frames and the corresponding included angles between the electric railings and the horizontal direction, starting from the second frame image to the Num-1 frame image, searching the first frame image meeting the constraint condition of the formula (3) from frame to frame for the rod lifting motion, and taking the frame numbers of the first frame image as C frame_start:
Starting from the C frame_start frame image to the Num-1 frame image, searching the first frame image meeting the constraint adjustment of the formula (4) frame by frame for the starting rod motion, and taking the frame number as C frame_end:
And θ (C frame +1) is the included angle between the electric railing and the horizontal direction, which is obtained in the later frame of image.
In one embodiment, for the falling pole motion, the step S10 comprises the steps of forming a C frame -theta sequence by the frame numbers of the image frames and the corresponding included angles between the electric railings and the horizontal direction, and searching the first frame image meeting the constraint condition of the following formula (5) from the second frame image to the Num-1 frame image frame to frame by frame for the falling pole motion, wherein the frame numbers are taken as C frame_start:
Starting from the C frame_start frame image to the Num-1 frame image, for the falling rod motion, searching the first frame image meeting the constraint condition of the following formula (6) frame by frame, and taking the frame number as C frame_end:
And θ (C frame +1) is the included angle between the electric railing and the horizontal direction, which is obtained in the later frame of image.
S11, calculating a unit frame time interval according to a preset frame rate, and calculating the electric rail rising/falling time according to the unit frame time interval, the starting frame number C frame_start and the stopping frame number C frame_end.
In one embodiment, equation (7) for calculating the motorized balustrade up/down time T in step S11 is:
T=(Cframe_end-Cframe_start)×Δt (7)
Where Δt is the unit frame time interval.
Specifically, the unit frame time interval is the image frame time interval Δt=1 second/frame rate.
In one embodiment, an apparatus is provided, which may be a server, the internal structure of which may be as shown in fig. 5. The device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the device is configured to provide computing and control capabilities. The memory of the device includes a non-volatile storage medium, an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the device is used for storing configuration templates and can also be used for storing target webpage data. The network interface of the device is used for communicating with an external terminal through a network connection. The computer program when executed by the processor is used for realizing a method for testing the rise and fall time of the electric railing for charging.
It will be appreciated by persons skilled in the art that the structure shown in fig. 5 is merely a block diagram of a portion of the structure associated with the present inventive arrangements and does not constitute a limitation of the apparatus to which the present inventive arrangements are applied, and that a particular apparatus may include more or less components than those shown in the drawings, or may combine certain components, or have a different arrangement of components.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be centralized on a single computing device, or distributed across a network of computing devices, or they may alternatively be implemented in program code executable by computing devices, such that they may be stored on a computer storage medium (ROM/RAM, magnetic or optical disk) for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than what is shown or described herein, or they may be individually manufactured as individual integrated circuit modules, or a plurality of modules or steps in them may be manufactured as a single integrated circuit module. Therefore, the present invention is not limited to any specific combination of hardware and software.
It should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention, and not for limiting the same, and although the present invention has been described in detail with reference to the above-mentioned embodiments, it should be understood by those skilled in the art that the technical solution described in the above-mentioned embodiments may be modified or some or all of the technical features may be replaced, and these modifications or substitutions do not make the essence of the corresponding technical solution deviate from the scope of the technical solution of the embodiments of the present invention, and all the modifications or substitutions are included in the scope of the claims and the specification of the present invention.

Claims (4)

1. The method for testing the rise and fall time of the electric railing for charging is characterized by comprising the following steps of:
S1, carrying out framing treatment on the acquired landing video according to a preset frame rate to obtain a total frame number Num, and setting a variable C frame to represent the current image frame number, wherein the initial value of the variable C frame is 1;
s2, starting from a first frame image, sequentially taking a rectangular area covering the maximum movement range of the electric railing in each frame image as an ROI area;
S3, preprocessing the image of the ROI area to obtain a gray level image;
S4, extracting the edges of the gray level image according to an edge detection algorithm, and performing binarization processing to obtain a binary edge image;
S5, carrying out differential operation on the binary edge image of the C frame frame and the binary edge image of the C frame -1 frame to obtain a differential image;
S6, counting the number of non-zero pixels in the differential image, judging whether the number of the non-zero pixels is smaller than a preset threshold value, if not, entering a step S7, if yes, taking the included angle solved by the previous frame as the current included angle, and entering a step S9;
S7, carrying out Hough transformation on the binary edge image to obtain a candidate straight line meeting the set requirement in the C frame frame image, wherein the method comprises the following steps:
Taking m discrete values l 1、l2、…、lm at equal intervals when the length l of the electric railing is in a set range [ l min,lmax ], and taking n discrete values theta 1、θ2、…、θn at equal intervals when the horizontal included angle theta is in a set range [ theta minmax ];
Defining two-dimensional array Sm n, initializing all elements of the two-dimensional array Sm n to be 0;
Traversing all non-zero pixels (i, j) of the ROI binary edge image, voting on all (i pq) combinations satisfying the following, and saving the result in the element S [ p ] [ q ] of the two-dimensional array S [ m ] [ n ]:
lp=i×cosθq+j×sinθq
wherein, p is more than or equal to 1 and less than or equal to m, q is more than or equal to 1 and less than or equal to n;
Ordering all elements of the two-dimensional array S [ m ] [ n ] from large to small, and taking (L pq) combinations corresponding to k elements with the earlier ordering to represent k candidate straight lines in the image of the C frame frame, wherein the k candidate straight lines are marked as L 1、L2、…、Lk;
s8, calculating an included angle theta (C frame) between the electric railing and the horizontal direction according to the candidate straight line, wherein the included angle theta comprises:
S81 defines the rising stem motion as θ (0) =0°, the falling stem motion as θ (0) =90°, and the variable a=1;
S82, judging whether the combination of the lines L a and (L pq) meets the following formula conditions, if yes, determining that the angle theta q corresponding to the line L a is the angle theta (C frame) between the electric rail and the horizontal direction, and proceeding to the step S9, if no, increasing the variable a by 1:
Wherein θ (C frame -1) is the included angle between the electric railing and the horizontal direction obtained in the previous frame image, and θ thed is the preset threshold value of the angle change between the adjacent frame images;
s83 repeatedly executing the step S82 until the included angle theta (C frame) between the electric railing and the horizontal direction is solved, or a=k+1 is established;
S84, when the included angle theta (C frame) is not solved by the steps S81-S83, the included angle theta (C frame) is solved by adopting the previous frame of image, namely, the included angle theta (C frame)=θ(Cframe -1);
s9, judging whether the C frame frame image is the last frame image, if so, entering a step S10, otherwise, acquiring the next frame image of the current image as a new C frame frame image, and repeating the steps S3 to S9;
S10, according to the included angle theta (C frame), acquiring a start frame number C frame_start and a stop frame number C frame_end, wherein the method comprises the following steps:
The frame numbers of the image frames and the included angles between the corresponding electric railings and the horizontal direction form a C frame -theta sequence;
Starting from the second frame image to a Num-1 frame image, searching a first frame image meeting the constraint condition of the following formula frame by frame for the starting rod motion, and taking the frame number as C frame_start:
Starting from the C frame_start frame image to the Num-1 frame image, for the starting rod motion, searching the first frame image meeting the constraint condition of the following formula frame by frame, and taking the frame number as C frame_end:
wherein θ (C frame +1) is the included angle between the electric railing and the horizontal direction obtained in the next frame of image;
The frame numbers of the image frames and the included angles between the corresponding electric railings and the horizontal direction form a C frame -theta sequence;
and for the falling rod motion, searching a first frame image meeting the constraint condition of the following formula from the second frame image to a Num-1 frame image frame by frame, and taking the frame number as C frame_start:
Starting from the C frame_start frame image to the Num-1 frame image, for the falling rod motion, searching the first frame image meeting the constraint condition of the following formula frame by frame, and taking the frame number as C frame_end:
wherein θ (C frame +1) is the included angle between the electric railing and the horizontal direction obtained in the next frame of image;
S11, calculating a unit frame time interval according to the preset frame rate, and calculating the rising/falling time of the electric railing according to the unit frame time interval, the starting frame number C frame_start and the stopping frame number C frame_end.
2. The method according to claim 1, further comprising, prior to step S1:
Installing an electric railing landing time testing device at the place where the electric railing to be tested is located;
Starting video acquisition in the electric railing rise and fall time testing device, and continuously acquiring real-time images of the electric railing;
Controlling the electric railing to start rod lifting/falling movement;
and recognizing the state of the lifting/falling motion of the electric railing, and stopping video acquisition when the lifting/falling motion of the electric railing is stopped, so as to obtain a lifting/falling video.
3. The method according to claim 1, wherein the preprocessing in step S3 includes graying processing and filtering denoising processing.
4. The method according to claim 1, wherein the formula for calculating the electric balustrade rise/fall time T in step S11 is as follows:
T=(Cframe_end-Cframe_start)×Δt
Where Δt is the unit frame time interval.
CN202210412514.2A 2022-04-19 2022-04-19 A method, device and equipment for testing the rise and fall time of electric barriers for toll collection Active CN114792306B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210412514.2A CN114792306B (en) 2022-04-19 2022-04-19 A method, device and equipment for testing the rise and fall time of electric barriers for toll collection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210412514.2A CN114792306B (en) 2022-04-19 2022-04-19 A method, device and equipment for testing the rise and fall time of electric barriers for toll collection

Publications (2)

Publication Number Publication Date
CN114792306A CN114792306A (en) 2022-07-26
CN114792306B true CN114792306B (en) 2025-01-14

Family

ID=82462386

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210412514.2A Active CN114792306B (en) 2022-04-19 2022-04-19 A method, device and equipment for testing the rise and fall time of electric barriers for toll collection

Country Status (1)

Country Link
CN (1) CN114792306B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119758696B (en) * 2025-03-05 2025-05-09 四川京炜交通工程技术有限公司 A method and system for quickly detecting the rise and fall time of electric barriers for toll collection

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108921878A (en) * 2018-04-30 2018-11-30 武汉工程大学 Hazardous gas spillage infrared video detection method under moving-target low contrast
CN109887137A (en) * 2019-02-18 2019-06-14 新华三技术有限公司 A kind of control method and device of lifting lever

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6495729B2 (en) * 2015-04-28 2019-04-03 日立建機株式会社 Construction machine control equipment
CN208314466U (en) * 2018-05-11 2019-01-01 中咨公路养护检测技术有限公司 A kind of lifting lever time register of railing
CN209198885U (en) * 2018-11-21 2019-08-02 陕西高速公路工程试验检测有限公司 A kind of highway electric rod rises and falls time test system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108921878A (en) * 2018-04-30 2018-11-30 武汉工程大学 Hazardous gas spillage infrared video detection method under moving-target low contrast
CN109887137A (en) * 2019-02-18 2019-06-14 新华三技术有限公司 A kind of control method and device of lifting lever

Also Published As

Publication number Publication date
CN114792306A (en) 2022-07-26

Similar Documents

Publication Publication Date Title
CN105956942B (en) Quality detection method and detection device for steel mesh of power pipe gallery based on machine vision
CN113971779B (en) Water gauge automatic reading method based on deep learning
CN107229930A (en) A kind of pointer instrument numerical value intelligent identification Method and device
CN106909941A (en) Multilist character recognition system and method based on machine vision
CN112966665A (en) Pavement disease detection model training method and device and computer equipment
CN106599890B (en) digital instrument recognition algorithm for substation inspection robot
CN116563641A (en) Surface defect identification method and system based on small target detection
CN113688817A (en) Instrument identification method and system for automatic inspection
CN102930287A (en) Overlook-based detection and counting system and method for pedestrians
CN109636857B (en) Alignment method and calibration system
CN105931246A (en) Fabric flaw detection method based on wavelet transformation and genetic algorithm
KR102292602B1 (en) Deep learning and image processing based bolt loosening detection method
CN113888446B (en) Intelligent detection method for bending line of sheet metal structural part
CN114792306B (en) A method, device and equipment for testing the rise and fall time of electric barriers for toll collection
CN107092905B (en) A method for locating an instrument to be identified for a power inspection robot
WO2025145485A1 (en) Railway foreign object intrusion detection method and system, device and medium
Liu et al. A deep learning-based method for structural modal analysis using computer vision
CN119516254B (en) Cable production detection method and system based on machine vision
CN114092385A (en) Industrial machine fault detection method and device based on machine vision
CN115760720A (en) Crack online detection method and system based on mobile device and super-resolution reconstruction segmentation network
CN107767366B (en) A transmission line fitting method and device
CN113643206A (en) A kind of cow's breath detection method
CN102280028B (en) Vehicle monitoring method based on dynamic background analysis and monitoring tape scanning
WO2022019747A1 (en) System and method for identification of text region in video
CN117953048A (en) Swivel bridge attitude monitoring system and method based on computer vision

Legal Events

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