CN105335942A - Local enhancement image acquisition method of moving object on the basis of Canny operator - Google Patents

Local enhancement image acquisition method of moving object on the basis of Canny operator Download PDF

Info

Publication number
CN105335942A
CN105335942A CN201510608616.1A CN201510608616A CN105335942A CN 105335942 A CN105335942 A CN 105335942A CN 201510608616 A CN201510608616 A CN 201510608616A CN 105335942 A CN105335942 A CN 105335942A
Authority
CN
China
Prior art keywords
image
carry out
pixel
point
pixel value
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.)
Pending
Application number
CN201510608616.1A
Other languages
Chinese (zh)
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.)
Chengdu Rongchuang Zhigu Science and Technology Co Ltd
Original Assignee
Chengdu Rongchuang Zhigu Science and 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 Chengdu Rongchuang Zhigu Science and Technology Co Ltd filed Critical Chengdu Rongchuang Zhigu Science and Technology Co Ltd
Priority to CN201510608616.1A priority Critical patent/CN105335942A/en
Publication of CN105335942A publication Critical patent/CN105335942A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion

Landscapes

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

Abstract

The invention discloses a local enhancement image acquisition method of a moving object on the basis of a Canny operator. The local enhancement image acquisition method comprises the following steps: reading a first frame of image, converting the first frame of image into a grayscale image, judging whether the grayscale image needs to be preprocessed, and carrying out edge extraction; and scanning each pixel in a differential image in a row column sequence, if the value of the pixel is 1, carrying out assignment on the pixel to cause the pixel to be equal to 1000, taking the pixel as a sign, and obtaining an image g(x,y) after an image f(x,y) is subjected to convolution processing. The processing method is g(x,y)=f(x,y)*h(x,y), wherein h(x,y) is a linear invariant operator, and * represents convolution; and g(x,y)=f(x,y)*h(x,y) is represented as G(u,v)=H(u,v)*F(u,v) in a transform domain, wherein G(u,v), H(u,v) and F(u,v) are independently the Fourier transform of g(x,y), f(x,y) and h(x,y), H(u,v) is determined by a filter, and g(x,y)=f(x,y)*h(x,y) and G(u,v)=H(u,v)*F(u,v) are used for obtaining g(x,y)=F-1[H(u,v)F(u,v)].

Description

A kind of moving object local enhancement image-pickup method based on Canny operator
Technical field
The present invention relates to technical field of image processing, provide a kind of moving object local enhancement image-pickup method based on Canny operator.
Background technology
In information age today, the development of society is advanced by leaps and bounds, and all trades and professions all be unable to do without information, especially image information.Image Information Processing is applied in every field widely as frontier science and technology interdisciplinary.Moving object detection is the result of the important topic in Image Information Processing, moving object detection, is usually the input picture of the senior aftertreatments such as next step target following, pattern-recognition, image understanding.In many occasions, such as the monitoring etc. of the magnitude of traffic flow, we are often interested in the object of motion.Therefore research is highly significant to the detection and tracking system of moving target sensitivity.
In recent years, along with the fast development of multimedia technology and improving constantly of computing power, dynamic image pro cess technology is subject to the favor of people day by day, and achieves great successes, fields such as being widely used in traffic administration, military target is followed the tracks of, be biomedical.Target monitoring system, can replace operator on duty in warehouse with computing machine, transformer station, the important place such as bank monitor.Because still image treatment technology has certain limitation, and dynamic image comprises more information than still image, therefore, introduces motion monitoring necessary.
Moving object detection is the important topic in the fields such as machine vision, video information process and application vision research.In actual applications, utilizing moving object detection algorithm to carry out the result of Iamge Segmentation, is usually the input picture of the senior aftertreatments such as next step target following, pattern-recognition, image understanding.In actual life, a large amount of significant visual information is included among motion, and even the eyes of some animal are through evolving, and can only see the object of motion.Although human vision can see that motion can see static object again, but in many occasions, such as the security personnel of the monitoring of the magnitude of traffic flow, important place, aviation and the guidance of military spacecraft, the automatic Pilot of automobile or auxiliary driving etc., we are often interested in the object of motion.Therefore research is highly significant to the detection and tracking system of moving target sensitivity.In addition, the research object of moving target is image sequence, and it is easy to want comparison single-frame images to do static analysis to the study general of image sequence.
Summary of the invention
The object of the present invention is to provide and a kind of moving object in the image collected to be identified, and the moving object in figure is carried out a kind of method of strengthening.
Based on a moving object local enhancement image-pickup method for Canny operator, it comprises the following steps:
Step 1, employing camera collection image;
Step 2, read the first two field picture, and be converted to gray level image, and judge whether to need pre-service, if needed, carry out step 3, do not need, carry out step 4;
Step 3, carry out histogram image intensifying, extreme value intermediate value strengthens, and carries out edge extracting with Canny operator;
Step 4, obtain frame-to-frame differences image;
Step 5, by each pixel in Row Column order scan difference image, this pixel point value is 1 and carry out step 6, otherwise carry out step 11;
Step 6, it is 1000 that this pixel value is composed, and as mark, 8 adjoint points scanning this pixel whether have pixel value be 1 point, the point being 1 if any pixel value then carry out step 7, noly carry out step 8;
Step 7, the pixel value of this point compose 1000, connecting length is added 1, carry out step 6;
Step 8, judges whether connecting length is greater than 25, is, carry out step 9, otherwise carry out step 10;
Step 9 pixel value on this line be 1000 point again assignment be 1;
Step 10, pixel value on this line be 1000 point again assignment be 0;
Step 11, compares with former figure, draws image, and judged whether successive image, if also have successive image, carry out step 2;
Obtain image g (x, y) after step 12. pair image f (x, y) process of convolution, disposal route is:
G (x, y)=f (x, y) * h (x, y), wherein h (x, y) is linear invariant operator, and * represents convolution;
By g (x, y)=f (x, y) * h (x, y) be expressed as in transform domain be: G (u, v)=H (u, v) * F (u, v), G (u, v), H (u, v), F (u, v) is g (x, y), h (x respectively, y), f (x, y) Fourier transform, H (u, v) is determined by wave filter, by g (x, y)=f (x, y) * h (x, y) and G (u, v)=H (u, v) * F (u, v) obtains g (x, y)=F -1[H (u, v) F (u, v)].
In technique scheme, it is as follows that Canny operator carries out edge extracting step:
Step 2.1, use Gaussian filter smoothed image;
Step with 2.2, the finite difference of single order local derviation assigns to the amplitude of compute gradient and direction;
Step 2.3, non-maxima suppression is carried out to gradient magnitude;
Step 2.4, with dual threshold algorithm detect and be connected edge.
The technical solution used in the present invention is as follows:
The Canny operator of the application can obtain good balance between squelch and rim detection.
The application removes and solves outside shadow problem, also solves moving target and glues connection problem.
Embodiment
All features disclosed in this instructions, or the step in disclosed all methods or process, except mutually exclusive feature and/or step, all can combine by any way.
About the explanation of Iamge Segmentation and statement a lot, following more formal definition can be provided by means of collective concept to Iamge Segmentation:
Order set R represents the region of entire image, can regard as R the segmentation of R nindividual nonvoid subset (subregion) R meeting following 5 conditions 1, R 2,---R n:
2. to all i and j, i ≠ j is had, R i∩ R j=Φ;
3. to i=1,2 ..., N, has P (R i)=True;
4. to i ≠ j, P (R i∪ R j)=False;
5. i=1,2 ..., N, R iit is the region be communicated with.
Wherein P (R i) be logical predicate to all elements in set, Φ represents empty set.
First give simple explanation respectively to each condition above-mentioned below.1. condition is pointed out should be able to comprise all pixels in image (being exactly original image) to comprehensive (union) of whole subregions of piece image gained, and each pixel of image should be divided in certain region by segmentation in other words.2. condition points out that each sub regions is non-overlapping copies in segmentation result, and in segmentation result, a pixel can not belong to two regions simultaneously in other words.3. condition points out that every sub regions has unique characteristic in segmentation result, and the pixel belonged in other words in same region should have some identical characteristics.4. condition is pointed out in segmentation result, and different subregions has different characteristics, does not have common element, and the pixel belonging to zones of different in other words should have some different characteristics.5. condition requires that the pixel in segmentation result in same subregion should be communicated with, and namely two pixels of same subregion interconnect in this subregion, and splitting the region obtained in other words is a connection constituent element.
In addition, these conditions above-mentioned define not only segmentation, also have directive function to carrying out segmentation.The segmentation of image is always carried out according to some segmentation criterions.2. 1. condition illustrate with condition that correct segmentation criterion should be applicable to all regions and all pixels, and 4. 3. condition illustrate with condition that reasonably segmentation criterion should be able to help to determine the representational characteristic of each area pixel, 5. condition illustrates that complete segmentation criterion should have certain requirement or restriction to the connectedness of pixel in region directly or indirectly.
Finally it may be noted that Iamge Segmentation in practical application not only will be divided into the region that meets each tool characteristic of 5 conditions above but also needs piece image and wherein interested target area is extracted.Only in this way just calculate the task of really completing Iamge Segmentation.
Image segmentation algorithm is classified
The research of image segmentation algorithm is subject to the great attention of people always, and up to the present, the partitioning algorithm of proposition reaches thousands of kinds, because existing partitioning algorithm sausage stuffed mainly with bean starch paste is many, so the method that they carry out classifying be it is also proposed much.Such as handlebar partitioning algorithm is divided into 3 classes: 1. rim detection, 2. Threshold segmentation and 3. region growing.But the method for in fact Threshold Segmentation Algorithm segmentation is also a kind of method for extracting region in itself, so 3. actually contains 1..
This chapter considers from the angle of practical application, describes the following algorithm of Iamge Segmentation in detail: segmentation detection, Threshold segmentation, region growing etc.
Corrosion is the most basic computing of mathematical morphology, and its realization is the concept based on interstitital texture element.Utilize the process that structural element is filled, depend on basic Euclidean space computing a---translation.A set A translation distance x can be expressed as A+x, and it is defined as:
A + x = { a + x : a ∈ A } - - - ( 2 - 1 )
From geometrically, A+x represents that A prolongs vector x and is shifted a segment distance.The object of detection, marks image those (translation) positions structural element can inserted inner exactly.
Set A is corroded by set B, and be expressed as A Θ B, it is defined as:
A Θ B = { x : B + x ⋐ A } - - - ( 2 - 2 )
Wherein ∈ represents subset relation.Corrosion can also represent with E (A, B) and ERODE (A, B).Wherein A is called input picture, and B is called structural element.A Θ B has an x to form by by B translation x but still the institute be included in A.If seen by B and be made template, so, A Θ B is then by the process of translation template, and all initial points can inserting the template of A inside form.
If initial point is in the inside of structural element, so, corrosion has the effect of shrinking input picture, as shown below.In figure, structural element B is a disk.From geometric angle, the dot position (being the center of circle of disk here) of disk, at the internal motion of A, is marked, just obtains the image after corroding by disk.General, can obtain following character: if initial point is in the inside of structural element, then the image after corrosion is a subset of input picture.
Another fundamental operation of binary mathematical morphology is expanded.Expansion is the dual operations (inverse operation) of erosion operation, can by defining the corrosion of supplementary set.A is expanded by B and is expressed as it is defined as:
A ⊕ B = [ A c Θ ( - B ) ] c - - - ( 2 - 5 )
Wherein, A crepresent the supplementary set of A.Expansion can also represent with D (A, B) and DILATE (A, B).In order to utilize B expansion A, can obtain-B by rotating relative to initial point 180 ° ,-B is to A for recycling ccorrode.The supplementary set of Corrosion results is tried to achieve result.As shown below:
In upper figure, B is a disk comprising initial point, utilizes B to be that A is expanded to the result that A expands.Because expanding is utilize structural element to fill image supplementary set, thus its expression does filtering process to picture appearance.Corrosion then represents does filtering process to image inside.Service and another difference expanded expand to meet exchange rate:
A ⊕ B = B ⊕ A - - - ( 2 - 6 )
When writing, according to the custom of image procossing, always first writing out input picture, then writing out structural element.If structural element is a disk, so, expanding can aperture (hole smaller for structural element) in blank map picture, and the dolly dimple part at image border place.And corrosion can the medium and small part of removal of images, and by image down, thus its supplementary set is expanded.
About moot two equivalent equation of expansion.First equation is:
A Θ B = ∪ { A + b : b ∈ B } - - - ( 2 - 7 )
Thus, expand and can have a translation input picture by the institute of opposed configuration element, then calculate its union and obtain.The expansion that above formula defines be called Minkowski and.Because expand meet exchange rate, so above formula also can be write as:
A ⊕ B = ∪ { B + a : a ∈ A } - - - ( 2 - 8 )
Another expression equation expanded is:
A ⊕ B = { x : ( - B + x ) ∩ A ≠ φ } - - - ( 2 - 9 )
This equation utilizes and hits input picture, if the parallel transformation expressing of round dot symmetrical structure element (-B) not being sky that namely occurs simultaneously with input expands.
The basic thought detecting step edge finds out the pixel with local greatest gradient amplitude in the picture.Detect the major part work of step edge to concentrate on and find the gradient numeral that can be used in real image and approach.Image due to reality have passed through the level and smooth of camera optics system and the intrinsic low-pass filter of Circuits System (bandwidth restriction), and therefore, the step edge in image is not extremely rise steeply.Image is also subject to the interference of undesirable details in camera noise and scene.Image gradient approaches and must meet two requirements: 1. approaching must restraint speckle effect: 2. must try one's best and accurately determine the position at edge.Restraint speckle and edge are accurately located and cannot be met simultaneously, and that is, edge detection algorithm eliminates noise by image smoothing operator, but adds the uncertainty of edge local; Conversely, if improve the susceptibility of edge detection operator edge, also improve the susceptibility to noise simultaneously.Have a kind of leading operator can select an optimal trade-off at anti-noise jamming with accurately between location, it is exactly the first order derivative of Gaussian function, the level and smooth and gradient calculation of the Gaussian function corresponding to image.
In gaussian noise, typical edge represents the Strength Changes of a step.According to this model, good edge detection operator should have 3 indexs: 1. low probability of failure, namely the least possible loss of real marginal point avoids non-edge point to be detected as edge again as far as possible: 2. high position precision, and the edge of detection should as far as possible close to real edge; 3. there is only response to each marginal point, obtain the edge of single pixel wide degree.Canny operator proposes following 3 criterions of boundary operator.
(1) signal-to-noise ratio (SNR) Criterion
Signal to noise ratio (S/N ratio) is larger, and the edge quality of extraction is higher.Signal to noise ratio snr is defined as:
S N R = | ∫ - w + w G ( - x ) h ( x ) d x | σ ∫ - w + w h 2 ( x ) d x - - - ( 4 - 13 )
Wherein G (x) represents edge function, and h (x) represents the impulse response that width is the wave filter of W.
(2) setting accuracy criterion
Edge precision L is as given a definition:
L = | ∫ - w + w G ′ ( - x ) h ′ ( x ) d x | σ ∫ - w + w h ′ 2 ( x ) d x - - - ( 4 - 14 )
Wherein G (X) and H ' (X) is the derivative of G (X) and h (X) respectively.L shows that more greatly positioning precision is higher.
(3) single edges response criteria
In order to bonding edge only has a response, the zero cross point mean distance D (f ') of the impulse response derivative of detective operators should meet:
H ' (x) is the second derivative of h (x)
Based on These parameters and criterion, utilizing the method for functional differentiate can derive canny edge detection device is signal to noise ratio (S/N ratio) and the best approximation operator of the product of location, and expression formula is similar to the first order derivative of Gaussian function.Tuscany 3 criterions are combined and can obtain optimum detective operators.The algorithm steps of canny edge detection is as follows:
Use Gaussian filter smoothed image;
To assign to the amplitude of compute gradient and direction by the finite difference of single order local derviation;
Non-maxima suppression is carried out to gradient magnitude;
Detect with dual threshold algorithm and be connected edge.
Canny operator also can carry out Edge detected with the edge function in MATLAB:
BW1=edge(I,’canny’,thresh,sigma)
Thresh in formula is the threshold value of rim detection, and sigma is the σ value of Gaussian filter, is defaulted as 2.

Claims (2)

1., based on a moving object local enhancement image-pickup method for Canny operator, it is characterized in that:
Step 1, employing camera collection image;
Step 2, read the first two field picture, and be converted to gray level image, and judge whether to need pre-service, if needed, carry out step 3, do not need, carry out step 4;
Step 3, carry out histogram image intensifying, extreme value intermediate value strengthens, and carries out edge extracting with Canny operator;
Step 4, obtain frame-to-frame differences image;
Step 5, by each pixel in Row Column order scan difference image, this pixel point value is 1 and carry out step 6, otherwise carry out step 11;
Step 6, it is 1000 that this pixel value is composed, and as mark, 8 adjoint points scanning this pixel whether have pixel value be 1 point, the point being 1 if any pixel value then carry out step 7, noly carry out step 8;
Step 7, the pixel value of this point compose 1000, connecting length is added 1, carry out step 6;
Step 8, judges whether connecting length is greater than 25, is, carry out step 9, otherwise carry out step 10;
Step 9 pixel value on this line be 1000 point again assignment be 1;
Step 10, pixel value on this line be 1000 point again assignment be 0;
Step 11, compares with former figure, draws image, and judged whether successive image, if also have successive image, carry out step 2;
Obtain image g (x, y) after step 12. pair image f (x, y) process of convolution, disposal route is:
G (x, y)=f (x, y) * h (x, y), wherein h (x, y) is linear invariant operator, and * represents convolution;
By g (x, y)=f (x, y) * h (x, y) be expressed as in transform domain be: G (u, v)=H (u, v) * F (u, v), G (u, v), H (u, v), F (u, v) is g (x, y), h (x respectively, y), the Fourier transform of f (x, y), H (u, v) determined by wave filter
G (x, y)=F is obtained by g (x, y)=f (x, y) * h (x, y) and G (u, v)=H (u, v) * F (u, v) -1[H (u, v) F (u, v)].
2. a kind of moving object local enhancement image-pickup method based on Canny operator according to claim 1, is characterized in that, it is as follows that Canny operator carries out edge extracting step:
Step 2.1, use Gaussian filter smoothed image;
The finite difference of step 2.2, single order local derviation is assigned to the amplitude of compute gradient and direction;
Step 2.3, non-maxima suppression is carried out to gradient magnitude;
Step 2.4, with dual threshold algorithm detect and be connected edge.
CN201510608616.1A 2015-09-22 2015-09-22 Local enhancement image acquisition method of moving object on the basis of Canny operator Pending CN105335942A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510608616.1A CN105335942A (en) 2015-09-22 2015-09-22 Local enhancement image acquisition method of moving object on the basis of Canny operator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510608616.1A CN105335942A (en) 2015-09-22 2015-09-22 Local enhancement image acquisition method of moving object on the basis of Canny operator

Publications (1)

Publication Number Publication Date
CN105335942A true CN105335942A (en) 2016-02-17

Family

ID=55286452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510608616.1A Pending CN105335942A (en) 2015-09-22 2015-09-22 Local enhancement image acquisition method of moving object on the basis of Canny operator

Country Status (1)

Country Link
CN (1) CN105335942A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108499117A (en) * 2018-04-11 2018-09-07 李�杰 It can push type hanging basket swing

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101315701A (en) * 2008-07-11 2008-12-03 天津大学 Movement destination image partition method
CN104732536A (en) * 2015-03-18 2015-06-24 广东顺德西安交通大学研究院 Sub-pixel edge detection method based on improved morphology

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101315701A (en) * 2008-07-11 2008-12-03 天津大学 Movement destination image partition method
CN104732536A (en) * 2015-03-18 2015-06-24 广东顺德西安交通大学研究院 Sub-pixel edge detection method based on improved morphology

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
冯文刚: "视频图像中运动物体的检测", 《HTTPS://WENKU.BAIDU.COM/VIEW/573DC5AA33D4B14E84246828.HTML》 *
郑方等: "《数字信号与图像处理》", 31 January 2006, 清华大学出版社 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108499117A (en) * 2018-04-11 2018-09-07 李�杰 It can push type hanging basket swing
CN108499117B (en) * 2018-04-11 2019-10-18 浦江县神力链条有限公司 It can push type hanging basket swing

Similar Documents

Publication Publication Date Title
CN100589561C (en) Dubious static object detecting method based on video content analysis
CN104408711B (en) Multi-scale region fusion-based salient region detection method
CN104715244A (en) Multi-viewing-angle face detection method based on skin color segmentation and machine learning
CN104809433A (en) Zebra stripe detection method based on maximum stable region and random sampling
Li et al. Road lane detection with gabor filters
CN103996198A (en) Method for detecting region of interest in complicated natural environment
CN106682641A (en) Pedestrian identification method based on image with FHOG- LBPH feature
CN104123529A (en) Human hand detection method and system thereof
CN101996401A (en) Target analysis method and device based on intensity image and range image
CN104915642B (en) Front vehicles distance measuring method and device
CN105260749A (en) Real-time target detection method based on oriented gradient two-value mode and soft cascade SVM
CN101551852A (en) Training system, training method and detection method
CN106503710A (en) A kind of automobile logo identification method and device
CN107704833A (en) A kind of front vehicles detection and tracking based on machine learning
Su et al. A new local-main-gradient-orientation HOG and contour differences based algorithm for object classification
CN111696072A (en) Color image line detection method, color image line detection device, electronic device, and storage medium
CN104268595A (en) General object detecting method and system
Wang et al. License plate recognition system
CN104050674B (en) Salient region detection method and device
Chen et al. License plate recognition for moving vehicles using a moving camera
Yoon et al. Thermal-infrared based drivable region detection
Hsieh et al. A novel approach to the detection of small objects with low contrast
CN105335942A (en) Local enhancement image acquisition method of moving object on the basis of Canny operator
Chen et al. Context-aware lane marking detection on urban roads
Le et al. Pedestrian lane detection in unstructured environments for assistive navigation

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20160217

RJ01 Rejection of invention patent application after publication