Bone / filler grading intelligent detection method and system, and device under non-uniform illumination conditions
By acquiring bone/filler images against a red background, eliminating shadows using grayscale transformation and binarization algorithms, and combining connected component algorithms and neural network models, accurate detection of bone/filler gradation under uneven lighting conditions was achieved, solving the problems of low detection accuracy and insufficient real-time performance in existing technologies.
Patent Information
- Application Number
- CN202411825560.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2044-12-12
AI Technical Summary
Existing bone/filler gradation testing technologies are not accurate enough under uneven lighting conditions, making it difficult to achieve real-time online monitoring. They are also severely affected by shadows, failing to meet the industry's demand for efficient and accurate testing.
By employing image acquisition against a red background, grayscale transformation based on subtracting the pixel values of the blue and green channels from the red channel, binarization using the maximum inter-class variance method, feature extraction using the connected component algorithm, and neural network model training, the influence of shadows is eliminated, achieving accurate particle size detection.
Precise detection of bone/filler gradation was achieved under uneven illumination conditions, improving the accuracy and efficiency of detection and meeting the needs of real-time industrial monitoring.
Smart Images

Figure CN119693341B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent manufacturing technology, and in particular to an intelligent detection method, system, and equipment for bone / filler gradation under non-uniform illumination conditions. Background Technology
[0002] In the railway / road construction sector, aggregates / fillers are a major component of important building materials such as concrete and roadbeds, and their gradation characteristics directly affect the performance and durability of the final product. Traditional methods for aggregate / filler gradation testing typically rely on manual sampling and sieving analysis in laboratories. While these methods offer high accuracy, they suffer from drawbacks such as being time-consuming, costly, and difficult to implement in real-time online monitoring. With technological advancements, non-contact aggregate / filler gradation testing technology has gradually become a research hotspot. However, existing non-contact testing solutions are often significantly affected by environmental factors such as lighting conditions, especially in outdoor applications where changes in natural light create shadows, thus affecting the accurate identification of aggregate / filler particle sizes. Furthermore, existing solutions still fall short in handling complex backgrounds and variable environmental conditions, failing to meet the industry's demands for efficient, accurate, and real-time monitoring. Summary of the Invention
[0003] This invention provides a method, system, and device for intelligent detection of bone / filler gradation under uneven lighting conditions, which solves the defects of existing technologies that cannot detect bone / filler gradation in a timely manner, resulting in low production efficiency and low accuracy of bone / filler gradation. Furthermore, it can eliminate the influence of bone / filler shadows under uneven lighting conditions to achieve accurate intelligent detection.
[0004] This invention provides an intelligent detection method for bone / filler gradation under non-uniform illumination conditions, comprising:
[0005] Acquire bone / filler images against a red background;
[0006] The pixel values of the bone / filler grayscale image are determined by subtracting the larger value from the blue and green channels at the corresponding position from each pixel value of the red channel of the bone / filler image.
[0007] The grayscale image of bone / filler is binarized based on the maximum inter-class variance method to determine the binarized image with the bone / filler shadow removed.
[0008] Based on the connected component algorithm, each bone / filler is extracted from the binarized image, and the area, perimeter, inscribed circle radius, and major and minor axis sizes of the circumscribed ellipse of each bone / filler are determined.
[0009] The area, perimeter, inscribed circle radius, and major and minor axes of the circumscribed ellipse of each bone / filler are input into a pre-built neural network model to determine the particle size of each bone / filler, thus completing the bone / filler gradation detection.
[0010] The intelligent detection method for bone / filler gradation under non-uniform illumination conditions provided by the present invention includes, in the step of determining the particle size of each bone / filler and completing the bone / filler gradation detection, the following steps are taken:
[0011] The gradation curve of the current bone / filler is generated based on the particle size of each bone / filler output by the neural network model.
[0012] According to the intelligent detection method for bone / filler gradation under non-uniform illumination conditions provided by the present invention, the neural network model is trained in the following manner:
[0013] Using the area, perimeter, inscribed circle radius, and major and minor axis sizes of the circumscribed ellipse of different bone / filler as input parameters and particle size as output parameters, a neural network model dataset is constructed.
[0014] The neural network model is obtained by training the dataset pair of the neural network model.
[0015] According to the intelligent detection method for bone / filler gradation under non-uniform illumination conditions provided by the present invention, the determination of the pixel value of the bone / filler grayscale image based on subtracting the larger value of the blue and green channels at the corresponding position from each pixel value of the red channel of the bone / filler image includes:
[0016] Extract the red, blue, and green channel pixel values of the bone / filler image against a red background, respectively.
[0017] Based on formula (1), the red channel pixel values, blue channel pixel values, and green channel pixel values of the bone / filler image against a red background are transformed:
[0018] Image_new=max(0,R-max(G,B))(1)
[0019] Where R represents the pixel value of the red channel of the bone / filler image, G represents the pixel value of the green channel of the bone / filler image, B represents the pixel value of the blue channel of the bone / filler image, max(G,B) represents the larger value between the green and blue channels, R-max(G,B) calculates the difference between the red channel value and the larger value between the green and blue channels, max(0,R-max(G,B)) ensures that the calculation result is not negative. If the result of R-max(G,B) is less than 0, output 0; otherwise, output the result of R-max(G,B). Image_new represents the pixel value of the grayscale image of the bone / filler.
[0020] The intelligent detection method for bone / filler gradation under non-uniform illumination conditions provided by the present invention includes, in the step of binarizing the grayscale image of bone / filler based on the maximum inter-class variance method to determine the binarized image with bone / filler shadows removed, the method comprising:
[0021] Based on the histogram of the bone / filler grayscale image, the minimum value between the two peaks of the bone / filler and the background is found as a threshold. Based on the threshold, the image is divided into two parts: bone / filler and background, so as to separate the bone / filler and the background.
[0022] The erosion operation is used to reduce noise points, and the dilation operation is used to fill the small holes inside the bone / filler. The opening operation is used to remove small noise and smooth the boundary of the bone / filler by first eroding and then dilating. The closing operation is used to fill the small holes inside the bone / filler by first dilating and then eroding, resulting in a binarized image with the bone / filler shadows removed.
[0023] According to the intelligent detection method for bone / filler gradation under non-uniform illumination conditions provided by the present invention, the step of extracting each bone / filler from the binarized image based on the connected component algorithm, and determining the area, perimeter, inscribed circle radius, and major and minor axis sizes of the circumscribed ellipse of each bone / filler includes:
[0024] By labeling the connected components of the bone / filler grayscale image, a unique label is assigned to each connected region, and the area, perimeter, inscribed circle radius, and major and minor axis sizes of the circumscribed ellipse of each connected region are obtained.
[0025] This invention also provides an intelligent detection system for bone / filler gradation under non-uniform illumination conditions, comprising:
[0026] The acquisition module is used to acquire bone / filler images against a red background;
[0027] The first determining module is used to subtract the larger value between the blue and green channels at the corresponding position from each pixel value of the red channel to obtain the pixel value of the bone / filler grayscale image;
[0028] The second determination module is used to binarize the bone / filler grayscale image using the maximum inter-class variance method, and determine the bone / filler grayscale image with the bone / filler shadow removed.
[0029] The third determination module is used to extract each bone / filler in the binary image based on the connected component algorithm, and determine the area, perimeter, inscribed circle radius, and major and minor axis sizes of the circumscribed ellipse of each bone / filler.
[0030] The fourth determination module, based on a pre-built neural network model, determines the particle size of each bone / filler and completes intelligent detection of bone / filler gradation.
[0031] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements any of the above-described intelligent detection methods for bone / filler gradation under non-uniform illumination conditions.
[0032] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described intelligent detection methods for bone / filler gradation under non-uniform illumination conditions.
[0033] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements any of the above-described intelligent detection methods for bone / filler gradation under non-uniform illumination conditions.
[0034] The intelligent detection method for bone / filler gradation under uneven lighting conditions provided by this invention involves taking a bone / filler image captured by a camera against a red background, subtracting the larger value from the corresponding blue and green channels from each pixel value in the red channel, and using this as the pixel value of the bone / filler grayscale image. The pixel values of the bone / filler image are then binarized using the maximum inter-class variance method to obtain a bone / filler grayscale image without shadows. A connected component algorithm is then used to isolate individual bone / filler particles, calculating their area, perimeter, inscribed circle radius, and the major and minor axes of the circumscribed ellipse. These parameters are then input into a pre-constructed neural network model, which outputs the bone / filler particle size, thus completing the intelligent detection of bone / filler gradation. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0036] Figure 1 This is a schematic flowchart of an intelligent detection method for bone / filler gradation under non-uniform illumination conditions provided by an embodiment of the present invention;
[0037] Figure 2 This is a schematic diagram of a bone / filler image with shadow removal provided in an embodiment of the present invention;
[0038] Figure 3 This is a schematic diagram of the gradation curve provided in an embodiment of the present invention;
[0039] Figure 4This is a schematic diagram of the structure of an intelligent detection system for bone / filler gradation under non-uniform illumination conditions provided in an embodiment of the present invention;
[0040] Figure 5 This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation
[0041] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0042] Figure 1 This is a flowchart illustrating the intelligent detection method provided in an embodiment of the present invention.
[0043] like Figure 1 As shown, this embodiment provides a smart detection method for bone / filler gradation under non-uniform illumination conditions, including:
[0044] Step 101: Acquire bone / filler images against a red background.
[0045] Step 102: Based on each pixel value of the red channel of the bone / filler image, subtract the larger value from the blue and green channels at the corresponding position to determine the pixel value of the grayscale image of the bone / filler.
[0046] Step 103: Binarize the bone / filler grayscale image based on the maximum inter-class variance method to determine the binarized image with bone / filler shadows removed.
[0047] Step 104: Based on the connected component algorithm, extract each bone / filler from the binarized image and determine the area, perimeter, inscribed circle radius, and major and minor axis sizes of the circumscribed ellipse for each bone / filler.
[0048] Step 105: Input the area, perimeter, inscribed circle radius, and major and minor axis of the circumscribed ellipse of each bone / filler into the pre-built neural network model to determine the particle size of each bone / filler and complete the bone / filler gradation detection.
[0049] Bone / filler refers to granular materials that serve as a skeleton and filler in concrete and mortar.
[0050] The gradation of aggregates / fillers refers to the way in which various sizes of aggregates / fillers are mixed and matched in a certain proportion.
[0051] Bone / filler shadow refers to the shadow cast on the background by the bone / filler under uneven lighting conditions. In this embodiment, it is assumed that the uneven lighting conditions are met and that the bone / filler will cast a significant shadow.
[0052] Figure 2 This is a schematic diagram of the bone / filler image recognition process provided in an embodiment of the present invention.
[0053] like Figure 2 As shown, in practical applications, after acquiring bone / filler images against a red background, the pixel values of the bone / filler grayscale image are determined by subtracting the larger value from the blue and green channels at the corresponding positions from each pixel value of the red channel of the bone / filler image. This makes the distinction between bone / filler and bone / filler shadows more obvious. Then, the bone / filler grayscale image is binarized using the maximum inter-class variance method to eliminate bone / filler shadows.
[0054] Figure 3 This is a schematic diagram of the gradation curve provided in an embodiment of the present invention.
[0055] like Figure 3 As shown, in practical applications, after determining the equivalent particle size of each bone / filler, a gradation curve can be generated based on the equivalent particle size of each bone / filler. The gradation curve can be used to characterize the gradation of the bone / filler.
[0056] in Figure 3 The provided data is the gradation curve for 5mm-20mm bone / filler under standard conditions.
[0057] In the intelligent detection method for bone / filler gradation under uneven lighting conditions provided in this embodiment, the bone / filler under a red background is first captured by a camera. The larger value in the blue and green channels at the corresponding position is subtracted from the pixel value of each pixel in the red channel of the bone / filler image to determine the pixel value of the grayscale image of the bone / filler. Then, the grayscale image of the bone / filler is binarized by the maximum inter-class variance method to determine the binarized image with the shadows of the bone / filler removed. Each bone / filler in the binarized image is isolated by the connected component algorithm to determine the area, perimeter, inscribed circle radius, and major and minor axis of the circumscribed ellipse of each bone / filler. Based on the area, perimeter, inscribed circle radius, and major and minor axis of the circumscribed ellipse of each bone / filler, a pre-constructed neural network model is input to determine the particle size of each bone / filler, thus completing the bone / filler gradation detection.
[0058] In an exemplary embodiment, the camera is parallel to the bone / filler plane, and the distance between the camera and the bone / filler plane remains constant.
[0059] In the exemplary embodiment, the neural network model is trained in the following manner:
[0060] A neural network model dataset is constructed based on the area, perimeter, inscribed circle radius, and major and minor axis sizes of the circumscribed ellipse of different bone / filler as input parameters and particle size as output parameter.
[0061] The neural network model is obtained by training the dataset pair of the neural network model.
[0062] In practical applications, the training set can be trained using the Tensorflow deep learning framework combined with the MLP neural network structure, which can improve the accuracy of the semantic segmentation model obtained from the training.
[0063] In an exemplary embodiment, determining the area, perimeter, inscribed circle radius, and major and minor axes of the circumscribed ellipse for each bone / filler includes:
[0064] In a Python program, the findContours module from the OpenCV library is used to extract the bone / filler contours from the binarized image. Then, based on the bone / filler contours, the contourArea module from the OpenCV library is used to calculate the area S of each bone / filler contour. pixel The perimeter L of each bone / filler contour is calculated using the arcLength module in the OpenCV software library. pixel The major and minor axes a and b of the minimum circumscribed ellipse for each bone / filler are calculated using the cv2.fitEllipse module, and the radius r of the inscribed circle for each bone / filler is calculated using the cv2.minEnclosingCircle module.
[0065] In an exemplary embodiment, a neural network model dataset is constructed based on the area, perimeter, inscribed circle radius, and major and minor axes of the circumscribed ellipse of different bone / filler materials as input parameters, and particle size as the output parameter. The dataset includes:
[0066] Acquire images of bone / filler particles of different sizes;
[0067] Subtract the larger value from the blue and green channels at the corresponding position from the pixel value of the red channel of the bone / filler image to determine the pixel value of the grayscale image of the bone / filler. Binarize the grayscale image of the bone / filler based on the Otsu's method to determine the binarized image with the bone / filler shadow removed. Based on the connected component algorithm, isolate each bone / filler in the binarized image. Determine the area, perimeter, inscribed circle radius, and major and minor axis sizes of the circumscribed ellipse of each bone / filler as input parameters for the dataset.
[0068] The actual particle size of each bone / filler was detected by sieving and used as the output parameter of the dataset.
[0069] Furthermore, the dataset will be divided into a training set, a validation set, and a test set. The training set can be used to train the neural network model based on the neural network dataset, and the validation set and test set can be used to validate and test the trained neural network model.
[0070] In the exemplary embodiment, the particle size of each bone / filler is determined, and the bone / filler gradation test is completed in the following manner:
[0071] The area, perimeter, inscribed circle radius, and major and minor axis sizes of the circumscribed ellipse of each bone / filler are input into a pre-built MLP neural network model, which outputs the particle size of each bone / filler and generates the gradation curve of the bone / filler.
[0072] In an exemplary embodiment, the larger value in the blue and green channels at the corresponding location is subtracted from each pixel value in the red channel, which is not based on the bone / filler image, and determined as follows:
[0073] In a Python program, the red, blue, and green channel pixel values of a bone / filler image against a red background are extracted using the split module of the OpenCV library.
[0074] The pixel values of the three channels are transformed based on formula (1).
[0075] Image_new=max(0,R-max(G,B))(1)
[0076] Where R represents the pixel value of the red channel of the bone / filler image, G represents the pixel value of the green channel of the bone / filler image, B represents the pixel value of the blue channel of the bone / filler image, max(G,B) represents the larger value between the green and blue channels, R-max(G,B) calculates the difference between the red channel value and the larger value between the green and blue channels, max(0,R-max(G,B)) ensures that the calculation result is not negative. If the result of R-max(G,B) is less than 0, output 0; otherwise, output the result of R-max(G,B). Image_new represents the pixel value of the grayscale image of the bone / filler.
[0077] In an exemplary embodiment, binarizing the bone / filler grayscale image based on the maximum inter-class variance method includes:
[0078] Calculate the grayscale histogram of the image, which shows the number of pixels at each grayscale level. Find two distinct peaks in the histogram, typically corresponding to the grayscale distribution of the bone / filler and background regions. There will be a local minimum between these two peaks; this minimum can be used as a threshold. This threshold is used to segment the image into two parts: the portion above the threshold is considered bone / filler, and the portion below the threshold is considered background. Use an erosion operation to remove small noise points in the image. Select a suitable structuring element (such as a 3x3 or 5x5 square structuring element) to erode the binarized image, removing or reducing isolated small regions. Next, use a dilation operation to restore the size of the bone / filler region and fill in the small holes created by the erosion operation. Dilation also requires selecting a suitable structuring element (such as a 3x3 or 5x5 square structuring element). Based on the histogram of the bone / filler grayscale image, find the minimum value between the two peaks of bone / filler and background as a threshold to separate the image into bone / filler and background parts.
[0079] Use erosion to reduce noise points, then use expansion to fill small cavities inside the bone / filler. Use opening operations, eroding first and then expanding to remove small noise points and smooth bone / filler boundaries. Use closing operations, expanding first and then eroding to fill small cavities inside the bone / filler.
[0080] In an exemplary embodiment, extracting each bone / filler from the binarized image based on a connected component algorithm includes:
[0081] By labeling the connected components of the bone / filler grayscale image, a unique label is assigned to each connected region, and the area, perimeter, inscribed circle radius, and major and minor axis sizes of the circumscribed ellipse of each connected region are obtained.
[0082] The intelligent detection system for bone / filler gradation under non-uniform illumination conditions provided by the present invention will be described below. The intelligent detection system for bone / filler gradation under non-uniform illumination conditions described below can be referred to in correspondence with the intelligent detection method for bone / filler gradation under non-uniform illumination conditions described above.
[0083] Figure 4 This is a schematic diagram of the intelligent detection system provided in an embodiment of the present invention.
[0084] like Figure 4 As shown, the intelligent detection system for bone / filler gradation under non-uniform illumination conditions provided in this embodiment includes:
[0085] Acquisition module 301 is used to acquire bone / filler images against a red background;
[0086] The first determining module 302 is used to subtract the larger value between the blue and green channels at the corresponding position from each pixel value of the red channel to obtain the pixel value of the bone / filler grayscale image;
[0087] The second determining module 303 is used to binarize the bone / filler grayscale image using the maximum inter-class variance method, and to determine the bone / filler grayscale image with the bone / filler shadow removed.
[0088] The third determining module 304 is used to extract each bone / filler in the binarized image based on the connected component algorithm, and determine the area, perimeter, inscribed circle radius, and major and minor axis sizes of the circumscribed ellipse of each bone / filler.
[0089] The fourth determination module 305, based on a pre-built neural network model, determines the particle size of each bone / filler and completes intelligent detection of bone / filler gradation.
[0090] The specific implementation method of the intelligent detection system for bone / filler gradation under non-uniform illumination conditions provided in this embodiment can be implemented with reference to the above embodiment, and will not be repeated here.
[0091] Figure 5 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other via the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a smart detection method for bone / filler gradation under non-uniform illumination conditions, the method including:
[0092] Acquire bone / filler images against a red background;
[0093] The pixel values of the bone / filler grayscale image are determined by subtracting the larger value from the blue and green channels at the corresponding position from each pixel value of the red channel of the bone / filler image.
[0094] The grayscale image of bone / filler is binarized based on the maximum inter-class variance method to determine the binarized image with the bone / filler shadow removed.
[0095] Based on the connected component algorithm, each bone / filler in the binarized image is isolated, and the area, perimeter, inscribed circle radius, and major and minor axis sizes of the circumscribed ellipse of each bone / filler are determined.
[0096] Based on the area, perimeter, inscribed circle radius, and major and minor axis sizes of the circumscribed ellipse of each bone / filler, a pre-built neural network model is input to determine the particle size of each bone / filler and complete the bone / filler gradation detection.
[0097] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0098] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to perform the intelligent detection method for bone / filler gradation under non-uniform illumination conditions provided by the above methods, the method comprising:
[0099] Acquire bone / filler images against a red background;
[0100] The pixel values of the bone / filler grayscale image are determined by subtracting the larger value from the blue and green channels at the corresponding position from each pixel value of the red channel of the bone / filler image.
[0101] The grayscale image of bone / filler is binarized based on the maximum inter-class variance method to determine the binarized image with the bone / filler shadow removed.
[0102] Based on the connected component algorithm, each bone / filler in the binarized image is isolated, and the area, perimeter, inscribed circle radius, and major and minor axis sizes of the circumscribed ellipse of each bone / filler are determined.
[0103] Based on the area, perimeter, inscribed circle radius, and major and minor axis sizes of the circumscribed ellipse of each bone / filler, a pre-built neural network model is used to determine the particle size of each bone / filler, thus completing the bone / filler gradation detection.
[0104] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the intelligent detection method for bone / filler gradation under non-uniform illumination conditions provided by the methods described above, the method comprising:
[0105] Acquire bone / filler images against a red background;
[0106] The pixel values of the bone / filler grayscale image are determined by subtracting the larger value from the blue and green channels at the corresponding position from each pixel value of the red channel of the bone / filler image.
[0107] The grayscale image of bone / filler is binarized based on the maximum inter-class variance method to determine the binarized image with the bone / filler shadow removed.
[0108] Based on the connected component algorithm, each bone / filler in the binarized image is isolated, and the area, perimeter, inscribed circle radius, and major and minor axis sizes of the circumscribed ellipse of each bone / filler are determined.
[0109] Based on the area, perimeter, inscribed circle radius, and major and minor axis sizes of the circumscribed ellipse of each bone / filler, a pre-built neural network model is used to determine the particle size of each bone / filler, thus completing the bone / filler gradation detection.
[0110] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0111] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.
[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for intelligent detection of bone / filler gradation under non-uniform lighting conditions, characterized in that, The method comprises the following steps: Collecting a bone / filler image under a red background; Determining the pixel value of the bone / filler grayscale image based on the difference between each pixel value of the red channel of the bone / filler image and the larger value of the blue channel and the green channel; Binarizing the bone / filler grayscale image based on the maximum inter-class variance method to determine a binary image that eliminates bone / filler shadows; Extracting each bone / filler in the binary image based on the connected domain algorithm to determine the area, perimeter, inscribed circle radius, and major and minor axis sizes of the circumscribed ellipse of each bone / filler; Inputting the area, perimeter, inscribed circle radius, and major and minor axis sizes of the circumscribed ellipse of each bone / filler into a pre-constructed neural network model to determine the particle size of each bone / filler and complete the bone / filler gradation detection; Respectively extracting the red channel pixel value, blue channel pixel value, and green channel pixel value of the bone / filler image under the red background; Transforming the red channel pixel value, blue channel pixel value, and green channel pixel value of the bone / filler image under the red background based on formula (1): Image_new=max(0,R-max(G,B)) (1) Wherein R represents the pixel value of the red channel of the bone / filler image, G represents the pixel value of the green channel of the bone / filler image, B represents the pixel value of the blue channel of the bone / filler image, max(G,B) represents the larger value of the green and blue channels, R-max(G,B) represents the difference between the value of the red channel and the larger value of the green and blue channels, max(0,R-max(G,B)) ensures that the calculation result will not appear negative, if the result of R-max(G,B) is less than 0, output 0, otherwise output the result of R-max(G,B), Image_new represents the pixel value of the bone / filler grayscale image; The binarization of the bone / filler grayscale image based on the maximum inter-class variance method to determine the binary image that eliminates bone / filler shadows comprises: Finding the minimum value between the two peaks of bone / filler and background based on the histogram of the bone / filler grayscale image as a threshold, and dividing the image into bone / filler and background based on the threshold to separate the bone / filler and background; Using the erosion operation to reduce noise points, and then using the dilation operation to fill small holes in the bone / filler, using the opening operation, first eroding and then dilating to remove small noise and smooth the boundary of the bone / filler, using the closing operation, first dilating and then eroding to fill small holes in the bone / filler, to obtain the binary image that eliminates bone / filler shadows; The neural network model is trained in the following way: Constructing a neural network model dataset with different bone / filler area, perimeter, inscribed circle radius, and major and minor axis sizes of the circumscribed ellipse as input parameters and particle size as output parameter; Training the neural network model dataset to obtain the neural network model.
2. The method for intelligent detection of bone / filler gradation under non-uniform illumination conditions according to claim 1, characterized in that, The determination of the particle size of each bone / filler and the completion of the bone / filler gradation detection comprise: Generating the gradation curve of the current bone / filler based on the particle size of each bone / filler output by the neural network model.
3. The method for intelligent detection of bone / filler gradation under non-uniform illumination conditions according to claim 1, wherein, The connected domain algorithm is used to extract each bone / filler in the binary image, and the area, perimeter, inscribed circle radius, and long axis and short axis size of the circumscribed ellipse of each bone / filler are determined, including: The connected domain algorithm is used to extract each bone / filler in the binary image, and the area, perimeter, inscribed circle radius, and long axis and short axis size of the circumscribed ellipse of each bone / filler are determined, including:
4. A bone / filler grading smart detection system under non-uniform lighting conditions for performing the method of any one of claims 1 to 3, characterized in that, The connected domain algorithm is used to extract each bone / filler in the binary image, and the area, perimeter, inscribed circle radius, and long axis and short axis size of the circumscribed ellipse of each bone / filler are determined, including: The acquisition module is configured to acquire the bone / filler image under a red background; The first determination module is configured to subtract the larger value in the blue channel and the green channel from each pixel value of the red channel to obtain the pixel value of the bone / filler grayscale image; The second determination module is configured to binarize the bone / filler grayscale image using the maximum inter-class variance method to determine the bone / filler grayscale image with the bone / filler shadow removed; The third determination module is configured to extract each bone / filler in the binary image based on the connected domain algorithm, and determine the area, perimeter, inscribed circle radius, and long axis and short axis size of the circumscribed ellipse of each bone / filler; The fourth determination module is configured to determine the particle size of each bone / filler based on a pre-constructed neural network model to complete intelligent detection of the bone / filler gradation.
5. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the bone / filler gradation intelligent detection method under non-uniform illumination conditions according to any one of claims 1 to 3.
Citation Information
Patent Citations
Water meter recognition method based on dynamic image processing
CN107220645A
Intelligent detection method, system and equipment for gradation of aggregates with different depths of field in stock bin
CN117495843A