CN112017206A - Directional sliding self-adaptive threshold value binarization method based on line structure light image - Google Patents

Directional sliding self-adaptive threshold value binarization method based on line structure light image Download PDF

Info

Publication number
CN112017206A
CN112017206A CN202010895929.0A CN202010895929A CN112017206A CN 112017206 A CN112017206 A CN 112017206A CN 202010895929 A CN202010895929 A CN 202010895929A CN 112017206 A CN112017206 A CN 112017206A
Authority
CN
China
Prior art keywords
sliding window
sliding
threshold value
boundary factor
image
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.)
Withdrawn
Application number
CN202010895929.0A
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.)
Hebei University of Engineering
Original Assignee
Hebei University of Engineering
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 Hebei University of Engineering filed Critical Hebei University of Engineering
Priority to CN202010895929.0A priority Critical patent/CN112017206A/en
Publication of CN112017206A publication Critical patent/CN112017206A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Abstract

A directed sliding adaptive threshold value binarization method based on a line structure light image comprises the following steps of 1, firstly, taking a pixel point set where line structure light is located as a target, and setting an initial sliding window by taking a pixel point to be solved as a center; step 2, defining the average value of all pixel gray values in the sliding window as a threshold value T; step 3, setting a boundary factor tau for moving the sliding window to enable the sliding window to only perform directional sliding near the linear structured light; and 4, carrying out binarization on the image through a threshold value T. The invention makes the sliding window only do directional sliding near the line structure light by setting the boundary factor tau of the sliding window moving. The sliding range of the sliding window is reduced, the whole image is prevented from being traversed, the traversing efficiency is improved, and the effect of rapid processing is achieved.

Description

Directional sliding self-adaptive threshold value binarization method based on line structure light image
Technical Field
The invention belongs to the technical field of image binarization, and particularly relates to a directed sliding self-adaptive threshold value binarization method based on a line structure light image.
Background
Image binarization is an important problem in image processing, and is widely applied to the fields of image segmentation, image enhancement, image identification and the like. The method changes an original image into an image target and a background binary image which are only expressed by two gray values by using the difference of gray characteristics of an object to be extracted and the background of the object in the image. Most of binarization methods are threshold-based methods, that is, a proper threshold is found to divide the pixel gray level of the original image into two types, i.e., a threshold larger than the threshold and a threshold smaller than the threshold, so as to obtain a binarization result. At present, threshold-based binarization methods can be classified into a global threshold method and a local threshold method.
The local threshold method can set different thresholds according to the brightness of different regions of an image, and the threshold at the time is a local threshold corresponding to the brightness distribution of each small region on the image, so that different regions on the same image have different thresholds, and a good effect is achieved when the image with uneven brightness of the line structure is dealt with, but a rapid processing method is still lacked in the threshold binarization applied to the line structure light image.
Disclosure of Invention
Aiming at the problems of a threshold value binarization method for a linear structured light image in the prior art, the invention provides a directed sliding self-adaptive threshold value binarization method based on the linear structured light image, which is suitable for identifying the image of linear structured light through image binarization.
A directed sliding adaptive threshold value binarization method based on a line structure light image comprises the following steps of 1, firstly, taking a pixel point set where line structure light is located as a target, and setting an initial sliding window by taking a pixel point to be solved as a center; step 2, defining the average value of all pixel gray values in the sliding window as a threshold value T; step 3, setting a boundary factor tau for moving the sliding window to enable the sliding window to only perform directional sliding near the linear structured light; and 4, carrying out binarization on the image through a threshold value T.
Further, the initial sliding window in step 1 is a sliding window with a size of 3 × 3, which is set with the pixel point to be solved as the center.
Further, the calculation formula of the threshold value T is:
Figure DEST_PATH_IMAGE001
for a point that cannot be fully covered by a sliding window, the normal threshold is the mean of the closest sliding window coverage to that point.
Further, the boundary factor τ includes an upper boundary factor
Figure 9105DEST_PATH_IMAGE002
Lower boundary factor
Figure DEST_PATH_IMAGE003
And right boundary factor
Figure 76287DEST_PATH_IMAGE004
Boundary factors in three directions, upper boundary factor
Figure DEST_PATH_IMAGE005
And a lower boundary factor
Figure 514222DEST_PATH_IMAGE003
Respectively play a role in limiting the sliding of the sliding window in the upper and lower directions, and the right boundary factor
Figure 997156DEST_PATH_IMAGE004
Determines the direction in which the sliding window slides.
Further, an upper bound factor
Figure 469726DEST_PATH_IMAGE006
The maximum value of three upper neighborhoods of the pixel point to be solved, and the lower boundary factor
Figure 149886DEST_PATH_IMAGE003
The maximum value of three neighborhoods at the lower side of the pixel point to be solved, and the right border factor
Figure 75117DEST_PATH_IMAGE004
The maximum value of the three neighborhoods at the right side of the pixel point to be solved is obtained.
Further, the initial pixel point to be solved is the pixel point with the maximum gray scale value in the second row of the image.
The invention makes the sliding window only do directional sliding near the line structure light by setting the boundary factor tau of the sliding window moving. The sliding range of the sliding window is reduced, the whole image is prevented from being traversed, the traversing efficiency is improved, and the effect of rapid processing is achieved.
Drawings
Fig. 1 is a schematic view of a sliding window of size 3 × 3.
Detailed Description
The following further describes embodiments of the present invention in conjunction with the summary of the invention and the accompanying drawings.
The invention provides a directed sliding self-adaptive threshold value binarization method based on a line structure light image, which is suitable for identifying the line structure light image through image binarization.
A directed sliding adaptive threshold value binarization method based on a line structure light image comprises the following steps of 1, firstly, taking a pixel point set where line structure light is located as a target, and setting an initial sliding window by taking a pixel point to be solved as a center; step 2, defining the average value of all pixel gray values in the sliding window as a threshold value T; step 3, setting a boundary factor tau for moving the sliding window to enable the sliding window to only perform directional sliding near the linear structured light; and 4, carrying out binarization on the image through a threshold value T.
The initial sliding window in step 1 is a sliding window with a size of 3 × 3, which is set with the pixel point to be solved as the center.
Determining a threshold value T: as shown in the schematic drawing of 3 × 3 sliding window size of FIG. 1 for finding points
Figure DEST_PATH_IMAGE007
Setting an initial sliding window with the size of 3 multiplied by 3 for the center, defining the current threshold value T as the average value of all pixel gray values of the current sliding window, and calculating the T according to the formula (1). The normal threshold is distance for points that cannot be completely covered by the sliding window (e.g., points at the edges and corners in FIG. 1)The mean of the closest sliding window coverage for that point.
Figure 361742DEST_PATH_IMAGE008
(1)
In the formula (2), the initial candidate point is defined
Figure 423239DEST_PATH_IMAGE009
The pixel point with the maximum gray value in the second row of the image is obtained.
Figure 769907DEST_PATH_IMAGE010
(2)
Determining the boundary factor τ: by setting the boundary factor tau of the sliding window movement, the sliding window only performs directional sliding near the line structure light. The boundary factor tau includes an upper boundary factor
Figure 182433DEST_PATH_IMAGE005
Lower boundary factor
Figure 272749DEST_PATH_IMAGE003
And right boundary factor
Figure 454332DEST_PATH_IMAGE004
In the three directions, the light source is arranged in the three directions,
Figure 644005DEST_PATH_IMAGE002
and
Figure 107609DEST_PATH_IMAGE003
respectively play a role in limiting the sliding in the upper and lower directions,
Figure 673720DEST_PATH_IMAGE004
determines the direction of the sliding. Defining an upper boundary factor
Figure 37705DEST_PATH_IMAGE002
To be a point to be solved
Figure 398279DEST_PATH_IMAGE007
Maximum of three neighborhoods at the upper side, lower boundary factor
Figure 785398DEST_PATH_IMAGE003
To be a point to be solved
Figure DEST_PATH_IMAGE011
Maximum of three neighborhoods at the bottom, right boundary factor
Figure 217517DEST_PATH_IMAGE004
To be a point to be solved
Figure 108112DEST_PATH_IMAGE007
The calculation process of the maximum value of the three neighborhoods on the right side is shown as formula (3).
Figure 967484DEST_PATH_IMAGE012
(3)
The sliding range of the sliding window is effectively reduced by setting the boundary factor, and the image binarization efficiency is further improved.
The invention makes the sliding window only do directional sliding near the line structure light by setting the boundary factor tau of the sliding window moving. The sliding range of the sliding window is reduced, the whole image is prevented from being traversed, the traversing efficiency is improved, and the effect of rapid processing is achieved.

Claims (6)

1. A directed sliding adaptive threshold value binarization method based on a line structure light image is characterized by comprising the following steps of 1, firstly, taking a pixel point set where line structure light is located as a target, and setting an initial sliding window by taking a pixel point to be solved as a center; step 2, defining the average value of all pixel gray values in the sliding window as a threshold value T; step 3, setting a boundary factor tau for moving the sliding window to enable the sliding window to only perform directional sliding near the linear structured light; and 4, carrying out binarization on the image through a threshold value T.
2. The method according to claim 1, wherein the initial sliding window in step 1 is a sliding window of 3 × 3 size centered on the pixel to be solved.
3. The method according to claim 2, wherein the calculation formula of the threshold value T is as follows:
Figure 261929DEST_PATH_IMAGE002
for a point that cannot be fully covered by a sliding window, the normal threshold is the mean of the closest sliding window coverage to that point.
4. The method according to any one of claims 2-3, wherein the boundary factor τ comprises an upper boundary factor
Figure 179069DEST_PATH_IMAGE004
Lower boundary factor
Figure 21123DEST_PATH_IMAGE006
And right boundary factor
Figure 416332DEST_PATH_IMAGE008
Boundary factors in three directions, upper boundary factor
Figure DEST_PATH_IMAGE009
And a lower boundary factor
Figure 794486DEST_PATH_IMAGE006
Respectively play a role in limiting the sliding of the sliding window in the upper and lower directions, and the right boundary factor
Figure 616949DEST_PATH_IMAGE008
Determines the direction in which the sliding window slides.
5. The method according to claim 4, wherein the upper boundary factor is an upper boundary factor
Figure DEST_PATH_IMAGE010
The maximum value of three upper neighborhoods of the pixel point to be solved, and the lower boundary factor
Figure 946299DEST_PATH_IMAGE006
The maximum value of three neighborhoods at the lower side of the pixel point to be solved, and the right border factor
Figure 207516DEST_PATH_IMAGE008
The maximum value of the three neighborhoods at the right side of the pixel point to be solved is obtained.
6. The method according to any one of claims 1, 3 and 5, wherein the initial pixel to be solved is the pixel with the largest gray scale value in the second row of the image.
CN202010895929.0A 2020-08-31 2020-08-31 Directional sliding self-adaptive threshold value binarization method based on line structure light image Withdrawn CN112017206A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010895929.0A CN112017206A (en) 2020-08-31 2020-08-31 Directional sliding self-adaptive threshold value binarization method based on line structure light image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010895929.0A CN112017206A (en) 2020-08-31 2020-08-31 Directional sliding self-adaptive threshold value binarization method based on line structure light image

Publications (1)

Publication Number Publication Date
CN112017206A true CN112017206A (en) 2020-12-01

Family

ID=73503884

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010895929.0A Withdrawn CN112017206A (en) 2020-08-31 2020-08-31 Directional sliding self-adaptive threshold value binarization method based on line structure light image

Country Status (1)

Country Link
CN (1) CN112017206A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106096610A (en) * 2016-06-13 2016-11-09 湖北工业大学 A kind of file and picture binary coding method based on support vector machine
CN106127765A (en) * 2016-06-23 2016-11-16 成都神州数码索贝科技有限公司 Image binaryzation system based on self-adapting window and smooth threshold method
CN106780531A (en) * 2016-12-22 2017-05-31 河海大学 A kind of image edge extraction method based on color lump point feature
CN108763997A (en) * 2018-04-13 2018-11-06 广州中大微电子有限公司 A kind of Quick Response Code noise-reduction method and system based on crisscross quick binaryzation
CN109816681A (en) * 2019-01-10 2019-05-28 中国药科大学 Microorganisms in water image partition method based on adaptive local threshold binarization
CN110866924A (en) * 2019-09-24 2020-03-06 重庆邮电大学 Line structured light center line extraction method and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106096610A (en) * 2016-06-13 2016-11-09 湖北工业大学 A kind of file and picture binary coding method based on support vector machine
CN106127765A (en) * 2016-06-23 2016-11-16 成都神州数码索贝科技有限公司 Image binaryzation system based on self-adapting window and smooth threshold method
CN106780531A (en) * 2016-12-22 2017-05-31 河海大学 A kind of image edge extraction method based on color lump point feature
CN108763997A (en) * 2018-04-13 2018-11-06 广州中大微电子有限公司 A kind of Quick Response Code noise-reduction method and system based on crisscross quick binaryzation
CN109816681A (en) * 2019-01-10 2019-05-28 中国药科大学 Microorganisms in water image partition method based on adaptive local threshold binarization
CN110866924A (en) * 2019-09-24 2020-03-06 重庆邮电大学 Line structured light center line extraction method and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
逯圣辉: "基于机器视觉的带式输送机动态煤量计量研究", 《中国优秀博硕士学位论文全文数据库(硕士) 工程科技Ⅰ辑》 *

Similar Documents

Publication Publication Date Title
CN111415363B (en) Image edge identification method
CN102385753B (en) Illumination-classification-based adaptive image segmentation method
CN105184763B (en) Image processing method and device
CN109658424B (en) Improved robust two-dimensional OTSU threshold image segmentation method
CN115249246B (en) Optical glass surface defect detection method
CN103996209A (en) Infrared vessel object segmentation method based on salient region detection
CN114219805B (en) Intelligent detection method for glass defects
CN102509095B (en) Number plate image preprocessing method
CN109190632A (en) A kind of binarization method of ancient books file and picture
CN111583279A (en) Super-pixel image segmentation method based on PCBA
CN115131375B (en) Automatic ore cutting method
CN116630813B (en) Highway road surface construction quality intelligent detection system
CN112991283A (en) Flexible IC substrate line width detection method based on super-pixels, medium and equipment
CN110163894B (en) Sub-pixel level target tracking method based on feature matching
CN117314940B (en) Laser cutting part contour rapid segmentation method based on artificial intelligence
CN108230334B (en) High-concentration wind-blown sand image segmentation method based on gray threshold
CN112381844B (en) Self-adaptive ORB feature extraction method based on image blocking
CN113936023A (en) Method for detecting edge straight line of granary walkway plate under strong light condition
Najafzadeh et al. Object tracking using Kalman filter with adaptive sampled histogram
CN112017206A (en) Directional sliding self-adaptive threshold value binarization method based on line structure light image
CN106408029A (en) Image texture classification method based on structural difference histogram
CN105701807B (en) A kind of image partition method based on temporal voting strategy
CN114549649A (en) Feature matching-based rapid identification method for scanned map point symbols
Nasr-Isfahani et al. A new approach for touching cells segmentation
CN108564593A (en) A kind of image partition method and system based on anomaly particle cluster algorithm

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20201201