CN109523553A - A kind of container unusual fluctuation monitoring method based on LSD straight-line detection partitioning algorithm - Google Patents

A kind of container unusual fluctuation monitoring method based on LSD straight-line detection partitioning algorithm Download PDF

Info

Publication number
CN109523553A
CN109523553A CN201811347793.9A CN201811347793A CN109523553A CN 109523553 A CN109523553 A CN 109523553A CN 201811347793 A CN201811347793 A CN 201811347793A CN 109523553 A CN109523553 A CN 109523553A
Authority
CN
China
Prior art keywords
lsd
unusual fluctuation
algorithm
template
container
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
CN201811347793.9A
Other languages
Chinese (zh)
Other versions
CN109523553B (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 International Science And Technology (beijing) Satellite Communication Technology Co Ltd
Original Assignee
China International Science And Technology (beijing) Satellite Communication Technology 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 International Science And Technology (beijing) Satellite Communication Technology Co Ltd filed Critical China International Science And Technology (beijing) Satellite Communication Technology Co Ltd
Priority to CN201811347793.9A priority Critical patent/CN109523553B/en
Publication of CN109523553A publication Critical patent/CN109523553A/en
Application granted granted Critical
Publication of CN109523553B publication Critical patent/CN109523553B/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
    • G06T7/001Industrial image inspection using an image reference approach
    • 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

Abstract

The invention discloses a kind of container unusual fluctuation monitoring methods based on LSD straight-line detection partitioning algorithm, including step A: generating standard form, step B: statistics is compared in new video frame straight line element, as a result step C is disposed.The present invention extracts graph line technological means using LSD algorithm and obtains initial position, the state of container by the video acquired to camera, if unusual fluctuation occurs for container, by the comparison with initial position, the container that unusual fluctuation occurs then is found out, and export unusual fluctuation event.The present invention effectively reduces the influence of camera shake by establishing multiframe template;And standard form is further established, sensitizing range delimited, the report manner of unusual fluctuation is effectively improved, multithreading divides, and improves treatment effeciency.

Description

A kind of container unusual fluctuation monitoring method based on LSD straight-line detection partitioning algorithm
Technical field
The present invention relates to container monitoring technical field, in particular to a kind of collection based on LSD straight-line detection partitioning algorithm Vanning unusual fluctuation monitoring method.
Background technique
Container is fixed by the fixed device such as cage knob and binding bar, and is carried out according to lower heavy light stacking principle It puts, to enhance the stability of container.If the stability of container is relatively low, rolling period is elongated, resists beam wind athwart sea Ability is on the weak side, once container moves, ship gravity center instability can then be such that the risk of navigation increases, accident easily occurs.
In the past, the mode that the installation camera on ship is generallyd use in industry carries out the unusual fluctuation monitoring of container, but this Kind mode can only observe the biggish unusual fluctuation of amplitude, and if there is subtle unusual fluctuation, camera is difficult to observe, and also not can avoid The generation of container unusual fluctuation.
In recent years, industry begin one's study container unusual fluctuation monitoring new technology, LSD straight line monitor partitioning algorithm be exactly wherein It is a kind of.LSD (Line Segment Detector) algorithm is a kind of linear feature detection algorithm, can be obtained in a very short period of time The testing result of subpixel accuracy, LSD algorithm are designed to voluntarily control all without parameter regulation on the digital image The quantity of erroneous detection processed.The straight linear profile in part, i.e. line segmentation in the algorithm detectable image.LSD algorithm executes rate Fastly, precision is high, is highly suitable for the apparent container monitoring technology of linear feature.
Summary of the invention
To achieve the above object, the invention discloses a kind of, and the container unusual fluctuation based on LSD straight-line detection partitioning algorithm is supervised Survey method, comprising the following steps: step A: generating standard form, and step B: statistics is compared in new video frame straight line element, Step C, is as a result disposed;
The step A includes:
Step A1, video real-time is synchronous: for the video of input, multithreading being taken to handle, a thread is responsible for Video data is taken, and converts data to the available matrix data of algorithm, another thread is responsible for event handling, to guarantee to locate Data in lineation journey are latest frame, avoid causing video real-time poor due to terminal capabilities difference;
Step A2, it establishes blank template: according to the pixel size of video frame, generating an equal amount of blank template, ruler It is very little are as follows: width is the width of input picture matrix, and the height of a height of input picture matrix, wave band number is 1, monochrome band, image position Depth is 2bit;
Step A3, it extracts each frame video frame and carries out LSD algorithm processing: the video frame that camera acquires is converted into LSD The data structure of algorithm, is handled by LSD algorithm, acquires the linear feature of current video frame, and straight line element confidence level is joined Number being filled in the template of A2 with value 1 greater than 2, so far generates first frame template;
Step A4, LSD algorithm handles next frame video frame: it is identical as step A3, by straight line element with 1 fill mould of pixel value Plate;50 frame of LSD algorithm continuous processing: circulation step A4 fills 50 straight line elements, it is therefore an objective to reduce single altogether in a template The error that identification error and camera shake generate;
Step A5, will be being generated in A4 as a result, as immunity region;Element extension is carried out as unit of pixel, is divided into 5 grades Prewarning area, as sensitizing range, the two collectively forms original template, is named as Mask herein;
The step B includes:
Step B1, event-template is created: identical as A2;
Step B2, LSD algorithm handles the 51st frame: it is identical as step A3, by straight line element with 1 filling template of pixel value, this Place is named as Frame51;
Step B3, it counting: Frame51 is compared with Mask, the element information for falling in immunity region is not involved in statistics, The element for falling in sensitizing range is for statistical analysis, counts the element quantity of sensitizing range respectively;
The step C includes:
Step C1, result judges: carrying out grade judgement according to pre-set threshold value, the region of unusual fluctuation is obtained, if different Dynamic region is greater than the set value, and exports unusual fluctuation event according to the Forecast Mode of setting, algorithm end cycle is reset, again from A2 Start, carries out subsequent cycle;If be not greater than the set value, repetitive cycling executes step B;
As a further improvement of the above technical scheme, the step A3 is further included steps of
A31:LSD scaling factor;
A32:LSD gradient and direction template;
A33: gradient puppet sequence;
A34: linearity region increases;
The calculating of A35:NFA;
A36: dot density in class;
A37: optimization rectangle.
As a further improvement of the above technical scheme, the step C1 is further included steps of
C11: sensitivity threshold setting;
C12: result Forecast Mode setting;Setting output result pattern.
The beneficial effects of the present invention are:
Graph line technological means is extracted using LSD algorithm, by the video acquired to camera, obtains the first of container Beginning position, state, if container occur unusual fluctuation, by the comparison with initial position, then find out occur unusual fluctuation container, And export unusual fluctuation event.The present invention effectively reduces the influence of camera shake by establishing multiframe template;And it further establishes Standard form delimit sensitizing range, effectively improve the report manner of unusual fluctuation, and multithreading divides, and improve treatment effeciency.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to needed in the embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for ability For the those of ordinary skill of domain, without any creative labor, it can also be obtained according to these attached drawings others Attached drawing.
Fig. 1 is the working principle of the invention flow chart;
Fig. 2 is the working principle flow chart of LSD straight-line detection partitioning algorithm of the present invention;
Fig. 3 is the first frame original graph in experimentation of the present invention;
Fig. 4 is collected template first frame image in experimentation of the present invention;
Fig. 5 is the original template that completion is handled in experimentation of the present invention;
Fig. 6 is video frame of the container without unusual fluctuation obtained after comparing with original template;
Fig. 7 is the video frame that the container obtained after comparing with original template has unusual fluctuation;
Fig. 8 is the original graph for having unusual fluctuation video frame.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.
As shown in Figs. 1-2, a kind of container unusual fluctuation monitoring side based on LSD straight-line detection partitioning algorithm that the present invention provides Method, this method include generating standard form and unusual fluctuation statistics and result disposition three parts.
First part generates standard form:
The method of the step A includes:
Step A1, video real-time is synchronous: for the video of input, multithreading being taken to handle, a thread is responsible for Video data is taken, and converts data to the available matrix data of algorithm, another thread is responsible for event handling, to guarantee to locate Data in lineation journey are latest frame, avoid causing video real-time poor due to terminal capabilities difference;
Step A2, it establishes blank template: according to the pixel size of video frame, generating an equal amount of blank template, ruler It is very little are as follows: width is the width of input picture matrix, and the height of a height of input picture matrix, wave band number is 1, monochrome band, image position Depth is 2bit;
Step A3, it extracts each frame video frame and carries out LSD algorithm processing: the video frame that camera acquires is converted into LSD The data structure of algorithm, is handled by LSD algorithm, acquires the linear feature of current video frame, and straight line element confidence level is joined Number being filled in the template of A2 with value 1 greater than 2, so far generates first frame template;Wherein LSD algorithm is handled, and can be divided into 7 streams Journey: scaling, gradient and direction calculating, the sequence of gradient puppet, the growth of straight line (rectangle) region, the calculating of NFA, put in class it is close Degree, optimization rectangle.By this 7 step, it can be detected from picture and be partitioned into straight line.The each step of brief description:
A31 scaling: the purpose of testing mesoscale zoom factor s=0.8 is to eliminate sawtooth effect.Then Gauss is used The mode of down-sampling operates input picture;
A32 gradient and direction calculating: what is used when calculating is the template of 2*2, guarantees phase when in order to opposite module The independence of adjoint point directional spreding;
The sequence of A33 gradient puppet: gradient value is bigger, significant marginal point, therefore is more suitable for seed point.To gradient It is the very high work of timeliness that value, which carries out sequence completely, therefore gradient value is simply divided into 1024 grades, this 1024 grades cover gradient by 0~255 variation range, consumption when this sequence is a thread.Seed point is from gradient It is worth highest grade to start to search for, successively down, until all the points are labeled as USED;
A34 straight line (rectangle) region increases: being met by seed point search angle and state is the point (eight neighborhood) of USED The region of formation is known as line-supportregion.Meet the deflection of whole region in neighborhood in angle tolerance range t The point of region-ang is added to this region;
The calculating of A35NFA: NFA (Number ofFalseALarms) is less than to judge the candidate rectangle of some in image In opposite module in same position rectangle the quantity of mark point probability, NFA is bigger, shows current rectangle and phase in opposite module It is more similar with position, opposite, current rectangle is more likely to be " real target ";
Dot density in A36 class: the calculating put in class will solve the shape that exists for be mistakenly identified as straight line of the curve because of t Condition;
A37 optimizes rectangle: Rectangle Improvement.If current rectangle is not able to satisfy NFA still, use 1. reducing dian, 2. short side reduces a line, and 3. long side reduces a line, and 4. long side reduces another row, 5. reduces point p=p/2, until Meet NFA.
Step A4, LSD algorithm handles next frame video frame: it is identical as step A3, by straight line element with 1 fill mould of pixel value Plate;50 frame of LSD algorithm continuous processing: circulation step A4 fills 50 straight line elements, it is therefore an objective to reduce single altogether in a template The error that identification error and camera shake generate;
Step A5, will be being generated in A4 as a result, as immunity region;Element extension is carried out as unit of pixel, is divided into 5 grades Prewarning area, as sensitizing range, the two collectively forms original template, is named as Mask herein.
Statistics is compared in second part, new video frame straight line element:
The specific method of the step B includes:
Step B1, event-template is created: identical as A2;
Step B2, LSD algorithm handles the 51st frame: it is identical as step A3, by straight line element with 1 filling template of pixel value, this Place is named as Frame51;
Step B3, it counting: Frame51 is compared with Mask, the element information for falling in immunity region is not involved in statistics, The element for falling in sensitizing range is for statistical analysis, counts the element quantity of sensitizing range respectively.
Part III, result disposition:
Step C1, result judges: C11: sensitivity threshold setting;C12: result Forecast Mode setting;Setting output result sample Formula (text, picture, sound) carries out grade judgement according to pre-set threshold value, obtains the region of unusual fluctuation, if unusual fluctuation Region is greater than the set value, and exports unusual fluctuation event, algorithm end cycle according to the Forecast Mode of setting, and resetting restarts from A2, Carry out subsequent cycle;If be not greater than the set value, repetitive cycling executes step B (B1, B2, B3).
EXPERIMENTAL EXEMPLIFICATIONThe explanation:
This experiment acquires video flowing using linux system, Haikang prestige view IP Camera, is divided based on LSD straight-line detection The container unusual fluctuation monitoring method of algorithm.It is experimentation figure below:
Fig. 3 is the original graph of the first frame in experimentation, and Fig. 4 is that LSD algorithm handles collected mould in experimentation Plate first frame, Fig. 5 are to handle the original template completed by LSD algorithm in experimentation, and Fig. 6 is after comparing with original template Video frame of the obtained container without unusual fluctuation, Fig. 7 are the video frames that the container obtained after comparing with original template has unusual fluctuation, figure 8 be the original graph for having unusual fluctuation video frame.
According to original template compared with the video frame of no unusual fluctuation, without what difference, illustrate container without unusual fluctuation;According to first For beginning template compared with the video frame for having unusual fluctuation, the discovery upper left container of video frame has unusual fluctuation.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention Within mind and principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.Separately Outside, the technical solution between each embodiment can be combined with each other, can be real with those of ordinary skill in the art but must be Based on existing;It will be understood that the combination of this technical solution not when conflicting or cannot achieve when occurs in the combination of technical solution In the presence of, also not the present invention claims protection scope within.

Claims (3)

1. a kind of container unusual fluctuation monitoring method based on LSD straight-line detection partitioning algorithm, which is characterized in that including step A: raw At standard form, step B: statistics is compared in new video frame straight line element, as a result step C is disposed;
The step A includes:
Step A1, video real-time is synchronous: for the video of input, multithreading being taken to handle, a thread is responsible for taking view Frequency evidence, and the available matrix data of algorithm is converted data to, another thread is responsible for event handling, to guarantee to handle line Data in journey are latest frame, avoid causing video real-time poor due to terminal capabilities difference;
Step A2, it establishes blank template: according to the pixel size of video frame, generating an equal amount of blank template, size are as follows: Width is the width of input picture matrix, and the height of a height of input picture matrix, wave band number is 1, monochrome band, and image locating depth is 2bit;
Step A3, it extracts each frame video frame and carries out LSD algorithm processing: the video frame that camera acquires is converted into LSD algorithm Data structure, handled by LSD algorithm, acquire the linear feature of current video frame, and straight line element confidence level parameter is big In 2 template for being filled in A2 with value 1, first frame template is so far generated;
Step A4, LSD algorithm handles next frame video frame: it is identical as step A3, by straight line element with 1 filling template of pixel value; 50 frame of LSD algorithm continuous processing: circulation step A4 fills 50 straight line elements altogether in a template, it is therefore an objective to reduce single identification The error that error and camera shake generate;
Step A5, will be being generated in A4 as a result, as immunity region;Element extension is carried out as unit of pixel, is divided into 5 grades of early warning Region, as sensitizing range, the two collectively forms original template, is named as Mask herein;
The step B includes:
Step B1, event-template is created: identical as A2;
Step B2, LSD algorithm handles the 51st frame: it is identical as step A3, by straight line element with 1 filling template of pixel value, order herein Entitled Frame51;
Step B3, it counts: Frame51 being compared with Mask, the element information for falling in immunity region is not involved in statistics, falls in The element of sensitizing range is for statistical analysis, counts the element quantity of sensitizing range respectively;
The step C includes:
Step C1, result judges: grade judgement is carried out according to pre-set threshold value, obtains the region of unusual fluctuation, if unusual fluctuation Region is greater than the set value, and exports unusual fluctuation event, algorithm end cycle according to the Forecast Mode of setting, and resetting restarts from A2, Carry out subsequent cycle;If be not greater than the set value, repetitive cycling executes step B.
2. the container unusual fluctuation monitoring method according to claim 1 based on LSD straight-line detection partitioning algorithm, feature exist In the step A3 is further included steps of
A31:LSD scaling factor;
A32:LSD gradient and direction template;
A33: gradient puppet sequence;
A34: linearity region increases;
The calculating of A35:NFA;
A36: dot density in class;
A37: optimization rectangle.
3. the container unusual fluctuation monitoring method according to claim 1 based on LSD straight-line detection partitioning algorithm, feature exist In the step C1 is further included steps of
C11: sensitivity threshold setting;
C12: result Forecast Mode setting;Setting output result pattern.
CN201811347793.9A 2018-11-13 2018-11-13 Container abnormal movement monitoring method based on LSD linear detection segmentation algorithm Active CN109523553B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811347793.9A CN109523553B (en) 2018-11-13 2018-11-13 Container abnormal movement monitoring method based on LSD linear detection segmentation algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811347793.9A CN109523553B (en) 2018-11-13 2018-11-13 Container abnormal movement monitoring method based on LSD linear detection segmentation algorithm

Publications (2)

Publication Number Publication Date
CN109523553A true CN109523553A (en) 2019-03-26
CN109523553B CN109523553B (en) 2022-10-18

Family

ID=65776173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811347793.9A Active CN109523553B (en) 2018-11-13 2018-11-13 Container abnormal movement monitoring method based on LSD linear detection segmentation algorithm

Country Status (1)

Country Link
CN (1) CN109523553B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110246123A (en) * 2019-05-21 2019-09-17 贵州民族大学 A kind of tile laying regularity detection method based on machine vision
CN112053360A (en) * 2020-10-10 2020-12-08 腾讯科技(深圳)有限公司 Image segmentation method and device, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090238486A1 (en) * 2006-10-18 2009-09-24 Paul Biezen Image processing system, method and computer program for contrast enhancement of images
CN102833511A (en) * 2012-09-18 2012-12-19 浙江红苹果电子有限公司 Method and device for storing high-definition videos based on serial digital interface (SDI)
CN106599885A (en) * 2016-08-30 2017-04-26 中海网络科技股份有限公司 Monitoring system and method for container Bay
CN106986272A (en) * 2017-02-24 2017-07-28 北京航天自动控制研究所 It is a kind of to prevent slinging method and system based on the container container car that machine vision is tracked
CN107527347A (en) * 2017-10-11 2017-12-29 南京大学 Harbour container based on computer visual image processing lifts by crane safety monitoring method
CN107734268A (en) * 2017-09-18 2018-02-23 北京航空航天大学 A kind of structure-preserved wide baseline video joining method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090238486A1 (en) * 2006-10-18 2009-09-24 Paul Biezen Image processing system, method and computer program for contrast enhancement of images
CN102833511A (en) * 2012-09-18 2012-12-19 浙江红苹果电子有限公司 Method and device for storing high-definition videos based on serial digital interface (SDI)
CN106599885A (en) * 2016-08-30 2017-04-26 中海网络科技股份有限公司 Monitoring system and method for container Bay
CN106986272A (en) * 2017-02-24 2017-07-28 北京航天自动控制研究所 It is a kind of to prevent slinging method and system based on the container container car that machine vision is tracked
CN107734268A (en) * 2017-09-18 2018-02-23 北京航空航天大学 A kind of structure-preserved wide baseline video joining method
CN107527347A (en) * 2017-10-11 2017-12-29 南京大学 Harbour container based on computer visual image processing lifts by crane safety monitoring method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李涛等: "基于改进线段分割检测的电线杆遮挡检测算法", 《计算机工程》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110246123A (en) * 2019-05-21 2019-09-17 贵州民族大学 A kind of tile laying regularity detection method based on machine vision
CN110246123B (en) * 2019-05-21 2021-08-03 贵州民族大学 Tile paving regularity detection method based on machine vision
CN112053360A (en) * 2020-10-10 2020-12-08 腾讯科技(深圳)有限公司 Image segmentation method and device, computer equipment and storage medium
CN112053360B (en) * 2020-10-10 2023-07-25 腾讯科技(深圳)有限公司 Image segmentation method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN109523553B (en) 2022-10-18

Similar Documents

Publication Publication Date Title
CN110363158B (en) Millimeter wave radar and visual cooperative target detection and identification method based on neural network
CN112766274B (en) Water gauge image water level automatic reading method and system based on Mask RCNN algorithm
EP3680609A1 (en) Antenna downward inclination angle measurement method based on multi-scale deep semantic segmentation network
CN107490398B (en) A kind of gauge pointer automatic identifying method
CN110084165A (en) The intelligent recognition and method for early warning of anomalous event under the open scene of power domain based on edge calculations
CN103996049B (en) Ship overlength and overwidth detection method based on video image
CN112798811B (en) Speed measurement method, device and equipment
CN110516636A (en) A kind of monitoring method of process, device, computer equipment and storage medium
CN111275960A (en) Traffic road condition analysis method, system and camera
CN106778570B (en) A kind of pedestrian detection and tracking in real time
CN102768022A (en) Tunnel surrounding rock deformation detection method adopting digital camera technique
CN109523553A (en) A kind of container unusual fluctuation monitoring method based on LSD straight-line detection partitioning algorithm
CN107067755A (en) A kind of method for calibrating traffic monitoring camera automatically based on computer vision
CN109982044B (en) Tracking method of target positioning and tracking system based on CCTV sensor network
CN110009675A (en) Generate method, apparatus, medium and the equipment of disparity map
CN106504227B (en) Demographic method and its system based on depth image
CN109360225A (en) A kind of optimization system and method for motion model
CN110070106A (en) Smog detection method, device and electronic equipment
CN115588040A (en) System and method for counting and positioning coordinates based on full-view imaging points
CN116844147A (en) Pointer instrument identification and abnormal alarm method based on deep learning
Du et al. An open data platform for traffic parameters measurement via multirotor unmanned aerial vehicles video
CN109165553A (en) Petroleum installations remote sensing automatic identifying method and device based on deep learning
CN109492573A (en) A kind of pointer read method and device
CN105335723B (en) A kind of model recognizing method based on infrared structure light
Reiterer et al. A 3D optical deformation measurement system supported by knowledge-based and learning techniques

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