CN102881005A - Method for eliminating high voltage line on image in railway freight train photographing process - Google Patents

Method for eliminating high voltage line on image in railway freight train photographing process Download PDF

Info

Publication number
CN102881005A
CN102881005A CN201210325385XA CN201210325385A CN102881005A CN 102881005 A CN102881005 A CN 102881005A CN 201210325385X A CN201210325385X A CN 201210325385XA CN 201210325385 A CN201210325385 A CN 201210325385A CN 102881005 A CN102881005 A CN 102881005A
Authority
CN
China
Prior art keywords
pixel
image
line
area
interpolation
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
CN201210325385XA
Other languages
Chinese (zh)
Other versions
CN102881005B (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.)
TIANJIN PHOTOELECTRIC GAOSI COMMUNICATION ENGINEERING TECHNOLOGY Co Ltd
Original Assignee
TIANJIN PHOTOELECTRIC GAOSI COMMUNICATION ENGINEERING 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 TIANJIN PHOTOELECTRIC GAOSI COMMUNICATION ENGINEERING TECHNOLOGY Co Ltd filed Critical TIANJIN PHOTOELECTRIC GAOSI COMMUNICATION ENGINEERING TECHNOLOGY Co Ltd
Priority to CN201210325385.XA priority Critical patent/CN102881005B/en
Publication of CN102881005A publication Critical patent/CN102881005A/en
Application granted granted Critical
Publication of CN102881005B publication Critical patent/CN102881005B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)

Abstract

The invention provides a method for eliminating a high voltage line on an image in a railway freight train photographing process. The method comprises the following steps: firstly obtaining the image; secondly obtaining the position and width parameters of the high voltage line in the image and setting a pixel position to be processed as the pixel position of an area to be processed; thirdly obtaining gray level pixel data of the pixel of the area to be processed; fourthly obtaining adjacent domain pixel sets of three angles of the area to be processed; fifthly respectively calculating the sum of gradient absolute values of the sets; sixthly selecting a set having the minimum sum of the gradient absolute values to eliminate a reference pixel set as interpolation calculation after the area to be processed; and subsequently estimating a substitution value of area to be interpolated and inserting the substitution value into the interpolation area by using a cubic spline interpolation algorithm. The method has the beneficial effects that with the adoption of the technical scheme, the high voltage line on the image in the railway freight train photographing process can be eliminated accurately, and meanwhile the naturalness and the completeness of other images are ensured.

Description

The take pictures removal method of the hi-line in the image in the process of railway freight train
Technical field
The invention belongs to field of photoelectric technology, especially relate to the take pictures removal method of the hi-line in the image in the process of a kind of railway freight train.
Background technology
In existing technology; the railway freight train is taken pictures in the process; affected by the limitation of railway construction construction, often have the appearance of hi-line in the railway freight train top graph picture that collects, this has certain influence to eye-observation and other image-based Intelligent Recognition utensils.Unresolved above-mentioned technical matters is badly in need of a kind of method that can remove image mesohigh line, and the method can accurately be removed the demonstration of image mesohigh line, has guaranteed simultaneously naturality and the integrality of image.
Summary of the invention
The problem to be solved in the present invention provides the take pictures removal method of the hi-line in the image in the process of a kind of railway freight train, and the parameter that especially is fit to hi-line is known constant situation.
For solving the problems of the technologies described above, the technical solution used in the present invention is: the take pictures removal method of the hi-line in the image in the process of a kind of railway freight train is characterized in that: comprise the steps:
Step 1, obtain the hi-line parameter: the position of the Y-axis of hi-line in image and the width of hi-line;
The position of step 2, the Y-axis of hi-line in image obtained according to step 1 and the width of hi-line, it is pending area pixel that the location of pixels that need to process is set, and obtains the gray-scale pixels data of this pending area pixel;
Step 3, to image each row in pending area pixel, being that (A °-A °+180 °, B °-B °+180 °, C °-C °+180 °) three directions are laterally zygomorphic in its angle respectively gets 5~10 neighborhood territory pixels and analyzes, we obtain three groups of pixel set, i.e. C (P altogether like this A, P B, P C);
Step 4, according to three groups of neighborhood territory pixels set that step 3 obtains, calculate respectively the Grad change curve in each pixel set, the formula of calculating is as follows:
If one group of set F is arranged k(P n), k=1 ... 3, n=1 ... 5~10; The Grad of F is calculated as follows so:
▿ F = ∂ F ∂ x i ^ + ∂ F ∂ y j ^
Step 5, according to the gradient that step 4 obtains, calculate the gradient absolute value sum of each pixel set according to following formula:
Sum = w * Σ | Lx | 2 + ( 1 - w ) Σ | Ly | 2 (w∈[0,1])
The Grad of X-direction during wherein the Lx representative is gathered, the Grad of Y direction in the Ly representative set, w represents weight;
Step 6, according to the gradient absolute value sum of each pixel set of step 5 gained, the set of pixels cooperation of getting gradient absolute value sum minimum is that the reference pixel of interpolation arithmetic is gathered, and described reference pixel set has comprised described pending area pixel removal and replaced becomes interpolation zone and each 5~10 neighborhood territory pixel of described pending area pixel front and back;
The reference pixel set of step 7, the pending area pixel of removal that obtains according to step 6 utilizes Cubic cubic spline interpolation algorithm, estimates to replace the pixel value in the interpolation zone in described pending zone, and inserts described interpolation zone;
Step 8, repeating step 3-7 finish until the pixel in whole pending zones is all replaced.
Further, the described hi-line parameter of step 1 is known constant.
Further, the preferred version of the described A of step 3, B, C is: A=45, B=90, C=135.
Further, the neighborhood territory pixel described in step 3 and the step 6 is preferably each 7 up and down.
Advantage and good effect that the present invention has are: owing to adopting technique scheme, the railway freight train hi-line in the image of taking pictures in the process can accurately be removed, and can guarantee naturality and the integrality of original other images simultaneously.
Description of drawings
Fig. 1 is FB(flow block) of the present invention
Fig. 2 is the image effect figure before hi-line of the present invention is removed
Fig. 3 is the image effect figure after hi-line of the present invention is removed
Fig. 4 is the gradient figure of the directions X described in the step 4 and Y-direction among the present invention
Among the figure:
1, hi-line 2, compartment 3, goods
Embodiment
As shown in Figure 1, the invention provides the take pictures removal method of the hi-line in the image in the process of a kind of railway freight train, it is characterized in that: comprise the steps:
Step 1, obtain the hi-line parameter: the position of the Y-axis of hi-line in image and the width of hi-line;
The position of step 2, the Y-axis of hi-line in image obtained according to step 1 and the width of hi-line, it is pending area pixel (such as the little square frame on the horizontal line in the following example) that the location of pixels that need to process is set, and obtains the gray-scale pixels data of this pending area pixel;
Figure BDA00002103426200031
Step 3, to image each row in pending area pixel, being that (A °-A °+180 °, B °-B °+180 °, C °-C °+180 °) three directions are laterally zygomorphic in its angle respectively gets 5~10 neighborhood territory pixels and analyzes, we obtain three groups of pixel set, i.e. C (P altogether like this A, P B, P C); The location of pixels in pending zone and the location of pixels of other angles relation can arrange position as shown in the table: (clockwise direction tendency)
45° 90° 135°
Pending pixel 180°
315° 270° 225°
Step 4, according to three groups of neighborhood territory pixels set that step 3 obtains, calculate respectively the Grad change curve in each pixel set, the formula of calculating is as follows:
If one group of set F is arranged k(P n), k=1 ... 3, n=1 ... 5~10; The Grad of F is calculated as follows so:
▿ F = ∂ F ∂ x i ^ + ∂ F ∂ y j ^
Returned the graded of each set X-direction and Y direction in the formula, its change curve as shown in Figure 4, three line representatives are gathered based on the pixel of three angles among the figure, (a) are X-direction gradient curve figure, (b) are Y direction gradient curve figure;
Step 5, according to the gradient that step 4 obtains, calculate the gradient absolute value sum of each pixel set according to following formula:
Sum = w * Σ | Lx | 2 + ( 1 - w ) Σ | Ly | 2 (w∈[0,1])
The Grad of X-direction during wherein the Lx representative is gathered, the Grad of Y direction in the Ly representative set, w represents weight;
Step 6, according to the gradient absolute value sum of each pixel set of step 5 gained, the set of pixels cooperation of getting gradient absolute value sum minimum is that the reference pixel of interpolation arithmetic is gathered, and described reference pixel set has comprised described pending area pixel removal and replaced becomes interpolation zone and each 5~10 neighborhood territory pixel of described pending area pixel front and back; When respectively getting 7 neighborhood territory pixels before and after us, the set of pixels of gradient absolute value sum minimum is combined into the following form of expression:
40 41 42 42 40 40 62 109 80 49 49 48 47 47 44
So, the reference pixel set is that 109 in the middle of removing and the pixel that replaces with empty interpolation zone (following square) are gathered, and its form of expression is as follows:
Figure BDA00002103426200041
The reference pixel set of step 7, the pending area pixel of removal that obtains according to step 6 utilizes Cubic cubic spline interpolation algorithm, estimates to replace the pixel value in the interpolation zone in described pending zone, and inserts described interpolation zone;
Step 8, repeating step 3-7 finish until the pixel in whole pending zones is all replaced.
Further, the described hi-line parameter of step 1 is known constant.
Further, the preferred version of the described A of step 3, B, C is: A=45, B=90, C=135.
Further, the neighborhood territory pixel described in step 3 and the step 6 is preferably each 7 up and down.
The present invention relates to neighborhood territory pixel up and down symmetrical number choose, in the scope that pixel processing capability allows, can elect 5~10 in the present embodiment as for a plurality of, be preferably 7.
Above one embodiment of the present of invention are had been described in detail, but described content only is preferred embodiment of the present invention, can not be considered to be used to limiting practical range of the present invention.All equalizations of doing according to the present patent application scope change and improve etc., all should still belong within the patent covering scope of the present invention.

Claims (4)

1. railway freight train removal method of the hi-line in the image in the process of taking pictures is characterized in that: comprise the steps:
Step 1, obtain the hi-line parameter: the position of the Y-axis of hi-line in image and the width of hi-line;
The position of step 2, the Y-axis of hi-line in image obtained according to step 1 and the width of hi-line, it is pending area pixel that the location of pixels that need to process is set, and obtains the gray-scale pixels data of this pending area pixel;
Step 3, to image each row in pending area pixel, being that (A °-A °+180 °, B °-B °+180 °, C °-C °+180 °) three directions are laterally zygomorphic in its angle respectively gets 5~10 neighborhood territory pixels and analyzes, we obtain three groups of pixel set, i.e. C (P altogether like this A, P B, P C);
Step 4, according to three groups of neighborhood territory pixels set that step 3 obtains, calculate respectively the Grad change curve in each pixel set, the formula of calculating is as follows:
If one group of set F is arranged k(P n), k=1 ... 3, n=1 ... 5~10; The Grad of F is calculated as follows so:
▿ F = ∂ F ∂ x i ^ + ∂ F ∂ y j ^
Step 5, according to the gradient that step 4 obtains, calculate the gradient absolute value sum of each pixel set according to following formula:
Sum = w * Σ | Lx | 2 + ( 1 - w ) Σ | Ly | 2 (w∈[0,1])
The Grad of X-direction during wherein the Lx representative is gathered, the Grad of Y direction in the Ly representative set, w represents weight;
Step 6, according to the gradient absolute value sum of each pixel set of step 5 gained, the set of pixels cooperation of getting gradient absolute value sum minimum is that the reference pixel of interpolation arithmetic is gathered, and described reference pixel set has comprised described pending area pixel removal and replaced becomes interpolation zone and each 5~10 neighborhood territory pixel of described pending area pixel front and back;
The reference pixel set of step 7, the pending area pixel of removal that obtains according to step 6 utilizes Cubic cubic spline interpolation algorithm, estimates to replace the pixel value in the interpolation zone in described pending zone, and inserts described interpolation zone;
Step 8, repeating step 3-7 finish until the pixel in whole pending zones is all replaced.
2. the railway freight train according to claim 1 removal method of the hi-line in the image in the process of taking pictures, it is characterized in that: the described hi-line parameter of step 1 is known constant.
3. the railroad train according to claim 1 removal method of the hi-line in the image in the process of taking pictures is characterized in that: the described A=45 of step 3, B=90, C=135.
4. the railroad train according to claim 1 removal method of the hi-line in the image in the process of taking pictures, it is characterized in that: the neighborhood territory pixel described in step 3 and the step 6 is each 7 up and down.
CN201210325385.XA 2012-09-05 2012-09-05 Railway freight train is taken pictures the minimizing technology of the hi-line in process in image Active CN102881005B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210325385.XA CN102881005B (en) 2012-09-05 2012-09-05 Railway freight train is taken pictures the minimizing technology of the hi-line in process in image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210325385.XA CN102881005B (en) 2012-09-05 2012-09-05 Railway freight train is taken pictures the minimizing technology of the hi-line in process in image

Publications (2)

Publication Number Publication Date
CN102881005A true CN102881005A (en) 2013-01-16
CN102881005B CN102881005B (en) 2016-01-20

Family

ID=47482318

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210325385.XA Active CN102881005B (en) 2012-09-05 2012-09-05 Railway freight train is taken pictures the minimizing technology of the hi-line in process in image

Country Status (1)

Country Link
CN (1) CN102881005B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101674397A (en) * 2009-09-27 2010-03-17 上海大学 Repairing method of scratch in video sequence

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101674397A (en) * 2009-09-27 2010-03-17 上海大学 Repairing method of scratch in video sequence

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
党向盈等: "基于边缘最大梯度的多方向优化插值算法", 《计算机应用研究》 *
梅志红,杨万铨: "《MATLAB程序设计基础及应用》", 31 December 2005, 清华大学出版社 *
葛仕明等: "一种结合灰度和梯度方向的图像修复方法", 《电路与系统学报》 *
袁红星等: "一种用于CMOS图像传感器的彩色插值算法", 《首都师范大学学报(自然科学版)》 *

Also Published As

Publication number Publication date
CN102881005B (en) 2016-01-20

Similar Documents

Publication Publication Date Title
CN111062872B (en) Image super-resolution reconstruction method and system based on edge detection
CN107016642B (en) Method and apparatus for resolution up-scaling of noisy input images
CN106127688B (en) A kind of super-resolution image reconstruction method and its system
CN102722876B (en) Residual-based ultra-resolution image reconstruction method
CN107240084B (en) Method and device for removing rain from single image
CN103699900B (en) Building horizontal vector profile automatic batch extracting method in satellite image
CN104809698A (en) Kinect depth image inpainting method based on improved trilateral filtering
CN103020918B (en) Shape-adaptive neighborhood mean value based non-local mean value denoising method
CN102890820B (en) Based on shearlet conversion and the image de-noising method of Wiener filtering
CN101996406A (en) No-reference structure definition image quality evaluation method
CN103426148A (en) Method and device for generating a super-resolution version of a low resolution input data structure
CN106204461B (en) In conjunction with the compound regularized image denoising method of non local priori
CN104574381B (en) A kind of full reference image quality appraisement method based on local binary patterns
CN105657401B (en) A kind of bore hole 3D display methods, system and bore hole 3D display device
CN103293168B (en) Fruit surface defect detection method based on visual saliency
CN101923721B (en) Non-illumination face image reconstruction method and system
CN103440664A (en) Method, system and computing device for generating high-resolution depth map
CN101527043A (en) Video picture segmentation method based on moving target outline information
CN103020898A (en) Sequence iris image super-resolution reconstruction method
CN104063849A (en) Video super-resolution reconstruction method based on image block self-adaptive registration
CN110189390A (en) A kind of monocular vision SLAM method and system
CN104504672A (en) NormLV feature based low-rank sparse neighborhood-embedding super-resolution method
CN101504769B (en) Self-adaptive noise intensity estimation method based on encoder frame work
CN107169932A (en) A kind of image recovery method based on Gauss Poisson mixed noise model suitable for neutron imaging system diagram picture
CN103493482A (en) Method and device for extracting and optimizing depth map of image

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: Binhai Huayuan Industrial Zone in Tianjin City hi tech road 300384 No. 18 West 3-303

Applicant after: TIANJIN OPTICAL ELECTRICAL GAOSI COMMUNICATION ENGINEERING TECHNOLOGY CO., LTD.

Address before: Binhai Huayuan Industrial Zone in Tianjin City hi tech road 300384 No. 18 West 3-303

Applicant before: Tianjin Photoelectric Gaosi Communication Engineering Technology Co., Ltd.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: TIANJIN PHOTOELECTRIC GAOSI COMMUNICATION ENGINEERING TECHNOLOGY CO., LTD. TO: TIANJIN PHOTOELECTRIC GAOSI COMMUNICATION ENGINEERING TECHNOLOGY LTD.

C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant