CN108344741B - Automatic focal length identification and control method applied to automatic coal rock detection - Google Patents
Automatic focal length identification and control method applied to automatic coal rock detection Download PDFInfo
- Publication number
- CN108344741B CN108344741B CN201810134365.1A CN201810134365A CN108344741B CN 108344741 B CN108344741 B CN 108344741B CN 201810134365 A CN201810134365 A CN 201810134365A CN 108344741 B CN108344741 B CN 108344741B
- Authority
- CN
- China
- Prior art keywords
- area
- value
- focal length
- coal rock
- automatic
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/01—Arrangements or apparatus for facilitating the optical investigation
Landscapes
- Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- Biochemistry (AREA)
- General Health & Medical Sciences (AREA)
- General Physics & Mathematics (AREA)
- Immunology (AREA)
- Pathology (AREA)
- Automatic Focus Adjustment (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
A focal length automatic identification and control technology applied to coal rock automatic detection is characterized in that a camera is used for shooting a microscopic picture, then inputting the obtained microscopic picture into a computer, after the computer calculates the gray value of each pixel point of the microscopic picture, summing up all pixel E values in the microscopic picture, obtaining the J value of the whole microscopic picture, comparing the J values of the microscopic pictures at different focal length positions in the same identification area by a computer, taking the focal length position corresponding to the maximum J value picture as the quasi-focal value of the current area, then the computer takes any three-point coordinate to establish an equation set, so that the numerical value of the constant can be determined, after the numerical value of the constant is obtained, full-automatic detection is started, during the movement, the theoretical Z-axis height can be calculated by a formula according to the X, Y coordinate of the identification area, and then the number of the motor pulses is calculated through a formula, so that the precise coke control in the full-automatic coal rock detection process is realized. The invention does not need manual auxiliary adjustment, has high running speed and can meet the condition of daily samples to be detected.
Description
Technical Field
The invention belongs to the field of coal rock detection, and particularly relates to a focal length automatic identification and control method applied to automatic coal rock detection.
Background
At present, the manual mode is mostly adopted for detecting the components and the reflectivity of coal rocks in the industries of geology, coking, coal washing and the like, and the efficiency is low. The realization of automation can improve the efficiency, but the realization of automation has one technical difficulty that how to obtain clear coal rock microscopic pictures of each measuring area in the coal rock polished section in real time. A technical method for making effective virtual focus judgment aiming at a coal rock microscopic picture is needed. Meanwhile, in the whole scanning process, the control hardware realizes accurate focusing control.
Disclosure of Invention
The invention provides a focal length automatic identification and control method applied to automatic coal rock detection, which is used for overcoming the defects in the prior art.
The invention is realized by the following technical scheme:
a focal length automatic identification and control method applied to automatic coal rock detection comprises the following steps:
step 1: dividing a coal rock polished section into 9 focus identification areas which are uniformly distributed, sequentially marking the areas from the upper left corner to be named as an area A, an area B, an area C, an area D, an area E, an area F, an area G, an area H and an area I, sequentially shooting the areas A, shooting coal rock microscopic pictures at different focus positions corresponding to the focus identification areas by a high-precision camera arranged on a microscope, controlling the focus positions by a focusing motor arranged on the Z axis of the microscope, expressing the focus positions by the height of a focusing coordinate of the Z axis of the microscope, wherein the unit is the pulse number of the focusing motor, positive rotation is positive, and negative rotation is negative;
step 2: respectively inputting the obtained microscopic picture of each identification area into a computer according to groups, and calculating the gray value of each pixel point of the non-edge area in each coal rock microscopic picture by the computer through the following formula:
j1 = (-1) × a + (-2) × D + (-1) × G + 1 × C + 2 × F + 1 × I formula 1;
j2 = (-1) × a + (-2) × B + (-1) × C + 1 × G + 2 × H + 1 × I formula 2;
j1 represents a gray value of each pixel point in the focal length identification areas of the left edge area and the right edge area in the vertical direction of the microscopic picture, J2 represents a gray value of each pixel point in the focal length identification areas of the upper edge area and the lower edge area in the horizontal direction of the microscopic picture, E represents a gray value of each pixel point in the non-edge area of the microscopic picture, and the E values of all pixels in one coal rock microscopic picture are summed to obtain a gray value, namely a J value, of the whole coal rock microscopic picture;
and step 3: after all J values are calculated by the computer, the J values of the coal rock microscopic pictures at different focal length positions in the same identification area are compared, the focal length position corresponding to the maximum J value picture is taken as the quasi-focal value of the current area, and the coordinate value is recorded as Z values according to the names of different identification areas in sequenceA、ZB、ZC、ZD、ZE、ZF、ZG、ZH、ZI;
And 4, step 4: then the computer takes the coordinates of any three-point area: (X1, Y1, Z1), (X2, Y2, Z2), (X3, Y3, Z3), establishing the system of equations:
a0*X1+a1*Y1+ a2*Z1=-A
a0*X2+a1*Y2+ a2*Z2=-A
a0*X3+a1*Y3+ a2*Z3=-A
solving the equation set, the accurate values of undetermined constants a0, a1 and a2 in the equation can be determined, a plurality of different three points are combined and calculated, and the average value of each constant is finally calculated;
and 5: after the accurate values of the constants a0, a1 and a2 are obtained, full-automatic detection is started, the coordinate value of the central area of the light sheet is firstly determined as (0, 0), then the light sheet is moved to the initial position of the area A to start detection in sequence, and in the moving process, the light sheet can be detected according to the X, Y coordinate of the corresponding identification area through the formula: a 0X + a 1Y + a 2Z = -a to calculate the corresponding theoretical Z-axis height, i.e., the quasi-focal position;
step 6: obtaining the theoretical Z-axis height through the formula: and the adjustment pulse number of the focusing motor = the actual height of the current Z axis-the theoretical calculation Z value, the adjustment pulse number of the focusing motor is calculated, the forward rotation adjustment of the focusing motor is controlled when the adjustment pulse number of the motor is regular, and the reverse rotation adjustment of the focusing is controlled when the adjustment pulse number of the motor is negative, so that the precise focusing control in the coal rock full-automatic detection process is realized.
Preferably, when shooting the focus recognition area, the following method is adopted for shooting: and changing the initial value of 6-10 focal length positions to continuously shoot a plurality of coal petrography polished section micrographs.
The invention has the advantages that: the invention can realize rapid full-automatic accurate virtual focus identification and accurate focus control, solves the problems of no automatic technology or manual adjustment in the automatic detection process in the field at present and overlarge labor intensity, does not need manual auxiliary adjustment, has high identification speed and can meet the condition of producing a large number of daily samples to be detected.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a diagram of an image pixel distribution of the present invention;
fig. 2 is a diagram showing the result of automatic focus recognition in the detection process of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1
A focal length automatic identification and control method applied to automatic coal rock detection comprises the following steps:
step 1: dividing a coal rock polished section into 9 focus identification areas which are uniformly distributed, sequentially marking the areas from the upper left corner to be named as an area A, an area B, an area C, an area D, an area E, an area F, an area G, an area H and an area I, sequentially shooting the areas A, shooting coal rock microscopic pictures at different focus positions corresponding to the focus identification areas by a high-precision camera arranged on a microscope, controlling the focus positions by a focusing motor arranged on the Z axis of the microscope during shooting, expressing the focus positions by the height of a focusing coordinate of the Z axis of the microscope, and taking the unit as the pulse number of the focusing motor, wherein the positive rotation is a positive value, and the negative rotation is a negative value;
step 2: respectively inputting the obtained microscopic picture of each identification area into a computer according to groups, and calculating the gray value of each pixel point of the non-edge area in each coal rock microscopic picture by the computer through the following formula:
j1 = (-1) × a + (-2) × D + (-1) × G + 1 × C + 2 × F + 1 × I formula 1;
j2 = (-1) × a + (-2) × B + (-1) × C + 1 × G + 2 × H + 1 × I formula 2;
j1 represents the gray value of each pixel point in the focal length identification areas of the left edge area and the right edge area in the vertical direction of the microscopic picture, J2 represents the gray value of each pixel point in the focal length identification areas of the upper edge area and the lower edge area in the horizontal direction of the microscopic picture, E represents the gray value of each pixel point in the non-edge area of the microscopic picture, and the E values of all pixels in one coal rock microscopic picture are summed to obtain the gray value of the whole coal rock microscopic picture, namely the J value;
and step 3: after all J values are calculated by the computer, the J values of the coal rock microscopic pictures at different focal length positions in the same identification area are compared, the focal length position corresponding to the maximum J value picture is taken as the quasi-focal value of the current area, and the coordinate value is recorded as Z values according to the names of different identification areas in sequenceA、ZB、ZC、ZD、ZE、ZF、ZG、ZH、ZI;
And 4, step 4: then the computer takes the coordinates of any three-point area: (X1, Y1, Z1), (X2, Y2, Z2), (X3, Y3, Z3), establishing the system of equations:
a0*X1+a1*Y1+ a2*Z1=-A
a0*X2+a1*Y2+ a2*Z2=-A
a0*X3+a1*Y3+ a2*Z3=-A
solving the equation set, the accurate values of undetermined constants a0, a1 and a2 in the equation can be determined, a plurality of different three points are combined and calculated, and the average value of each constant is finally calculated;
and 5: after the accurate values of the constants a0, a1 and a2 are obtained, full-automatic detection is started, the coordinate value of the central area of the light sheet is firstly determined as (0, 0), then the light sheet is moved to the initial position of the area A to start detection in sequence, and in the moving process, the light sheet can be detected according to the X, Y coordinate of the corresponding identification area through the formula: a 0X + a 1Y + a 2Z = -a to calculate the corresponding theoretical Z-axis height, i.e., the quasi-focal position;
step 6: obtaining the theoretical Z-axis height through the formula: and the adjustment pulse number of the focusing motor = the actual height of the current Z axis-the theoretical calculation Z value, the adjustment pulse number of the focusing motor is calculated, the forward rotation adjustment of the focusing motor is controlled when the adjustment pulse number of the motor is regular, and the reverse rotation adjustment of the focusing is controlled when the adjustment pulse number of the motor is negative, so that the precise focusing control in the coal rock full-automatic detection process is realized.
Preferably, when shooting the focus recognition area, the following method is adopted for shooting: and changing the initial value of 6-10 focal length positions to continuously shoot a plurality of coal petrography polished section micrographs.
Finally, it should be noted that: in the description of the present invention, it is to be understood that the terms "top", "bottom", "one end", "the other end", "top", "bottom", "upper", "lower", "left", "right", "one side", "inner", "middle", "center", "two ends", etc., indicate orientations or positional relationships based on those shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed in a particular orientation, and be operated, and thus, should not be construed as limiting the present invention. In the present invention, unless otherwise expressly stated or limited, the terms "mounted," "disposed," "connected," "fixed," "pivotally connected," and the like are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral part; can be a mechanical connection, but also an electrical connection; can be directly connected or indirectly connected through an intermediate medium, can be communication between two elements or interaction relationship of two elements, and the specific meaning of the above terms in the present invention can be understood by those skilled in the art according to specific situations unless otherwise specifically limited. The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (2)
1. A focal length automatic identification and control method applied to automatic coal rock detection is characterized in that: the method comprises the following steps:
step 1: dividing a coal rock polished section into 9 focus identification areas which are uniformly distributed, sequentially marking the areas from the upper left corner to be named as an area A, an area B, an area C, an area D, an area E, an area F, an area G, an area H and an area I, sequentially shooting the areas A, shooting coal rock microscopic pictures at different focus positions corresponding to the focus identification areas by a high-precision camera arranged on a microscope, controlling the focus positions by a focusing motor arranged on the Z axis of the microscope, expressing the focus positions by the height of a focusing coordinate of the Z axis of the microscope, wherein the unit is the pulse number of the focusing motor, positive rotation is positive, and negative rotation is negative;
step 2: respectively inputting the obtained microscopic picture of each identification area into a computer according to groups, and calculating the gray value of each pixel point of the non-edge area in each coal rock microscopic picture by the computer through the following formula:
j1 = (-1) × a + (-2) × D + (-1) × G + 1 × C + 2 × F + 1 × I formula 1;
j2 = (-1) × a + (-2) × B + (-1) × C + 1 × G + 2 × H + 1 × I formula 2;
j1 represents a gray value of each pixel point in the focal length identification areas of the left edge area and the right edge area in the vertical direction of the microscopic picture, J2 represents a gray value of each pixel point in the focal length identification areas of the upper edge area and the lower edge area in the horizontal direction of the microscopic picture, E represents a gray value of each pixel point in the non-edge area of the microscopic picture, and the E values of all pixels in one coal rock microscopic picture are summed to obtain a gray value, namely a J value, of the whole coal rock microscopic picture;
and step 3: after all J values are calculated by the computer, the J values of the coal rock microscopic pictures at different focal length positions in the same identification area are compared, the focal length position corresponding to the maximum J value picture is taken as the quasi-focal value of the current area, and the coordinate value is recorded as Z values according to the names of different identification areas in sequenceA、ZB、ZC、ZD、ZE、ZF、ZG、ZH、ZI;
And 4, step 4: then the computer takes the coordinates of any three-point area: (X1, Y1, Z1), (X2, Y2, Z2), (X3, Y3, Z3), establishing the system of equations:
a0*X1+a1*Y1+ a2*Z1=-A
a0*X2+a1*Y2+ a2*Z2=-A
a0*X3+a1*Y3+ a2*Z3=-A
solving the equation set, the accurate values of undetermined constants a0, a1 and a2 in the equation can be determined, a plurality of different three points are combined and calculated, and the average value of each constant is finally calculated;
and 5: after the accurate values of the constants a0, a1 and a2 are obtained, full-automatic detection is started, the coordinate value of the central area of the light sheet is firstly determined as (0, 0), then the light sheet is moved to the initial position of the area A to start detection in sequence, and in the moving process, the light sheet can be detected according to the X, Y coordinate of the corresponding identification area through the formula: a 0X + a 1Y + a 2Z = -a to calculate the corresponding theoretical Z-axis height, i.e., the quasi-focal position;
step 6: obtaining the theoretical Z-axis height through the formula: and the adjustment pulse number of the focusing motor = the actual height of the current Z axis-the theoretical calculation Z value, the adjustment pulse number of the focusing motor is calculated, the forward rotation adjustment of the focusing motor is controlled when the adjustment pulse number of the motor is regular, and the reverse rotation adjustment of the focusing is controlled when the adjustment pulse number of the motor is negative, so that the precise focusing control in the coal rock full-automatic detection process is realized.
2. The automatic focal length identification and control method applied to automatic coal rock detection according to claim 1, characterized in that: when shooting the focus identification area, shooting by adopting the following method: and changing the upper and lower 6-10 focal length positions of the initial value to continuously shoot a plurality of coal petrography light sheet micrographs.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810134365.1A CN108344741B (en) | 2018-02-09 | 2018-02-09 | Automatic focal length identification and control method applied to automatic coal rock detection |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810134365.1A CN108344741B (en) | 2018-02-09 | 2018-02-09 | Automatic focal length identification and control method applied to automatic coal rock detection |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108344741A CN108344741A (en) | 2018-07-31 |
CN108344741B true CN108344741B (en) | 2021-03-16 |
Family
ID=62959307
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810134365.1A Active CN108344741B (en) | 2018-02-09 | 2018-02-09 | Automatic focal length identification and control method applied to automatic coal rock detection |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108344741B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1794790A (en) * | 2005-10-09 | 2006-06-28 | 英华达股份有限公司 | Image freatment method and its device |
CN104730702A (en) * | 2015-03-16 | 2015-06-24 | 苏州创继生物科技有限公司 | Micro-scanning platform, shooting method and work area flatness calibration method |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101846623A (en) * | 2010-04-16 | 2010-09-29 | 煤炭科学研究总院 | Method for detecting reflectivity of coal or organic rock vitrinite and special equipment thereof |
CN103163638A (en) * | 2011-12-09 | 2013-06-19 | 姚伯元 | Microscope automatic focusing method based on sample determination surface plane equation |
CN102928340A (en) * | 2012-10-19 | 2013-02-13 | 煤炭科学研究总院 | Image analysis-based method and special equipment for simultaneously determining content of maceral and vitrinite reflectance of coal |
CN105334612B (en) * | 2015-12-18 | 2017-11-21 | 苏州创继生物科技有限公司 | The flatness calibration method of Microscanning platform X/Y plane |
-
2018
- 2018-02-09 CN CN201810134365.1A patent/CN108344741B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1794790A (en) * | 2005-10-09 | 2006-06-28 | 英华达股份有限公司 | Image freatment method and its device |
CN104730702A (en) * | 2015-03-16 | 2015-06-24 | 苏州创继生物科技有限公司 | Micro-scanning platform, shooting method and work area flatness calibration method |
Non-Patent Citations (1)
Title |
---|
煤岩光片平整度及光线斜射对反射率自动测试精度影响的实验研究;武琳琳 等;《煤质技术》;20170731;第1-5页 * |
Also Published As
Publication number | Publication date |
---|---|
CN108344741A (en) | 2018-07-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108921865B (en) | Anti-interference sub-pixel straight line fitting method | |
CN109085113B (en) | Automatic focusing method and device for cervical exfoliated cell detection device | |
CN103384998B (en) | Imaging device and imaging method | |
CN109782414B (en) | Automatic focusing method based on definition of non-reference structure | |
CN108345085A (en) | Focus method and focusing system | |
CN109559355A (en) | A kind of polyphaser global calibration device and method without public view field based on phase unit | |
CN108259753A (en) | A kind of camera auto-focusing method and device that climbing method is improved based on defocus estimation | |
CN112949478A (en) | Target detection method based on holder camera | |
CN106355597B (en) | Steel plate dog-ear automatic measurement machine people's image processing method based on monocular vision | |
CN105701809B (en) | A kind of method for correcting flat field based on line-scan digital camera scanning | |
CN111292369B (en) | False point cloud data generation method of laser radar | |
CN108665436B (en) | Multi-focus image fusion method and system based on gray mean reference | |
CN111354047B (en) | Computer vision-based camera module positioning method and system | |
CN113923358A (en) | Online automatic focusing method and system in flying shooting mode | |
CN109001902B (en) | Microscope focusing method based on image fusion | |
CN113593035A (en) | Motion control decision generation method and device, electronic equipment and storage medium | |
CN106154688A (en) | A kind of method and device of auto-focusing | |
CN105115443B (en) | The full visual angle high precision three-dimensional measurement method of level of view-based access control model e measurement technology | |
CN108344741B (en) | Automatic focal length identification and control method applied to automatic coal rock detection | |
CN106973199A (en) | The many aperture camera systems for improving depth accuracy are scanned using focal distance | |
CN104614372B (en) | Detection method of solar silicon wafer | |
CN109671059A (en) | A kind of battery case image processing method and system based on OpenCV | |
CN109658441A (en) | Foreground detection method and device based on depth information | |
CN109318235B (en) | Quick focusing method of robot vision servo system | |
CN116912715A (en) | Unmanned aerial vehicle vision servo control method and system for fan blade inspection |
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 | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20210409 Address after: No. 261, Yueling Road, Lishan District, Anshan City, Liaoning Province Patentee after: Liaoning Tuotai Intelligent Technology Co.,Ltd. Address before: 114051 no.1-271 Lincheng street, high tech Zone, Anshan City, Liaoning Province Patentee before: LIAONING XIANGSHUN TECHNOLOGY Co.,Ltd. |