A method and device for identifying ore images based on color feature filtering
By using a method based on color feature filtering to identify ore images, the problem of misidentification of ore and background gaps is solved, high-accuracy ore identification is achieved, and the automatic crushing efficiency of the breaker is improved.
Patent Information
- Application Number
- CN202211646698.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-21
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2042-12-21
AI Technical Summary
In ore crushing operations, it is difficult for the existing technology to accurately identify the gap between the ore and its background, resulting in identification errors and affecting the automated crushing efficiency of the breaker.
The ore image recognition method based on color feature filtering is used to define the ore through the pre-established ore color feature information library, determine the RGB color feature filter function, perform ambient light correction and filtering on the ore image, and isolate and remove the background. and gaps to improve recognition accuracy.
It effectively reduces the misrecognition rate of ore recognition and improves the efficiency of ore image recognition. The misrecognition rate is reduced from 10% to 2%, and the recognition pass rate is increased by nearly 80%.
Smart Images

Figure CN116229108B
Abstract
Description
Technical Field
[0001] The invention relates to the field of ore image recognition, and in particular to an ore image recognition method based on color feature filtering and a device thereof. Background Art
[0002] In the ore crushing operation, in order to realize the demand of automatic crushing of ore by the breaker, identifying the ore to be crushed is the most important link. Only by accurately identifying the ore to be crushed can the breaker be smoothly guided to crush the ore and complete the automated construction.
[0003] Taking the intelligent excavator as an example, when the excavator is working in an unmanned state, the ore of the operating target is identified through the visual system composed of a camera and an image processor on the excavator for proprietary operating conditions such as ore crushing. Ore identification must meet the identification requirements of clearly marking the ore and the ore working surface. The identification is carried out by extracting the feature contour of the identification object. In the actual identification process, the ore image is binarized, the image is sharpened by corrosion, expansion and other methods, and the contour is obtained by setting the grayscale threshold. Filtering, denoising and other methods are also usually used in the processing process to obtain the contour features of the identification target. In this identification process, the ore background and the gaps between the ores will also be closed into contours and cut into independent surfaces, which are mistaken for the ore surface, resulting in recognition errors. Summary of the invention
[0004] In order to prevent the ore background and the gaps between ores from being misidentified and to improve the accuracy of ore identification, one aspect of the present invention provides an ore image recognition method based on color feature filtering, comprising: defining the ore in the ore image to be identified according to a pre-established ore color feature information library to define the color feature class to which the ore belongs; determining the RGB color feature filtering function corresponding to the ore according to the ore definition result; performing ambient light correction processing on the brightness of the ore image to unify the ore image to a standard sampling brightness; and filtering the ore image after ambient light correction to separate the ore from the background and the gaps between ores.
[0005] Preferably, the RGB color feature filtering function is expressed as ; Among them A i is the color feature class to which the ore belongs, "1" corresponds to the pixel position of the ore image, and the original pixel position remains unchanged; K is the filtering factor corresponding to R red, G green, and B blue respectively.
[0006] Preferably, the brightness of the ore image is subjected to ambient light correction processing, including: performing ambient light correction processing on the brightness of the ore image according to an RGB function; wherein the RGB function Mo of the ore image before correction is expressed as ; are the brightness values corresponding to the red, green, and blue of the x pixel respectively; x = (i, j) is the pixel position, and the domain consists of all pixel positions of the ore image; where the modified ore image RGB function Mt is expressed as: ;in, ; α is the gain correction number, γ is the deviation correction number; the values of α and γ are dynamically obtained by comparing the ore image with the standard ambient light image.
[0007] Preferably, filtering the ore image after ambient light correction includes: assuming that the ore pixel function of the ore image is , the non-ore pixel function is the complement of the ore pixel function ; x=(i, j) is the pixel position, M=(u, v, w) is the RGB brightness value of the ore image; where, ; After non-ore pixel function Calculation, non-ore pixels are all set to 1 and displayed in white; ore pixels are the complement of non-ore pixels, and the non-ore pixels after filtering are eliminated to obtain the ore pixel function result.
[0008] Preferably, the method further comprises: performing one or more processing operations including graying, binarization, dilation and erosion on the filtered ore image to obtain the ore contour.
[0009] In order to avoid the ore background and the gaps between ores from being misidentified and to improve the accuracy of ore identification, one aspect of the present invention provides an ore image recognition device based on color feature filtering, comprising: an ore definition module, configured to define the ore in the ore image to be identified according to a pre-established ore color feature information library, so as to define the color feature class to which the ore belongs; an RGB color feature filtering function determination module, configured to determine the RGB color feature filtering function corresponding to the ore according to the ore definition result; an ambient light correction module, configured to perform ambient light correction processing on the brightness of the ore image to unify the ore image to a standard sampling brightness; and an image filtering module, configured to filter the ore image after ambient light correction to separate the ore from the background and the gaps between ores.
[0010] Preferably, the RGB color feature filtering function is expressed as ; Among them A iis the color feature class to which the ore belongs, "1" corresponds to the pixel position of the ore image, and the original pixel position remains unchanged; K is the filtering factor corresponding to R red, G green, and B blue respectively.
[0011] Preferably, the ambient light correction module is further configured to perform ambient light correction processing on the brightness of the ore image according to an RGB function; wherein the RGB function Mo of the ore image before correction is expressed as: ; are the brightness values corresponding to the red, green, and blue of the x pixel respectively; x = (i, j) is the pixel position, and the domain consists of all pixel positions of the ore image; where the modified ore image RGB function Mt is expressed as: ;in, ; α is the gain correction number, γ is the deviation correction number; the values of α and γ are dynamically obtained by comparing the ore image with the standard ambient light image.
[0012] Preferably, the image filtering module is further configured as follows: assuming that the ore pixel function of the ore image is , the non-ore pixel function is the complement of the ore pixel function ; x=(i, j) is the pixel position, M=(u, v, w) is the RGB brightness value of the ore image; where, ; After non-ore pixel function Calculation, non-ore pixels are all set to 1 and displayed in white; ore pixels are the complement of non-ore pixels, and the non-ore pixels after filtering are eliminated to obtain the ore pixel function result.
[0013] Preferably, the device further comprises: an image post-processing module configured to perform one or more processing operations including graying, binarization, dilation and erosion on the ore image after filtering to obtain the ore contour.
[0014] The present invention defines the ore type of the target object in the target image according to the color feature, performs filtering of the RGB color feature operator during the recognition process, and then isolates and removes the background according to the features of the target object, thereby achieving the purpose of preventing the ore background and the gap between the ore from being misidentified. The misidentification rate of ore identification is effectively reduced, and the efficiency of ore image recognition is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0016] Figure 1 The figure shows a schematic flow chart of a method for identifying an ore image provided by one embodiment of the present invention;
[0017] Figure 2 The figure shows a schematic diagram of a mineral image filtering process provided by one embodiment of the present invention;
[0018] Figure 3 (a) is a schematic diagram showing a mineral image before pixel points are filtered according to one embodiment of the present invention; (b) is a schematic diagram showing a mineral image after pixel points are filtered according to one embodiment of the present invention;
[0019] Figure 4 (a) is a schematic diagram showing an ore image before filtering provided by one embodiment of the present invention; (b) is a schematic diagram showing an ore image after filtering provided by one embodiment of the present invention;
[0020] Figure 5 , 6 7 and 8 respectively show the structural schematic diagrams of the ore image recognition device provided by one embodiment of the present invention;
[0021] Figure 8 Shown is a schematic diagram of the structure of a computer-readable storage medium provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0022] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0023] One aspect of the present invention provides an ore image recognition method based on color feature filtering, which is preferably used to identify ore to be crushed in ore crushing operations, and can also be used to identify ore in other uses. The ore crushing operation described is, for example, an automated ore crushing operation performed by an excavator breaker, and of course, it can also be other engineering machinery, that is, in actual applications, the method can be applied to other engineering machinery that can also perform ore crushing operations, which should also fall within the scope of the present invention.
[0024] In some embodiments, the method at least comprises S101 to S104. Figure 1 , 2 Description The composition of S101 to S104 is further described by way of example.
[0025] S101, defining the ore in the ore image to be identified according to a pre-established ore color feature information database, so as to define the color feature class to which the ore belongs.
[0026] It should be understood that the described ore image does not mean that only ore exists in the image, but that the image contains ore, the image elements are composed of ore and background, and one ore image may contain several ores.
[0027] The ore color feature information database is established based on the ore color features of pure ore images without environmental factors. The ore color feature information database defines ores with special color features as A1, A2, ...A n Color feature class. It should be understood that the color features of the ore in the library correspond to the types of ore. For example, the color of chalcopyrite ore is usually yellow or bronze yellow, so the chalcopyrite ore can be corresponding to the brass color. For example, chrome lead ore has a bright red color, so the chrome lead ore can be corresponding to red. For example, sapphire is generally blue, so the sapphire can be corresponding to blue... For an ore with multiple colors, the multiple colors it has can constitute the color features of the ore.
[0028] When defining the ore in the ore image to be identified, the image information of the ore definition is read, and the ore is defined as a certain color feature type ore A through comparison and confirmation with the ore color feature information library. i Among them, the ore definition requires that the ore filling rate of the image is above 80%, that is, more than 80% of the image is covered by ore.
[0029] S102: Determine an RGB color feature filtering function corresponding to the ore according to the ore definition result.
[0030] It should be understood that different color feature classes correspond to different RGB color feature filtering functions. After determining the color feature class corresponding to the ore in the ore image according to the ore definition result, the RGB color feature filtering function corresponding to the ore can be further determined.
[0031] Among them, the RGB color feature filtering function is expressed as ; Among them A iis the color feature class to which the ore belongs, "1" corresponds to the pixel position of the ore image, and the original pixel position remains unchanged; K is the filtering factor corresponding to R red, G green, and B blue respectively.
[0032] S103, performing ambient light correction processing on the brightness of the ore image to unify the ore image to a standard sampling brightness.
[0033] Since the sampling images of the ore color feature information library are taken under a uniform ambient brightness, and are limited by the current shooting environment of the ore image to be identified, its ambient brightness is different from that of the sampling images in the library, resulting in deviations in the reference conditions. Therefore, it is necessary to correct the brightness of the ore image for ambient light so that it is consistent with the brightness of the sampling images in the library, that is, to unify the ore image to a standard sampling brightness. It should be understood that the standard sampling brightness described refers to the sampling brightness of the sampling image in the library.
[0034] When the brightness of the ore image is subjected to ambient light correction processing, the brightness of the ore image is subjected to ambient light correction processing specifically according to the RGB function.
[0035] Among them, the RGB function Mo of the ore image before correction is expressed as ; are the corresponding brightness values of R red, G green, and B blue of the pixel point x; x=(i, j) is the pixel position, and the definition domain consists of all pixel positions of the ore image.
[0036] Among them, the corrected ore image RGB function Mt is expressed as: ;
[0037] in, ; α is the gain correction number, γ is the deviation correction number; the values of α and γ are dynamically obtained by comparing the ore image with the standard ambient light image, and have an adaptive effect on the ore image under different light intensities.
[0038] S104, filtering the ore image after ambient light correction to separate the ore from the background and the gaps between the ores.
[0039] Specifically, the ore pixel function of the ore image after ambient light correction is assumed to be , the non-ore pixel function is the complement of the ore pixel function ; x=(i, j) is the pixel position, M=(u, v, w) is the RGB brightness value of the ore image.
[0040] in, ; After non-ore pixel function Calculation, non-ore pixels are all set to 1 and displayed in white; ore pixels are the complement of non-ore pixels, and the non-ore pixels after filtering are eliminated to obtain the ore pixel function result.
[0041] refer to Figure 3 As shown, after filtering, pixels 1, 2, 3, 4, 5, 6, and 8 of pixels 1-9 presented in (a) are confirmed as non-ore pixels and are eliminated, while pixels 7 and 9 are confirmed as ore pixels and are retained, thus finally forming (b).
[0042] refer to Figure 4 As shown, before filtering, as shown in (a), the elements in the ore image include several ores and the background; after filtering, as shown in (b), the background in the ore image and the gaps between the ores are removed, leaving only the ore, thereby separating the ore from the background and the gaps between the ores.
[0043] It should be understood that, limited by the ore image information, the present invention uses ore color information as the entry dimension and defines the ore method according to the ore color characteristics. In order to remove the influence of different ambient light on the collected image information, the present invention uses dynamic gain correction parameters and deviation correction parameters to unify the ambient light intensity of the identified target image (ore image). And according to the unique color characteristics of the ore, the ore RGB color feature operator is established to filter non-ore pixels.
[0044] The present invention defines the ore type of the target object in the target image according to the color feature, performs filtering of the RGB color feature operator during the recognition process, and then isolates and removes the background according to the features of the target object, thereby achieving the purpose of preventing the ore background and the gaps between ores from being misidentified. The misidentification rate of ore identification is effectively reduced, and the efficiency of ore image recognition is improved.
[0045] At present, the construction of the ore color feature information database for commonly used ore crushing conditions has been basically completed. It can basically accurately define a certain ore based on the image information of the ore definition, and select the corresponding ore RGB color feature filtering function.
[0046] The present invention can effectively reduce the error rate of ore image recognition. The error rate is about 10% when the description method is not used, and about 2% when the description method is used, which is an increase of nearly 80%. It is applied in actual ore identification, which improves the ore identification pass rate and the efficiency of ore image recognition.
[0047] In some embodiments, after the ore image is filtered, subsequent image processing is performed on the ore image, which is specifically embodied in that the ore image after the filtering process is One or more processing operations including graying, binarization, dilation, and corrosion are performed to obtain the ore outline.
[0048] It should be understood that the above-described post-processing operation corresponds to all operations for identifying ore images in the prior art, which also leads to the defects described in the background technology - in this identification process, the ore background and the gaps between the ores will also be closed into contours and cut into independent surfaces, which are mistaken for the ore surface, causing identification errors. However, since the above-mentioned post-processing operation of the present application is performed after the filtration processing of the ore image is completed, the above-mentioned defects can be effectively avoided, thereby preventing the ore background and the gaps between the ores from being misidentified, and improving the accuracy of ore identification.
[0049] refer to Figure 5 As shown, one aspect of the present invention provides a mineral image recognition device based on color feature filtering, the device comprising:
[0050] The ore definition module 201 is configured to perform ore definition on the ore in the ore image to be identified according to a pre-established ore color feature information library, so as to define the color feature class to which the ore belongs.
[0051] The RGB color feature filtering function determination module 202 is configured to determine the RGB color feature filtering function corresponding to the ore according to the ore definition result.
[0052] The ambient light correction module 203 is configured to perform ambient light correction processing on the brightness of the ore image to unify the ore image to a standard sampling brightness.
[0053] The image filtering module 204 is configured to perform filtering processing on the ore image after ambient light correction to separate the ore from the background and the gaps between the ores.
[0054] In some embodiments, the RGB color feature filtering function is expressed as ; Among them A i is the color feature class to which the ore belongs, "1" corresponds to the pixel position of the ore image, and the original pixel position remains unchanged; K is the filtering factor corresponding to R red, G green, and B blue respectively.
[0055] In some embodiments, the ambient light correction module 203 is further configured to perform ambient light correction processing on the brightness of the ore image according to an RGB function;
[0056] Among them, the RGB function Mo of the ore image before correction is expressed as ; are the brightness values corresponding to the red, green, and blue of the pixel point x; x = (i, j) is the pixel position, and the domain consists of all pixel positions of the ore image;
[0057] Among them, the corrected ore image RGB function Mt is expressed as: ;
[0058] in, ; α is the gain correction number, γ is the deviation correction number; the values of α and γ are dynamically obtained by comparing the ore image with the standard ambient light image.
[0059] In some embodiments, the image filtering module 204 is further configured to:
[0060] Assume that the ore pixel function of the ore image is , the non-ore pixel function is the complement of the ore pixel function ; x=(i, j)is the pixel position, M=(u, v, w)is the RGB brightness value of the ore image;
[0061] in, ;
[0062] After non-ore pixel function Calculation, non-ore pixels are all set to 1 and displayed in white; ore pixels are the complement of non-ore pixels, and the non-ore pixels after filtering are eliminated to obtain the ore pixel function result.
[0063] In some embodiments, reference Figure 6 As shown, the device further includes: an image post-processing module 205, which is configured to perform one or more processing operations including graying, binarization, dilation, and corrosion on the ore image after filtering to obtain the ore contour.
[0064] refer to Figure 7 As shown, one aspect of the present invention provides a mineral image recognition device based on color feature filtering, comprising: a memory 301 and a processor 302, the memory 301 is used to store a computer program, and the processor 302 is used to call the computer program to execute the corresponding steps of a mineral image recognition method based on color feature filtering provided in an embodiment of the present invention.
[0065] refer to Figure 8 As shown, one aspect of the present invention provides a computer-readable storage medium, in which a computer program is stored. When the computer program is run on a computer, the corresponding steps of a mineral image recognition method based on color feature filtering provided by an embodiment of the present invention are executed.
[0066] The computer readable storage medium includes a computer program for executing a computer process on a computing device. In some embodiments, the computer readable storage medium is provided using a signal bearing medium 401. The signal bearing medium 401 may include one or more program instructions, which when executed by one or more processors may provide the above Figure 1-2 Thus, for example, one or more features of a method for identifying an ore image based on color feature filtering may be performed by one or more instructions associated with the signal bearing medium 401. In addition, Figure 8 The program instructions in also describe example instructions. In some examples, the signal bearing medium 401 may include a computer readable medium 402, such as, but not limited to, a hard drive, a compact disk (CD), a digital video disk (DVD), a digital tape, a memory, a read-only memory (ROM) or a random access memory (RAM), and the like.
[0067] In some implementations, signal bearing medium 401 may include computer recordable medium 403 such as, but not limited to, memory, read / write (R / W) CD, R / W DVD, and the like.
[0068] In some implementations, signal bearing medium 401 may include communication medium 404 such as, but not limited to, digital and / or analog communication media (eg, fiber optic cables, waveguides, wired communication links, wireless communication links, etc.).
[0069] The signal bearing medium 401 may be communicated by a wireless form of communication medium 404 (eg, a wireless communication medium complying with the IEEE 802.11 standard or other transmission protocols). The one or more program instructions may be, for example, computer executable instructions or logic implemented instructions.
[0070] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0071] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.
[0072] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A method for identifying mineral images based on color feature filtering. It is characterized in that The method comprises: Defining the ore in the ore image to be identified according to a pre-established ore color feature information database to define the color feature class to which the ore belongs; Determine an RGB color feature filtering function corresponding to the ore according to the ore definition result; Performing ambient light correction processing on the brightness of the ore image to unify the ore image to a standard sampling brightness; and The ore image after ambient light correction is filtered to separate the ore from the background and the gaps between the ore.
2. The ore image recognition method according to claim 1, It is characterized in that The RGB color feature filtering function is expressed as ; Among them A i is the color feature class to which the ore belongs, "1" corresponds to the pixel position of the ore image, and the original pixel position remains unchanged; K is the filtering factor corresponding to R red, G green, and B blue respectively.
3. The ore image recognition method according to claim 2, It is characterized in that Performing ambient light correction processing on the brightness of the ore image includes: Performing ambient light correction processing on the brightness of the ore image according to the RGB function; Among them, the RGB function Mo of the ore image before correction is expressed as ; are the brightness values corresponding to the red, green, and blue of the pixel point x; x = (i, j) is the pixel position, and the domain consists of all pixel positions of the ore image; Among them, the corrected ore image RGB function Mt is expressed as: ; in, ; α is the gain correction number, γ is the deviation correction number; the values of α and γ are dynamically obtained by comparing the ore image with the standard ambient light image.
4. The ore image recognition method according to claim 3, It is characterized in that The ore image after the ambient light correction is subjected to filtering processing, including: Assume that the ore pixel function of the ore image is , the non-ore pixel function is the complement of the ore pixel function ; x=(i,j)is the pixel position, M=(u,v,w)is the RGB brightness value of the ore image; in, ; After non-ore pixel function Calculation, non-ore pixels are all set to 1 and displayed in white; ore pixels are the complement of non-ore pixels, and the non-ore pixels after filtering are eliminated to obtain the ore pixel function result.
5. The ore image recognition method according to any one of claims 1 to 4, It is characterized in that The method further comprises: The filtered ore image is subjected to one or more processing operations including graying, binarization, dilation, and erosion to obtain the ore contour.
6. A mineral image recognition device based on color feature filtering, It is characterized in that The device comprises: An ore definition module is configured to perform ore definition on the ore in the ore image to be identified according to a pre-established ore color feature information library, so as to define the color feature class to which the ore belongs; An RGB color feature filtering function determination module is configured to determine an RGB color feature filtering function corresponding to the ore according to the ore definition result; an ambient light correction module, configured to perform ambient light correction processing on the brightness of the ore image to unify the ore image to a standard sampling brightness; and The image filtering module is configured to perform filtering processing on the ore image after ambient light correction to separate the ore from the background and the gaps between the ores.
7. The ore image recognition device according to claim 6, It is characterized in that The RGB color feature filtering function is expressed as ; Among them A i is the color feature class to which the ore belongs, "1" corresponds to the pixel position of the ore image, and the original pixel position remains unchanged; K is the filtering factor corresponding to R red, G green, and B blue respectively.
8. The ore image recognition device according to claim 7, It is characterized in that The ambient light correction module is further configured to perform ambient light correction processing on the brightness of the ore image according to an RGB function; Among them, the RGB function Mo of the ore image before correction is expressed as ; are the brightness values corresponding to the red, green, and blue of the pixel point x; x = (i, j) is the pixel position, and the domain consists of all pixel positions of the ore image; Among them, the corrected ore image RGB function Mt is expressed as: ; in, ; α is the gain correction number, γ is the deviation correction number; the values of α and γ are dynamically obtained by comparing the ore image with the standard ambient light image.
9. The ore image recognition device according to claim 7, It is characterized in that The image filtering module is further configured as follows: Assume that the ore pixel function of the ore image is , the non-ore pixel function is the complement of the ore pixel function ; x=(i,j)is the pixel position, M=(u,v,w)is the RGB brightness value of the ore image; in, ; After non-ore pixel function Calculation, non-ore pixels are all set to 1 and displayed in white; ore pixels are the complement of non-ore pixels, and the non-ore pixels after filtering are eliminated to obtain the ore pixel function result.
10. The ore image recognition device according to any one of claims 6 to 9, It is characterized in that The device also includes: The image post-processing module is configured to perform one or more processing operations including graying, binarization, dilation, and erosion on the ore image after filtering to obtain the ore outline.
